diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-12-17 09:29:19 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-12-17 09:47:55 -0800 |
commit | 7d425a0a160e65b357ed1ad8b35dc01855b5f479 (patch) | |
tree | 5d1c940b27eeea7bbe420361e667ad7304b84a33 /deps/v8/src/bootstrapper.cc | |
parent | 9eaf2329e7d1e7c2de20ab7e4461bf55b18595c2 (diff) | |
download | node-7d425a0a160e65b357ed1ad8b35dc01855b5f479.tar.gz |
Upgrade V8 to 3.0.3
Diffstat (limited to 'deps/v8/src/bootstrapper.cc')
-rw-r--r-- | deps/v8/src/bootstrapper.cc | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/deps/v8/src/bootstrapper.cc b/deps/v8/src/bootstrapper.cc index 800c4376c..cae1a9a28 100644 --- a/deps/v8/src/bootstrapper.cc +++ b/deps/v8/src/bootstrapper.cc @@ -38,7 +38,6 @@ #include "natives.h" #include "objects-visiting.h" #include "snapshot.h" -#include "stub-cache.h" #include "extensions/externalize-string-extension.h" #include "extensions/gc-extension.h" @@ -234,7 +233,7 @@ class Genesis BASE_EMBEDDED { // Used for creating a context from scratch. void InstallNativeFunctions(); bool InstallNatives(); - void InstallCustomCallGenerators(); + void InstallBuiltinFunctionIds(); void InstallJSFunctionResultCaches(); void InitializeNormalizedMapCaches(); // Used both for deserialized and from-scratch contexts to add the extensions @@ -1270,7 +1269,7 @@ bool Genesis::InstallNatives() { global_context()->set_string_function_prototype_map( HeapObject::cast(string_function->initial_map()->prototype())->map()); - InstallCustomCallGenerators(); + InstallBuiltinFunctionIds(); // Install Function.prototype.call and apply. { Handle<String> key = Factory::function_class_symbol(); @@ -1369,7 +1368,7 @@ bool Genesis::InstallNatives() { } -static Handle<JSObject> ResolveCustomCallGeneratorHolder( +static Handle<JSObject> ResolveBuiltinIdHolder( Handle<Context> global_context, const char* holder_expr) { Handle<GlobalObject> global(global_context->global()); @@ -1387,9 +1386,9 @@ static Handle<JSObject> ResolveCustomCallGeneratorHolder( } -static void InstallCustomCallGenerator(Handle<JSObject> holder, - const char* function_name, - int id) { +static void InstallBuiltinFunctionId(Handle<JSObject> holder, + const char* function_name, + BuiltinFunctionId id) { Handle<String> name = Factory::LookupAsciiSymbol(function_name); Object* function_object = holder->GetProperty(*name)->ToObjectUnchecked(); Handle<JSFunction> function(JSFunction::cast(function_object)); @@ -1397,17 +1396,17 @@ static void InstallCustomCallGenerator(Handle<JSObject> holder, } -void Genesis::InstallCustomCallGenerators() { +void Genesis::InstallBuiltinFunctionIds() { HandleScope scope; -#define INSTALL_CALL_GENERATOR(holder_expr, fun_name, name) \ - { \ - Handle<JSObject> holder = ResolveCustomCallGeneratorHolder( \ - global_context(), #holder_expr); \ - const int id = CallStubCompiler::k##name##CallGenerator; \ - InstallCustomCallGenerator(holder, #fun_name, id); \ +#define INSTALL_BUILTIN_ID(holder_expr, fun_name, name) \ + { \ + Handle<JSObject> holder = ResolveBuiltinIdHolder( \ + global_context(), #holder_expr); \ + BuiltinFunctionId id = k##name; \ + InstallBuiltinFunctionId(holder, #fun_name, id); \ } - CUSTOM_CALL_IC_GENERATORS(INSTALL_CALL_GENERATOR) -#undef INSTALL_CALL_GENERATOR + FUNCTIONS_WITH_ID_LIST(INSTALL_BUILTIN_ID) +#undef INSTALL_BUILTIN_ID } |