| Index: src/x64/stub-cache-x64.cc
|
| diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
|
| index 6463a37f4329e32920028fba69afb190e274f275..f7836378e9b849d85c5c362ab5c885b38d9d82d0 100644
|
| --- a/src/x64/stub-cache-x64.cc
|
| +++ b/src/x64/stub-cache-x64.cc
|
| @@ -49,10 +49,12 @@ static void ProbeTable(Isolate* isolate,
|
| // The offset is scaled by 4, based on
|
| // kHeapObjectTagSize, which is two bits
|
| Register offset) {
|
| - // We need to scale up the pointer by 2 because the offset is scaled by less
|
| + // We need to scale up the pointer by 2 when the offset is scaled by less
|
| // than the pointer size.
|
| - ASSERT(kPointerSizeLog2 == kHeapObjectTagSize + 1);
|
| - ScaleFactor scale_factor = times_2;
|
| + ASSERT(kPointerSize == kInt64Size
|
| + ? kPointerSizeLog2 == kHeapObjectTagSize + 1
|
| + : kPointerSizeLog2 == kHeapObjectTagSize);
|
| + ScaleFactor scale_factor = kPointerSize == kInt64Size ? times_2 : times_1;
|
|
|
| ASSERT_EQ(3 * kPointerSize, sizeof(StubCache::Entry));
|
| // The offset register holds the entry offset times four (due to masking
|
| @@ -320,13 +322,13 @@ static void PushInterceptorArguments(MacroAssembler* masm,
|
| STATIC_ASSERT(StubCache::kInterceptorArgsThisIndex == 2);
|
| STATIC_ASSERT(StubCache::kInterceptorArgsHolderIndex == 3);
|
| STATIC_ASSERT(StubCache::kInterceptorArgsLength == 4);
|
| - __ push(name);
|
| + __ Push(name);
|
| Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
|
| ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor));
|
| __ Move(kScratchRegister, interceptor);
|
| - __ push(kScratchRegister);
|
| - __ push(receiver);
|
| - __ push(holder);
|
| + __ Push(kScratchRegister);
|
| + __ Push(receiver);
|
| + __ Push(holder);
|
| }
|
|
|
|
|
| @@ -357,13 +359,13 @@ void StubCompiler::GenerateFastApiCall(MacroAssembler* masm,
|
|
|
| __ PopReturnAddressTo(scratch_in);
|
| // receiver
|
| - __ push(receiver);
|
| + __ Push(receiver);
|
| // Write the arguments to stack frame.
|
| for (int i = 0; i < argc; i++) {
|
| Register arg = values[argc-1-i];
|
| ASSERT(!receiver.is(arg));
|
| ASSERT(!scratch_in.is(arg));
|
| - __ push(arg);
|
| + __ Push(arg);
|
| }
|
| __ PushReturnAddressFrom(scratch_in);
|
| // Stack now matches JSFunction abi.
|
| @@ -521,9 +523,9 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
|
| // The properties must be extended before we can store the value.
|
| // We jump to a runtime call that extends the properties array.
|
| __ PopReturnAddressTo(scratch1);
|
| - __ push(receiver_reg);
|
| + __ Push(receiver_reg);
|
| __ Push(transition);
|
| - __ push(value_reg);
|
| + __ Push(value_reg);
|
| __ PushReturnAddressFrom(scratch1);
|
| __ TailCallExternalReference(
|
| ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage),
|
| @@ -933,22 +935,22 @@ void LoadStubCompiler::GenerateLoadCallback(
|
| STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4);
|
| STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5);
|
| STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6);
|
| - __ push(receiver()); // receiver
|
| + __ Push(receiver()); // receiver
|
| if (heap()->InNewSpace(callback->data())) {
|
| ASSERT(!scratch2().is(reg));
|
| __ Move(scratch2(), callback);
|
| - __ push(FieldOperand(scratch2(),
|
| + __ Push(FieldOperand(scratch2(),
|
| ExecutableAccessorInfo::kDataOffset)); // data
|
| } else {
|
| __ Push(Handle<Object>(callback->data(), isolate()));
|
| }
|
| ASSERT(!kScratchRegister.is(reg));
|
| __ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex);
|
| - __ push(kScratchRegister); // return value
|
| - __ push(kScratchRegister); // return value default
|
| + __ Push(kScratchRegister); // return value
|
| + __ Push(kScratchRegister); // return value default
|
| __ PushAddress(ExternalReference::isolate_address(isolate()));
|
| - __ push(reg); // holder
|
| - __ push(name()); // name
|
| + __ Push(reg); // holder
|
| + __ Push(name()); // name
|
| // Save a pointer to where we pushed the arguments pointer. This will be
|
| // passed as the const PropertyAccessorInfo& to the C++ callback.
|
|
|
| @@ -1016,10 +1018,10 @@ void LoadStubCompiler::GenerateLoadInterceptor(
|
| FrameScope frame_scope(masm(), StackFrame::INTERNAL);
|
|
|
| if (must_preserve_receiver_reg) {
|
| - __ push(receiver());
|
| + __ Push(receiver());
|
| }
|
| - __ push(holder_reg);
|
| - __ push(this->name());
|
| + __ Push(holder_reg);
|
| + __ Push(this->name());
|
|
|
| // Invoke an interceptor. Note: map checks from receiver to
|
| // interceptor's holder has been compiled before (see a caller
|
| @@ -1037,10 +1039,10 @@ void LoadStubCompiler::GenerateLoadInterceptor(
|
| __ ret(0);
|
|
|
| __ bind(&interceptor_failed);
|
| - __ pop(this->name());
|
| - __ pop(holder_reg);
|
| + __ Pop(this->name());
|
| + __ Pop(holder_reg);
|
| if (must_preserve_receiver_reg) {
|
| - __ pop(receiver());
|
| + __ Pop(receiver());
|
| }
|
|
|
| // Leave the internal frame.
|
| @@ -1082,11 +1084,11 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
| IC::CurrentTypeOf(object, isolate()), receiver(), holder, name);
|
|
|
| __ PopReturnAddressTo(scratch1());
|
| - __ push(receiver());
|
| - __ push(holder_reg);
|
| + __ Push(receiver());
|
| + __ Push(holder_reg);
|
| __ Push(callback); // callback info
|
| __ Push(name);
|
| - __ push(value());
|
| + __ Push(value());
|
| __ PushReturnAddressFrom(scratch1());
|
|
|
| // Do tail-call to the runtime system.
|
| @@ -1115,7 +1117,7 @@ void StoreStubCompiler::GenerateStoreViaSetter(
|
| FrameScope scope(masm, StackFrame::INTERNAL);
|
|
|
| // Save value register, so we can restore it later.
|
| - __ push(value());
|
| + __ Push(value());
|
|
|
| if (!setter.is_null()) {
|
| // Call the JavaScript setter with receiver and value on the stack.
|
| @@ -1124,8 +1126,8 @@ void StoreStubCompiler::GenerateStoreViaSetter(
|
| __ movp(receiver,
|
| FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset));
|
| }
|
| - __ push(receiver);
|
| - __ push(value());
|
| + __ Push(receiver);
|
| + __ Push(value());
|
| ParameterCount actual(1);
|
| ParameterCount expected(setter);
|
| __ InvokeFunction(setter, expected, actual,
|
| @@ -1137,7 +1139,7 @@ void StoreStubCompiler::GenerateStoreViaSetter(
|
| }
|
|
|
| // We have to return the passed value, not the return value of the setter.
|
| - __ pop(rax);
|
| + __ Pop(rax);
|
|
|
| // Restore context register.
|
| __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
|
| @@ -1154,9 +1156,9 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
| Handle<JSObject> object,
|
| Handle<Name> name) {
|
| __ PopReturnAddressTo(scratch1());
|
| - __ push(receiver());
|
| - __ push(this->name());
|
| - __ push(value());
|
| + __ Push(receiver());
|
| + __ Push(this->name());
|
| + __ Push(value());
|
| __ PushReturnAddressFrom(scratch1());
|
|
|
| // Do tail-call to the runtime system.
|
| @@ -1172,8 +1174,8 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
| void StoreStubCompiler::GenerateStoreArrayLength() {
|
| // Prepare tail call to StoreIC_ArrayLength.
|
| __ PopReturnAddressTo(scratch1());
|
| - __ push(receiver());
|
| - __ push(value());
|
| + __ Push(receiver());
|
| + __ Push(value());
|
| __ PushReturnAddressFrom(scratch1());
|
|
|
| ExternalReference ref =
|
| @@ -1289,7 +1291,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
|
| __ movp(receiver,
|
| FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset));
|
| }
|
| - __ push(receiver);
|
| + __ Push(receiver);
|
| ParameterCount actual(0);
|
| ParameterCount expected(getter);
|
| __ InvokeFunction(getter, expected, actual,
|
|
|