diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-02-16 08:38:33 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-02-16 10:38:49 -0800 |
commit | 550f73ae3e3b29aa36e793e8ffc5cd23478df099 (patch) | |
tree | 3f4d8f9d7648169df967a820406923a9c4321cba /deps/v8/src/builtins.cc | |
parent | 3ef6433255cfeabdeb70bbfa51ac32a287c5d243 (diff) | |
download | node-new-550f73ae3e3b29aa36e793e8ffc5cd23478df099.tar.gz |
Upgrade V8 to 3.1.5
Diffstat (limited to 'deps/v8/src/builtins.cc')
-rw-r--r-- | deps/v8/src/builtins.cc | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/deps/v8/src/builtins.cc b/deps/v8/src/builtins.cc index d604226d75..8fdc1b1382 100644 --- a/deps/v8/src/builtins.cc +++ b/deps/v8/src/builtins.cc @@ -368,7 +368,9 @@ static bool ArrayPrototypeHasNoElements(Context* global_context, array_proto = JSObject::cast(array_proto->GetPrototype()); ASSERT(array_proto->elements() == Heap::empty_fixed_array()); // Object.prototype - array_proto = JSObject::cast(array_proto->GetPrototype()); + Object* proto = array_proto->GetPrototype(); + if (proto == Heap::null_value()) return false; + array_proto = JSObject::cast(proto); if (array_proto != global_context->initial_object_prototype()) return false; if (array_proto->elements() != Heap::empty_fixed_array()) return false; ASSERT(array_proto->GetPrototype()->IsNull()); @@ -1305,6 +1307,11 @@ static void Generate_StoreIC_Initialize(MacroAssembler* masm) { } +static void Generate_StoreIC_Initialize_Strict(MacroAssembler* masm) { + StoreIC::GenerateInitialize(masm); +} + + static void Generate_StoreIC_Miss(MacroAssembler* masm) { StoreIC::GenerateMiss(masm); } @@ -1315,8 +1322,18 @@ static void Generate_StoreIC_Normal(MacroAssembler* masm) { } +static void Generate_StoreIC_Normal_Strict(MacroAssembler* masm) { + StoreIC::GenerateNormal(masm); +} + + static void Generate_StoreIC_Megamorphic(MacroAssembler* masm) { - StoreIC::GenerateMegamorphic(masm); + StoreIC::GenerateMegamorphic(masm, StoreIC::kStoreICNonStrict); +} + + +static void Generate_StoreIC_Megamorphic_Strict(MacroAssembler* masm) { + StoreIC::GenerateMegamorphic(masm, StoreIC::kStoreICStrict); } @@ -1325,11 +1342,21 @@ static void Generate_StoreIC_ArrayLength(MacroAssembler* masm) { } +static void Generate_StoreIC_ArrayLength_Strict(MacroAssembler* masm) { + StoreIC::GenerateArrayLength(masm); +} + + static void Generate_StoreIC_GlobalProxy(MacroAssembler* masm) { StoreIC::GenerateGlobalProxy(masm); } +static void Generate_StoreIC_GlobalProxy_Strict(MacroAssembler* masm) { + StoreIC::GenerateGlobalProxy(masm); +} + + static void Generate_KeyedStoreIC_Generic(MacroAssembler* masm) { KeyedStoreIC::GenerateGeneric(masm); } @@ -1442,13 +1469,13 @@ void Builtins::Setup(bool create_heap_objects) { extra_args \ }, -#define DEF_FUNCTION_PTR_A(name, kind, state) \ - { FUNCTION_ADDR(Generate_##name), \ - NULL, \ - #name, \ - name, \ - Code::ComputeFlags(Code::kind, NOT_IN_LOOP, state), \ - NO_EXTRA_ARGUMENTS \ +#define DEF_FUNCTION_PTR_A(name, kind, state, extra) \ + { FUNCTION_ADDR(Generate_##name), \ + NULL, \ + #name, \ + name, \ + Code::ComputeFlags(Code::kind, NOT_IN_LOOP, state, extra), \ + NO_EXTRA_ARGUMENTS \ }, // Define array of pointers to generators and C builtin functions. |