| Index: src/scopeinfo.cc
|
| ===================================================================
|
| --- src/scopeinfo.cc (revision 11348)
|
| +++ src/scopeinfo.cc (working copy)
|
| @@ -53,7 +53,7 @@
|
| 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 @@
|
| // 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 @@
|
| 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;
|
| }
|
|
|
|
|