summaryrefslogtreecommitdiff
path: root/deps/v8/src/scopeinfo.cc
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-05-15 19:53:16 -0700
committerisaacs <i@izs.me>2012-05-16 14:22:33 -0700
commit3f3f958c14cf4e963a73d6f037ac381c77fe78bb (patch)
tree391e35b59e76d038534fbd375f1bbe0dc55076cf /deps/v8/src/scopeinfo.cc
parent4099d1eebae4e78864a6879c0b9e08f31d48d8cb (diff)
downloadnode-new-3f3f958c14cf4e963a73d6f037ac381c77fe78bb.tar.gz
Upgrade V8 to 3.11.1
Diffstat (limited to 'deps/v8/src/scopeinfo.cc')
-rw-r--r--deps/v8/src/scopeinfo.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/deps/v8/src/scopeinfo.cc b/deps/v8/src/scopeinfo.cc
index 0f36234701..f50af304a2 100644
--- a/deps/v8/src/scopeinfo.cc
+++ b/deps/v8/src/scopeinfo.cc
@@ -53,7 +53,7 @@ Handle<ScopeInfo> ScopeInfo::Create(Scope* scope) {
FunctionVariableInfo function_name_info;
VariableMode function_variable_mode;
if (scope->is_function_scope() && scope->function() != NULL) {
- Variable* var = scope->function()->var();
+ Variable* var = scope->function()->proxy()->var();
if (!var->is_used()) {
function_name_info = UNUSED;
} else if (var->IsContextSlot()) {
@@ -129,8 +129,8 @@ Handle<ScopeInfo> ScopeInfo::Create(Scope* scope) {
// If present, add the function variable name and its index.
ASSERT(index == scope_info->FunctionNameEntryIndex());
if (has_function_name) {
- int var_index = scope->function()->var()->index();
- scope_info->set(index++, *scope->function()->name());
+ int var_index = scope->function()->proxy()->var()->index();
+ scope_info->set(index++, *scope->function()->proxy()->name());
scope_info->set(index++, Smi::FromInt(var_index));
ASSERT(function_name_info != STACK ||
(var_index == scope_info->StackLocalCount() &&
@@ -142,7 +142,9 @@ Handle<ScopeInfo> ScopeInfo::Create(Scope* scope) {
ASSERT(index == scope_info->length());
ASSERT(scope->num_parameters() == scope_info->ParameterCount());
ASSERT(scope->num_stack_slots() == scope_info->StackSlotCount());
- ASSERT(scope->num_heap_slots() == scope_info->ContextLength());
+ ASSERT(scope->num_heap_slots() == scope_info->ContextLength() ||
+ (scope->num_heap_slots() == kVariablePartIndex &&
+ scope_info->ContextLength() == 0));
return scope_info;
}