diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2009-10-07 11:53:03 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2009-10-07 11:53:45 +0200 |
commit | 1f31a7dbfe792fa6eee8a9cdcdfd662aad5cde06 (patch) | |
tree | c83b724056517e4bf71f203b74ad1d832d0ca7f0 /deps/v8/src/handles.cc | |
parent | 1a2762b78e496dac4cc9fd0fb4ffb1d4f036692b (diff) | |
download | node-new-1f31a7dbfe792fa6eee8a9cdcdfd662aad5cde06.tar.gz |
Upgrade v8 to 1.3.14
Diffstat (limited to 'deps/v8/src/handles.cc')
-rw-r--r-- | deps/v8/src/handles.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/deps/v8/src/handles.cc b/deps/v8/src/handles.cc index 931e3b9bf0..b43ec53207 100644 --- a/deps/v8/src/handles.cc +++ b/deps/v8/src/handles.cc @@ -29,6 +29,7 @@ #include "accessors.h" #include "api.h" +#include "arguments.h" #include "bootstrapper.h" #include "compiler.h" #include "debug.h" @@ -46,10 +47,10 @@ v8::ImplementationUtilities::HandleScopeData HandleScope::current_ = int HandleScope::NumberOfHandles() { - int n = HandleScopeImplementer::instance()->Blocks()->length(); + int n = HandleScopeImplementer::instance()->blocks()->length(); if (n == 0) return 0; return ((n - 1) * kHandleBlockSize) + - (current_.next - HandleScopeImplementer::instance()->Blocks()->last()); + (current_.next - HandleScopeImplementer::instance()->blocks()->last()); } @@ -67,8 +68,8 @@ Object** HandleScope::Extend() { HandleScopeImplementer* impl = HandleScopeImplementer::instance(); // If there's more room in the last block, we use that. This is used // for fast creation of scopes after scope barriers. - if (!impl->Blocks()->is_empty()) { - Object** limit = &impl->Blocks()->last()[kHandleBlockSize]; + if (!impl->blocks()->is_empty()) { + Object** limit = &impl->blocks()->last()[kHandleBlockSize]; if (current_.limit != limit) { current_.limit = limit; } @@ -81,7 +82,7 @@ Object** HandleScope::Extend() { result = impl->GetSpareOrNewBlock(); // Add the extension to the global list of blocks, but count the // extension as part of the current scope. - impl->Blocks()->Add(result); + impl->blocks()->Add(result); current_.extensions++; current_.limit = &result[kHandleBlockSize]; } @@ -479,15 +480,17 @@ int GetScriptLineNumber(Handle<Script> script, int code_pos) { } +void CustomArguments::IterateInstance(ObjectVisitor* v) { + v->VisitPointers(values_, values_ + 4); +} + + // Compute the property keys from the interceptor. v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, Handle<JSObject> object) { Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor()); - Handle<Object> data(interceptor->data()); - v8::AccessorInfo info( - v8::Utils::ToLocal(receiver), - v8::Utils::ToLocal(data), - v8::Utils::ToLocal(object)); + CustomArguments args(interceptor->data(), *receiver, *object); + v8::AccessorInfo info(args.end()); v8::Handle<v8::Array> result; if (!interceptor->enumerator()->IsUndefined()) { v8::NamedPropertyEnumerator enum_fun = @@ -507,11 +510,8 @@ v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, Handle<JSObject> object) { Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor()); - Handle<Object> data(interceptor->data()); - v8::AccessorInfo info( - v8::Utils::ToLocal(receiver), - v8::Utils::ToLocal(data), - v8::Utils::ToLocal(object)); + CustomArguments args(interceptor->data(), *receiver, *object); + v8::AccessorInfo info(args.end()); v8::Handle<v8::Array> result; if (!interceptor->enumerator()->IsUndefined()) { v8::IndexedPropertyEnumerator enum_fun = |