aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/contexts.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-11-02 16:58:08 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2011-11-02 16:58:35 +0100
commitedea4122b1c725a9f7873c02fe04100995472ddc (patch)
tree3334347495150cfd3a68909489689c112457ae07 /deps/v8/src/contexts.cc
parentcc9223406837e7610b5f36b16b6a0e51861370cb (diff)
downloadandroid-node-v8-edea4122b1c725a9f7873c02fe04100995472ddc.tar.gz
android-node-v8-edea4122b1c725a9f7873c02fe04100995472ddc.tar.bz2
android-node-v8-edea4122b1c725a9f7873c02fe04100995472ddc.zip
Revert "Upgrade V8 to 3.7.1"
This reverts commit 92f5a5d3caf01f382f90c235e9057590a5e76870. V8 3.7.1 in debug mode on ia32 has a curious race-like bug where an fs.Stats object is not fully formed until some time after it's created. This is easy to demonstrate by running `make test-debug`. V8 3.7.0 does not exhibit this behaviour so back we go. Fixes #1981.
Diffstat (limited to 'deps/v8/src/contexts.cc')
-rw-r--r--deps/v8/src/contexts.cc29
1 files changed, 13 insertions, 16 deletions
diff --git a/deps/v8/src/contexts.cc b/deps/v8/src/contexts.cc
index b25ffac931..0cda430492 100644
--- a/deps/v8/src/contexts.cc
+++ b/deps/v8/src/contexts.cc
@@ -174,10 +174,6 @@ Handle<Object> Context::Lookup(Handle<String> name,
*attributes = READ_ONLY;
*binding_flags = IMMUTABLE_CHECK_INITIALIZED;
break;
- case CONST_HARMONY:
- *attributes = READ_ONLY;
- *binding_flags = IMMUTABLE_CHECK_INITIALIZED_HARMONY;
- break;
case DYNAMIC:
case DYNAMIC_GLOBAL:
case DYNAMIC_LOCAL:
@@ -191,8 +187,7 @@ Handle<Object> Context::Lookup(Handle<String> name,
// Check the slot corresponding to the intermediate context holding
// only the function name variable.
if (follow_context_chain && context->IsFunctionContext()) {
- VariableMode mode;
- int function_index = scope_info->FunctionContextSlotIndex(*name, &mode);
+ int function_index = scope_info->FunctionContextSlotIndex(*name);
if (function_index >= 0) {
if (FLAG_trace_contexts) {
PrintF("=> found intermediate function in context slot %d\n",
@@ -200,9 +195,7 @@ Handle<Object> Context::Lookup(Handle<String> name,
}
*index = function_index;
*attributes = READ_ONLY;
- ASSERT(mode == CONST || mode == CONST_HARMONY);
- *binding_flags = (mode == CONST)
- ? IMMUTABLE_IS_INITIALIZED : IMMUTABLE_IS_INITIALIZED_HARMONY;
+ *binding_flags = IMMUTABLE_IS_INITIALIZED;
return context;
}
}
@@ -262,7 +255,7 @@ bool Context::GlobalIfNotShadowedByEval(Handle<String> name) {
if (param_index >= 0) return false;
// Check context only holding the function name variable.
- index = scope_info->FunctionContextSlotIndex(*name, NULL);
+ index = scope_info->FunctionContextSlotIndex(*name);
if (index >= 0) return false;
context = context->previous();
}
@@ -273,7 +266,8 @@ bool Context::GlobalIfNotShadowedByEval(Handle<String> name) {
}
-void Context::ComputeEvalScopeInfo(bool* outer_scope_calls_non_strict_eval) {
+void Context::ComputeEvalScopeInfo(bool* outer_scope_calls_eval,
+ bool* outer_scope_calls_non_strict_eval) {
// Skip up the context chain checking all the function contexts to see
// whether they call eval.
Context* context = this;
@@ -281,11 +275,14 @@ void Context::ComputeEvalScopeInfo(bool* outer_scope_calls_non_strict_eval) {
if (context->IsFunctionContext()) {
Handle<SerializedScopeInfo> scope_info(
context->closure()->shared()->scope_info());
- if (scope_info->CallsEval() && !scope_info->IsStrictMode()) {
- // No need to go further since the answers will not change from
- // here.
- *outer_scope_calls_non_strict_eval = true;
- return;
+ if (scope_info->CallsEval()) {
+ *outer_scope_calls_eval = true;
+ if (!scope_info->IsStrictMode()) {
+ // No need to go further since the answers will not change from
+ // here.
+ *outer_scope_calls_non_strict_eval = true;
+ return;
+ }
}
}
context = context->previous();