| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index b70a60432aa680926d0540475e1bafd80169a597..170f53348bf2e4ea51733ae2a9f5ada3a4bd0ee0 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -48,8 +48,8 @@ void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { edx, ecx };
|
| descriptor->register_param_count_ = 2;
|
| - descriptor->stack_parameter_count_ = NULL;
|
| descriptor->register_params_ = registers;
|
| + descriptor->stack_parameter_count_ = NULL;
|
| descriptor->deoptimization_handler_ =
|
| FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure);
|
| }
|
| @@ -68,6 +68,10 @@ void TransitionElementsKindStub::InitializeInterfaceDescriptor(
|
|
|
| static void InitializeArrayConstructorDescriptor(Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| + // register state
|
| + // edi -- constructor function
|
| + // ebx -- type info cell with elements kind
|
| + // eax -- number of arguments to the constructor function
|
| static Register registers[] = { edi, ebx };
|
| descriptor->register_param_count_ = 2;
|
| // stack param count needs (constructor pointer, and single argument)
|
| @@ -4851,9 +4855,9 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
| // A monomorphic cache hit or an already megamorphic state: invoke the
|
| // function without changing the state.
|
| __ cmp(ecx, edi);
|
| - __ j(equal, &done, Label::kFar);
|
| + __ j(equal, &done);
|
| __ cmp(ecx, Immediate(TypeFeedbackCells::MegamorphicSentinel(isolate)));
|
| - __ j(equal, &done, Label::kFar);
|
| + __ j(equal, &done);
|
|
|
| // Special handling of the Array() function, which caches not only the
|
| // monomorphic Array function but the initial ElementsKind with special
|
| @@ -4861,26 +4865,21 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
| Handle<Object> terminal_kind_sentinel =
|
| TypeFeedbackCells::MonomorphicArraySentinel(LAST_FAST_ELEMENTS_KIND);
|
| __ cmp(ecx, Immediate(terminal_kind_sentinel));
|
| - __ j(above, &miss, Label::kFar);
|
| + __ j(above, &miss);
|
| // Load the global or builtins object from the current context
|
| - __ mov(ecx, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalContextOffset));
|
| + __ LoadGlobalContext(ecx);
|
| // Make sure the function is the Array() function
|
| __ cmp(edi, Operand(ecx,
|
| Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
|
| - Label megamorphic_pre;
|
| - __ j(not_equal, &megamorphic_pre, Label::kFar);
|
| + __ j(not_equal, &megamorphic);
|
| __ jmp(&done);
|
|
|
| - __ bind(&megamorphic_pre);
|
| - __ jmp(&megamorphic, Label::kFar);
|
| -
|
| __ bind(&miss);
|
|
|
| // A monomorphic miss (i.e, here the cache is not uninitialized) goes
|
| // megamorphic.
|
| __ cmp(ecx, Immediate(TypeFeedbackCells::UninitializedSentinel(isolate)));
|
| - __ j(equal, &initialize, Label::kFar);
|
| + __ j(equal, &initialize);
|
| // MegamorphicSentinel is an immortal immovable object (undefined) so no
|
| // write-barrier is needed.
|
| __ bind(&megamorphic);
|
| @@ -4891,8 +4890,7 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
|
| // An uninitialized cache is patched with the function or sentinel to
|
| // indicate the ElementsKind if function is the Array constructor.
|
| __ bind(&initialize);
|
| - __ mov(ecx, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalContextOffset));
|
| + __ LoadGlobalContext(ecx);
|
| // Make sure the function is the Array() function
|
| __ cmp(edi, Operand(ecx,
|
| Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
|
|
|