Index: src/contexts.cc |
=================================================================== |
--- src/contexts.cc (revision 5059) |
+++ src/contexts.cc (working copy) |
@@ -120,9 +120,10 @@ |
// we have context-local slots |
// check non-parameter locals in context |
- Handle<Object> scope_info(context->closure()->shared()->scope_info()); |
+ Handle<SerializedScopeInfo> scope_info( |
+ context->closure()->shared()->scope_info()); |
Variable::Mode mode; |
- int index = ScopeInfo<>::ContextSlotIndex(*scope_info, *name, &mode); |
+ int index = scope_info->ContextSlotIndex(*name, &mode); |
ASSERT(index < 0 || index >= MIN_CONTEXT_SLOTS); |
if (index >= 0) { |
// slot found |
@@ -150,13 +151,11 @@ |
} |
// check parameter locals in context |
- int param_index = ScopeInfo<>::ParameterIndex(*scope_info, *name); |
+ int param_index = scope_info->ParameterIndex(*name); |
if (param_index >= 0) { |
// slot found. |
int index = |
- ScopeInfo<>::ContextSlotIndex(*scope_info, |
- Heap::arguments_shadow_symbol(), |
- NULL); |
+ scope_info->ContextSlotIndex(Heap::arguments_shadow_symbol(), NULL); |
ASSERT(index >= 0); // arguments must exist and be in the heap context |
Handle<JSObject> arguments(JSObject::cast(context->get(index))); |
ASSERT(arguments->HasLocalProperty(Heap::length_symbol())); |
@@ -170,7 +169,7 @@ |
// check intermediate context (holding only the function name variable) |
if (follow_context_chain) { |
- int index = ScopeInfo<>::FunctionContextSlotIndex(*scope_info, *name); |
+ int index = scope_info->FunctionContextSlotIndex(*name); |
if (index >= 0) { |
// slot found |
if (FLAG_trace_contexts) { |
@@ -216,18 +215,19 @@ |
ASSERT(context->is_function_context()); |
// Check non-parameter locals. |
- Handle<Object> scope_info(context->closure()->shared()->scope_info()); |
+ Handle<SerializedScopeInfo> scope_info( |
+ context->closure()->shared()->scope_info()); |
Variable::Mode mode; |
- int index = ScopeInfo<>::ContextSlotIndex(*scope_info, *name, &mode); |
+ int index = scope_info->ContextSlotIndex(*name, &mode); |
ASSERT(index < 0 || index >= MIN_CONTEXT_SLOTS); |
if (index >= 0) return false; |
// Check parameter locals. |
- int param_index = ScopeInfo<>::ParameterIndex(*scope_info, *name); |
+ int param_index = scope_info->ParameterIndex(*name); |
if (param_index >= 0) return false; |
// Check context only holding the function name variable. |
- index = ScopeInfo<>::FunctionContextSlotIndex(*scope_info, *name); |
+ index = scope_info->FunctionContextSlotIndex(*name); |
if (index >= 0) return false; |
context = Context::cast(context->closure()->context()); |
} |