Lines Matching full:__
16 #define __ ACCESS_MASM(masm) macro
30 __ AssertFunction(edi); in Generate_Adaptor()
36 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_Adaptor()
41 __ add(eax, Immediate(num_extra_args + 1)); in Generate_Adaptor()
44 __ PopReturnAddressTo(ecx); in Generate_Adaptor()
45 __ SmiTag(eax); in Generate_Adaptor()
46 __ Push(eax); in Generate_Adaptor()
47 __ SmiUntag(eax); in Generate_Adaptor()
48 __ Push(edi); in Generate_Adaptor()
49 __ Push(edx); in Generate_Adaptor()
50 __ PushReturnAddressFrom(ecx); in Generate_Adaptor()
52 __ JumpToExternalReference(ExternalReference(address, masm->isolate()), in Generate_Adaptor()
66 __ SmiTag(eax); in GenerateTailCallToReturnedCode()
67 __ push(eax); in GenerateTailCallToReturnedCode()
69 __ push(edi); in GenerateTailCallToReturnedCode()
70 __ push(edx); in GenerateTailCallToReturnedCode()
72 __ push(edi); in GenerateTailCallToReturnedCode()
74 __ CallRuntime(function_id, 1); in GenerateTailCallToReturnedCode()
75 __ mov(ebx, eax); in GenerateTailCallToReturnedCode()
78 __ pop(edx); in GenerateTailCallToReturnedCode()
79 __ pop(edi); in GenerateTailCallToReturnedCode()
80 __ pop(eax); in GenerateTailCallToReturnedCode()
81 __ SmiUntag(eax); in GenerateTailCallToReturnedCode()
84 __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); in GenerateTailCallToReturnedCode()
85 __ jmp(ebx); in GenerateTailCallToReturnedCode()
89 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in GenerateTailCallToSharedCode()
90 __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); in GenerateTailCallToSharedCode()
91 __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); in GenerateTailCallToSharedCode()
92 __ jmp(ebx); in GenerateTailCallToSharedCode()
104 __ cmp(esp, Operand::StaticVariable(stack_limit)); in Generate_InOptimizationQueue()
105 __ j(above_equal, &ok, Label::kNear); in Generate_InOptimizationQueue()
109 __ bind(&ok); in Generate_InOptimizationQueue()
130 __ SmiTag(eax); in Generate_JSConstructStubHelper()
131 __ push(esi); in Generate_JSConstructStubHelper()
132 __ push(eax); in Generate_JSConstructStubHelper()
136 __ Push(edi); in Generate_JSConstructStubHelper()
137 __ Push(edx); in Generate_JSConstructStubHelper()
139 __ CallStub(&stub); in Generate_JSConstructStubHelper()
140 __ mov(ebx, eax); in Generate_JSConstructStubHelper()
141 __ Pop(edx); in Generate_JSConstructStubHelper()
142 __ Pop(edi); in Generate_JSConstructStubHelper()
151 __ mov(eax, Operand(esp, 0)); in Generate_JSConstructStubHelper()
154 __ SmiUntag(eax); in Generate_JSConstructStubHelper()
160 __ push(ebx); in Generate_JSConstructStubHelper()
161 __ push(ebx); in Generate_JSConstructStubHelper()
163 __ PushRoot(Heap::kTheHoleValueRootIndex); in Generate_JSConstructStubHelper()
167 __ lea(ebx, Operand(ebp, StandardFrameConstants::kCallerSPOffset)); in Generate_JSConstructStubHelper()
171 __ mov(ecx, eax); in Generate_JSConstructStubHelper()
172 __ jmp(&entry); in Generate_JSConstructStubHelper()
173 __ bind(&loop); in Generate_JSConstructStubHelper()
174 __ push(Operand(ebx, ecx, times_4, 0)); in Generate_JSConstructStubHelper()
175 __ bind(&entry); in Generate_JSConstructStubHelper()
176 __ dec(ecx); in Generate_JSConstructStubHelper()
177 __ j(greater_equal, &loop); in Generate_JSConstructStubHelper()
181 __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, in Generate_JSConstructStubHelper()
190 __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); in Generate_JSConstructStubHelper()
198 __ JumpIfSmi(eax, &use_receiver, Label::kNear); in Generate_JSConstructStubHelper()
202 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); in Generate_JSConstructStubHelper()
203 __ j(above_equal, &exit, Label::kNear); in Generate_JSConstructStubHelper()
207 __ bind(&use_receiver); in Generate_JSConstructStubHelper()
208 __ mov(eax, Operand(esp, 0)); in Generate_JSConstructStubHelper()
212 __ bind(&exit); in Generate_JSConstructStubHelper()
213 __ mov(ebx, Operand(esp, 1 * kPointerSize)); in Generate_JSConstructStubHelper()
215 __ mov(ebx, Operand(esp, 0)); in Generate_JSConstructStubHelper()
226 __ JumpIfNotSmi(eax, &dont_throw); in Generate_JSConstructStubHelper()
229 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); in Generate_JSConstructStubHelper()
231 __ bind(&dont_throw); in Generate_JSConstructStubHelper()
236 __ pop(ecx); in Generate_JSConstructStubHelper()
237 __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver in Generate_JSConstructStubHelper()
238 __ push(ecx); in Generate_JSConstructStubHelper()
240 __ IncrementCounter(masm->isolate()->counters()->constructed_objects(), 1); in Generate_JSConstructStubHelper()
242 __ ret(0); in Generate_JSConstructStubHelper()
266 __ push(edi); in Generate_ConstructedNonConstructable()
267 __ CallRuntime(Runtime::kThrowConstructedNonConstructable); in Generate_ConstructedNonConstructable()
283 __ mov(edi, Operand::StaticVariable(real_stack_limit)); in Generate_CheckStackOverflow()
286 __ mov(ecx, esp); in Generate_CheckStackOverflow()
287 __ sub(ecx, edi); in Generate_CheckStackOverflow()
290 __ mov(edx, eax); in Generate_CheckStackOverflow()
292 __ shl(edx, kPointerSizeLog2 - smi_tag); in Generate_CheckStackOverflow()
294 __ cmp(ecx, edx); in Generate_CheckStackOverflow()
295 __ j(greater, &okay); // Signed comparison. in Generate_CheckStackOverflow()
298 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_CheckStackOverflow()
300 __ bind(&okay); in Generate_CheckStackOverflow()
313 __ mov(esi, Operand::StaticVariable(context_address)); in Generate_JSEntryTrampolineHelper()
316 __ mov(ebx, Operand(ebp, 0)); in Generate_JSEntryTrampolineHelper()
319 __ push(Operand(ebx, EntryFrameConstants::kFunctionArgOffset)); in Generate_JSEntryTrampolineHelper()
320 __ push(Operand(ebx, EntryFrameConstants::kReceiverArgOffset)); in Generate_JSEntryTrampolineHelper()
323 __ mov(eax, Operand(ebx, EntryFrameConstants::kArgcOffset)); in Generate_JSEntryTrampolineHelper()
324 __ mov(ebx, Operand(ebx, EntryFrameConstants::kArgvOffset)); in Generate_JSEntryTrampolineHelper()
332 __ Move(ecx, Immediate(0)); in Generate_JSEntryTrampolineHelper()
333 __ jmp(&entry, Label::kNear); in Generate_JSEntryTrampolineHelper()
334 __ bind(&loop); in Generate_JSEntryTrampolineHelper()
335 __ mov(edx, Operand(ebx, ecx, times_4, 0)); // push parameter from argv in Generate_JSEntryTrampolineHelper()
336 __ push(Operand(edx, 0)); // dereference handle in Generate_JSEntryTrampolineHelper()
337 __ inc(ecx); in Generate_JSEntryTrampolineHelper()
338 __ bind(&entry); in Generate_JSEntryTrampolineHelper()
339 __ cmp(ecx, eax); in Generate_JSEntryTrampolineHelper()
340 __ j(not_equal, &loop); in Generate_JSEntryTrampolineHelper()
343 __ mov(ebx, Operand(ebp, 0)); in Generate_JSEntryTrampolineHelper()
346 __ mov(edx, Operand(ebx, EntryFrameConstants::kNewTargetArgOffset)); in Generate_JSEntryTrampolineHelper()
347 __ mov(edi, Operand(ebx, EntryFrameConstants::kFunctionArgOffset)); in Generate_JSEntryTrampolineHelper()
353 __ Call(builtin, RelocInfo::CODE_TARGET); in Generate_JSEntryTrampolineHelper()
359 __ ret(kPointerSize); // Remove receiver. in Generate_JSEntryTrampolineHelper()
378 __ AssertGeneratorObject(ebx); in Generate_ResumeGeneratorTrampoline()
381 __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOrDebugPosOffset), eax); in Generate_ResumeGeneratorTrampoline()
382 __ RecordWriteField(ebx, JSGeneratorObject::kInputOrDebugPosOffset, eax, ecx, in Generate_ResumeGeneratorTrampoline()
386 __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); in Generate_ResumeGeneratorTrampoline()
389 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); in Generate_ResumeGeneratorTrampoline()
390 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
398 __ cmpb(Operand::StaticVariable(last_step_action), Immediate(StepIn)); in Generate_ResumeGeneratorTrampoline()
399 __ j(greater_equal, &prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
404 __ cmp(ebx, Operand::StaticVariable(debug_suspended_generator)); in Generate_ResumeGeneratorTrampoline()
405 __ j(equal, &prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
406 __ bind(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
409 __ PopReturnAddressTo(eax); in Generate_ResumeGeneratorTrampoline()
412 __ Push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); in Generate_ResumeGeneratorTrampoline()
427 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
428 __ mov(ecx, in Generate_ResumeGeneratorTrampoline()
432 __ bind(&loop); in Generate_ResumeGeneratorTrampoline()
433 __ sub(ecx, Immediate(Smi::FromInt(1))); in Generate_ResumeGeneratorTrampoline()
434 __ j(carry, &done_loop, Label::kNear); in Generate_ResumeGeneratorTrampoline()
435 __ PushRoot(Heap::kTheHoleValueRootIndex); in Generate_ResumeGeneratorTrampoline()
436 __ jmp(&loop); in Generate_ResumeGeneratorTrampoline()
437 __ bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
442 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
443 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kFunctionDataOffset)); in Generate_ResumeGeneratorTrampoline()
444 __ CmpObjectType(ecx, BYTECODE_ARRAY_TYPE, ecx); in Generate_ResumeGeneratorTrampoline()
445 __ j(not_equal, &old_generator); in Generate_ResumeGeneratorTrampoline()
449 __ PushReturnAddressFrom(eax); in Generate_ResumeGeneratorTrampoline()
450 __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
451 __ mov(eax, in Generate_ResumeGeneratorTrampoline()
456 __ mov(edx, ebx); in Generate_ResumeGeneratorTrampoline()
457 __ jmp(FieldOperand(edi, JSFunction::kCodeEntryOffset)); in Generate_ResumeGeneratorTrampoline()
461 __ bind(&old_generator); in Generate_ResumeGeneratorTrampoline()
466 __ PushReturnAddressFrom(eax); // Return address. in Generate_ResumeGeneratorTrampoline()
467 __ Push(ebp); // Caller's frame pointer. in Generate_ResumeGeneratorTrampoline()
468 __ Move(ebp, esp); in Generate_ResumeGeneratorTrampoline()
469 __ Push(esi); // Callee's context. in Generate_ResumeGeneratorTrampoline()
470 __ Push(edi); // Callee's JS Function. in Generate_ResumeGeneratorTrampoline()
473 __ mov(eax, FieldOperand(ebx, JSGeneratorObject::kOperandStackOffset)); in Generate_ResumeGeneratorTrampoline()
476 __ Move(ecx, Smi::kZero); in Generate_ResumeGeneratorTrampoline()
477 __ bind(&loop); in Generate_ResumeGeneratorTrampoline()
478 __ cmp(ecx, FieldOperand(eax, FixedArray::kLengthOffset)); in Generate_ResumeGeneratorTrampoline()
479 __ j(equal, &done_loop, Label::kNear); in Generate_ResumeGeneratorTrampoline()
480 __ Push(FieldOperand(eax, ecx, times_half_pointer_size, in Generate_ResumeGeneratorTrampoline()
482 __ add(ecx, Immediate(Smi::FromInt(1))); in Generate_ResumeGeneratorTrampoline()
483 __ jmp(&loop); in Generate_ResumeGeneratorTrampoline()
484 __ bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
488 __ mov(FieldOperand(ebx, JSGeneratorObject::kOperandStackOffset), in Generate_ResumeGeneratorTrampoline()
492 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
493 __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); in Generate_ResumeGeneratorTrampoline()
494 __ mov(ecx, FieldOperand(ebx, JSGeneratorObject::kContinuationOffset)); in Generate_ResumeGeneratorTrampoline()
495 __ SmiUntag(ecx); in Generate_ResumeGeneratorTrampoline()
496 __ lea(edx, FieldOperand(edx, ecx, times_1, Code::kHeaderSize)); in Generate_ResumeGeneratorTrampoline()
497 __ mov(FieldOperand(ebx, JSGeneratorObject::kContinuationOffset), in Generate_ResumeGeneratorTrampoline()
499 __ mov(eax, ebx); // Continuation expects generator object in eax. in Generate_ResumeGeneratorTrampoline()
500 __ jmp(edx); in Generate_ResumeGeneratorTrampoline()
503 __ bind(&prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
506 __ Push(ebx); in Generate_ResumeGeneratorTrampoline()
507 __ Push(edx); in Generate_ResumeGeneratorTrampoline()
508 __ Push(edi); in Generate_ResumeGeneratorTrampoline()
509 __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); in Generate_ResumeGeneratorTrampoline()
510 __ Pop(edx); in Generate_ResumeGeneratorTrampoline()
511 __ Pop(ebx); in Generate_ResumeGeneratorTrampoline()
512 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
514 __ jmp(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
516 __ bind(&prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
519 __ Push(ebx); in Generate_ResumeGeneratorTrampoline()
520 __ Push(edx); in Generate_ResumeGeneratorTrampoline()
521 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); in Generate_ResumeGeneratorTrampoline()
522 __ Pop(edx); in Generate_ResumeGeneratorTrampoline()
523 __ Pop(ebx); in Generate_ResumeGeneratorTrampoline()
524 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
526 __ jmp(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
535 __ mov(args_count, in LeaveInterpreterFrame()
537 __ mov(args_count, in LeaveInterpreterFrame()
541 __ leave(); in LeaveInterpreterFrame()
544 __ pop(return_pc); in LeaveInterpreterFrame()
545 __ add(esp, args_count); in LeaveInterpreterFrame()
546 __ push(return_pc); in LeaveInterpreterFrame()
570 __ push(ebp); // Caller's frame pointer. in Generate_InterpreterEntryTrampoline()
571 __ mov(ebp, esp); in Generate_InterpreterEntryTrampoline()
572 __ push(esi); // Callee's context. in Generate_InterpreterEntryTrampoline()
573 __ push(edi); // Callee's JS function. in Generate_InterpreterEntryTrampoline()
574 __ push(edx); // Callee's new target. in Generate_InterpreterEntryTrampoline()
578 __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
580 __ cmp(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), in Generate_InterpreterEntryTrampoline()
582 __ j(not_equal, &load_debug_bytecode_array); in Generate_InterpreterEntryTrampoline()
583 __ mov(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
585 __ bind(&bytecode_array_loaded); in Generate_InterpreterEntryTrampoline()
589 __ Move(ecx, masm->CodeObject()); // Self-reference to this code. in Generate_InterpreterEntryTrampoline()
590 __ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
591 __ j(not_equal, &switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
594 __ EmitLoadTypeFeedbackVector(ecx); in Generate_InterpreterEntryTrampoline()
595 __ add(FieldOperand(ecx, in Generate_InterpreterEntryTrampoline()
602 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); in Generate_InterpreterEntryTrampoline()
603 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, in Generate_InterpreterEntryTrampoline()
605 __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEntryTrampoline()
609 __ push(kInterpreterBytecodeArrayRegister); in Generate_InterpreterEntryTrampoline()
611 __ push(Immediate(Smi::FromInt(BytecodeArray::kHeaderSize - kHeapObjectTag))); in Generate_InterpreterEntryTrampoline()
616 __ mov(ebx, FieldOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
621 __ mov(ecx, esp); in Generate_InterpreterEntryTrampoline()
622 __ sub(ecx, ebx); in Generate_InterpreterEntryTrampoline()
625 __ cmp(ecx, Operand::StaticVariable(stack_limit)); in Generate_InterpreterEntryTrampoline()
626 __ j(above_equal, &ok); in Generate_InterpreterEntryTrampoline()
627 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterEntryTrampoline()
628 __ bind(&ok); in Generate_InterpreterEntryTrampoline()
633 __ mov(eax, Immediate(masm->isolate()->factory()->undefined_value())); in Generate_InterpreterEntryTrampoline()
634 __ jmp(&loop_check); in Generate_InterpreterEntryTrampoline()
635 __ bind(&loop_header); in Generate_InterpreterEntryTrampoline()
637 __ push(eax); in Generate_InterpreterEntryTrampoline()
639 __ bind(&loop_check); in Generate_InterpreterEntryTrampoline()
640 __ sub(ebx, Immediate(kPointerSize)); in Generate_InterpreterEntryTrampoline()
641 __ j(greater_equal, &loop_header); in Generate_InterpreterEntryTrampoline()
645 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); in Generate_InterpreterEntryTrampoline()
646 __ mov(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEntryTrampoline()
648 __ mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEntryTrampoline()
653 __ movzx_b(ebx, Operand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
655 __ mov(ebx, Operand(kInterpreterDispatchTableRegister, ebx, in Generate_InterpreterEntryTrampoline()
657 __ call(ebx); in Generate_InterpreterEntryTrampoline()
662 __ ret(0); in Generate_InterpreterEntryTrampoline()
665 __ bind(&load_debug_bytecode_array); in Generate_InterpreterEntryTrampoline()
667 __ mov(debug_info, FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset)); in Generate_InterpreterEntryTrampoline()
668 __ mov(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
670 __ jmp(&bytecode_array_loaded); in Generate_InterpreterEntryTrampoline()
675 __ bind(&switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
676 __ pop(edx); // Callee's new target. in Generate_InterpreterEntryTrampoline()
677 __ pop(edi); // Callee's JS function. in Generate_InterpreterEntryTrampoline()
678 __ pop(esi); // Callee's context. in Generate_InterpreterEntryTrampoline()
679 __ leave(); // Leave the frame so we can tail call. in Generate_InterpreterEntryTrampoline()
680 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
681 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
682 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_InterpreterEntryTrampoline()
683 __ mov(FieldOperand(edi, JSFunction::kCodeEntryOffset), ecx); in Generate_InterpreterEntryTrampoline()
684 __ RecordWriteCodeEntryField(edi, ecx, ebx); in Generate_InterpreterEntryTrampoline()
685 __ jmp(ecx); in Generate_InterpreterEntryTrampoline()
697 __ mov(scratch1, Operand::StaticVariable(real_stack_limit)); in Generate_StackOverflowCheck()
700 __ mov(scratch2, esp); in Generate_StackOverflowCheck()
701 __ sub(scratch2, scratch1); in Generate_StackOverflowCheck()
704 __ mov(scratch1, num_args); in Generate_StackOverflowCheck()
706 __ add(scratch1, Immediate(1)); in Generate_StackOverflowCheck()
708 __ shl(scratch1, kPointerSizeLog2); in Generate_StackOverflowCheck()
710 __ cmp(scratch2, scratch1); in Generate_StackOverflowCheck()
711 __ j(less_equal, stack_overflow); // Signed comparison. in Generate_StackOverflowCheck()
723 __ jmp(&loop_check); in Generate_InterpreterPushArgs()
724 __ bind(&loop_header); in Generate_InterpreterPushArgs()
725 __ Push(Operand(start_address, 0)); in Generate_InterpreterPushArgs()
726 __ sub(start_address, Immediate(kPointerSize)); in Generate_InterpreterPushArgs()
727 __ bind(&loop_check); in Generate_InterpreterPushArgs()
728 __ cmp(start_address, array_limit); in Generate_InterpreterPushArgs()
729 __ j(greater, &loop_header, Label::kNear); in Generate_InterpreterPushArgs()
745 __ mov(ecx, eax); in Generate_InterpreterPushArgsAndCallImpl()
746 __ add(ecx, Immediate(1)); // Add one for receiver. in Generate_InterpreterPushArgsAndCallImpl()
751 __ Push(edi); in Generate_InterpreterPushArgsAndCallImpl()
753 __ Pop(edi); in Generate_InterpreterPushArgsAndCallImpl()
756 __ Pop(edx); in Generate_InterpreterPushArgsAndCallImpl()
759 __ shl(ecx, kPointerSizeLog2); in Generate_InterpreterPushArgsAndCallImpl()
760 __ neg(ecx); in Generate_InterpreterPushArgsAndCallImpl()
761 __ add(ecx, ebx); in Generate_InterpreterPushArgsAndCallImpl()
765 __ Push(edx); // Re-push return address. in Generate_InterpreterPushArgsAndCallImpl()
768 __ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
773 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
778 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndCallImpl()
781 __ Pop(edi); in Generate_InterpreterPushArgsAndCallImpl()
783 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndCallImpl()
786 __ int3(); in Generate_InterpreterPushArgsAndCallImpl()
831 __ bind(&check_offset); in Generate_InterpreterPushArgsAndReturnAddress()
832 __ cmp(scratch1, page_size); in Generate_InterpreterPushArgsAndReturnAddress()
833 __ j(less, &update_stack_pointer); in Generate_InterpreterPushArgsAndReturnAddress()
834 __ sub(esp, Immediate(page_size)); in Generate_InterpreterPushArgsAndReturnAddress()
836 __ mov(Operand(esp, 0), Immediate(0)); in Generate_InterpreterPushArgsAndReturnAddress()
837 __ sub(scratch1, Immediate(page_size)); in Generate_InterpreterPushArgsAndReturnAddress()
838 __ jmp(&check_offset); in Generate_InterpreterPushArgsAndReturnAddress()
839 __ bind(&update_stack_pointer); in Generate_InterpreterPushArgsAndReturnAddress()
842 __ sub(esp, scratch1); in Generate_InterpreterPushArgsAndReturnAddress()
849 __ mov(scratch1, in Generate_InterpreterPushArgsAndReturnAddress()
851 __ mov(Operand(esp, i * kPointerSize), scratch1); in Generate_InterpreterPushArgsAndReturnAddress()
856 __ mov(scratch1, num_args); in Generate_InterpreterPushArgsAndReturnAddress()
857 __ add(scratch1, Immediate(1)); in Generate_InterpreterPushArgsAndReturnAddress()
861 __ mov(Operand(esp, num_args, times_pointer_size, in Generate_InterpreterPushArgsAndReturnAddress()
864 __ mov(scratch1, num_args); in Generate_InterpreterPushArgsAndReturnAddress()
868 __ jmp(&loop_check); in Generate_InterpreterPushArgsAndReturnAddress()
869 __ bind(&loop_header); in Generate_InterpreterPushArgsAndReturnAddress()
870 __ mov(scratch2, Operand(start_addr, 0)); in Generate_InterpreterPushArgsAndReturnAddress()
871 __ mov(Operand(esp, scratch1, times_pointer_size, in Generate_InterpreterPushArgsAndReturnAddress()
874 __ sub(start_addr, Immediate(kPointerSize)); in Generate_InterpreterPushArgsAndReturnAddress()
875 __ sub(scratch1, Immediate(1)); in Generate_InterpreterPushArgsAndReturnAddress()
876 __ bind(&loop_check); in Generate_InterpreterPushArgsAndReturnAddress()
877 __ cmp(scratch1, Immediate(0)); in Generate_InterpreterPushArgsAndReturnAddress()
878 __ j(greater, &loop_header, Label::kNear); in Generate_InterpreterPushArgsAndReturnAddress()
897 __ Push(edi); in Generate_InterpreterPushArgsAndConstructImpl()
898 __ Push(edx); in Generate_InterpreterPushArgsAndConstructImpl()
907 __ Pop(edx); in Generate_InterpreterPushArgsAndConstructImpl()
908 __ Pop(edi); in Generate_InterpreterPushArgsAndConstructImpl()
910 __ AssertUndefinedOrAllocationSite(ebx); in Generate_InterpreterPushArgsAndConstructImpl()
914 __ AssertFunction(edi); in Generate_InterpreterPushArgsAndConstructImpl()
916 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
917 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
918 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_InterpreterPushArgsAndConstructImpl()
919 __ jmp(ecx); in Generate_InterpreterPushArgsAndConstructImpl()
924 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_InterpreterPushArgsAndConstructImpl()
927 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructImpl()
930 __ Pop(edx); in Generate_InterpreterPushArgsAndConstructImpl()
931 __ Pop(edi); in Generate_InterpreterPushArgsAndConstructImpl()
933 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructImpl()
936 __ int3(); in Generate_InterpreterPushArgsAndConstructImpl()
954 __ Push(edx); in Generate_InterpreterPushArgsAndConstructArray()
963 __ Pop(edx); in Generate_InterpreterPushArgsAndConstructArray()
966 __ Move(edi, edx); in Generate_InterpreterPushArgsAndConstructArray()
969 __ TailCallStub(&stub); in Generate_InterpreterPushArgsAndConstructArray()
971 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructArray()
974 __ Pop(edx); in Generate_InterpreterPushArgsAndConstructArray()
976 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructArray()
979 __ int3(); in Generate_InterpreterPushArgsAndConstructArray()
989 __ LoadHeapObject(ebx, in Generate_InterpreterEnterBytecode()
991 __ add(ebx, Immediate(interpreter_entry_return_pc_offset->value() + in Generate_InterpreterEnterBytecode()
993 __ push(ebx); in Generate_InterpreterEnterBytecode()
996 __ mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEnterBytecode()
1001 __ mov(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1006 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); in Generate_InterpreterEnterBytecode()
1007 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, in Generate_InterpreterEnterBytecode()
1009 __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEnterBytecode()
1013 __ mov(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEnterBytecode()
1015 __ SmiUntag(kInterpreterBytecodeOffsetRegister); in Generate_InterpreterEnterBytecode()
1018 __ movzx_b(ebx, Operand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1020 __ mov(ebx, Operand(kInterpreterDispatchTableRegister, ebx, in Generate_InterpreterEnterBytecode()
1022 __ jmp(ebx); in Generate_InterpreterEnterBytecode()
1029 __ mov(ebx, Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1030 __ mov(edx, Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1031 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); in Generate_InterpreterEnterBytecodeAdvance()
1034 __ Push(kInterpreterAccumulatorRegister); in Generate_InterpreterEnterBytecodeAdvance()
1035 __ Push(ebx); // First argument is the bytecode array. in Generate_InterpreterEnterBytecodeAdvance()
1036 __ Push(edx); // Second argument is the bytecode offset. in Generate_InterpreterEnterBytecodeAdvance()
1037 __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); in Generate_InterpreterEnterBytecodeAdvance()
1038 __ Move(edx, eax); // Result is the new bytecode offset. in Generate_InterpreterEnterBytecodeAdvance()
1039 __ Pop(kInterpreterAccumulatorRegister); in Generate_InterpreterEnterBytecodeAdvance()
1041 __ mov(Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp), edx); in Generate_InterpreterEnterBytecodeAdvance()
1065 __ push(argument_count); in Generate_CompileLazy()
1066 __ push(new_target); in Generate_CompileLazy()
1067 __ push(closure); in Generate_CompileLazy()
1071 __ mov(map, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); in Generate_CompileLazy()
1072 __ mov(map, FieldOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); in Generate_CompileLazy()
1073 __ mov(index, FieldOperand(map, FixedArray::kLengthOffset)); in Generate_CompileLazy()
1074 __ cmp(index, Immediate(Smi::FromInt(2))); in Generate_CompileLazy()
1075 __ j(less, &gotta_call_runtime); in Generate_CompileLazy()
1084 __ mov(native_context, NativeContextOperand()); in Generate_CompileLazy()
1086 __ bind(&loop_top); in Generate_CompileLazy()
1090 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, in Generate_CompileLazy()
1092 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1093 __ cmp(temp, native_context); in Generate_CompileLazy()
1094 __ j(not_equal, &loop_bottom); in Generate_CompileLazy()
1096 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, in Generate_CompileLazy()
1099 __ cmp(temp, Immediate(Smi::FromInt(bailout_id))); in Generate_CompileLazy()
1100 __ j(not_equal, &loop_bottom); in Generate_CompileLazy()
1102 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, in Generate_CompileLazy()
1104 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1105 __ JumpIfSmi(temp, &gotta_call_runtime); in Generate_CompileLazy()
1108 __ mov(ecx, Operand(esp, 0)); in Generate_CompileLazy()
1109 __ mov(FieldOperand(ecx, JSFunction::kLiteralsOffset), temp); in Generate_CompileLazy()
1110 __ push(index); in Generate_CompileLazy()
1111 __ RecordWriteField(ecx, JSFunction::kLiteralsOffset, temp, index, in Generate_CompileLazy()
1113 __ pop(index); in Generate_CompileLazy()
1117 __ mov(entry, FieldOperand(map, index, times_half_pointer_size, in Generate_CompileLazy()
1119 __ mov(entry, FieldOperand(entry, WeakCell::kValueOffset)); in Generate_CompileLazy()
1120 __ JumpIfSmi(entry, &try_shared); in Generate_CompileLazy()
1123 __ pop(closure); in Generate_CompileLazy()
1125 __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); in Generate_CompileLazy()
1126 __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); in Generate_CompileLazy()
1127 __ RecordWriteCodeEntryField(closure, entry, eax); in Generate_CompileLazy()
1133 __ mov(ebx, in Generate_CompileLazy()
1135 __ mov(FieldOperand(closure, JSFunction::kNextFunctionLinkOffset), ebx); in Generate_CompileLazy()
1136 __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, ebx, eax, in Generate_CompileLazy()
1140 __ mov(ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST), in Generate_CompileLazy()
1143 __ mov(ebx, closure); in Generate_CompileLazy()
1144 __ RecordWriteContextSlot(native_context, function_list_offset, closure, eax, in Generate_CompileLazy()
1146 __ mov(closure, ebx); in Generate_CompileLazy()
1147 __ pop(new_target); in Generate_CompileLazy()
1148 __ pop(argument_count); in Generate_CompileLazy()
1149 __ jmp(entry); in Generate_CompileLazy()
1151 __ bind(&loop_bottom); in Generate_CompileLazy()
1152 __ sub(index, Immediate(Smi::FromInt(SharedFunctionInfo::kEntryLength))); in Generate_CompileLazy()
1153 __ cmp(index, Immediate(Smi::FromInt(1))); in Generate_CompileLazy()
1154 __ j(greater, &loop_top); in Generate_CompileLazy()
1157 __ jmp(&gotta_call_runtime); in Generate_CompileLazy()
1159 __ bind(&try_shared); in Generate_CompileLazy()
1160 __ pop(closure); in Generate_CompileLazy()
1161 __ pop(new_target); in Generate_CompileLazy()
1162 __ pop(argument_count); in Generate_CompileLazy()
1163 __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); in Generate_CompileLazy()
1165 __ test_b(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset), in Generate_CompileLazy()
1167 __ j(not_zero, &gotta_call_runtime_no_stack); in Generate_CompileLazy()
1169 __ mov(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); in Generate_CompileLazy()
1170 __ mov(ebx, FieldOperand(entry, Code::kFlagsOffset)); in Generate_CompileLazy()
1171 __ and_(ebx, Code::KindField::kMask); in Generate_CompileLazy()
1172 __ shr(ebx, Code::KindField::kShift); in Generate_CompileLazy()
1173 __ cmp(ebx, Immediate(Code::BUILTIN)); in Generate_CompileLazy()
1174 __ j(equal, &gotta_call_runtime_no_stack); in Generate_CompileLazy()
1176 __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); in Generate_CompileLazy()
1177 __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); in Generate_CompileLazy()
1178 __ RecordWriteCodeEntryField(closure, entry, ebx); in Generate_CompileLazy()
1179 __ jmp(entry); in Generate_CompileLazy()
1181 __ bind(&gotta_call_runtime); in Generate_CompileLazy()
1182 __ pop(closure); in Generate_CompileLazy()
1183 __ pop(new_target); in Generate_CompileLazy()
1184 __ pop(argument_count); in Generate_CompileLazy()
1185 __ bind(&gotta_call_runtime_no_stack); in Generate_CompileLazy()
1213 __ mov(ecx, eax); in Generate_InstantiateAsmJs()
1215 __ SmiTag(eax); in Generate_InstantiateAsmJs()
1216 __ push(eax); in Generate_InstantiateAsmJs()
1218 __ push(edi); in Generate_InstantiateAsmJs()
1219 __ push(edx); in Generate_InstantiateAsmJs()
1222 __ push(edi); in Generate_InstantiateAsmJs()
1228 __ cmp(ecx, Immediate(j)); in Generate_InstantiateAsmJs()
1229 __ j(not_equal, &over, Label::kNear); in Generate_InstantiateAsmJs()
1232 __ Push(Operand( in Generate_InstantiateAsmJs()
1236 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_InstantiateAsmJs()
1239 __ jmp(&args_done, Label::kNear); in Generate_InstantiateAsmJs()
1240 __ bind(&over); in Generate_InstantiateAsmJs()
1243 __ bind(&args_done); in Generate_InstantiateAsmJs()
1246 __ CallRuntime(Runtime::kInstantiateAsmJs, 4); in Generate_InstantiateAsmJs()
1248 __ JumpIfSmi(eax, &failed, Label::kNear); in Generate_InstantiateAsmJs()
1250 __ Drop(2); in Generate_InstantiateAsmJs()
1251 __ Pop(ecx); in Generate_InstantiateAsmJs()
1252 __ SmiUntag(ecx); in Generate_InstantiateAsmJs()
1255 __ PopReturnAddressTo(ebx); in Generate_InstantiateAsmJs()
1256 __ inc(ecx); in Generate_InstantiateAsmJs()
1257 __ lea(esp, Operand(esp, ecx, times_pointer_size, 0)); in Generate_InstantiateAsmJs()
1258 __ PushReturnAddressFrom(ebx); in Generate_InstantiateAsmJs()
1259 __ ret(0); in Generate_InstantiateAsmJs()
1261 __ bind(&failed); in Generate_InstantiateAsmJs()
1263 __ pop(edx); in Generate_InstantiateAsmJs()
1264 __ pop(edi); in Generate_InstantiateAsmJs()
1265 __ pop(eax); in Generate_InstantiateAsmJs()
1266 __ SmiUntag(eax); in Generate_InstantiateAsmJs()
1281 __ sub(Operand(esp, 0), Immediate(5)); in GenerateMakeCodeYoungAgainCommon()
1282 __ pushad(); in GenerateMakeCodeYoungAgainCommon()
1283 __ mov(eax, Operand(esp, 8 * kPointerSize)); in GenerateMakeCodeYoungAgainCommon()
1286 __ PrepareCallCFunction(2, ebx); in GenerateMakeCodeYoungAgainCommon()
1287 __ mov(Operand(esp, 1 * kPointerSize), in GenerateMakeCodeYoungAgainCommon()
1289 __ mov(Operand(esp, 0), eax); in GenerateMakeCodeYoungAgainCommon()
1290 __ CallCFunction( in GenerateMakeCodeYoungAgainCommon()
1293 __ popad(); in GenerateMakeCodeYoungAgainCommon()
1294 __ ret(0); in GenerateMakeCodeYoungAgainCommon()
1314 __ pushad(); in CODE_AGE_LIST()
1315 __ mov(eax, Operand(esp, 8 * kPointerSize)); in CODE_AGE_LIST()
1316 __ sub(eax, Immediate(Assembler::kCallInstructionLength)); in CODE_AGE_LIST()
1319 __ PrepareCallCFunction(2, ebx); in CODE_AGE_LIST()
1320 __ mov(Operand(esp, 1 * kPointerSize), in CODE_AGE_LIST()
1322 __ mov(Operand(esp, 0), eax); in CODE_AGE_LIST()
1323 __ CallCFunction( in CODE_AGE_LIST()
1327 __ popad(); in CODE_AGE_LIST()
1330 __ pop(eax); // Pop return address into scratch register. in CODE_AGE_LIST()
1331 __ push(ebp); // Caller's frame pointer. in CODE_AGE_LIST()
1332 __ mov(ebp, esp); in CODE_AGE_LIST()
1333 __ push(esi); // Callee's context. in CODE_AGE_LIST()
1334 __ push(edi); // Callee's JS Function. in CODE_AGE_LIST()
1335 __ push(eax); // Push return address after frame prologue. in CODE_AGE_LIST()
1338 __ ret(0); in CODE_AGE_LIST()
1358 __ pushad(); in Generate_NotifyStubFailureHelper()
1359 __ CallRuntime(Runtime::kNotifyStubFailure, save_doubles); in Generate_NotifyStubFailureHelper()
1360 __ popad(); in Generate_NotifyStubFailureHelper()
1364 __ pop(MemOperand(esp, 0)); // Ignore state offset in Generate_NotifyStubFailureHelper()
1365 __ ret(0); // Return to IC Miss stub, continuation still on stack. in Generate_NotifyStubFailureHelper()
1382 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); in Generate_NotifyDeoptimizedHelper()
1383 __ CallRuntime(Runtime::kNotifyDeoptimized); in Generate_NotifyDeoptimizedHelper()
1389 __ mov(ecx, Operand(esp, 1 * kPointerSize)); in Generate_NotifyDeoptimizedHelper()
1390 __ SmiUntag(ecx); in Generate_NotifyDeoptimizedHelper()
1394 __ cmp(ecx, static_cast<int>(Deoptimizer::BailoutState::NO_REGISTERS)); in Generate_NotifyDeoptimizedHelper()
1395 __ j(not_equal, ¬_no_registers, Label::kNear); in Generate_NotifyDeoptimizedHelper()
1396 __ ret(1 * kPointerSize); // Remove state. in Generate_NotifyDeoptimizedHelper()
1398 __ bind(¬_no_registers); in Generate_NotifyDeoptimizedHelper()
1400 __ mov(eax, Operand(esp, 2 * kPointerSize)); in Generate_NotifyDeoptimizedHelper()
1401 __ cmp(ecx, static_cast<int>(Deoptimizer::BailoutState::TOS_REGISTER)); in Generate_NotifyDeoptimizedHelper()
1402 __ j(not_equal, ¬_tos_eax, Label::kNear); in Generate_NotifyDeoptimizedHelper()
1403 __ ret(2 * kPointerSize); // Remove state, eax. in Generate_NotifyDeoptimizedHelper()
1405 __ bind(¬_tos_eax); in Generate_NotifyDeoptimizedHelper()
1406 __ Abort(kNoCasesLeft); in Generate_NotifyDeoptimizedHelper()
1436 __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1437 __ mov(ebx, edx); in Generate_FunctionPrototypeApply()
1438 __ mov(edi, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_FunctionPrototypeApply()
1439 __ test(eax, eax); in Generate_FunctionPrototypeApply()
1440 __ j(zero, &no_this_arg, Label::kNear); in Generate_FunctionPrototypeApply()
1442 __ mov(edx, Operand(esp, eax, times_pointer_size, 0)); in Generate_FunctionPrototypeApply()
1443 __ cmp(eax, Immediate(1)); in Generate_FunctionPrototypeApply()
1444 __ j(equal, &no_arg_array, Label::kNear); in Generate_FunctionPrototypeApply()
1445 __ mov(ebx, Operand(esp, eax, times_pointer_size, -kPointerSize)); in Generate_FunctionPrototypeApply()
1446 __ bind(&no_arg_array); in Generate_FunctionPrototypeApply()
1448 __ bind(&no_this_arg); in Generate_FunctionPrototypeApply()
1449 __ PopReturnAddressTo(ecx); in Generate_FunctionPrototypeApply()
1450 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_FunctionPrototypeApply()
1451 __ Push(edx); in Generate_FunctionPrototypeApply()
1452 __ PushReturnAddressFrom(ecx); in Generate_FunctionPrototypeApply()
1453 __ Move(eax, ebx); in Generate_FunctionPrototypeApply()
1465 __ JumpIfSmi(edi, &receiver_not_callable, Label::kNear); in Generate_FunctionPrototypeApply()
1466 __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); in Generate_FunctionPrototypeApply()
1467 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_FunctionPrototypeApply()
1469 __ j(zero, &receiver_not_callable, Label::kNear); in Generate_FunctionPrototypeApply()
1473 __ JumpIfRoot(eax, Heap::kNullValueRootIndex, &no_arguments, Label::kNear); in Generate_FunctionPrototypeApply()
1474 __ JumpIfRoot(eax, Heap::kUndefinedValueRootIndex, &no_arguments, in Generate_FunctionPrototypeApply()
1479 __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1480 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1484 __ bind(&no_arguments); in Generate_FunctionPrototypeApply()
1486 __ Set(eax, 0); in Generate_FunctionPrototypeApply()
1487 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1491 __ bind(&receiver_not_callable); in Generate_FunctionPrototypeApply()
1493 __ mov(Operand(esp, kPointerSize), edi); in Generate_FunctionPrototypeApply()
1494 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_FunctionPrototypeApply()
1513 __ test(eax, eax); in Generate_FunctionPrototypeCall()
1514 __ j(not_zero, &done, Label::kNear); in Generate_FunctionPrototypeCall()
1515 __ PopReturnAddressTo(ebx); in Generate_FunctionPrototypeCall()
1516 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeCall()
1517 __ PushReturnAddressFrom(ebx); in Generate_FunctionPrototypeCall()
1518 __ inc(eax); in Generate_FunctionPrototypeCall()
1519 __ bind(&done); in Generate_FunctionPrototypeCall()
1523 __ mov(edi, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_FunctionPrototypeCall()
1530 __ mov(ecx, eax); in Generate_FunctionPrototypeCall()
1531 __ bind(&loop); in Generate_FunctionPrototypeCall()
1532 __ mov(ebx, Operand(esp, ecx, times_pointer_size, 0)); in Generate_FunctionPrototypeCall()
1533 __ mov(Operand(esp, ecx, times_pointer_size, kPointerSize), ebx); in Generate_FunctionPrototypeCall()
1534 __ dec(ecx); in Generate_FunctionPrototypeCall()
1535 __ j(not_sign, &loop); // While non-negative (to copy return address). in Generate_FunctionPrototypeCall()
1536 __ pop(ebx); // Discard copy of return address. in Generate_FunctionPrototypeCall()
1537 __ dec(eax); // One fewer argument (first argument is new receiver). in Generate_FunctionPrototypeCall()
1541 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeCall()
1559 __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
1560 __ mov(edx, edi); in Generate_ReflectApply()
1561 __ mov(ebx, edi); in Generate_ReflectApply()
1562 __ cmp(eax, Immediate(1)); in Generate_ReflectApply()
1563 __ j(below, &done, Label::kNear); in Generate_ReflectApply()
1564 __ mov(edi, Operand(esp, eax, times_pointer_size, -0 * kPointerSize)); in Generate_ReflectApply()
1565 __ j(equal, &done, Label::kNear); in Generate_ReflectApply()
1566 __ mov(edx, Operand(esp, eax, times_pointer_size, -1 * kPointerSize)); in Generate_ReflectApply()
1567 __ cmp(eax, Immediate(3)); in Generate_ReflectApply()
1568 __ j(below, &done, Label::kNear); in Generate_ReflectApply()
1569 __ mov(ebx, Operand(esp, eax, times_pointer_size, -2 * kPointerSize)); in Generate_ReflectApply()
1570 __ bind(&done); in Generate_ReflectApply()
1571 __ PopReturnAddressTo(ecx); in Generate_ReflectApply()
1572 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_ReflectApply()
1573 __ Push(edx); in Generate_ReflectApply()
1574 __ PushReturnAddressFrom(ecx); in Generate_ReflectApply()
1575 __ Move(eax, ebx); in Generate_ReflectApply()
1587 __ JumpIfSmi(edi, &target_not_callable, Label::kNear); in Generate_ReflectApply()
1588 __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); in Generate_ReflectApply()
1589 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_ReflectApply()
1591 __ j(zero, &target_not_callable, Label::kNear); in Generate_ReflectApply()
1595 __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
1596 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectApply()
1599 __ bind(&target_not_callable); in Generate_ReflectApply()
1601 __ mov(Operand(esp, kPointerSize), edi); in Generate_ReflectApply()
1602 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_ReflectApply()
1622 __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); in Generate_ReflectConstruct()
1623 __ mov(edx, edi); in Generate_ReflectConstruct()
1624 __ mov(ebx, edi); in Generate_ReflectConstruct()
1625 __ cmp(eax, Immediate(1)); in Generate_ReflectConstruct()
1626 __ j(below, &done, Label::kNear); in Generate_ReflectConstruct()
1627 __ mov(edi, Operand(esp, eax, times_pointer_size, -0 * kPointerSize)); in Generate_ReflectConstruct()
1628 __ mov(edx, edi); in Generate_ReflectConstruct()
1629 __ j(equal, &done, Label::kNear); in Generate_ReflectConstruct()
1630 __ mov(ebx, Operand(esp, eax, times_pointer_size, -1 * kPointerSize)); in Generate_ReflectConstruct()
1631 __ cmp(eax, Immediate(3)); in Generate_ReflectConstruct()
1632 __ j(below, &done, Label::kNear); in Generate_ReflectConstruct()
1633 __ mov(edx, Operand(esp, eax, times_pointer_size, -2 * kPointerSize)); in Generate_ReflectConstruct()
1634 __ bind(&done); in Generate_ReflectConstruct()
1635 __ PopReturnAddressTo(ecx); in Generate_ReflectConstruct()
1636 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_ReflectConstruct()
1637 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_ReflectConstruct()
1638 __ PushReturnAddressFrom(ecx); in Generate_ReflectConstruct()
1639 __ Move(eax, ebx); in Generate_ReflectConstruct()
1652 __ JumpIfSmi(edi, &target_not_constructor, Label::kNear); in Generate_ReflectConstruct()
1653 __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
1654 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_ReflectConstruct()
1656 __ j(zero, &target_not_constructor, Label::kNear); in Generate_ReflectConstruct()
1660 __ JumpIfSmi(edx, &new_target_not_constructor, Label::kNear); in Generate_ReflectConstruct()
1661 __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
1662 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_ReflectConstruct()
1664 __ j(zero, &new_target_not_constructor, Label::kNear); in Generate_ReflectConstruct()
1667 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectConstruct()
1670 __ bind(&target_not_constructor); in Generate_ReflectConstruct()
1672 __ mov(Operand(esp, kPointerSize), edi); in Generate_ReflectConstruct()
1673 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
1677 __ bind(&new_target_not_constructor); in Generate_ReflectConstruct()
1679 __ mov(Operand(esp, kPointerSize), edx); in Generate_ReflectConstruct()
1680 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
1693 __ LoadGlobalFunction(Context::INTERNAL_ARRAY_FUNCTION_INDEX, edi); in Generate_InternalArrayCode()
1697 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_InternalArrayCode()
1699 __ test(ebx, Immediate(kSmiTagMask)); in Generate_InternalArrayCode()
1700 __ Assert(not_zero, kUnexpectedInitialMapForInternalArrayFunction); in Generate_InternalArrayCode()
1701 __ CmpObjectType(ebx, MAP_TYPE, ecx); in Generate_InternalArrayCode()
1702 __ Assert(equal, kUnexpectedInitialMapForInternalArrayFunction); in Generate_InternalArrayCode()
1709 __ TailCallStub(&stub); in Generate_InternalArrayCode()
1721 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, edi); in Generate_ArrayCode()
1722 __ mov(edx, edi); in Generate_ArrayCode()
1726 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_ArrayCode()
1728 __ test(ebx, Immediate(kSmiTagMask)); in Generate_ArrayCode()
1729 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); in Generate_ArrayCode()
1730 __ CmpObjectType(ebx, MAP_TYPE, ecx); in Generate_ArrayCode()
1731 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); in Generate_ArrayCode()
1736 __ mov(ebx, masm->isolate()->factory()->undefined_value()); in Generate_ArrayCode()
1738 __ TailCallStub(&stub); in Generate_ArrayCode()
1759 __ LoadRoot(edx, root_index); in Generate_MathMaxMin()
1760 __ movsd(xmm0, FieldOperand(edx, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
1761 __ Move(ecx, eax); in Generate_MathMaxMin()
1764 __ bind(&loop); in Generate_MathMaxMin()
1767 __ test(ecx, ecx); in Generate_MathMaxMin()
1768 __ j(zero, &done_loop); in Generate_MathMaxMin()
1771 __ mov(ebx, Operand(esp, ecx, times_pointer_size, 0)); in Generate_MathMaxMin()
1776 __ bind(&convert); in Generate_MathMaxMin()
1777 __ JumpIfSmi(ebx, &convert_smi); in Generate_MathMaxMin()
1778 __ JumpIfRoot(FieldOperand(ebx, HeapObject::kMapOffset), in Generate_MathMaxMin()
1783 __ SmiTag(eax); in Generate_MathMaxMin()
1784 __ SmiTag(ecx); in Generate_MathMaxMin()
1785 __ EnterBuiltinFrame(esi, edi, eax); in Generate_MathMaxMin()
1786 __ Push(ecx); in Generate_MathMaxMin()
1787 __ Push(edx); in Generate_MathMaxMin()
1788 __ mov(eax, ebx); in Generate_MathMaxMin()
1789 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_MathMaxMin()
1790 __ mov(ebx, eax); in Generate_MathMaxMin()
1791 __ Pop(edx); in Generate_MathMaxMin()
1792 __ Pop(ecx); in Generate_MathMaxMin()
1793 __ LeaveBuiltinFrame(esi, edi, eax); in Generate_MathMaxMin()
1794 __ SmiUntag(ecx); in Generate_MathMaxMin()
1795 __ SmiUntag(eax); in Generate_MathMaxMin()
1799 __ JumpIfSmi(edx, &restore_smi, Label::kNear); in Generate_MathMaxMin()
1800 __ movsd(xmm0, FieldOperand(edx, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
1801 __ jmp(&done_restore, Label::kNear); in Generate_MathMaxMin()
1802 __ bind(&restore_smi); in Generate_MathMaxMin()
1803 __ SmiUntag(edx); in Generate_MathMaxMin()
1804 __ Cvtsi2sd(xmm0, edx); in Generate_MathMaxMin()
1805 __ SmiTag(edx); in Generate_MathMaxMin()
1806 __ bind(&done_restore); in Generate_MathMaxMin()
1809 __ jmp(&convert); in Generate_MathMaxMin()
1810 __ bind(&convert_number); in Generate_MathMaxMin()
1811 __ movsd(xmm1, FieldOperand(ebx, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
1812 __ jmp(&done_convert, Label::kNear); in Generate_MathMaxMin()
1813 __ bind(&convert_smi); in Generate_MathMaxMin()
1814 __ SmiUntag(ebx); in Generate_MathMaxMin()
1815 __ Cvtsi2sd(xmm1, ebx); in Generate_MathMaxMin()
1816 __ SmiTag(ebx); in Generate_MathMaxMin()
1817 __ bind(&done_convert); in Generate_MathMaxMin()
1822 __ ucomisd(xmm0, xmm1); in Generate_MathMaxMin()
1823 __ j(parity_even, &compare_nan, Label::kNear); in Generate_MathMaxMin()
1824 __ j(cc, &done_compare, Label::kNear); in Generate_MathMaxMin()
1825 __ j(equal, &compare_equal, Label::kNear); in Generate_MathMaxMin()
1828 __ bind(&compare_swap); in Generate_MathMaxMin()
1829 __ movaps(xmm0, xmm1); in Generate_MathMaxMin()
1830 __ mov(edx, ebx); in Generate_MathMaxMin()
1831 __ jmp(&done_compare, Label::kNear); in Generate_MathMaxMin()
1834 __ bind(&compare_nan); in Generate_MathMaxMin()
1835 __ LoadRoot(edx, Heap::kNanValueRootIndex); in Generate_MathMaxMin()
1836 __ movsd(xmm0, FieldOperand(edx, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
1837 __ jmp(&done_compare, Label::kNear); in Generate_MathMaxMin()
1840 __ bind(&compare_equal); in Generate_MathMaxMin()
1841 __ Push(edi); // Preserve function in edi. in Generate_MathMaxMin()
1842 __ movmskpd(edi, reg); in Generate_MathMaxMin()
1843 __ test(edi, Immediate(1)); in Generate_MathMaxMin()
1844 __ Pop(edi); in Generate_MathMaxMin()
1845 __ j(not_zero, &compare_swap); in Generate_MathMaxMin()
1847 __ bind(&done_compare); in Generate_MathMaxMin()
1848 __ dec(ecx); in Generate_MathMaxMin()
1849 __ jmp(&loop); in Generate_MathMaxMin()
1852 __ bind(&done_loop); in Generate_MathMaxMin()
1853 __ PopReturnAddressTo(ecx); in Generate_MathMaxMin()
1854 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_MathMaxMin()
1855 __ PushReturnAddressFrom(ecx); in Generate_MathMaxMin()
1856 __ mov(eax, edx); in Generate_MathMaxMin()
1857 __ Ret(); in Generate_MathMaxMin()
1874 __ test(eax, eax); in Generate_NumberConstructor()
1875 __ j(zero, &no_arguments, Label::kNear); in Generate_NumberConstructor()
1876 __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); in Generate_NumberConstructor()
1882 __ SmiTag(eax); in Generate_NumberConstructor()
1883 __ EnterBuiltinFrame(esi, edi, eax); in Generate_NumberConstructor()
1884 __ mov(eax, ebx); in Generate_NumberConstructor()
1885 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor()
1886 __ LeaveBuiltinFrame(esi, edi, ebx); // Argc popped to ebx. in Generate_NumberConstructor()
1887 __ SmiUntag(ebx); in Generate_NumberConstructor()
1892 __ PopReturnAddressTo(ecx); in Generate_NumberConstructor()
1893 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); in Generate_NumberConstructor()
1894 __ PushReturnAddressFrom(ecx); in Generate_NumberConstructor()
1895 __ Ret(); in Generate_NumberConstructor()
1899 __ bind(&no_arguments); in Generate_NumberConstructor()
1900 __ ret(1 * kPointerSize); in Generate_NumberConstructor()
1916 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_NumberConstructor_ConstructStub()
1919 __ mov(ecx, eax); in Generate_NumberConstructor_ConstructStub()
1920 __ SmiTag(ecx); in Generate_NumberConstructor_ConstructStub()
1925 __ test(eax, eax); in Generate_NumberConstructor_ConstructStub()
1926 __ j(zero, &no_arguments, Label::kNear); in Generate_NumberConstructor_ConstructStub()
1927 __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); in Generate_NumberConstructor_ConstructStub()
1928 __ jmp(&done, Label::kNear); in Generate_NumberConstructor_ConstructStub()
1929 __ bind(&no_arguments); in Generate_NumberConstructor_ConstructStub()
1930 __ Move(ebx, Smi::kZero); in Generate_NumberConstructor_ConstructStub()
1931 __ bind(&done); in Generate_NumberConstructor_ConstructStub()
1937 __ JumpIfSmi(ebx, &done_convert); in Generate_NumberConstructor_ConstructStub()
1938 __ CompareRoot(FieldOperand(ebx, HeapObject::kMapOffset), in Generate_NumberConstructor_ConstructStub()
1940 __ j(equal, &done_convert); in Generate_NumberConstructor_ConstructStub()
1943 __ EnterBuiltinFrame(esi, edi, ecx); in Generate_NumberConstructor_ConstructStub()
1944 __ Push(edx); in Generate_NumberConstructor_ConstructStub()
1945 __ Move(eax, ebx); in Generate_NumberConstructor_ConstructStub()
1946 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor_ConstructStub()
1947 __ Move(ebx, eax); in Generate_NumberConstructor_ConstructStub()
1948 __ Pop(edx); in Generate_NumberConstructor_ConstructStub()
1949 __ LeaveBuiltinFrame(esi, edi, ecx); in Generate_NumberConstructor_ConstructStub()
1951 __ bind(&done_convert); in Generate_NumberConstructor_ConstructStub()
1956 __ cmp(edx, edi); in Generate_NumberConstructor_ConstructStub()
1957 __ j(not_equal, &new_object); in Generate_NumberConstructor_ConstructStub()
1960 __ AllocateJSValue(eax, edi, ebx, esi, &done_alloc); in Generate_NumberConstructor_ConstructStub()
1961 __ jmp(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
1963 __ bind(&done_alloc); in Generate_NumberConstructor_ConstructStub()
1964 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); // Restore esi. in Generate_NumberConstructor_ConstructStub()
1967 __ bind(&new_object); in Generate_NumberConstructor_ConstructStub()
1970 __ EnterBuiltinFrame(esi, edi, ecx); in Generate_NumberConstructor_ConstructStub()
1971 __ Push(ebx); // the first argument in Generate_NumberConstructor_ConstructStub()
1973 __ CallStub(&stub); in Generate_NumberConstructor_ConstructStub()
1974 __ Pop(FieldOperand(eax, JSValue::kValueOffset)); in Generate_NumberConstructor_ConstructStub()
1975 __ LeaveBuiltinFrame(esi, edi, ecx); in Generate_NumberConstructor_ConstructStub()
1978 __ bind(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
1981 __ PopReturnAddressTo(esi); in Generate_NumberConstructor_ConstructStub()
1982 __ SmiUntag(ecx); in Generate_NumberConstructor_ConstructStub()
1983 __ lea(esp, Operand(esp, ecx, times_pointer_size, kPointerSize)); in Generate_NumberConstructor_ConstructStub()
1984 __ PushReturnAddressFrom(esi); in Generate_NumberConstructor_ConstructStub()
1985 __ Ret(); in Generate_NumberConstructor_ConstructStub()
2003 __ mov(ebx, eax); // Store argc in ebx. in Generate_StringConstructor()
2004 __ test(eax, eax); in Generate_StringConstructor()
2005 __ j(zero, &no_arguments, Label::kNear); in Generate_StringConstructor()
2006 __ mov(eax, Operand(esp, eax, times_pointer_size, 0)); in Generate_StringConstructor()
2013 __ JumpIfSmi(eax, &to_string, Label::kNear); in Generate_StringConstructor()
2015 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx); in Generate_StringConstructor()
2016 __ j(above, &to_string, Label::kNear); in Generate_StringConstructor()
2017 __ j(equal, &symbol_descriptive_string, Label::kNear); in Generate_StringConstructor()
2018 __ jmp(&drop_frame_and_ret, Label::kNear); in Generate_StringConstructor()
2022 __ bind(&no_arguments); in Generate_StringConstructor()
2024 __ LoadRoot(eax, Heap::kempty_stringRootIndex); in Generate_StringConstructor()
2025 __ ret(1 * kPointerSize); in Generate_StringConstructor()
2029 __ bind(&to_string); in Generate_StringConstructor()
2032 __ SmiTag(ebx); in Generate_StringConstructor()
2033 __ EnterBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor()
2034 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor()
2035 __ LeaveBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor()
2036 __ SmiUntag(ebx); in Generate_StringConstructor()
2038 __ jmp(&drop_frame_and_ret, Label::kNear); in Generate_StringConstructor()
2041 __ bind(&symbol_descriptive_string); in Generate_StringConstructor()
2043 __ PopReturnAddressTo(ecx); in Generate_StringConstructor()
2044 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); in Generate_StringConstructor()
2045 __ Push(eax); in Generate_StringConstructor()
2046 __ PushReturnAddressFrom(ecx); in Generate_StringConstructor()
2047 __ TailCallRuntime(Runtime::kSymbolDescriptiveString); in Generate_StringConstructor()
2050 __ bind(&drop_frame_and_ret); in Generate_StringConstructor()
2053 __ PopReturnAddressTo(ecx); in Generate_StringConstructor()
2054 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); in Generate_StringConstructor()
2055 __ PushReturnAddressFrom(ecx); in Generate_StringConstructor()
2056 __ Ret(); in Generate_StringConstructor()
2073 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_StringConstructor_ConstructStub()
2075 __ mov(ebx, eax); in Generate_StringConstructor_ConstructStub()
2080 __ test(ebx, ebx); in Generate_StringConstructor_ConstructStub()
2081 __ j(zero, &no_arguments, Label::kNear); in Generate_StringConstructor_ConstructStub()
2082 __ mov(eax, Operand(esp, ebx, times_pointer_size, 0)); in Generate_StringConstructor_ConstructStub()
2083 __ jmp(&done, Label::kNear); in Generate_StringConstructor_ConstructStub()
2084 __ bind(&no_arguments); in Generate_StringConstructor_ConstructStub()
2085 __ LoadRoot(eax, Heap::kempty_stringRootIndex); in Generate_StringConstructor_ConstructStub()
2086 __ bind(&done); in Generate_StringConstructor_ConstructStub()
2092 __ JumpIfSmi(eax, &convert, Label::kNear); in Generate_StringConstructor_ConstructStub()
2093 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ecx); in Generate_StringConstructor_ConstructStub()
2094 __ j(below, &done_convert); in Generate_StringConstructor_ConstructStub()
2095 __ bind(&convert); in Generate_StringConstructor_ConstructStub()
2098 __ SmiTag(ebx); in Generate_StringConstructor_ConstructStub()
2099 __ EnterBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor_ConstructStub()
2100 __ Push(edx); in Generate_StringConstructor_ConstructStub()
2101 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor_ConstructStub()
2102 __ Pop(edx); in Generate_StringConstructor_ConstructStub()
2103 __ LeaveBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor_ConstructStub()
2104 __ SmiUntag(ebx); in Generate_StringConstructor_ConstructStub()
2106 __ bind(&done_convert); in Generate_StringConstructor_ConstructStub()
2111 __ cmp(edx, edi); in Generate_StringConstructor_ConstructStub()
2112 __ j(not_equal, &new_object); in Generate_StringConstructor_ConstructStub()
2117 __ mov(esi, eax); in Generate_StringConstructor_ConstructStub()
2118 __ AllocateJSValue(eax, edi, esi, ecx, &done_alloc); in Generate_StringConstructor_ConstructStub()
2119 __ jmp(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
2121 __ bind(&done_alloc); in Generate_StringConstructor_ConstructStub()
2124 __ mov(eax, esi); in Generate_StringConstructor_ConstructStub()
2125 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_StringConstructor_ConstructStub()
2129 __ bind(&new_object); in Generate_StringConstructor_ConstructStub()
2132 __ SmiTag(ebx); in Generate_StringConstructor_ConstructStub()
2133 __ EnterBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor_ConstructStub()
2134 __ Push(eax); // the first argument in Generate_StringConstructor_ConstructStub()
2136 __ CallStub(&stub); in Generate_StringConstructor_ConstructStub()
2137 __ Pop(FieldOperand(eax, JSValue::kValueOffset)); in Generate_StringConstructor_ConstructStub()
2138 __ LeaveBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor_ConstructStub()
2139 __ SmiUntag(ebx); in Generate_StringConstructor_ConstructStub()
2142 __ bind(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
2145 __ PopReturnAddressTo(ecx); in Generate_StringConstructor_ConstructStub()
2146 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); in Generate_StringConstructor_ConstructStub()
2147 __ PushReturnAddressFrom(ecx); in Generate_StringConstructor_ConstructStub()
2148 __ Ret(); in Generate_StringConstructor_ConstructStub()
2153 __ push(ebp); in EnterArgumentsAdaptorFrame()
2154 __ mov(ebp, esp); in EnterArgumentsAdaptorFrame()
2157 __ push(Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); in EnterArgumentsAdaptorFrame()
2160 __ push(edi); in EnterArgumentsAdaptorFrame()
2166 __ lea(edi, Operand(eax, eax, times_1, kSmiTag)); in EnterArgumentsAdaptorFrame()
2167 __ push(edi); in EnterArgumentsAdaptorFrame()
2172 __ mov(ebx, Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset)); in LeaveArgumentsAdaptorFrame()
2175 __ leave(); in LeaveArgumentsAdaptorFrame()
2179 __ pop(ecx); in LeaveArgumentsAdaptorFrame()
2180 __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver in LeaveArgumentsAdaptorFrame()
2181 __ push(ecx); in LeaveArgumentsAdaptorFrame()
2197 __ JumpIfSmi(eax, &create_runtime); in Generate_Apply()
2200 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); in Generate_Apply()
2203 __ mov(ebx, NativeContextOperand()); in Generate_Apply()
2206 __ cmp(ecx, ContextOperand(ebx, Context::SLOPPY_ARGUMENTS_MAP_INDEX)); in Generate_Apply()
2207 __ j(equal, &create_arguments); in Generate_Apply()
2208 __ cmp(ecx, ContextOperand(ebx, Context::STRICT_ARGUMENTS_MAP_INDEX)); in Generate_Apply()
2209 __ j(equal, &create_arguments); in Generate_Apply()
2212 __ CmpInstanceType(ecx, JS_ARRAY_TYPE); in Generate_Apply()
2213 __ j(equal, &create_array); in Generate_Apply()
2216 __ bind(&create_runtime); in Generate_Apply()
2219 __ Push(edi); in Generate_Apply()
2220 __ Push(edx); in Generate_Apply()
2221 __ Push(eax); in Generate_Apply()
2222 __ CallRuntime(Runtime::kCreateListFromArrayLike); in Generate_Apply()
2223 __ Pop(edx); in Generate_Apply()
2224 __ Pop(edi); in Generate_Apply()
2225 __ mov(ebx, FieldOperand(eax, FixedArray::kLengthOffset)); in Generate_Apply()
2226 __ SmiUntag(ebx); in Generate_Apply()
2228 __ jmp(&done_create); in Generate_Apply()
2231 __ bind(&create_arguments); in Generate_Apply()
2232 __ mov(ebx, FieldOperand(eax, JSArgumentsObject::kLengthOffset)); in Generate_Apply()
2233 __ mov(ecx, FieldOperand(eax, JSObject::kElementsOffset)); in Generate_Apply()
2234 __ cmp(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); in Generate_Apply()
2235 __ j(not_equal, &create_runtime); in Generate_Apply()
2236 __ SmiUntag(ebx); in Generate_Apply()
2237 __ mov(eax, ecx); in Generate_Apply()
2238 __ jmp(&done_create); in Generate_Apply()
2241 __ bind(&create_array); in Generate_Apply()
2242 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); in Generate_Apply()
2243 __ DecodeField<Map::ElementsKindBits>(ecx); in Generate_Apply()
2247 __ cmp(ecx, Immediate(FAST_ELEMENTS)); in Generate_Apply()
2248 __ j(above, &create_runtime); in Generate_Apply()
2249 __ cmp(ecx, Immediate(FAST_HOLEY_SMI_ELEMENTS)); in Generate_Apply()
2250 __ j(equal, &create_runtime); in Generate_Apply()
2251 __ mov(ebx, FieldOperand(eax, JSArray::kLengthOffset)); in Generate_Apply()
2252 __ SmiUntag(ebx); in Generate_Apply()
2253 __ mov(eax, FieldOperand(eax, JSArray::kElementsOffset)); in Generate_Apply()
2255 __ bind(&done_create); in Generate_Apply()
2265 __ mov(ecx, Operand::StaticVariable(real_stack_limit)); in Generate_Apply()
2268 __ neg(ecx); in Generate_Apply()
2269 __ add(ecx, esp); in Generate_Apply()
2270 __ sar(ecx, kPointerSizeLog2); in Generate_Apply()
2272 __ cmp(ecx, ebx); in Generate_Apply()
2273 __ j(greater, &done, Label::kNear); // Signed comparison. in Generate_Apply()
2274 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_Apply()
2275 __ bind(&done); in Generate_Apply()
2289 __ movd(xmm0, edx); in Generate_Apply()
2290 __ PopReturnAddressTo(edx); in Generate_Apply()
2291 __ Move(ecx, Immediate(0)); in Generate_Apply()
2293 __ bind(&loop); in Generate_Apply()
2294 __ cmp(ecx, ebx); in Generate_Apply()
2295 __ j(equal, &done, Label::kNear); in Generate_Apply()
2296 __ Push( in Generate_Apply()
2298 __ inc(ecx); in Generate_Apply()
2299 __ jmp(&loop); in Generate_Apply()
2300 __ bind(&done); in Generate_Apply()
2301 __ PushReturnAddressFrom(edx); in Generate_Apply()
2302 __ movd(edx, xmm0); in Generate_Apply()
2303 __ Move(eax, ebx); in Generate_Apply()
2308 __ CompareRoot(edx, Heap::kUndefinedValueRootIndex); in Generate_Apply()
2309 __ j(equal, masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_Apply()
2310 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_Apply()
2355 __ movzx_b(scratch1, in PrepareForTailCall()
2357 __ cmp(scratch1, Immediate(0)); in PrepareForTailCall()
2358 __ j(equal, &done, Label::kNear); in PrepareForTailCall()
2363 __ cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), in PrepareForTailCall()
2365 __ j(not_equal, &no_interpreter_frame, Label::kNear); in PrepareForTailCall()
2366 __ mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2367 __ bind(&no_interpreter_frame); in PrepareForTailCall()
2373 __ mov(scratch2, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2374 __ cmp(Operand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset), in PrepareForTailCall()
2376 __ j(not_equal, &no_arguments_adaptor, Label::kNear); in PrepareForTailCall()
2379 __ mov(ebp, scratch2); in PrepareForTailCall()
2380 __ mov(caller_args_count_reg, in PrepareForTailCall()
2382 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2383 __ jmp(&formal_parameter_count_loaded, Label::kNear); in PrepareForTailCall()
2385 __ bind(&no_arguments_adaptor); in PrepareForTailCall()
2387 __ mov(scratch1, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); in PrepareForTailCall()
2388 __ mov(scratch1, in PrepareForTailCall()
2390 __ mov( in PrepareForTailCall()
2393 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2395 __ bind(&formal_parameter_count_loaded); in PrepareForTailCall()
2398 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, in PrepareForTailCall()
2400 __ bind(&done); in PrepareForTailCall()
2412 __ AssertFunction(edi); in Generate_CallFunction()
2417 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2418 __ test_b(FieldOperand(edx, SharedFunctionInfo::kFunctionKindByteOffset), in Generate_CallFunction()
2420 __ j(not_zero, &class_constructor); in Generate_CallFunction()
2427 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_CallFunction()
2430 __ test_b(FieldOperand(edx, SharedFunctionInfo::kNativeByteOffset), in Generate_CallFunction()
2433 __ j(not_zero, &done_convert); in Generate_CallFunction()
2444 __ LoadGlobalProxy(ecx); in Generate_CallFunction()
2447 __ mov(ecx, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_CallFunction()
2448 __ JumpIfSmi(ecx, &convert_to_object, Label::kNear); in Generate_CallFunction()
2450 __ CmpObjectType(ecx, FIRST_JS_RECEIVER_TYPE, ebx); in Generate_CallFunction()
2451 __ j(above_equal, &done_convert); in Generate_CallFunction()
2454 __ JumpIfRoot(ecx, Heap::kUndefinedValueRootIndex, in Generate_CallFunction()
2456 __ JumpIfNotRoot(ecx, Heap::kNullValueRootIndex, &convert_to_object, in Generate_CallFunction()
2458 __ bind(&convert_global_proxy); in Generate_CallFunction()
2461 __ LoadGlobalProxy(ecx); in Generate_CallFunction()
2463 __ jmp(&convert_receiver); in Generate_CallFunction()
2465 __ bind(&convert_to_object); in Generate_CallFunction()
2471 __ SmiTag(eax); in Generate_CallFunction()
2472 __ Push(eax); in Generate_CallFunction()
2473 __ Push(edi); in Generate_CallFunction()
2474 __ mov(eax, ecx); in Generate_CallFunction()
2475 __ Push(esi); in Generate_CallFunction()
2476 __ Call(masm->isolate()->builtins()->ToObject(), in Generate_CallFunction()
2478 __ Pop(esi); in Generate_CallFunction()
2479 __ mov(ecx, eax); in Generate_CallFunction()
2480 __ Pop(edi); in Generate_CallFunction()
2481 __ Pop(eax); in Generate_CallFunction()
2482 __ SmiUntag(eax); in Generate_CallFunction()
2484 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2485 __ bind(&convert_receiver); in Generate_CallFunction()
2487 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ecx); in Generate_CallFunction()
2489 __ bind(&done_convert); in Generate_CallFunction()
2501 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2504 __ mov(ebx, in Generate_CallFunction()
2506 __ SmiUntag(ebx); in Generate_CallFunction()
2509 __ InvokeFunctionCode(edi, no_reg, expected, actual, JUMP_FUNCTION, in Generate_CallFunction()
2512 __ bind(&class_constructor); in Generate_CallFunction()
2515 __ push(edi); in Generate_CallFunction()
2516 __ CallRuntime(Runtime::kThrowConstructorNonCallableError); in Generate_CallFunction()
2531 __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundArgumentsOffset)); in Generate_PushBoundArguments()
2532 __ mov(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); in Generate_PushBoundArguments()
2533 __ SmiUntag(ebx); in Generate_PushBoundArguments()
2534 __ test(ebx, ebx); in Generate_PushBoundArguments()
2535 __ j(zero, &no_bound_arguments); in Generate_PushBoundArguments()
2548 __ lea(ecx, Operand(ebx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2549 __ sub(esp, ecx); in Generate_PushBoundArguments()
2553 __ CompareRoot(esp, ecx, Heap::kRealStackLimitRootIndex); in Generate_PushBoundArguments()
2554 __ j(greater, &done, Label::kNear); // Signed comparison. in Generate_PushBoundArguments()
2556 __ lea(esp, Operand(esp, ebx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2559 __ EnterFrame(StackFrame::INTERNAL); in Generate_PushBoundArguments()
2560 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_PushBoundArguments()
2562 __ bind(&done); in Generate_PushBoundArguments()
2566 __ inc(eax); in Generate_PushBoundArguments()
2571 __ Set(ecx, 0); in Generate_PushBoundArguments()
2572 __ lea(ebx, Operand(esp, ebx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2573 __ bind(&loop); in Generate_PushBoundArguments()
2574 __ movd(xmm0, Operand(ebx, ecx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2575 __ movd(Operand(esp, ecx, times_pointer_size, 0), xmm0); in Generate_PushBoundArguments()
2576 __ inc(ecx); in Generate_PushBoundArguments()
2577 __ cmp(ecx, eax); in Generate_PushBoundArguments()
2578 __ j(less, &loop); in Generate_PushBoundArguments()
2584 __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundArgumentsOffset)); in Generate_PushBoundArguments()
2585 __ mov(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); in Generate_PushBoundArguments()
2586 __ SmiUntag(ebx); in Generate_PushBoundArguments()
2587 __ bind(&loop); in Generate_PushBoundArguments()
2588 __ dec(ebx); in Generate_PushBoundArguments()
2589 __ movd(xmm0, FieldOperand(ecx, ebx, times_pointer_size, in Generate_PushBoundArguments()
2591 __ movd(Operand(esp, eax, times_pointer_size, 0), xmm0); in Generate_PushBoundArguments()
2592 __ lea(eax, Operand(eax, 1)); in Generate_PushBoundArguments()
2593 __ j(greater, &loop); in Generate_PushBoundArguments()
2599 __ dec(eax); in Generate_PushBoundArguments()
2601 __ bind(&no_bound_arguments); in Generate_PushBoundArguments()
2613 __ AssertBoundFunction(edi); in Generate_CallBoundFunctionImpl()
2620 __ mov(ebx, FieldOperand(edi, JSBoundFunction::kBoundThisOffset)); in Generate_CallBoundFunctionImpl()
2621 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ebx); in Generate_CallBoundFunctionImpl()
2627 __ mov(edi, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); in Generate_CallBoundFunctionImpl()
2628 __ mov(ecx, Operand::StaticVariable(ExternalReference( in Generate_CallBoundFunctionImpl()
2630 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_CallBoundFunctionImpl()
2631 __ jmp(ecx); in Generate_CallBoundFunctionImpl()
2643 __ JumpIfSmi(edi, &non_callable); in Generate_Call()
2644 __ bind(&non_smi); in Generate_Call()
2645 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); in Generate_Call()
2646 __ j(equal, masm->isolate()->builtins()->CallFunction(mode, tail_call_mode), in Generate_Call()
2648 __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); in Generate_Call()
2649 __ j(equal, masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), in Generate_Call()
2653 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_Call()
2655 __ j(zero, &non_callable); in Generate_Call()
2657 __ CmpInstanceType(ecx, JS_PROXY_TYPE); in Generate_Call()
2658 __ j(not_equal, &non_function); in Generate_Call()
2666 __ PopReturnAddressTo(ecx); in Generate_Call()
2667 __ Push(edi); in Generate_Call()
2668 __ PushReturnAddressFrom(ecx); in Generate_Call()
2671 __ add(eax, Immediate(2)); in Generate_Call()
2673 __ JumpToExternalReference( in Generate_Call()
2678 __ bind(&non_function); in Generate_Call()
2680 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); in Generate_Call()
2682 __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, edi); in Generate_Call()
2683 __ Jump(masm->isolate()->builtins()->CallFunction( in Generate_Call()
2688 __ bind(&non_callable); in Generate_Call()
2691 __ Push(edi); in Generate_Call()
2692 __ CallRuntime(Runtime::kThrowCalledNonCallable); in Generate_Call()
2703 __ AssertFunction(edi); in Generate_ConstructFunction()
2707 __ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); in Generate_ConstructFunction()
2711 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ConstructFunction()
2712 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); in Generate_ConstructFunction()
2713 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_ConstructFunction()
2714 __ jmp(ecx); in Generate_ConstructFunction()
2724 __ AssertBoundFunction(edi); in Generate_ConstructBoundFunction()
2732 __ cmp(edi, edx); in Generate_ConstructBoundFunction()
2733 __ j(not_equal, &done, Label::kNear); in Generate_ConstructBoundFunction()
2734 __ mov(edx, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); in Generate_ConstructBoundFunction()
2735 __ bind(&done); in Generate_ConstructBoundFunction()
2739 __ mov(edi, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); in Generate_ConstructBoundFunction()
2740 __ mov(ecx, Operand::StaticVariable( in Generate_ConstructBoundFunction()
2742 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_ConstructBoundFunction()
2743 __ jmp(ecx); in Generate_ConstructBoundFunction()
2756 __ PopReturnAddressTo(ecx); in Generate_ConstructProxy()
2757 __ Push(edi); in Generate_ConstructProxy()
2758 __ Push(edx); in Generate_ConstructProxy()
2759 __ PushReturnAddressFrom(ecx); in Generate_ConstructProxy()
2761 __ add(eax, Immediate(3)); in Generate_ConstructProxy()
2763 __ JumpToExternalReference( in Generate_ConstructProxy()
2778 __ JumpIfSmi(edi, &non_constructor, Label::kNear); in Generate_Construct()
2781 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); in Generate_Construct()
2782 __ j(equal, masm->isolate()->builtins()->ConstructFunction(), in Generate_Construct()
2786 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_Construct()
2788 __ j(zero, &non_constructor, Label::kNear); in Generate_Construct()
2792 __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); in Generate_Construct()
2793 __ j(equal, masm->isolate()->builtins()->ConstructBoundFunction(), in Generate_Construct()
2797 __ CmpInstanceType(ecx, JS_PROXY_TYPE); in Generate_Construct()
2798 __ j(equal, masm->isolate()->builtins()->ConstructProxy(), in Generate_Construct()
2804 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); in Generate_Construct()
2806 __ LoadGlobalFunction(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, edi); in Generate_Construct()
2807 __ Jump(masm->isolate()->builtins()->CallFunction(), in Generate_Construct()
2813 __ bind(&non_constructor); in Generate_Construct()
2814 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), in Generate_Construct()
2824 __ SmiTag(edx); in Generate_AllocateInNewSpace()
2825 __ PopReturnAddressTo(ecx); in Generate_AllocateInNewSpace()
2826 __ Push(edx); in Generate_AllocateInNewSpace()
2827 __ PushReturnAddressFrom(ecx); in Generate_AllocateInNewSpace()
2828 __ Move(esi, Smi::kZero); in Generate_AllocateInNewSpace()
2829 __ TailCallRuntime(Runtime::kAllocateInNewSpace); in Generate_AllocateInNewSpace()
2838 __ SmiTag(edx); in Generate_AllocateInOldSpace()
2839 __ PopReturnAddressTo(ecx); in Generate_AllocateInOldSpace()
2840 __ Push(edx); in Generate_AllocateInOldSpace()
2841 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); in Generate_AllocateInOldSpace()
2842 __ PushReturnAddressFrom(ecx); in Generate_AllocateInOldSpace()
2843 __ Move(esi, Smi::kZero); in Generate_AllocateInOldSpace()
2844 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); in Generate_AllocateInOldSpace()
2853 __ PopReturnAddressTo(ecx); in Generate_Abort()
2854 __ Push(edx); in Generate_Abort()
2855 __ PushReturnAddressFrom(ecx); in Generate_Abort()
2856 __ Move(esi, Smi::kZero); in Generate_Abort()
2857 __ TailCallRuntime(Runtime::kAbort); in Generate_Abort()
2869 __ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); in Generate_ArgumentsAdaptorTrampoline()
2872 __ cmp(eax, ebx); in Generate_ArgumentsAdaptorTrampoline()
2873 __ j(less, &too_few); in Generate_ArgumentsAdaptorTrampoline()
2874 __ cmp(ebx, SharedFunctionInfo::kDontAdaptArgumentsSentinel); in Generate_ArgumentsAdaptorTrampoline()
2875 __ j(equal, &dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
2878 __ bind(&enough); in Generate_ArgumentsAdaptorTrampoline()
2886 __ lea(edi, Operand(ebp, eax, times_4, offset)); in Generate_ArgumentsAdaptorTrampoline()
2887 __ mov(eax, -1); // account for receiver in Generate_ArgumentsAdaptorTrampoline()
2890 __ bind(©); in Generate_ArgumentsAdaptorTrampoline()
2891 __ inc(eax); in Generate_ArgumentsAdaptorTrampoline()
2892 __ push(Operand(edi, 0)); in Generate_ArgumentsAdaptorTrampoline()
2893 __ sub(edi, Immediate(kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2894 __ cmp(eax, ebx); in Generate_ArgumentsAdaptorTrampoline()
2895 __ j(less, ©); in Generate_ArgumentsAdaptorTrampoline()
2897 __ jmp(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2901 __ bind(&too_few); in Generate_ArgumentsAdaptorTrampoline()
2908 __ mov(ecx, ebx); in Generate_ArgumentsAdaptorTrampoline()
2912 __ lea(edi, Operand(ebp, eax, times_4, offset)); in Generate_ArgumentsAdaptorTrampoline()
2914 __ sub(ebx, eax); in Generate_ArgumentsAdaptorTrampoline()
2916 __ neg(eax); in Generate_ArgumentsAdaptorTrampoline()
2917 __ sub(eax, Immediate(1)); in Generate_ArgumentsAdaptorTrampoline()
2920 __ bind(©); in Generate_ArgumentsAdaptorTrampoline()
2921 __ inc(eax); in Generate_ArgumentsAdaptorTrampoline()
2922 __ push(Operand(edi, 0)); in Generate_ArgumentsAdaptorTrampoline()
2923 __ sub(edi, Immediate(kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2924 __ test(eax, eax); in Generate_ArgumentsAdaptorTrampoline()
2925 __ j(not_zero, ©); in Generate_ArgumentsAdaptorTrampoline()
2929 __ bind(&fill); in Generate_ArgumentsAdaptorTrampoline()
2930 __ inc(eax); in Generate_ArgumentsAdaptorTrampoline()
2931 __ push(Immediate(masm->isolate()->factory()->undefined_value())); in Generate_ArgumentsAdaptorTrampoline()
2932 __ cmp(eax, ebx); in Generate_ArgumentsAdaptorTrampoline()
2933 __ j(less, &fill); in Generate_ArgumentsAdaptorTrampoline()
2936 __ mov(eax, ecx); in Generate_ArgumentsAdaptorTrampoline()
2940 __ bind(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2942 __ mov(edi, Operand(ebp, ArgumentsAdaptorFrameConstants::kFunctionOffset)); in Generate_ArgumentsAdaptorTrampoline()
2946 __ mov(ecx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); in Generate_ArgumentsAdaptorTrampoline()
2947 __ call(ecx); in Generate_ArgumentsAdaptorTrampoline()
2954 __ ret(0); in Generate_ArgumentsAdaptorTrampoline()
2959 __ bind(&dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
2960 __ mov(ecx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); in Generate_ArgumentsAdaptorTrampoline()
2961 __ jmp(ecx); in Generate_ArgumentsAdaptorTrampoline()
2963 __ bind(&stack_overflow); in Generate_ArgumentsAdaptorTrampoline()
2966 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_ArgumentsAdaptorTrampoline()
2967 __ int3(); in Generate_ArgumentsAdaptorTrampoline()
2976 __ CompareRoot(FieldOperand(function_template_info, in CompatibleReceiverCheck()
2980 __ j(equal, &receiver_check_passed, Label::kNear); in CompatibleReceiverCheck()
2983 __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
2985 __ bind(&prototype_loop_start); in CompatibleReceiverCheck()
2988 __ GetMapConstructor(scratch0, scratch0, scratch1); in CompatibleReceiverCheck()
2989 __ CmpInstanceType(scratch1, JS_FUNCTION_TYPE); in CompatibleReceiverCheck()
2991 __ j(not_equal, &next_prototype, Label::kNear); in CompatibleReceiverCheck()
2994 __ mov(scratch0, in CompatibleReceiverCheck()
2996 __ mov(scratch0, in CompatibleReceiverCheck()
3001 __ bind(&function_template_loop); in CompatibleReceiverCheck()
3004 __ cmp(scratch0, FieldOperand(function_template_info, in CompatibleReceiverCheck()
3006 __ j(equal, &receiver_check_passed, Label::kNear); in CompatibleReceiverCheck()
3010 __ JumpIfSmi(scratch0, &next_prototype, Label::kNear); in CompatibleReceiverCheck()
3011 __ CmpObjectType(scratch0, FUNCTION_TEMPLATE_INFO_TYPE, scratch1); in CompatibleReceiverCheck()
3012 __ j(not_equal, &next_prototype, Label::kNear); in CompatibleReceiverCheck()
3015 __ mov(scratch0, in CompatibleReceiverCheck()
3017 __ jmp(&function_template_loop, Label::kNear); in CompatibleReceiverCheck()
3020 __ bind(&next_prototype); in CompatibleReceiverCheck()
3021 __ mov(receiver, FieldOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
3022 __ test(FieldOperand(receiver, Map::kBitField3Offset), in CompatibleReceiverCheck()
3024 __ j(zero, receiver_check_failed); in CompatibleReceiverCheck()
3026 __ mov(receiver, FieldOperand(receiver, Map::kPrototypeOffset)); in CompatibleReceiverCheck()
3027 __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
3029 __ jmp(&prototype_loop_start, Label::kNear); in CompatibleReceiverCheck()
3031 __ bind(&receiver_check_passed); in CompatibleReceiverCheck()
3047 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_HandleFastApiCall()
3048 __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kFunctionDataOffset)); in Generate_HandleFastApiCall()
3052 __ mov(ecx, Operand(esp, eax, times_pointer_size, kPCOnStackSize)); in Generate_HandleFastApiCall()
3053 __ Push(eax); in Generate_HandleFastApiCall()
3055 __ Pop(eax); in Generate_HandleFastApiCall()
3058 __ mov(edx, FieldOperand(ebx, FunctionTemplateInfo::kCallCodeOffset)); in Generate_HandleFastApiCall()
3059 __ mov(edx, FieldOperand(edx, CallHandlerInfo::kFastHandlerOffset)); in Generate_HandleFastApiCall()
3060 __ add(edx, Immediate(Code::kHeaderSize - kHeapObjectTag)); in Generate_HandleFastApiCall()
3061 __ jmp(edx); in Generate_HandleFastApiCall()
3065 __ bind(&receiver_check_failed); in Generate_HandleFastApiCall()
3066 __ Pop(eax); in Generate_HandleFastApiCall()
3067 __ PopReturnAddressTo(ebx); in Generate_HandleFastApiCall()
3068 __ lea(eax, Operand(eax, times_pointer_size, 1 * kPointerSize)); in Generate_HandleFastApiCall()
3069 __ add(esp, eax); in Generate_HandleFastApiCall()
3070 __ PushReturnAddressFrom(ebx); in Generate_HandleFastApiCall()
3073 __ TailCallRuntime(Runtime::kThrowIllegalInvocation); in Generate_HandleFastApiCall()
3081 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); in Generate_OnStackReplacementHelper()
3082 __ mov(eax, Operand(eax, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
3084 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
3090 __ push(eax); in Generate_OnStackReplacementHelper()
3091 __ CallRuntime(Runtime::kCompileForOnStackReplacement); in Generate_OnStackReplacementHelper()
3096 __ cmp(eax, Immediate(0)); in Generate_OnStackReplacementHelper()
3097 __ j(not_equal, &skip, Label::kNear); in Generate_OnStackReplacementHelper()
3098 __ ret(0); in Generate_OnStackReplacementHelper()
3100 __ bind(&skip); in Generate_OnStackReplacementHelper()
3105 __ leave(); in Generate_OnStackReplacementHelper()
3109 __ mov(ebx, Operand(eax, Code::kDeoptimizationDataOffset - kHeapObjectTag)); in Generate_OnStackReplacementHelper()
3112 __ mov(ebx, Operand(ebx, FixedArray::OffsetOfElementAt( in Generate_OnStackReplacementHelper()
3115 __ SmiUntag(ebx); in Generate_OnStackReplacementHelper()
3118 __ lea(eax, Operand(eax, ebx, times_1, Code::kHeaderSize - kHeapObjectTag)); in Generate_OnStackReplacementHelper()
3121 __ mov(Operand(esp, 0), eax); in Generate_OnStackReplacementHelper()
3124 __ ret(0); in Generate_OnStackReplacementHelper()
3135 #undef __