diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-04-29 22:35:21 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-04-29 22:35:21 +0200 |
commit | 2f75785c015fecc33565fe5ee3a483b0d4e5cc6d (patch) | |
tree | ad66b4eaba8cedfeb7cfb40b0871307ae08d25e8 /deps/v8/src/ia32/builtins-ia32.cc | |
parent | 5ddf7f4200894a7304d7c07bbbd8773fac3509d1 (diff) | |
download | node-new-2f75785c015fecc33565fe5ee3a483b0d4e5cc6d.tar.gz |
deps: upgrade v8 to 3.18.4
Diffstat (limited to 'deps/v8/src/ia32/builtins-ia32.cc')
-rw-r--r-- | deps/v8/src/ia32/builtins-ia32.cc | 60 |
1 files changed, 14 insertions, 46 deletions
diff --git a/deps/v8/src/ia32/builtins-ia32.cc b/deps/v8/src/ia32/builtins-ia32.cc index 08bc22784e..c6e10f4b41 100644 --- a/deps/v8/src/ia32/builtins-ia32.cc +++ b/deps/v8/src/ia32/builtins-ia32.cc @@ -1207,9 +1207,9 @@ static void AllocateJSArray(MacroAssembler* masm, // that for a construct call the constructor function in edi needs to be // preserved for entering the generic code. In both cases argc in eax needs to // be preserved. -static void ArrayNativeCode(MacroAssembler* masm, - bool construct_call, - Label* call_generic_code) { +void ArrayNativeCode(MacroAssembler* masm, + bool construct_call, + Label* call_generic_code) { Label argc_one_or_more, argc_two_or_more, prepare_generic_code_call, empty_array, not_empty_array, finish, cant_transition_map, not_double; @@ -1494,7 +1494,7 @@ void Builtins::Generate_ArrayCode(MacroAssembler* masm) { } -void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { +void Builtins::Generate_CommonArrayConstructCode(MacroAssembler* masm) { // ----------- S t a t e ------------- // -- eax : argc // -- ebx : type info cell @@ -1513,50 +1513,18 @@ void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) { __ Assert(not_zero, "Unexpected initial map for Array function"); __ CmpObjectType(ecx, MAP_TYPE, ecx); __ Assert(equal, "Unexpected initial map for Array function"); - - if (FLAG_optimize_constructed_arrays) { - // We should either have undefined in ebx or a valid jsglobalpropertycell - Label okay_here; - Handle<Object> undefined_sentinel( - masm->isolate()->heap()->undefined_value(), masm->isolate()); - Handle<Map> global_property_cell_map( - masm->isolate()->heap()->global_property_cell_map()); - __ cmp(ebx, Immediate(undefined_sentinel)); - __ j(equal, &okay_here); - __ cmp(FieldOperand(ebx, 0), Immediate(global_property_cell_map)); - __ Assert(equal, "Expected property cell in register ebx"); - __ bind(&okay_here); - } } - if (FLAG_optimize_constructed_arrays) { - Label not_zero_case, not_one_case; - __ test(eax, eax); - __ j(not_zero, ¬_zero_case); - ArrayNoArgumentConstructorStub no_argument_stub; - __ TailCallStub(&no_argument_stub); - - __ bind(¬_zero_case); - __ cmp(eax, 1); - __ j(greater, ¬_one_case); - ArraySingleArgumentConstructorStub single_argument_stub; - __ TailCallStub(&single_argument_stub); - - __ bind(¬_one_case); - ArrayNArgumentsConstructorStub n_argument_stub; - __ TailCallStub(&n_argument_stub); - } else { - Label generic_constructor; - // Run the native code for the Array function called as constructor. - ArrayNativeCode(masm, true, &generic_constructor); - - // Jump to the generic construct code in case the specialized code cannot - // handle the construction. - __ bind(&generic_constructor); - Handle<Code> generic_construct_stub = - masm->isolate()->builtins()->JSConstructStubGeneric(); - __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); - } + Label generic_constructor; + // Run the native code for the Array function called as constructor. + ArrayNativeCode(masm, true, &generic_constructor); + + // Jump to the generic construct code in case the specialized code cannot + // handle the construction. + __ bind(&generic_constructor); + Handle<Code> generic_construct_stub = + masm->isolate()->builtins()->JSConstructStubGeneric(); + __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); } |