summaryrefslogtreecommitdiff
path: root/deps/v8/src/contexts.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-07-15 18:52:48 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-07-15 18:52:48 -0700
commitdcd41ca864749b130b943c1e41eb993388f7e9d8 (patch)
tree8decfc4a73177c24c530a5428b57dcd159cfcf83 /deps/v8/src/contexts.cc
parent078a48a97b5b2597443f867e904a4c7e7f061c42 (diff)
downloadnode-new-dcd41ca864749b130b943c1e41eb993388f7e9d8.tar.gz
Upgrade V8 to 2.3.0
Diffstat (limited to 'deps/v8/src/contexts.cc')
-rw-r--r--deps/v8/src/contexts.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/deps/v8/src/contexts.cc b/deps/v8/src/contexts.cc
index 1eab24c28e..723354fc84 100644
--- a/deps/v8/src/contexts.cc
+++ b/deps/v8/src/contexts.cc
@@ -120,9 +120,10 @@ Handle<Object> Context::Lookup(Handle<String> name, ContextLookupFlags flags,
// 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 @@ Handle<Object> Context::Lookup(Handle<String> name, ContextLookupFlags flags,
}
// 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 @@ Handle<Object> Context::Lookup(Handle<String> name, ContextLookupFlags flags,
// 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 @@ bool Context::GlobalIfNotShadowedByEval(Handle<String> name) {
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());
}