diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2012-01-03 11:46:53 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2012-01-03 11:46:53 -0800 |
commit | 557fc396b4f5c165de90fbf9eaecb4370b46c057 (patch) | |
tree | effdb5494f7e290a80de2f9ca45b5e4be264494d /deps/v8/src/ia32/builtins-ia32.cc | |
parent | c123ac05dc37311d3dfb37ed6f22baef58280379 (diff) | |
download | node-557fc396b4f5c165de90fbf9eaecb4370b46c057.tar.gz |
Upgrade V8 to 3.8.4
Diffstat (limited to 'deps/v8/src/ia32/builtins-ia32.cc')
-rw-r--r-- | deps/v8/src/ia32/builtins-ia32.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/deps/v8/src/ia32/builtins-ia32.cc b/deps/v8/src/ia32/builtins-ia32.cc index 28a9b0fad..3d274f2e6 100644 --- a/deps/v8/src/ia32/builtins-ia32.cc +++ b/deps/v8/src/ia32/builtins-ia32.cc @@ -1308,6 +1308,40 @@ static void ArrayNativeCode(MacroAssembler* masm, } +void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { + // ----------- S t a t e ------------- + // -- eax : argc + // -- esp[0] : return address + // -- esp[4] : last argument + // ----------------------------------- + Label generic_array_code; + + // Get the InternalArray function. + __ LoadGlobalFunction(Context::INTERNAL_ARRAY_FUNCTION_INDEX, edi); + + if (FLAG_debug_code) { + // Initial map for the builtin InternalArray function shoud be a map. + __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); + // Will both indicate a NULL and a Smi. + __ test(ebx, Immediate(kSmiTagMask)); + __ Assert(not_zero, "Unexpected initial map for InternalArray function"); + __ CmpObjectType(ebx, MAP_TYPE, ecx); + __ Assert(equal, "Unexpected initial map for InternalArray function"); + } + + // Run the native code for the InternalArray function called as a normal + // function. + ArrayNativeCode(masm, false, &generic_array_code); + + // Jump to the generic array code in case the specialized code cannot handle + // the construction. + __ bind(&generic_array_code); + Handle<Code> array_code = + masm->isolate()->builtins()->InternalArrayCodeGeneric(); + __ jmp(array_code, RelocInfo::CODE_TARGET); +} + + void Builtins::Generate_ArrayCode(MacroAssembler* masm) { // ----------- S t a t e ------------- // -- eax : argc |