__ Push(rdi);
__ PushReturnAddressFrom(kScratchRegister);
} else {
- ASSERT(extra_args == NO_EXTRA_ARGUMENTS);
+ DCHECK(extra_args == NO_EXTRA_ARGUMENTS);
}
// JumpToExternalReference expects rax to contain the number of arguments
__ CompareRoot(rsp, Heap::kStackLimitRootIndex);
__ j(above_equal, &ok);
- CallRuntimePassFunction(masm, Runtime::kHiddenTryInstallOptimizedCode);
+ CallRuntimePassFunction(masm, Runtime::kTryInstallOptimizedCode);
GenerateTailCallToReturnedCode(masm);
__ bind(&ok);
// -----------------------------------
// Should never create mementos for api functions.
- ASSERT(!is_api_function || !create_memento);
+ DCHECK(!is_api_function || !create_memento);
// Enter a construct frame.
{
// rdi: constructor
__ movp(rax, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset));
// Will both indicate a NULL and a Smi
- ASSERT(kSmiTag == 0);
+ DCHECK(kSmiTag == 0);
__ JumpIfSmi(rax, &rt_call);
// rdi: constructor
// rax: initial map (if proven valid below)
__ Push(rdi);
__ Push(rdi); // constructor
- __ CallRuntime(Runtime::kHiddenFinalizeInstanceSize, 1);
+ __ CallRuntime(Runtime::kFinalizeInstanceSize, 1);
__ Pop(rdi);
__ Pop(rax);
__ movp(rdi, Operand(rsp, offset));
__ Push(rdi);
if (create_memento) {
- __ CallRuntime(Runtime::kHiddenNewObjectWithAllocationSite, 2);
+ __ CallRuntime(Runtime::kNewObjectWithAllocationSite, 2);
} else {
- __ CallRuntime(Runtime::kHiddenNewObject, 1);
+ __ CallRuntime(Runtime::kNewObject, 1);
}
__ movp(rbx, rax); // store result in rbx
void Builtins::Generate_CompileUnoptimized(MacroAssembler* masm) {
- CallRuntimePassFunction(masm, Runtime::kHiddenCompileUnoptimized);
+ CallRuntimePassFunction(masm, Runtime::kCompileUnoptimized);
GenerateTailCallToReturnedCode(masm);
}
// Whether to compile in a background thread.
__ Push(masm->isolate()->factory()->ToBoolean(concurrent));
- __ CallRuntime(Runtime::kHiddenCompileOptimized, 2);
+ __ CallRuntime(Runtime::kCompileOptimized, 2);
// Restore receiver.
__ Pop(rdi);
}
// stubs that tail call the runtime on deopts passing their parameters in
// registers.
__ Pushad();
- __ CallRuntime(Runtime::kHiddenNotifyStubFailure, 0, save_doubles);
+ __ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles);
__ Popad();
// Tear down internal frame.
}
// Pass the deoptimization type to the runtime system.
__ Push(Smi::FromInt(static_cast<int>(type)));
- __ CallRuntime(Runtime::kHiddenNotifyDeoptimized, 1);
+ __ CallRuntime(Runtime::kNotifyDeoptimized, 1);
// Tear down internal frame.
}
// 3a. Patch the first argument if necessary when calling a function.
Label shift_arguments;
__ Set(rdx, 0); // indicate regular JS_FUNCTION
- { Label convert_to_object, use_global_receiver, patch_receiver;
+ { Label convert_to_object, use_global_proxy, patch_receiver;
// Change context eagerly in case we need the global receiver.
__ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
__ JumpIfSmi(rbx, &convert_to_object, Label::kNear);
__ CompareRoot(rbx, Heap::kNullValueRootIndex);
- __ j(equal, &use_global_receiver);
+ __ j(equal, &use_global_proxy);
__ CompareRoot(rbx, Heap::kUndefinedValueRootIndex);
- __ j(equal, &use_global_receiver);
+ __ j(equal, &use_global_proxy);
STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE);
__ CmpObjectType(rbx, FIRST_SPEC_OBJECT_TYPE, rcx);
__ movp(rdi, args.GetReceiverOperand());
__ jmp(&patch_receiver, Label::kNear);
- __ bind(&use_global_receiver);
+ __ bind(&use_global_proxy);
__ movp(rbx,
Operand(rsi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
- __ movp(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset));
+ __ movp(rbx, FieldOperand(rbx, GlobalObject::kGlobalProxyOffset));
__ bind(&patch_receiver);
__ movp(args.GetArgumentOperand(1), rbx);
__ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
// Do not transform the receiver for strict mode functions.
- Label call_to_object, use_global_receiver;
+ Label call_to_object, use_global_proxy;
__ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
__ testb(FieldOperand(rdx, SharedFunctionInfo::kStrictModeByteOffset),
Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte));
// Compute the receiver in sloppy mode.
__ JumpIfSmi(rbx, &call_to_object, Label::kNear);
__ CompareRoot(rbx, Heap::kNullValueRootIndex);
- __ j(equal, &use_global_receiver);
+ __ j(equal, &use_global_proxy);
__ CompareRoot(rbx, Heap::kUndefinedValueRootIndex);
- __ j(equal, &use_global_receiver);
+ __ j(equal, &use_global_proxy);
// If given receiver is already a JavaScript object then there's no
// reason for converting it.
__ movp(rbx, rax);
__ jmp(&push_receiver, Label::kNear);
- __ bind(&use_global_receiver);
+ __ bind(&use_global_proxy);
__ movp(rbx,
Operand(rsi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
- __ movp(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset));
+ __ movp(rbx, FieldOperand(rbx, GlobalObject::kGlobalProxyOffset));
// Push the receiver.
__ bind(&push_receiver);
// Copy all arguments from the array to the stack.
Label entry, loop;
- __ movp(rax, Operand(rbp, kIndexOffset));
+ Register receiver = LoadIC::ReceiverRegister();
+ Register key = LoadIC::NameRegister();
+ __ movp(key, Operand(rbp, kIndexOffset));
__ jmp(&entry);
__ bind(&loop);
- __ movp(rdx, Operand(rbp, kArgumentsOffset)); // load arguments
+ __ movp(receiver, Operand(rbp, kArgumentsOffset)); // load arguments
// Use inline caching to speed up access to arguments.
+ if (FLAG_vector_ics) {
+ __ Move(LoadIC::SlotRegister(), Smi::FromInt(0));
+ }
Handle<Code> ic =
masm->isolate()->builtins()->KeyedLoadIC_Initialize();
__ Call(ic, RelocInfo::CODE_TARGET);
// Push the nth argument.
__ Push(rax);
- // Update the index on the stack and in register rax.
- __ movp(rax, Operand(rbp, kIndexOffset));
- __ SmiAddConstant(rax, rax, Smi::FromInt(1));
- __ movp(Operand(rbp, kIndexOffset), rax);
+ // Update the index on the stack and in register key.
+ __ movp(key, Operand(rbp, kIndexOffset));
+ __ SmiAddConstant(key, key, Smi::FromInt(1));
+ __ movp(Operand(rbp, kIndexOffset), key);
__ bind(&entry);
- __ cmpp(rax, Operand(rbp, kLimitOffset));
+ __ cmpp(key, Operand(rbp, kLimitOffset));
__ j(not_equal, &loop);
// Call the function.
Label call_proxy;
ParameterCount actual(rax);
- __ SmiToInteger32(rax, rax);
+ __ SmiToInteger32(rax, key);
__ movp(rdi, Operand(rbp, kFunctionOffset));
__ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx);
__ j(not_equal, &call_proxy);
__ j(above_equal, &ok);
{
FrameScope scope(masm, StackFrame::INTERNAL);
- __ CallRuntime(Runtime::kHiddenStackGuard, 0);
+ __ CallRuntime(Runtime::kStackGuard, 0);
}
__ jmp(masm->isolate()->builtins()->OnStackReplacement(),
RelocInfo::CODE_TARGET);