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()
199 __ JumpIfSmi(eax, &use_receiver, Label::kNear); in Generate_JSConstructStubHelper()
203 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); in Generate_JSConstructStubHelper()
204 __ j(above_equal, &exit, Label::kNear); in Generate_JSConstructStubHelper()
208 __ bind(&use_receiver); in Generate_JSConstructStubHelper()
209 __ mov(eax, Operand(esp, 0)); in Generate_JSConstructStubHelper()
213 __ bind(&exit); in Generate_JSConstructStubHelper()
214 __ mov(ebx, Operand(esp, 1 * kPointerSize)); in Generate_JSConstructStubHelper()
216 __ mov(ebx, Operand(esp, 0)); in Generate_JSConstructStubHelper()
227 __ JumpIfNotSmi(eax, &dont_throw); in Generate_JSConstructStubHelper()
230 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); in Generate_JSConstructStubHelper()
232 __ bind(&dont_throw); in Generate_JSConstructStubHelper()
237 __ pop(ecx); in Generate_JSConstructStubHelper()
238 __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver in Generate_JSConstructStubHelper()
239 __ push(ecx); in Generate_JSConstructStubHelper()
241 __ IncrementCounter(masm->isolate()->counters()->constructed_objects(), 1); in Generate_JSConstructStubHelper()
243 __ ret(0); in Generate_JSConstructStubHelper()
267 __ push(edi); in Generate_ConstructedNonConstructable()
268 __ CallRuntime(Runtime::kThrowConstructedNonConstructable); in Generate_ConstructedNonConstructable()
284 __ mov(edi, Operand::StaticVariable(real_stack_limit)); in Generate_CheckStackOverflow()
287 __ mov(ecx, esp); in Generate_CheckStackOverflow()
288 __ sub(ecx, edi); in Generate_CheckStackOverflow()
291 __ mov(edx, eax); in Generate_CheckStackOverflow()
293 __ shl(edx, kPointerSizeLog2 - smi_tag); in Generate_CheckStackOverflow()
295 __ cmp(ecx, edx); in Generate_CheckStackOverflow()
296 __ j(greater, &okay); // Signed comparison. in Generate_CheckStackOverflow()
299 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_CheckStackOverflow()
301 __ bind(&okay); in Generate_CheckStackOverflow()
314 __ mov(esi, Operand::StaticVariable(context_address)); in Generate_JSEntryTrampolineHelper()
317 __ mov(ebx, Operand(ebp, 0)); in Generate_JSEntryTrampolineHelper()
320 __ push(Operand(ebx, EntryFrameConstants::kFunctionArgOffset)); in Generate_JSEntryTrampolineHelper()
321 __ push(Operand(ebx, EntryFrameConstants::kReceiverArgOffset)); in Generate_JSEntryTrampolineHelper()
324 __ mov(eax, Operand(ebx, EntryFrameConstants::kArgcOffset)); in Generate_JSEntryTrampolineHelper()
325 __ mov(ebx, Operand(ebx, EntryFrameConstants::kArgvOffset)); in Generate_JSEntryTrampolineHelper()
333 __ Move(ecx, Immediate(0)); in Generate_JSEntryTrampolineHelper()
334 __ jmp(&entry, Label::kNear); in Generate_JSEntryTrampolineHelper()
335 __ bind(&loop); in Generate_JSEntryTrampolineHelper()
336 __ mov(edx, Operand(ebx, ecx, times_4, 0)); // push parameter from argv in Generate_JSEntryTrampolineHelper()
337 __ push(Operand(edx, 0)); // dereference handle in Generate_JSEntryTrampolineHelper()
338 __ inc(ecx); in Generate_JSEntryTrampolineHelper()
339 __ bind(&entry); in Generate_JSEntryTrampolineHelper()
340 __ cmp(ecx, eax); in Generate_JSEntryTrampolineHelper()
341 __ j(not_equal, &loop); in Generate_JSEntryTrampolineHelper()
344 __ mov(ebx, Operand(ebp, 0)); in Generate_JSEntryTrampolineHelper()
347 __ mov(edx, Operand(ebx, EntryFrameConstants::kNewTargetArgOffset)); in Generate_JSEntryTrampolineHelper()
348 __ mov(edi, Operand(ebx, EntryFrameConstants::kFunctionArgOffset)); in Generate_JSEntryTrampolineHelper()
354 __ Call(builtin, RelocInfo::CODE_TARGET); in Generate_JSEntryTrampolineHelper()
360 __ ret(kPointerSize); // Remove receiver. in Generate_JSEntryTrampolineHelper()
379 __ AssertGeneratorObject(ebx); in Generate_ResumeGeneratorTrampoline()
382 __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOrDebugPosOffset), eax); in Generate_ResumeGeneratorTrampoline()
383 __ RecordWriteField(ebx, JSGeneratorObject::kInputOrDebugPosOffset, eax, ecx, in Generate_ResumeGeneratorTrampoline()
387 __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); in Generate_ResumeGeneratorTrampoline()
390 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); in Generate_ResumeGeneratorTrampoline()
391 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
399 __ cmpb(Operand::StaticVariable(last_step_action), Immediate(StepIn)); in Generate_ResumeGeneratorTrampoline()
400 __ j(greater_equal, &prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
405 __ cmp(ebx, Operand::StaticVariable(debug_suspended_generator)); in Generate_ResumeGeneratorTrampoline()
406 __ j(equal, &prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
407 __ bind(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
410 __ PopReturnAddressTo(eax); in Generate_ResumeGeneratorTrampoline()
413 __ Push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); in Generate_ResumeGeneratorTrampoline()
428 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
429 __ mov(ecx, in Generate_ResumeGeneratorTrampoline()
433 __ bind(&loop); in Generate_ResumeGeneratorTrampoline()
434 __ sub(ecx, Immediate(Smi::FromInt(1))); in Generate_ResumeGeneratorTrampoline()
435 __ j(carry, &done_loop, Label::kNear); in Generate_ResumeGeneratorTrampoline()
436 __ PushRoot(Heap::kTheHoleValueRootIndex); in Generate_ResumeGeneratorTrampoline()
437 __ jmp(&loop); in Generate_ResumeGeneratorTrampoline()
438 __ bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
443 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
444 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kFunctionDataOffset)); in Generate_ResumeGeneratorTrampoline()
445 __ CmpObjectType(ecx, BYTECODE_ARRAY_TYPE, ecx); in Generate_ResumeGeneratorTrampoline()
446 __ j(not_equal, &old_generator); in Generate_ResumeGeneratorTrampoline()
450 __ PushReturnAddressFrom(eax); in Generate_ResumeGeneratorTrampoline()
451 __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
452 __ mov(eax, in Generate_ResumeGeneratorTrampoline()
457 __ mov(edx, ebx); in Generate_ResumeGeneratorTrampoline()
458 __ jmp(FieldOperand(edi, JSFunction::kCodeEntryOffset)); in Generate_ResumeGeneratorTrampoline()
462 __ bind(&old_generator); in Generate_ResumeGeneratorTrampoline()
467 __ PushReturnAddressFrom(eax); // Return address. in Generate_ResumeGeneratorTrampoline()
468 __ Push(ebp); // Caller's frame pointer. in Generate_ResumeGeneratorTrampoline()
469 __ Move(ebp, esp); in Generate_ResumeGeneratorTrampoline()
470 __ Push(esi); // Callee's context. in Generate_ResumeGeneratorTrampoline()
471 __ Push(edi); // Callee's JS Function. in Generate_ResumeGeneratorTrampoline()
474 __ mov(eax, FieldOperand(ebx, JSGeneratorObject::kOperandStackOffset)); in Generate_ResumeGeneratorTrampoline()
477 __ Move(ecx, Smi::kZero); in Generate_ResumeGeneratorTrampoline()
478 __ bind(&loop); in Generate_ResumeGeneratorTrampoline()
479 __ cmp(ecx, FieldOperand(eax, FixedArray::kLengthOffset)); in Generate_ResumeGeneratorTrampoline()
480 __ j(equal, &done_loop, Label::kNear); in Generate_ResumeGeneratorTrampoline()
481 __ Push(FieldOperand(eax, ecx, times_half_pointer_size, in Generate_ResumeGeneratorTrampoline()
483 __ add(ecx, Immediate(Smi::FromInt(1))); in Generate_ResumeGeneratorTrampoline()
484 __ jmp(&loop); in Generate_ResumeGeneratorTrampoline()
485 __ bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
489 __ mov(FieldOperand(ebx, JSGeneratorObject::kOperandStackOffset), in Generate_ResumeGeneratorTrampoline()
493 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
494 __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); in Generate_ResumeGeneratorTrampoline()
495 __ mov(ecx, FieldOperand(ebx, JSGeneratorObject::kContinuationOffset)); in Generate_ResumeGeneratorTrampoline()
496 __ SmiUntag(ecx); in Generate_ResumeGeneratorTrampoline()
497 __ lea(edx, FieldOperand(edx, ecx, times_1, Code::kHeaderSize)); in Generate_ResumeGeneratorTrampoline()
498 __ mov(FieldOperand(ebx, JSGeneratorObject::kContinuationOffset), in Generate_ResumeGeneratorTrampoline()
500 __ mov(eax, ebx); // Continuation expects generator object in eax. in Generate_ResumeGeneratorTrampoline()
501 __ jmp(edx); in Generate_ResumeGeneratorTrampoline()
504 __ bind(&prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
507 __ Push(ebx); in Generate_ResumeGeneratorTrampoline()
508 __ Push(edx); in Generate_ResumeGeneratorTrampoline()
509 __ Push(edi); in Generate_ResumeGeneratorTrampoline()
510 __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); in Generate_ResumeGeneratorTrampoline()
511 __ Pop(edx); in Generate_ResumeGeneratorTrampoline()
512 __ Pop(ebx); in Generate_ResumeGeneratorTrampoline()
513 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
515 __ jmp(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
517 __ bind(&prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
520 __ Push(ebx); in Generate_ResumeGeneratorTrampoline()
521 __ Push(edx); in Generate_ResumeGeneratorTrampoline()
522 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); in Generate_ResumeGeneratorTrampoline()
523 __ Pop(edx); in Generate_ResumeGeneratorTrampoline()
524 __ Pop(ebx); in Generate_ResumeGeneratorTrampoline()
525 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
527 __ jmp(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
536 __ mov(args_count, in LeaveInterpreterFrame()
538 __ mov(args_count, in LeaveInterpreterFrame()
542 __ leave(); in LeaveInterpreterFrame()
545 __ pop(return_pc); in LeaveInterpreterFrame()
546 __ add(esp, args_count); in LeaveInterpreterFrame()
547 __ push(return_pc); in LeaveInterpreterFrame()
571 __ push(ebp); // Caller's frame pointer. in Generate_InterpreterEntryTrampoline()
572 __ mov(ebp, esp); in Generate_InterpreterEntryTrampoline()
573 __ push(esi); // Callee's context. in Generate_InterpreterEntryTrampoline()
574 __ push(edi); // Callee's JS function. in Generate_InterpreterEntryTrampoline()
575 __ push(edx); // Callee's new target. in Generate_InterpreterEntryTrampoline()
579 __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
581 __ cmp(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), in Generate_InterpreterEntryTrampoline()
583 __ j(not_equal, &load_debug_bytecode_array); in Generate_InterpreterEntryTrampoline()
584 __ mov(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
586 __ bind(&bytecode_array_loaded); in Generate_InterpreterEntryTrampoline()
590 __ Move(ecx, masm->CodeObject()); // Self-reference to this code. in Generate_InterpreterEntryTrampoline()
591 __ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
592 __ j(not_equal, &switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
595 __ EmitLoadTypeFeedbackVector(ecx); in Generate_InterpreterEntryTrampoline()
596 __ add(FieldOperand(ecx, in Generate_InterpreterEntryTrampoline()
603 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); in Generate_InterpreterEntryTrampoline()
604 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, in Generate_InterpreterEntryTrampoline()
606 __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEntryTrampoline()
610 __ push(kInterpreterBytecodeArrayRegister); in Generate_InterpreterEntryTrampoline()
612 __ push(Immediate(Smi::FromInt(BytecodeArray::kHeaderSize - kHeapObjectTag))); in Generate_InterpreterEntryTrampoline()
617 __ mov(ebx, FieldOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
622 __ mov(ecx, esp); in Generate_InterpreterEntryTrampoline()
623 __ sub(ecx, ebx); in Generate_InterpreterEntryTrampoline()
626 __ cmp(ecx, Operand::StaticVariable(stack_limit)); in Generate_InterpreterEntryTrampoline()
627 __ j(above_equal, &ok); in Generate_InterpreterEntryTrampoline()
628 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterEntryTrampoline()
629 __ bind(&ok); in Generate_InterpreterEntryTrampoline()
634 __ mov(eax, Immediate(masm->isolate()->factory()->undefined_value())); in Generate_InterpreterEntryTrampoline()
635 __ jmp(&loop_check); in Generate_InterpreterEntryTrampoline()
636 __ bind(&loop_header); in Generate_InterpreterEntryTrampoline()
638 __ push(eax); in Generate_InterpreterEntryTrampoline()
640 __ bind(&loop_check); in Generate_InterpreterEntryTrampoline()
641 __ sub(ebx, Immediate(kPointerSize)); in Generate_InterpreterEntryTrampoline()
642 __ j(greater_equal, &loop_header); in Generate_InterpreterEntryTrampoline()
646 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); in Generate_InterpreterEntryTrampoline()
647 __ mov(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEntryTrampoline()
649 __ mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEntryTrampoline()
654 __ movzx_b(ebx, Operand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
656 __ mov(ebx, Operand(kInterpreterDispatchTableRegister, ebx, in Generate_InterpreterEntryTrampoline()
658 __ call(ebx); in Generate_InterpreterEntryTrampoline()
663 __ ret(0); in Generate_InterpreterEntryTrampoline()
666 __ bind(&load_debug_bytecode_array); in Generate_InterpreterEntryTrampoline()
668 __ mov(debug_info, FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset)); in Generate_InterpreterEntryTrampoline()
669 __ mov(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
671 __ jmp(&bytecode_array_loaded); in Generate_InterpreterEntryTrampoline()
676 __ bind(&switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
677 __ pop(edx); // Callee's new target. in Generate_InterpreterEntryTrampoline()
678 __ pop(edi); // Callee's JS function. in Generate_InterpreterEntryTrampoline()
679 __ pop(esi); // Callee's context. in Generate_InterpreterEntryTrampoline()
680 __ leave(); // Leave the frame so we can tail call. in Generate_InterpreterEntryTrampoline()
681 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
682 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
683 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_InterpreterEntryTrampoline()
684 __ mov(FieldOperand(edi, JSFunction::kCodeEntryOffset), ecx); in Generate_InterpreterEntryTrampoline()
685 __ RecordWriteCodeEntryField(edi, ecx, ebx); in Generate_InterpreterEntryTrampoline()
686 __ jmp(ecx); in Generate_InterpreterEntryTrampoline()
698 __ mov(scratch1, Operand::StaticVariable(real_stack_limit)); in Generate_StackOverflowCheck()
701 __ mov(scratch2, esp); in Generate_StackOverflowCheck()
702 __ sub(scratch2, scratch1); in Generate_StackOverflowCheck()
705 __ mov(scratch1, num_args); in Generate_StackOverflowCheck()
707 __ add(scratch1, Immediate(1)); in Generate_StackOverflowCheck()
709 __ shl(scratch1, kPointerSizeLog2); in Generate_StackOverflowCheck()
711 __ cmp(scratch2, scratch1); in Generate_StackOverflowCheck()
712 __ j(less_equal, stack_overflow); // Signed comparison. in Generate_StackOverflowCheck()
724 __ jmp(&loop_check); in Generate_InterpreterPushArgs()
725 __ bind(&loop_header); in Generate_InterpreterPushArgs()
726 __ Push(Operand(start_address, 0)); in Generate_InterpreterPushArgs()
727 __ sub(start_address, Immediate(kPointerSize)); in Generate_InterpreterPushArgs()
728 __ bind(&loop_check); in Generate_InterpreterPushArgs()
729 __ cmp(start_address, array_limit); in Generate_InterpreterPushArgs()
730 __ j(greater, &loop_header, Label::kNear); in Generate_InterpreterPushArgs()
746 __ mov(ecx, eax); in Generate_InterpreterPushArgsAndCallImpl()
747 __ add(ecx, Immediate(1)); // Add one for receiver. in Generate_InterpreterPushArgsAndCallImpl()
752 __ Push(edi); in Generate_InterpreterPushArgsAndCallImpl()
754 __ Pop(edi); in Generate_InterpreterPushArgsAndCallImpl()
757 __ Pop(edx); in Generate_InterpreterPushArgsAndCallImpl()
760 __ shl(ecx, kPointerSizeLog2); in Generate_InterpreterPushArgsAndCallImpl()
761 __ neg(ecx); in Generate_InterpreterPushArgsAndCallImpl()
762 __ add(ecx, ebx); in Generate_InterpreterPushArgsAndCallImpl()
766 __ Push(edx); // Re-push return address. in Generate_InterpreterPushArgsAndCallImpl()
769 __ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
774 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
779 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndCallImpl()
782 __ Pop(edi); in Generate_InterpreterPushArgsAndCallImpl()
784 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndCallImpl()
787 __ int3(); in Generate_InterpreterPushArgsAndCallImpl()
832 __ bind(&check_offset); in Generate_InterpreterPushArgsAndReturnAddress()
833 __ cmp(scratch1, page_size); in Generate_InterpreterPushArgsAndReturnAddress()
834 __ j(less, &update_stack_pointer); in Generate_InterpreterPushArgsAndReturnAddress()
835 __ sub(esp, Immediate(page_size)); in Generate_InterpreterPushArgsAndReturnAddress()
837 __ mov(Operand(esp, 0), Immediate(0)); in Generate_InterpreterPushArgsAndReturnAddress()
838 __ sub(scratch1, Immediate(page_size)); in Generate_InterpreterPushArgsAndReturnAddress()
839 __ jmp(&check_offset); in Generate_InterpreterPushArgsAndReturnAddress()
840 __ bind(&update_stack_pointer); in Generate_InterpreterPushArgsAndReturnAddress()
843 __ sub(esp, scratch1); in Generate_InterpreterPushArgsAndReturnAddress()
850 __ mov(scratch1, in Generate_InterpreterPushArgsAndReturnAddress()
852 __ mov(Operand(esp, i * kPointerSize), scratch1); in Generate_InterpreterPushArgsAndReturnAddress()
857 __ mov(scratch1, num_args); in Generate_InterpreterPushArgsAndReturnAddress()
858 __ add(scratch1, Immediate(1)); in Generate_InterpreterPushArgsAndReturnAddress()
862 __ mov(Operand(esp, num_args, times_pointer_size, in Generate_InterpreterPushArgsAndReturnAddress()
865 __ mov(scratch1, num_args); in Generate_InterpreterPushArgsAndReturnAddress()
869 __ jmp(&loop_check); in Generate_InterpreterPushArgsAndReturnAddress()
870 __ bind(&loop_header); in Generate_InterpreterPushArgsAndReturnAddress()
871 __ mov(scratch2, Operand(start_addr, 0)); in Generate_InterpreterPushArgsAndReturnAddress()
872 __ mov(Operand(esp, scratch1, times_pointer_size, in Generate_InterpreterPushArgsAndReturnAddress()
875 __ sub(start_addr, Immediate(kPointerSize)); in Generate_InterpreterPushArgsAndReturnAddress()
876 __ sub(scratch1, Immediate(1)); in Generate_InterpreterPushArgsAndReturnAddress()
877 __ bind(&loop_check); in Generate_InterpreterPushArgsAndReturnAddress()
878 __ cmp(scratch1, Immediate(0)); in Generate_InterpreterPushArgsAndReturnAddress()
879 __ j(greater, &loop_header, Label::kNear); in Generate_InterpreterPushArgsAndReturnAddress()
898 __ Push(edi); in Generate_InterpreterPushArgsAndConstructImpl()
899 __ Push(edx); in Generate_InterpreterPushArgsAndConstructImpl()
908 __ Pop(edx); in Generate_InterpreterPushArgsAndConstructImpl()
909 __ Pop(edi); in Generate_InterpreterPushArgsAndConstructImpl()
911 __ AssertUndefinedOrAllocationSite(ebx); in Generate_InterpreterPushArgsAndConstructImpl()
915 __ AssertFunction(edi); in Generate_InterpreterPushArgsAndConstructImpl()
917 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
918 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
919 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_InterpreterPushArgsAndConstructImpl()
920 __ jmp(ecx); in Generate_InterpreterPushArgsAndConstructImpl()
925 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_InterpreterPushArgsAndConstructImpl()
928 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructImpl()
931 __ Pop(edx); in Generate_InterpreterPushArgsAndConstructImpl()
932 __ Pop(edi); in Generate_InterpreterPushArgsAndConstructImpl()
934 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructImpl()
937 __ int3(); in Generate_InterpreterPushArgsAndConstructImpl()
955 __ Push(edx); in Generate_InterpreterPushArgsAndConstructArray()
964 __ Pop(edx); in Generate_InterpreterPushArgsAndConstructArray()
967 __ Move(edi, edx); in Generate_InterpreterPushArgsAndConstructArray()
970 __ TailCallStub(&stub); in Generate_InterpreterPushArgsAndConstructArray()
972 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructArray()
975 __ Pop(edx); in Generate_InterpreterPushArgsAndConstructArray()
977 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructArray()
980 __ int3(); in Generate_InterpreterPushArgsAndConstructArray()
990 __ LoadHeapObject(ebx, in Generate_InterpreterEnterBytecode()
992 __ add(ebx, Immediate(interpreter_entry_return_pc_offset->value() + in Generate_InterpreterEnterBytecode()
994 __ push(ebx); in Generate_InterpreterEnterBytecode()
997 __ mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEnterBytecode()
1002 __ mov(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1007 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); in Generate_InterpreterEnterBytecode()
1008 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, in Generate_InterpreterEnterBytecode()
1010 __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEnterBytecode()
1014 __ mov(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEnterBytecode()
1016 __ SmiUntag(kInterpreterBytecodeOffsetRegister); in Generate_InterpreterEnterBytecode()
1019 __ movzx_b(ebx, Operand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1021 __ mov(ebx, Operand(kInterpreterDispatchTableRegister, ebx, in Generate_InterpreterEnterBytecode()
1023 __ jmp(ebx); in Generate_InterpreterEnterBytecode()
1030 __ mov(ebx, Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1031 __ mov(edx, Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1032 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); in Generate_InterpreterEnterBytecodeAdvance()
1035 __ Push(kInterpreterAccumulatorRegister); in Generate_InterpreterEnterBytecodeAdvance()
1036 __ Push(ebx); // First argument is the bytecode array. in Generate_InterpreterEnterBytecodeAdvance()
1037 __ Push(edx); // Second argument is the bytecode offset. in Generate_InterpreterEnterBytecodeAdvance()
1038 __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); in Generate_InterpreterEnterBytecodeAdvance()
1039 __ Move(edx, eax); // Result is the new bytecode offset. in Generate_InterpreterEnterBytecodeAdvance()
1040 __ Pop(kInterpreterAccumulatorRegister); in Generate_InterpreterEnterBytecodeAdvance()
1042 __ mov(Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp), edx); in Generate_InterpreterEnterBytecodeAdvance()
1066 __ push(argument_count); in Generate_CompileLazy()
1067 __ push(new_target); in Generate_CompileLazy()
1068 __ push(closure); in Generate_CompileLazy()
1072 __ mov(map, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); in Generate_CompileLazy()
1073 __ mov(map, FieldOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); in Generate_CompileLazy()
1074 __ mov(index, FieldOperand(map, FixedArray::kLengthOffset)); in Generate_CompileLazy()
1075 __ cmp(index, Immediate(Smi::FromInt(2))); in Generate_CompileLazy()
1076 __ j(less, &gotta_call_runtime); in Generate_CompileLazy()
1085 __ mov(native_context, NativeContextOperand()); in Generate_CompileLazy()
1087 __ bind(&loop_top); in Generate_CompileLazy()
1091 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, in Generate_CompileLazy()
1093 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1094 __ cmp(temp, native_context); in Generate_CompileLazy()
1095 __ j(not_equal, &loop_bottom); in Generate_CompileLazy()
1097 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, in Generate_CompileLazy()
1100 __ cmp(temp, Immediate(Smi::FromInt(bailout_id))); in Generate_CompileLazy()
1101 __ j(not_equal, &loop_bottom); in Generate_CompileLazy()
1103 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, in Generate_CompileLazy()
1105 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1106 __ JumpIfSmi(temp, &gotta_call_runtime); in Generate_CompileLazy()
1109 __ mov(ecx, Operand(esp, 0)); in Generate_CompileLazy()
1110 __ mov(FieldOperand(ecx, JSFunction::kLiteralsOffset), temp); in Generate_CompileLazy()
1111 __ push(index); in Generate_CompileLazy()
1112 __ RecordWriteField(ecx, JSFunction::kLiteralsOffset, temp, index, in Generate_CompileLazy()
1114 __ pop(index); in Generate_CompileLazy()
1118 __ mov(entry, FieldOperand(map, index, times_half_pointer_size, in Generate_CompileLazy()
1120 __ mov(entry, FieldOperand(entry, WeakCell::kValueOffset)); in Generate_CompileLazy()
1121 __ JumpIfSmi(entry, &try_shared); in Generate_CompileLazy()
1124 __ pop(closure); in Generate_CompileLazy()
1126 __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); in Generate_CompileLazy()
1127 __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); in Generate_CompileLazy()
1128 __ RecordWriteCodeEntryField(closure, entry, eax); in Generate_CompileLazy()
1134 __ mov(ebx, in Generate_CompileLazy()
1136 __ mov(FieldOperand(closure, JSFunction::kNextFunctionLinkOffset), ebx); in Generate_CompileLazy()
1137 __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, ebx, eax, in Generate_CompileLazy()
1141 __ mov(ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST), in Generate_CompileLazy()
1144 __ mov(ebx, closure); in Generate_CompileLazy()
1145 __ RecordWriteContextSlot(native_context, function_list_offset, closure, eax, in Generate_CompileLazy()
1147 __ mov(closure, ebx); in Generate_CompileLazy()
1148 __ pop(new_target); in Generate_CompileLazy()
1149 __ pop(argument_count); in Generate_CompileLazy()
1150 __ jmp(entry); in Generate_CompileLazy()
1152 __ bind(&loop_bottom); in Generate_CompileLazy()
1153 __ sub(index, Immediate(Smi::FromInt(SharedFunctionInfo::kEntryLength))); in Generate_CompileLazy()
1154 __ cmp(index, Immediate(Smi::FromInt(1))); in Generate_CompileLazy()
1155 __ j(greater, &loop_top); in Generate_CompileLazy()
1158 __ jmp(&gotta_call_runtime); in Generate_CompileLazy()
1160 __ bind(&try_shared); in Generate_CompileLazy()
1161 __ pop(closure); in Generate_CompileLazy()
1162 __ pop(new_target); in Generate_CompileLazy()
1163 __ pop(argument_count); in Generate_CompileLazy()
1164 __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); in Generate_CompileLazy()
1166 __ test_b(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset), in Generate_CompileLazy()
1168 __ j(not_zero, &gotta_call_runtime_no_stack); in Generate_CompileLazy()
1170 __ mov(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); in Generate_CompileLazy()
1171 __ mov(ebx, FieldOperand(entry, Code::kFlagsOffset)); in Generate_CompileLazy()
1172 __ and_(ebx, Code::KindField::kMask); in Generate_CompileLazy()
1173 __ shr(ebx, Code::KindField::kShift); in Generate_CompileLazy()
1174 __ cmp(ebx, Immediate(Code::BUILTIN)); in Generate_CompileLazy()
1175 __ j(equal, &gotta_call_runtime_no_stack); in Generate_CompileLazy()
1177 __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); in Generate_CompileLazy()
1178 __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); in Generate_CompileLazy()
1179 __ RecordWriteCodeEntryField(closure, entry, ebx); in Generate_CompileLazy()
1180 __ jmp(entry); in Generate_CompileLazy()
1182 __ bind(&gotta_call_runtime); in Generate_CompileLazy()
1183 __ pop(closure); in Generate_CompileLazy()
1184 __ pop(new_target); in Generate_CompileLazy()
1185 __ pop(argument_count); in Generate_CompileLazy()
1186 __ bind(&gotta_call_runtime_no_stack); in Generate_CompileLazy()
1214 __ mov(ecx, eax); in Generate_InstantiateAsmJs()
1216 __ SmiTag(eax); in Generate_InstantiateAsmJs()
1217 __ push(eax); in Generate_InstantiateAsmJs()
1219 __ push(edi); in Generate_InstantiateAsmJs()
1220 __ push(edx); in Generate_InstantiateAsmJs()
1223 __ push(edi); in Generate_InstantiateAsmJs()
1229 __ cmp(ecx, Immediate(j)); in Generate_InstantiateAsmJs()
1230 __ j(not_equal, &over, Label::kNear); in Generate_InstantiateAsmJs()
1233 __ Push(Operand( in Generate_InstantiateAsmJs()
1237 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_InstantiateAsmJs()
1240 __ jmp(&args_done, Label::kNear); in Generate_InstantiateAsmJs()
1241 __ bind(&over); in Generate_InstantiateAsmJs()
1244 __ bind(&args_done); in Generate_InstantiateAsmJs()
1247 __ CallRuntime(Runtime::kInstantiateAsmJs, 4); in Generate_InstantiateAsmJs()
1249 __ JumpIfSmi(eax, &failed, Label::kNear); in Generate_InstantiateAsmJs()
1251 __ Drop(2); in Generate_InstantiateAsmJs()
1252 __ Pop(ecx); in Generate_InstantiateAsmJs()
1253 __ SmiUntag(ecx); in Generate_InstantiateAsmJs()
1256 __ PopReturnAddressTo(ebx); in Generate_InstantiateAsmJs()
1257 __ inc(ecx); in Generate_InstantiateAsmJs()
1258 __ lea(esp, Operand(esp, ecx, times_pointer_size, 0)); in Generate_InstantiateAsmJs()
1259 __ PushReturnAddressFrom(ebx); in Generate_InstantiateAsmJs()
1260 __ ret(0); in Generate_InstantiateAsmJs()
1262 __ bind(&failed); in Generate_InstantiateAsmJs()
1264 __ pop(edx); in Generate_InstantiateAsmJs()
1265 __ pop(edi); in Generate_InstantiateAsmJs()
1266 __ pop(eax); in Generate_InstantiateAsmJs()
1267 __ SmiUntag(eax); in Generate_InstantiateAsmJs()
1282 __ sub(Operand(esp, 0), Immediate(5)); in GenerateMakeCodeYoungAgainCommon()
1283 __ pushad(); in GenerateMakeCodeYoungAgainCommon()
1284 __ mov(eax, Operand(esp, 8 * kPointerSize)); in GenerateMakeCodeYoungAgainCommon()
1287 __ PrepareCallCFunction(2, ebx); in GenerateMakeCodeYoungAgainCommon()
1288 __ mov(Operand(esp, 1 * kPointerSize), in GenerateMakeCodeYoungAgainCommon()
1290 __ mov(Operand(esp, 0), eax); in GenerateMakeCodeYoungAgainCommon()
1291 __ CallCFunction( in GenerateMakeCodeYoungAgainCommon()
1294 __ popad(); in GenerateMakeCodeYoungAgainCommon()
1295 __ ret(0); in GenerateMakeCodeYoungAgainCommon()
1315 __ pushad(); in CODE_AGE_LIST()
1316 __ mov(eax, Operand(esp, 8 * kPointerSize)); in CODE_AGE_LIST()
1317 __ sub(eax, Immediate(Assembler::kCallInstructionLength)); in CODE_AGE_LIST()
1320 __ PrepareCallCFunction(2, ebx); in CODE_AGE_LIST()
1321 __ mov(Operand(esp, 1 * kPointerSize), in CODE_AGE_LIST()
1323 __ mov(Operand(esp, 0), eax); in CODE_AGE_LIST()
1324 __ CallCFunction( in CODE_AGE_LIST()
1328 __ popad(); in CODE_AGE_LIST()
1331 __ pop(eax); // Pop return address into scratch register. in CODE_AGE_LIST()
1332 __ push(ebp); // Caller's frame pointer. in CODE_AGE_LIST()
1333 __ mov(ebp, esp); in CODE_AGE_LIST()
1334 __ push(esi); // Callee's context. in CODE_AGE_LIST()
1335 __ push(edi); // Callee's JS Function. in CODE_AGE_LIST()
1336 __ push(eax); // Push return address after frame prologue. in CODE_AGE_LIST()
1339 __ ret(0); in CODE_AGE_LIST()
1359 __ pushad(); in Generate_NotifyStubFailureHelper()
1360 __ CallRuntime(Runtime::kNotifyStubFailure, save_doubles); in Generate_NotifyStubFailureHelper()
1361 __ popad(); in Generate_NotifyStubFailureHelper()
1365 __ pop(MemOperand(esp, 0)); // Ignore state offset in Generate_NotifyStubFailureHelper()
1366 __ ret(0); // Return to IC Miss stub, continuation still on stack. in Generate_NotifyStubFailureHelper()
1383 __ push(Immediate(Smi::FromInt(static_cast<int>(type)))); in Generate_NotifyDeoptimizedHelper()
1384 __ CallRuntime(Runtime::kNotifyDeoptimized); in Generate_NotifyDeoptimizedHelper()
1390 __ mov(ecx, Operand(esp, 1 * kPointerSize)); in Generate_NotifyDeoptimizedHelper()
1391 __ SmiUntag(ecx); in Generate_NotifyDeoptimizedHelper()
1395 __ cmp(ecx, static_cast<int>(Deoptimizer::BailoutState::NO_REGISTERS)); in Generate_NotifyDeoptimizedHelper()
1396 __ j(not_equal, ¬_no_registers, Label::kNear); in Generate_NotifyDeoptimizedHelper()
1397 __ ret(1 * kPointerSize); // Remove state. in Generate_NotifyDeoptimizedHelper()
1399 __ bind(¬_no_registers); in Generate_NotifyDeoptimizedHelper()
1401 __ mov(eax, Operand(esp, 2 * kPointerSize)); in Generate_NotifyDeoptimizedHelper()
1402 __ cmp(ecx, static_cast<int>(Deoptimizer::BailoutState::TOS_REGISTER)); in Generate_NotifyDeoptimizedHelper()
1403 __ j(not_equal, ¬_tos_eax, Label::kNear); in Generate_NotifyDeoptimizedHelper()
1404 __ ret(2 * kPointerSize); // Remove state, eax. in Generate_NotifyDeoptimizedHelper()
1406 __ bind(¬_tos_eax); in Generate_NotifyDeoptimizedHelper()
1407 __ Abort(kNoCasesLeft); in Generate_NotifyDeoptimizedHelper()
1437 __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1438 __ mov(ebx, edx); in Generate_FunctionPrototypeApply()
1439 __ mov(edi, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_FunctionPrototypeApply()
1440 __ test(eax, eax); in Generate_FunctionPrototypeApply()
1441 __ j(zero, &no_this_arg, Label::kNear); in Generate_FunctionPrototypeApply()
1443 __ mov(edx, Operand(esp, eax, times_pointer_size, 0)); in Generate_FunctionPrototypeApply()
1444 __ cmp(eax, Immediate(1)); in Generate_FunctionPrototypeApply()
1445 __ j(equal, &no_arg_array, Label::kNear); in Generate_FunctionPrototypeApply()
1446 __ mov(ebx, Operand(esp, eax, times_pointer_size, -kPointerSize)); in Generate_FunctionPrototypeApply()
1447 __ bind(&no_arg_array); in Generate_FunctionPrototypeApply()
1449 __ bind(&no_this_arg); in Generate_FunctionPrototypeApply()
1450 __ PopReturnAddressTo(ecx); in Generate_FunctionPrototypeApply()
1451 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_FunctionPrototypeApply()
1452 __ Push(edx); in Generate_FunctionPrototypeApply()
1453 __ PushReturnAddressFrom(ecx); in Generate_FunctionPrototypeApply()
1454 __ Move(eax, ebx); in Generate_FunctionPrototypeApply()
1466 __ JumpIfSmi(edi, &receiver_not_callable, Label::kNear); in Generate_FunctionPrototypeApply()
1467 __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); in Generate_FunctionPrototypeApply()
1468 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_FunctionPrototypeApply()
1470 __ j(zero, &receiver_not_callable, Label::kNear); in Generate_FunctionPrototypeApply()
1474 __ JumpIfRoot(eax, Heap::kNullValueRootIndex, &no_arguments, Label::kNear); in Generate_FunctionPrototypeApply()
1475 __ JumpIfRoot(eax, Heap::kUndefinedValueRootIndex, &no_arguments, in Generate_FunctionPrototypeApply()
1480 __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1481 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1485 __ bind(&no_arguments); in Generate_FunctionPrototypeApply()
1487 __ Set(eax, 0); in Generate_FunctionPrototypeApply()
1488 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1492 __ bind(&receiver_not_callable); in Generate_FunctionPrototypeApply()
1494 __ mov(Operand(esp, kPointerSize), edi); in Generate_FunctionPrototypeApply()
1495 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_FunctionPrototypeApply()
1514 __ test(eax, eax); in Generate_FunctionPrototypeCall()
1515 __ j(not_zero, &done, Label::kNear); in Generate_FunctionPrototypeCall()
1516 __ PopReturnAddressTo(ebx); in Generate_FunctionPrototypeCall()
1517 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeCall()
1518 __ PushReturnAddressFrom(ebx); in Generate_FunctionPrototypeCall()
1519 __ inc(eax); in Generate_FunctionPrototypeCall()
1520 __ bind(&done); in Generate_FunctionPrototypeCall()
1524 __ mov(edi, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_FunctionPrototypeCall()
1531 __ mov(ecx, eax); in Generate_FunctionPrototypeCall()
1532 __ bind(&loop); in Generate_FunctionPrototypeCall()
1533 __ mov(ebx, Operand(esp, ecx, times_pointer_size, 0)); in Generate_FunctionPrototypeCall()
1534 __ mov(Operand(esp, ecx, times_pointer_size, kPointerSize), ebx); in Generate_FunctionPrototypeCall()
1535 __ dec(ecx); in Generate_FunctionPrototypeCall()
1536 __ j(not_sign, &loop); // While non-negative (to copy return address). in Generate_FunctionPrototypeCall()
1537 __ pop(ebx); // Discard copy of return address. in Generate_FunctionPrototypeCall()
1538 __ dec(eax); // One fewer argument (first argument is new receiver). in Generate_FunctionPrototypeCall()
1542 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeCall()
1560 __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
1561 __ mov(edx, edi); in Generate_ReflectApply()
1562 __ mov(ebx, edi); in Generate_ReflectApply()
1563 __ cmp(eax, Immediate(1)); in Generate_ReflectApply()
1564 __ j(below, &done, Label::kNear); in Generate_ReflectApply()
1565 __ mov(edi, Operand(esp, eax, times_pointer_size, -0 * kPointerSize)); in Generate_ReflectApply()
1566 __ j(equal, &done, Label::kNear); in Generate_ReflectApply()
1567 __ mov(edx, Operand(esp, eax, times_pointer_size, -1 * kPointerSize)); in Generate_ReflectApply()
1568 __ cmp(eax, Immediate(3)); in Generate_ReflectApply()
1569 __ j(below, &done, Label::kNear); in Generate_ReflectApply()
1570 __ mov(ebx, Operand(esp, eax, times_pointer_size, -2 * kPointerSize)); in Generate_ReflectApply()
1571 __ bind(&done); in Generate_ReflectApply()
1572 __ PopReturnAddressTo(ecx); in Generate_ReflectApply()
1573 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_ReflectApply()
1574 __ Push(edx); in Generate_ReflectApply()
1575 __ PushReturnAddressFrom(ecx); in Generate_ReflectApply()
1576 __ Move(eax, ebx); in Generate_ReflectApply()
1588 __ JumpIfSmi(edi, &target_not_callable, Label::kNear); in Generate_ReflectApply()
1589 __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); in Generate_ReflectApply()
1590 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_ReflectApply()
1592 __ j(zero, &target_not_callable, Label::kNear); in Generate_ReflectApply()
1596 __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
1597 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectApply()
1600 __ bind(&target_not_callable); in Generate_ReflectApply()
1602 __ mov(Operand(esp, kPointerSize), edi); in Generate_ReflectApply()
1603 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_ReflectApply()
1623 __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); in Generate_ReflectConstruct()
1624 __ mov(edx, edi); in Generate_ReflectConstruct()
1625 __ mov(ebx, edi); in Generate_ReflectConstruct()
1626 __ cmp(eax, Immediate(1)); in Generate_ReflectConstruct()
1627 __ j(below, &done, Label::kNear); in Generate_ReflectConstruct()
1628 __ mov(edi, Operand(esp, eax, times_pointer_size, -0 * kPointerSize)); in Generate_ReflectConstruct()
1629 __ mov(edx, edi); in Generate_ReflectConstruct()
1630 __ j(equal, &done, Label::kNear); in Generate_ReflectConstruct()
1631 __ mov(ebx, Operand(esp, eax, times_pointer_size, -1 * kPointerSize)); in Generate_ReflectConstruct()
1632 __ cmp(eax, Immediate(3)); in Generate_ReflectConstruct()
1633 __ j(below, &done, Label::kNear); in Generate_ReflectConstruct()
1634 __ mov(edx, Operand(esp, eax, times_pointer_size, -2 * kPointerSize)); in Generate_ReflectConstruct()
1635 __ bind(&done); in Generate_ReflectConstruct()
1636 __ PopReturnAddressTo(ecx); in Generate_ReflectConstruct()
1637 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_ReflectConstruct()
1638 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_ReflectConstruct()
1639 __ PushReturnAddressFrom(ecx); in Generate_ReflectConstruct()
1640 __ Move(eax, ebx); in Generate_ReflectConstruct()
1653 __ JumpIfSmi(edi, &target_not_constructor, Label::kNear); in Generate_ReflectConstruct()
1654 __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
1655 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_ReflectConstruct()
1657 __ j(zero, &target_not_constructor, Label::kNear); in Generate_ReflectConstruct()
1661 __ JumpIfSmi(edx, &new_target_not_constructor, Label::kNear); in Generate_ReflectConstruct()
1662 __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
1663 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_ReflectConstruct()
1665 __ j(zero, &new_target_not_constructor, Label::kNear); in Generate_ReflectConstruct()
1668 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectConstruct()
1671 __ bind(&target_not_constructor); in Generate_ReflectConstruct()
1673 __ mov(Operand(esp, kPointerSize), edi); in Generate_ReflectConstruct()
1674 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
1678 __ bind(&new_target_not_constructor); in Generate_ReflectConstruct()
1680 __ mov(Operand(esp, kPointerSize), edx); in Generate_ReflectConstruct()
1681 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
1694 __ LoadGlobalFunction(Context::INTERNAL_ARRAY_FUNCTION_INDEX, edi); in Generate_InternalArrayCode()
1698 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_InternalArrayCode()
1700 __ test(ebx, Immediate(kSmiTagMask)); in Generate_InternalArrayCode()
1701 __ Assert(not_zero, kUnexpectedInitialMapForInternalArrayFunction); in Generate_InternalArrayCode()
1702 __ CmpObjectType(ebx, MAP_TYPE, ecx); in Generate_InternalArrayCode()
1703 __ Assert(equal, kUnexpectedInitialMapForInternalArrayFunction); in Generate_InternalArrayCode()
1710 __ TailCallStub(&stub); in Generate_InternalArrayCode()
1722 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, edi); in Generate_ArrayCode()
1723 __ mov(edx, edi); in Generate_ArrayCode()
1727 __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_ArrayCode()
1729 __ test(ebx, Immediate(kSmiTagMask)); in Generate_ArrayCode()
1730 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); in Generate_ArrayCode()
1731 __ CmpObjectType(ebx, MAP_TYPE, ecx); in Generate_ArrayCode()
1732 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); in Generate_ArrayCode()
1737 __ mov(ebx, masm->isolate()->factory()->undefined_value()); in Generate_ArrayCode()
1739 __ TailCallStub(&stub); in Generate_ArrayCode()
1760 __ LoadRoot(edx, root_index); in Generate_MathMaxMin()
1761 __ fld_d(FieldOperand(edx, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
1762 __ Move(ecx, eax); in Generate_MathMaxMin()
1765 __ bind(&loop); in Generate_MathMaxMin()
1768 __ test(ecx, ecx); in Generate_MathMaxMin()
1769 __ j(zero, &done_loop); in Generate_MathMaxMin()
1772 __ mov(ebx, Operand(esp, ecx, times_pointer_size, 0)); in Generate_MathMaxMin()
1777 __ bind(&convert); in Generate_MathMaxMin()
1778 __ JumpIfSmi(ebx, &convert_smi); in Generate_MathMaxMin()
1779 __ JumpIfRoot(FieldOperand(ebx, HeapObject::kMapOffset), in Generate_MathMaxMin()
1784 __ SmiTag(eax); in Generate_MathMaxMin()
1785 __ SmiTag(ecx); in Generate_MathMaxMin()
1786 __ EnterBuiltinFrame(esi, edi, eax); in Generate_MathMaxMin()
1787 __ Push(ecx); in Generate_MathMaxMin()
1788 __ Push(edx); in Generate_MathMaxMin()
1789 __ mov(eax, ebx); in Generate_MathMaxMin()
1790 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_MathMaxMin()
1791 __ mov(ebx, eax); in Generate_MathMaxMin()
1792 __ Pop(edx); in Generate_MathMaxMin()
1793 __ Pop(ecx); in Generate_MathMaxMin()
1794 __ LeaveBuiltinFrame(esi, edi, eax); in Generate_MathMaxMin()
1795 __ SmiUntag(ecx); in Generate_MathMaxMin()
1796 __ SmiUntag(eax); in Generate_MathMaxMin()
1800 __ JumpIfSmi(edx, &restore_smi, Label::kNear); in Generate_MathMaxMin()
1801 __ fld_d(FieldOperand(edx, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
1802 __ jmp(&done_restore, Label::kNear); in Generate_MathMaxMin()
1803 __ bind(&restore_smi); in Generate_MathMaxMin()
1804 __ SmiUntag(edx); in Generate_MathMaxMin()
1805 __ push(edx); in Generate_MathMaxMin()
1806 __ fild_s(Operand(esp, 0)); in Generate_MathMaxMin()
1807 __ pop(edx); in Generate_MathMaxMin()
1808 __ SmiTag(edx); in Generate_MathMaxMin()
1809 __ bind(&done_restore); in Generate_MathMaxMin()
1812 __ jmp(&convert); in Generate_MathMaxMin()
1813 __ bind(&convert_number); in Generate_MathMaxMin()
1815 __ fld_d(FieldOperand(ebx, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
1816 __ fxch(); in Generate_MathMaxMin()
1817 __ jmp(&done_convert, Label::kNear); in Generate_MathMaxMin()
1818 __ bind(&convert_smi); in Generate_MathMaxMin()
1819 __ SmiUntag(ebx); in Generate_MathMaxMin()
1820 __ push(ebx); in Generate_MathMaxMin()
1821 __ fild_s(Operand(esp, 0)); in Generate_MathMaxMin()
1822 __ pop(ebx); in Generate_MathMaxMin()
1823 __ fxch(); in Generate_MathMaxMin()
1824 __ SmiTag(ebx); in Generate_MathMaxMin()
1825 __ bind(&done_convert); in Generate_MathMaxMin()
1832 __ fld(1); in Generate_MathMaxMin()
1833 __ fld(1); in Generate_MathMaxMin()
1834 __ FCmp(); in Generate_MathMaxMin()
1835 __ j(parity_even, &compare_nan, Label::kNear); in Generate_MathMaxMin()
1836 __ j(cc, &done_compare, Label::kNear); in Generate_MathMaxMin()
1837 __ j(equal, &compare_equal, Label::kNear); in Generate_MathMaxMin()
1840 __ bind(&compare_swap); in Generate_MathMaxMin()
1841 __ fxch(); in Generate_MathMaxMin()
1842 __ mov(edx, ebx); in Generate_MathMaxMin()
1843 __ jmp(&done_compare, Label::kNear); in Generate_MathMaxMin()
1846 __ bind(&compare_nan); in Generate_MathMaxMin()
1848 __ fstp(0); in Generate_MathMaxMin()
1849 __ LoadRoot(edx, Heap::kNanValueRootIndex); in Generate_MathMaxMin()
1850 __ fld_d(FieldOperand(edx, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
1851 __ jmp(&done_compare, Label::kNear); in Generate_MathMaxMin()
1854 __ bind(&compare_equal); in Generate_MathMaxMin()
1856 __ fld(reg_sel); in Generate_MathMaxMin()
1857 __ FXamSign(); in Generate_MathMaxMin()
1858 __ j(not_zero, &compare_swap); in Generate_MathMaxMin()
1860 __ bind(&done_compare); in Generate_MathMaxMin()
1863 __ fxch(); in Generate_MathMaxMin()
1864 __ fstp(0); in Generate_MathMaxMin()
1865 __ dec(ecx); in Generate_MathMaxMin()
1866 __ jmp(&loop); in Generate_MathMaxMin()
1869 __ bind(&done_loop); in Generate_MathMaxMin()
1870 __ PopReturnAddressTo(ecx); in Generate_MathMaxMin()
1871 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_MathMaxMin()
1872 __ PushReturnAddressFrom(ecx); in Generate_MathMaxMin()
1873 __ mov(eax, edx); in Generate_MathMaxMin()
1874 __ Ret(); in Generate_MathMaxMin()
1891 __ test(eax, eax); in Generate_NumberConstructor()
1892 __ j(zero, &no_arguments, Label::kNear); in Generate_NumberConstructor()
1893 __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); in Generate_NumberConstructor()
1899 __ SmiTag(eax); in Generate_NumberConstructor()
1900 __ EnterBuiltinFrame(esi, edi, eax); in Generate_NumberConstructor()
1901 __ mov(eax, ebx); in Generate_NumberConstructor()
1902 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor()
1903 __ LeaveBuiltinFrame(esi, edi, ebx); // Argc popped to ebx. in Generate_NumberConstructor()
1904 __ SmiUntag(ebx); in Generate_NumberConstructor()
1909 __ PopReturnAddressTo(ecx); in Generate_NumberConstructor()
1910 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); in Generate_NumberConstructor()
1911 __ PushReturnAddressFrom(ecx); in Generate_NumberConstructor()
1912 __ Ret(); in Generate_NumberConstructor()
1916 __ bind(&no_arguments); in Generate_NumberConstructor()
1917 __ ret(1 * kPointerSize); in Generate_NumberConstructor()
1933 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_NumberConstructor_ConstructStub()
1936 __ mov(ecx, eax); in Generate_NumberConstructor_ConstructStub()
1937 __ SmiTag(ecx); in Generate_NumberConstructor_ConstructStub()
1942 __ test(eax, eax); in Generate_NumberConstructor_ConstructStub()
1943 __ j(zero, &no_arguments, Label::kNear); in Generate_NumberConstructor_ConstructStub()
1944 __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); in Generate_NumberConstructor_ConstructStub()
1945 __ jmp(&done, Label::kNear); in Generate_NumberConstructor_ConstructStub()
1946 __ bind(&no_arguments); in Generate_NumberConstructor_ConstructStub()
1947 __ Move(ebx, Smi::kZero); in Generate_NumberConstructor_ConstructStub()
1948 __ bind(&done); in Generate_NumberConstructor_ConstructStub()
1954 __ JumpIfSmi(ebx, &done_convert); in Generate_NumberConstructor_ConstructStub()
1955 __ CompareRoot(FieldOperand(ebx, HeapObject::kMapOffset), in Generate_NumberConstructor_ConstructStub()
1957 __ j(equal, &done_convert); in Generate_NumberConstructor_ConstructStub()
1960 __ EnterBuiltinFrame(esi, edi, ecx); in Generate_NumberConstructor_ConstructStub()
1961 __ Push(edx); in Generate_NumberConstructor_ConstructStub()
1962 __ Move(eax, ebx); in Generate_NumberConstructor_ConstructStub()
1963 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor_ConstructStub()
1964 __ Move(ebx, eax); in Generate_NumberConstructor_ConstructStub()
1965 __ Pop(edx); in Generate_NumberConstructor_ConstructStub()
1966 __ LeaveBuiltinFrame(esi, edi, ecx); in Generate_NumberConstructor_ConstructStub()
1968 __ bind(&done_convert); in Generate_NumberConstructor_ConstructStub()
1973 __ cmp(edx, edi); in Generate_NumberConstructor_ConstructStub()
1974 __ j(not_equal, &new_object); in Generate_NumberConstructor_ConstructStub()
1977 __ AllocateJSValue(eax, edi, ebx, esi, &done_alloc); in Generate_NumberConstructor_ConstructStub()
1978 __ jmp(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
1980 __ bind(&done_alloc); in Generate_NumberConstructor_ConstructStub()
1981 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); // Restore esi. in Generate_NumberConstructor_ConstructStub()
1984 __ bind(&new_object); in Generate_NumberConstructor_ConstructStub()
1987 __ EnterBuiltinFrame(esi, edi, ecx); in Generate_NumberConstructor_ConstructStub()
1988 __ Push(ebx); // the first argument in Generate_NumberConstructor_ConstructStub()
1990 __ CallStub(&stub); in Generate_NumberConstructor_ConstructStub()
1991 __ Pop(FieldOperand(eax, JSValue::kValueOffset)); in Generate_NumberConstructor_ConstructStub()
1992 __ LeaveBuiltinFrame(esi, edi, ecx); in Generate_NumberConstructor_ConstructStub()
1995 __ bind(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
1998 __ PopReturnAddressTo(esi); in Generate_NumberConstructor_ConstructStub()
1999 __ SmiUntag(ecx); in Generate_NumberConstructor_ConstructStub()
2000 __ lea(esp, Operand(esp, ecx, times_pointer_size, kPointerSize)); in Generate_NumberConstructor_ConstructStub()
2001 __ PushReturnAddressFrom(esi); in Generate_NumberConstructor_ConstructStub()
2002 __ Ret(); in Generate_NumberConstructor_ConstructStub()
2020 __ mov(ebx, eax); // Store argc in ebx. in Generate_StringConstructor()
2021 __ test(eax, eax); in Generate_StringConstructor()
2022 __ j(zero, &no_arguments, Label::kNear); in Generate_StringConstructor()
2023 __ mov(eax, Operand(esp, eax, times_pointer_size, 0)); in Generate_StringConstructor()
2030 __ JumpIfSmi(eax, &to_string, Label::kNear); in Generate_StringConstructor()
2032 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx); in Generate_StringConstructor()
2033 __ j(above, &to_string, Label::kNear); in Generate_StringConstructor()
2034 __ j(equal, &symbol_descriptive_string, Label::kNear); in Generate_StringConstructor()
2035 __ jmp(&drop_frame_and_ret, Label::kNear); in Generate_StringConstructor()
2039 __ bind(&no_arguments); in Generate_StringConstructor()
2041 __ LoadRoot(eax, Heap::kempty_stringRootIndex); in Generate_StringConstructor()
2042 __ ret(1 * kPointerSize); in Generate_StringConstructor()
2046 __ bind(&to_string); in Generate_StringConstructor()
2049 __ SmiTag(ebx); in Generate_StringConstructor()
2050 __ EnterBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor()
2051 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor()
2052 __ LeaveBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor()
2053 __ SmiUntag(ebx); in Generate_StringConstructor()
2055 __ jmp(&drop_frame_and_ret, Label::kNear); in Generate_StringConstructor()
2058 __ bind(&symbol_descriptive_string); in Generate_StringConstructor()
2060 __ PopReturnAddressTo(ecx); in Generate_StringConstructor()
2061 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); in Generate_StringConstructor()
2062 __ Push(eax); in Generate_StringConstructor()
2063 __ PushReturnAddressFrom(ecx); in Generate_StringConstructor()
2064 __ TailCallRuntime(Runtime::kSymbolDescriptiveString); in Generate_StringConstructor()
2067 __ bind(&drop_frame_and_ret); in Generate_StringConstructor()
2070 __ PopReturnAddressTo(ecx); in Generate_StringConstructor()
2071 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); in Generate_StringConstructor()
2072 __ PushReturnAddressFrom(ecx); in Generate_StringConstructor()
2073 __ Ret(); in Generate_StringConstructor()
2090 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_StringConstructor_ConstructStub()
2092 __ mov(ebx, eax); in Generate_StringConstructor_ConstructStub()
2097 __ test(ebx, ebx); in Generate_StringConstructor_ConstructStub()
2098 __ j(zero, &no_arguments, Label::kNear); in Generate_StringConstructor_ConstructStub()
2099 __ mov(eax, Operand(esp, ebx, times_pointer_size, 0)); in Generate_StringConstructor_ConstructStub()
2100 __ jmp(&done, Label::kNear); in Generate_StringConstructor_ConstructStub()
2101 __ bind(&no_arguments); in Generate_StringConstructor_ConstructStub()
2102 __ LoadRoot(eax, Heap::kempty_stringRootIndex); in Generate_StringConstructor_ConstructStub()
2103 __ bind(&done); in Generate_StringConstructor_ConstructStub()
2109 __ JumpIfSmi(eax, &convert, Label::kNear); in Generate_StringConstructor_ConstructStub()
2110 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ecx); in Generate_StringConstructor_ConstructStub()
2111 __ j(below, &done_convert); in Generate_StringConstructor_ConstructStub()
2112 __ bind(&convert); in Generate_StringConstructor_ConstructStub()
2115 __ SmiTag(ebx); in Generate_StringConstructor_ConstructStub()
2116 __ EnterBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor_ConstructStub()
2117 __ Push(edx); in Generate_StringConstructor_ConstructStub()
2118 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor_ConstructStub()
2119 __ Pop(edx); in Generate_StringConstructor_ConstructStub()
2120 __ LeaveBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor_ConstructStub()
2121 __ SmiUntag(ebx); in Generate_StringConstructor_ConstructStub()
2123 __ bind(&done_convert); in Generate_StringConstructor_ConstructStub()
2128 __ cmp(edx, edi); in Generate_StringConstructor_ConstructStub()
2129 __ j(not_equal, &new_object); in Generate_StringConstructor_ConstructStub()
2134 __ mov(esi, eax); in Generate_StringConstructor_ConstructStub()
2135 __ AllocateJSValue(eax, edi, esi, ecx, &done_alloc); in Generate_StringConstructor_ConstructStub()
2136 __ jmp(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
2138 __ bind(&done_alloc); in Generate_StringConstructor_ConstructStub()
2141 __ mov(eax, esi); in Generate_StringConstructor_ConstructStub()
2142 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_StringConstructor_ConstructStub()
2146 __ bind(&new_object); in Generate_StringConstructor_ConstructStub()
2149 __ SmiTag(ebx); in Generate_StringConstructor_ConstructStub()
2150 __ EnterBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor_ConstructStub()
2151 __ Push(eax); // the first argument in Generate_StringConstructor_ConstructStub()
2153 __ CallStub(&stub); in Generate_StringConstructor_ConstructStub()
2154 __ Pop(FieldOperand(eax, JSValue::kValueOffset)); in Generate_StringConstructor_ConstructStub()
2155 __ LeaveBuiltinFrame(esi, edi, ebx); in Generate_StringConstructor_ConstructStub()
2156 __ SmiUntag(ebx); in Generate_StringConstructor_ConstructStub()
2159 __ bind(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
2162 __ PopReturnAddressTo(ecx); in Generate_StringConstructor_ConstructStub()
2163 __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); in Generate_StringConstructor_ConstructStub()
2164 __ PushReturnAddressFrom(ecx); in Generate_StringConstructor_ConstructStub()
2165 __ Ret(); in Generate_StringConstructor_ConstructStub()
2170 __ push(ebp); in EnterArgumentsAdaptorFrame()
2171 __ mov(ebp, esp); in EnterArgumentsAdaptorFrame()
2174 __ push(Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); in EnterArgumentsAdaptorFrame()
2177 __ push(edi); in EnterArgumentsAdaptorFrame()
2183 __ lea(edi, Operand(eax, eax, times_1, kSmiTag)); in EnterArgumentsAdaptorFrame()
2184 __ push(edi); in EnterArgumentsAdaptorFrame()
2189 __ mov(ebx, Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset)); in LeaveArgumentsAdaptorFrame()
2192 __ leave(); in LeaveArgumentsAdaptorFrame()
2196 __ pop(ecx); in LeaveArgumentsAdaptorFrame()
2197 __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver in LeaveArgumentsAdaptorFrame()
2198 __ push(ecx); in LeaveArgumentsAdaptorFrame()
2214 __ JumpIfSmi(eax, &create_runtime); in Generate_Apply()
2217 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); in Generate_Apply()
2220 __ mov(ebx, NativeContextOperand()); in Generate_Apply()
2223 __ cmp(ecx, ContextOperand(ebx, Context::SLOPPY_ARGUMENTS_MAP_INDEX)); in Generate_Apply()
2224 __ j(equal, &create_arguments); in Generate_Apply()
2225 __ cmp(ecx, ContextOperand(ebx, Context::STRICT_ARGUMENTS_MAP_INDEX)); in Generate_Apply()
2226 __ j(equal, &create_arguments); in Generate_Apply()
2229 __ CmpInstanceType(ecx, JS_ARRAY_TYPE); in Generate_Apply()
2230 __ j(equal, &create_array); in Generate_Apply()
2233 __ bind(&create_runtime); in Generate_Apply()
2236 __ Push(edi); in Generate_Apply()
2237 __ Push(edx); in Generate_Apply()
2238 __ Push(eax); in Generate_Apply()
2239 __ CallRuntime(Runtime::kCreateListFromArrayLike); in Generate_Apply()
2240 __ Pop(edx); in Generate_Apply()
2241 __ Pop(edi); in Generate_Apply()
2242 __ mov(ebx, FieldOperand(eax, FixedArray::kLengthOffset)); in Generate_Apply()
2243 __ SmiUntag(ebx); in Generate_Apply()
2245 __ jmp(&done_create); in Generate_Apply()
2248 __ bind(&create_arguments); in Generate_Apply()
2249 __ mov(ebx, FieldOperand(eax, JSArgumentsObject::kLengthOffset)); in Generate_Apply()
2250 __ mov(ecx, FieldOperand(eax, JSObject::kElementsOffset)); in Generate_Apply()
2251 __ cmp(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); in Generate_Apply()
2252 __ j(not_equal, &create_runtime); in Generate_Apply()
2253 __ SmiUntag(ebx); in Generate_Apply()
2254 __ mov(eax, ecx); in Generate_Apply()
2255 __ jmp(&done_create); in Generate_Apply()
2258 __ bind(&create_array); in Generate_Apply()
2259 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); in Generate_Apply()
2260 __ DecodeField<Map::ElementsKindBits>(ecx); in Generate_Apply()
2264 __ cmp(ecx, Immediate(FAST_ELEMENTS)); in Generate_Apply()
2265 __ j(above, &create_runtime); in Generate_Apply()
2266 __ cmp(ecx, Immediate(FAST_HOLEY_SMI_ELEMENTS)); in Generate_Apply()
2267 __ j(equal, &create_runtime); in Generate_Apply()
2268 __ mov(ebx, FieldOperand(eax, JSArray::kLengthOffset)); in Generate_Apply()
2269 __ SmiUntag(ebx); in Generate_Apply()
2270 __ mov(eax, FieldOperand(eax, JSArray::kElementsOffset)); in Generate_Apply()
2272 __ bind(&done_create); in Generate_Apply()
2282 __ mov(ecx, Operand::StaticVariable(real_stack_limit)); in Generate_Apply()
2285 __ neg(ecx); in Generate_Apply()
2286 __ add(ecx, esp); in Generate_Apply()
2287 __ sar(ecx, kPointerSizeLog2); in Generate_Apply()
2289 __ cmp(ecx, ebx); in Generate_Apply()
2290 __ j(greater, &done, Label::kNear); // Signed comparison. in Generate_Apply()
2291 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_Apply()
2292 __ bind(&done); in Generate_Apply()
2306 __ push(edx); in Generate_Apply()
2307 __ fld_s(MemOperand(esp, 0)); in Generate_Apply()
2308 __ lea(esp, Operand(esp, kFloatSize)); in Generate_Apply()
2310 __ PopReturnAddressTo(edx); in Generate_Apply()
2311 __ Move(ecx, Immediate(0)); in Generate_Apply()
2313 __ bind(&loop); in Generate_Apply()
2314 __ cmp(ecx, ebx); in Generate_Apply()
2315 __ j(equal, &done, Label::kNear); in Generate_Apply()
2316 __ Push( in Generate_Apply()
2318 __ inc(ecx); in Generate_Apply()
2319 __ jmp(&loop); in Generate_Apply()
2320 __ bind(&done); in Generate_Apply()
2321 __ PushReturnAddressFrom(edx); in Generate_Apply()
2323 __ lea(esp, Operand(esp, -kFloatSize)); in Generate_Apply()
2324 __ fstp_s(MemOperand(esp, 0)); in Generate_Apply()
2325 __ pop(edx); in Generate_Apply()
2327 __ Move(eax, ebx); in Generate_Apply()
2332 __ CompareRoot(edx, Heap::kUndefinedValueRootIndex); in Generate_Apply()
2333 __ j(equal, masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_Apply()
2334 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_Apply()
2379 __ movzx_b(scratch1, in PrepareForTailCall()
2381 __ cmp(scratch1, Immediate(0)); in PrepareForTailCall()
2382 __ j(equal, &done, Label::kNear); in PrepareForTailCall()
2387 __ cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), in PrepareForTailCall()
2389 __ j(not_equal, &no_interpreter_frame, Label::kNear); in PrepareForTailCall()
2390 __ mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2391 __ bind(&no_interpreter_frame); in PrepareForTailCall()
2397 __ mov(scratch2, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2398 __ cmp(Operand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset), in PrepareForTailCall()
2400 __ j(not_equal, &no_arguments_adaptor, Label::kNear); in PrepareForTailCall()
2403 __ mov(ebp, scratch2); in PrepareForTailCall()
2404 __ mov(caller_args_count_reg, in PrepareForTailCall()
2406 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2407 __ jmp(&formal_parameter_count_loaded, Label::kNear); in PrepareForTailCall()
2409 __ bind(&no_arguments_adaptor); in PrepareForTailCall()
2411 __ mov(scratch1, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); in PrepareForTailCall()
2412 __ mov(scratch1, in PrepareForTailCall()
2414 __ mov( in PrepareForTailCall()
2417 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2419 __ bind(&formal_parameter_count_loaded); in PrepareForTailCall()
2422 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, in PrepareForTailCall()
2424 __ bind(&done); in PrepareForTailCall()
2436 __ AssertFunction(edi); in Generate_CallFunction()
2441 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2442 __ test_b(FieldOperand(edx, SharedFunctionInfo::kFunctionKindByteOffset), in Generate_CallFunction()
2444 __ j(not_zero, &class_constructor); in Generate_CallFunction()
2451 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate_CallFunction()
2454 __ test_b(FieldOperand(edx, SharedFunctionInfo::kNativeByteOffset), in Generate_CallFunction()
2457 __ j(not_zero, &done_convert); in Generate_CallFunction()
2468 __ LoadGlobalProxy(ecx); in Generate_CallFunction()
2471 __ mov(ecx, Operand(esp, eax, times_pointer_size, kPointerSize)); in Generate_CallFunction()
2472 __ JumpIfSmi(ecx, &convert_to_object, Label::kNear); in Generate_CallFunction()
2474 __ CmpObjectType(ecx, FIRST_JS_RECEIVER_TYPE, ebx); in Generate_CallFunction()
2475 __ j(above_equal, &done_convert); in Generate_CallFunction()
2478 __ JumpIfRoot(ecx, Heap::kUndefinedValueRootIndex, in Generate_CallFunction()
2480 __ JumpIfNotRoot(ecx, Heap::kNullValueRootIndex, &convert_to_object, in Generate_CallFunction()
2482 __ bind(&convert_global_proxy); in Generate_CallFunction()
2485 __ LoadGlobalProxy(ecx); in Generate_CallFunction()
2487 __ jmp(&convert_receiver); in Generate_CallFunction()
2489 __ bind(&convert_to_object); in Generate_CallFunction()
2495 __ SmiTag(eax); in Generate_CallFunction()
2496 __ Push(eax); in Generate_CallFunction()
2497 __ Push(edi); in Generate_CallFunction()
2498 __ mov(eax, ecx); in Generate_CallFunction()
2499 __ Push(esi); in Generate_CallFunction()
2500 __ Call(masm->isolate()->builtins()->ToObject(), in Generate_CallFunction()
2502 __ Pop(esi); in Generate_CallFunction()
2503 __ mov(ecx, eax); in Generate_CallFunction()
2504 __ Pop(edi); in Generate_CallFunction()
2505 __ Pop(eax); in Generate_CallFunction()
2506 __ SmiUntag(eax); in Generate_CallFunction()
2508 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2509 __ bind(&convert_receiver); in Generate_CallFunction()
2511 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ecx); in Generate_CallFunction()
2513 __ bind(&done_convert); in Generate_CallFunction()
2525 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2528 __ mov(ebx, in Generate_CallFunction()
2530 __ SmiUntag(ebx); in Generate_CallFunction()
2533 __ InvokeFunctionCode(edi, no_reg, expected, actual, JUMP_FUNCTION, in Generate_CallFunction()
2536 __ bind(&class_constructor); in Generate_CallFunction()
2539 __ push(edi); in Generate_CallFunction()
2540 __ CallRuntime(Runtime::kThrowConstructorNonCallableError); in Generate_CallFunction()
2555 __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundArgumentsOffset)); in Generate_PushBoundArguments()
2556 __ mov(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); in Generate_PushBoundArguments()
2557 __ SmiUntag(ebx); in Generate_PushBoundArguments()
2558 __ test(ebx, ebx); in Generate_PushBoundArguments()
2559 __ j(zero, &no_bound_arguments); in Generate_PushBoundArguments()
2572 __ lea(ecx, Operand(ebx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2573 __ sub(esp, ecx); in Generate_PushBoundArguments()
2577 __ CompareRoot(esp, ecx, Heap::kRealStackLimitRootIndex); in Generate_PushBoundArguments()
2578 __ j(greater, &done, Label::kNear); // Signed comparison. in Generate_PushBoundArguments()
2580 __ lea(esp, Operand(esp, ebx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2583 __ EnterFrame(StackFrame::INTERNAL); in Generate_PushBoundArguments()
2584 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_PushBoundArguments()
2586 __ bind(&done); in Generate_PushBoundArguments()
2590 __ inc(eax); in Generate_PushBoundArguments()
2595 __ Set(ecx, 0); in Generate_PushBoundArguments()
2596 __ lea(ebx, Operand(esp, ebx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2597 __ bind(&loop); in Generate_PushBoundArguments()
2598 __ fld_s(Operand(ebx, ecx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2599 __ fstp_s(Operand(esp, ecx, times_pointer_size, 0)); in Generate_PushBoundArguments()
2600 __ inc(ecx); in Generate_PushBoundArguments()
2601 __ cmp(ecx, eax); in Generate_PushBoundArguments()
2602 __ j(less, &loop); in Generate_PushBoundArguments()
2608 __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundArgumentsOffset)); in Generate_PushBoundArguments()
2609 __ mov(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); in Generate_PushBoundArguments()
2610 __ SmiUntag(ebx); in Generate_PushBoundArguments()
2611 __ bind(&loop); in Generate_PushBoundArguments()
2612 __ dec(ebx); in Generate_PushBoundArguments()
2613 __ fld_s( in Generate_PushBoundArguments()
2615 __ fstp_s(Operand(esp, eax, times_pointer_size, 0)); in Generate_PushBoundArguments()
2616 __ lea(eax, Operand(eax, 1)); in Generate_PushBoundArguments()
2617 __ j(greater, &loop); in Generate_PushBoundArguments()
2623 __ dec(eax); in Generate_PushBoundArguments()
2625 __ bind(&no_bound_arguments); in Generate_PushBoundArguments()
2637 __ AssertBoundFunction(edi); in Generate_CallBoundFunctionImpl()
2644 __ mov(ebx, FieldOperand(edi, JSBoundFunction::kBoundThisOffset)); in Generate_CallBoundFunctionImpl()
2645 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ebx); in Generate_CallBoundFunctionImpl()
2651 __ mov(edi, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); in Generate_CallBoundFunctionImpl()
2652 __ mov(ecx, Operand::StaticVariable(ExternalReference( in Generate_CallBoundFunctionImpl()
2654 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_CallBoundFunctionImpl()
2655 __ jmp(ecx); in Generate_CallBoundFunctionImpl()
2667 __ JumpIfSmi(edi, &non_callable); in Generate_Call()
2668 __ bind(&non_smi); in Generate_Call()
2669 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); in Generate_Call()
2670 __ j(equal, masm->isolate()->builtins()->CallFunction(mode, tail_call_mode), in Generate_Call()
2672 __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); in Generate_Call()
2673 __ j(equal, masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), in Generate_Call()
2677 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_Call()
2679 __ j(zero, &non_callable); in Generate_Call()
2681 __ CmpInstanceType(ecx, JS_PROXY_TYPE); in Generate_Call()
2682 __ j(not_equal, &non_function); in Generate_Call()
2690 __ PopReturnAddressTo(ecx); in Generate_Call()
2691 __ Push(edi); in Generate_Call()
2692 __ PushReturnAddressFrom(ecx); in Generate_Call()
2695 __ add(eax, Immediate(2)); in Generate_Call()
2697 __ JumpToExternalReference( in Generate_Call()
2702 __ bind(&non_function); in Generate_Call()
2704 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); in Generate_Call()
2706 __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, edi); in Generate_Call()
2707 __ Jump(masm->isolate()->builtins()->CallFunction( in Generate_Call()
2712 __ bind(&non_callable); in Generate_Call()
2715 __ Push(edi); in Generate_Call()
2716 __ CallRuntime(Runtime::kThrowCalledNonCallable); in Generate_Call()
2727 __ AssertFunction(edi); in Generate_ConstructFunction()
2731 __ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); in Generate_ConstructFunction()
2735 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_ConstructFunction()
2736 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); in Generate_ConstructFunction()
2737 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_ConstructFunction()
2738 __ jmp(ecx); in Generate_ConstructFunction()
2748 __ AssertBoundFunction(edi); in Generate_ConstructBoundFunction()
2756 __ cmp(edi, edx); in Generate_ConstructBoundFunction()
2757 __ j(not_equal, &done, Label::kNear); in Generate_ConstructBoundFunction()
2758 __ mov(edx, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); in Generate_ConstructBoundFunction()
2759 __ bind(&done); in Generate_ConstructBoundFunction()
2763 __ mov(edi, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); in Generate_ConstructBoundFunction()
2764 __ mov(ecx, Operand::StaticVariable( in Generate_ConstructBoundFunction()
2766 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate_ConstructBoundFunction()
2767 __ jmp(ecx); in Generate_ConstructBoundFunction()
2780 __ PopReturnAddressTo(ecx); in Generate_ConstructProxy()
2781 __ Push(edi); in Generate_ConstructProxy()
2782 __ Push(edx); in Generate_ConstructProxy()
2783 __ PushReturnAddressFrom(ecx); in Generate_ConstructProxy()
2785 __ add(eax, Immediate(3)); in Generate_ConstructProxy()
2787 __ JumpToExternalReference( in Generate_ConstructProxy()
2802 __ JumpIfSmi(edi, &non_constructor, Label::kNear); in Generate_Construct()
2805 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); in Generate_Construct()
2806 __ j(equal, masm->isolate()->builtins()->ConstructFunction(), in Generate_Construct()
2810 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in Generate_Construct()
2812 __ j(zero, &non_constructor, Label::kNear); in Generate_Construct()
2816 __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); in Generate_Construct()
2817 __ j(equal, masm->isolate()->builtins()->ConstructBoundFunction(), in Generate_Construct()
2821 __ CmpInstanceType(ecx, JS_PROXY_TYPE); in Generate_Construct()
2822 __ j(equal, masm->isolate()->builtins()->ConstructProxy(), in Generate_Construct()
2828 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); in Generate_Construct()
2830 __ LoadGlobalFunction(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, edi); in Generate_Construct()
2831 __ Jump(masm->isolate()->builtins()->CallFunction(), in Generate_Construct()
2837 __ bind(&non_constructor); in Generate_Construct()
2838 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), in Generate_Construct()
2848 __ SmiTag(edx); in Generate_AllocateInNewSpace()
2849 __ PopReturnAddressTo(ecx); in Generate_AllocateInNewSpace()
2850 __ Push(edx); in Generate_AllocateInNewSpace()
2851 __ PushReturnAddressFrom(ecx); in Generate_AllocateInNewSpace()
2852 __ Move(esi, Smi::kZero); in Generate_AllocateInNewSpace()
2853 __ TailCallRuntime(Runtime::kAllocateInNewSpace); in Generate_AllocateInNewSpace()
2862 __ SmiTag(edx); in Generate_AllocateInOldSpace()
2863 __ PopReturnAddressTo(ecx); in Generate_AllocateInOldSpace()
2864 __ Push(edx); in Generate_AllocateInOldSpace()
2865 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); in Generate_AllocateInOldSpace()
2866 __ PushReturnAddressFrom(ecx); in Generate_AllocateInOldSpace()
2867 __ Move(esi, Smi::kZero); in Generate_AllocateInOldSpace()
2868 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); in Generate_AllocateInOldSpace()
2877 __ PopReturnAddressTo(ecx); in Generate_Abort()
2878 __ Push(edx); in Generate_Abort()
2879 __ PushReturnAddressFrom(ecx); in Generate_Abort()
2880 __ Move(esi, Smi::kZero); in Generate_Abort()
2881 __ TailCallRuntime(Runtime::kAbort); in Generate_Abort()
2893 __ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); in Generate_ArgumentsAdaptorTrampoline()
2896 __ cmp(eax, ebx); in Generate_ArgumentsAdaptorTrampoline()
2897 __ j(less, &too_few); in Generate_ArgumentsAdaptorTrampoline()
2898 __ cmp(ebx, SharedFunctionInfo::kDontAdaptArgumentsSentinel); in Generate_ArgumentsAdaptorTrampoline()
2899 __ j(equal, &dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
2902 __ bind(&enough); in Generate_ArgumentsAdaptorTrampoline()
2910 __ lea(edi, Operand(ebp, eax, times_4, offset)); in Generate_ArgumentsAdaptorTrampoline()
2911 __ mov(eax, -1); // account for receiver in Generate_ArgumentsAdaptorTrampoline()
2914 __ bind(©); in Generate_ArgumentsAdaptorTrampoline()
2915 __ inc(eax); in Generate_ArgumentsAdaptorTrampoline()
2916 __ push(Operand(edi, 0)); in Generate_ArgumentsAdaptorTrampoline()
2917 __ sub(edi, Immediate(kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2918 __ cmp(eax, ebx); in Generate_ArgumentsAdaptorTrampoline()
2919 __ j(less, ©); in Generate_ArgumentsAdaptorTrampoline()
2921 __ jmp(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2925 __ bind(&too_few); in Generate_ArgumentsAdaptorTrampoline()
2932 __ mov(ecx, ebx); in Generate_ArgumentsAdaptorTrampoline()
2936 __ lea(edi, Operand(ebp, eax, times_4, offset)); in Generate_ArgumentsAdaptorTrampoline()
2938 __ sub(ebx, eax); in Generate_ArgumentsAdaptorTrampoline()
2940 __ neg(eax); in Generate_ArgumentsAdaptorTrampoline()
2941 __ sub(eax, Immediate(1)); in Generate_ArgumentsAdaptorTrampoline()
2944 __ bind(©); in Generate_ArgumentsAdaptorTrampoline()
2945 __ inc(eax); in Generate_ArgumentsAdaptorTrampoline()
2946 __ push(Operand(edi, 0)); in Generate_ArgumentsAdaptorTrampoline()
2947 __ sub(edi, Immediate(kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2948 __ test(eax, eax); in Generate_ArgumentsAdaptorTrampoline()
2949 __ j(not_zero, ©); in Generate_ArgumentsAdaptorTrampoline()
2953 __ bind(&fill); in Generate_ArgumentsAdaptorTrampoline()
2954 __ inc(eax); in Generate_ArgumentsAdaptorTrampoline()
2955 __ push(Immediate(masm->isolate()->factory()->undefined_value())); in Generate_ArgumentsAdaptorTrampoline()
2956 __ cmp(eax, ebx); in Generate_ArgumentsAdaptorTrampoline()
2957 __ j(less, &fill); in Generate_ArgumentsAdaptorTrampoline()
2960 __ mov(eax, ecx); in Generate_ArgumentsAdaptorTrampoline()
2964 __ bind(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2966 __ mov(edi, Operand(ebp, ArgumentsAdaptorFrameConstants::kFunctionOffset)); in Generate_ArgumentsAdaptorTrampoline()
2970 __ mov(ecx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); in Generate_ArgumentsAdaptorTrampoline()
2971 __ call(ecx); in Generate_ArgumentsAdaptorTrampoline()
2978 __ ret(0); in Generate_ArgumentsAdaptorTrampoline()
2983 __ bind(&dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
2984 __ mov(ecx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); in Generate_ArgumentsAdaptorTrampoline()
2985 __ jmp(ecx); in Generate_ArgumentsAdaptorTrampoline()
2987 __ bind(&stack_overflow); in Generate_ArgumentsAdaptorTrampoline()
2990 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_ArgumentsAdaptorTrampoline()
2991 __ int3(); in Generate_ArgumentsAdaptorTrampoline()
3000 __ CompareRoot(FieldOperand(function_template_info, in CompatibleReceiverCheck()
3004 __ j(equal, &receiver_check_passed, Label::kNear); in CompatibleReceiverCheck()
3007 __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
3009 __ bind(&prototype_loop_start); in CompatibleReceiverCheck()
3012 __ GetMapConstructor(scratch0, scratch0, scratch1); in CompatibleReceiverCheck()
3013 __ CmpInstanceType(scratch1, JS_FUNCTION_TYPE); in CompatibleReceiverCheck()
3015 __ j(not_equal, &next_prototype, Label::kNear); in CompatibleReceiverCheck()
3018 __ mov(scratch0, in CompatibleReceiverCheck()
3020 __ mov(scratch0, in CompatibleReceiverCheck()
3025 __ bind(&function_template_loop); in CompatibleReceiverCheck()
3028 __ cmp(scratch0, FieldOperand(function_template_info, in CompatibleReceiverCheck()
3030 __ j(equal, &receiver_check_passed, Label::kNear); in CompatibleReceiverCheck()
3034 __ JumpIfSmi(scratch0, &next_prototype, Label::kNear); in CompatibleReceiverCheck()
3035 __ CmpObjectType(scratch0, FUNCTION_TEMPLATE_INFO_TYPE, scratch1); in CompatibleReceiverCheck()
3036 __ j(not_equal, &next_prototype, Label::kNear); in CompatibleReceiverCheck()
3039 __ mov(scratch0, in CompatibleReceiverCheck()
3041 __ jmp(&function_template_loop, Label::kNear); in CompatibleReceiverCheck()
3044 __ bind(&next_prototype); in CompatibleReceiverCheck()
3045 __ mov(receiver, FieldOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
3046 __ test(FieldOperand(receiver, Map::kBitField3Offset), in CompatibleReceiverCheck()
3048 __ j(zero, receiver_check_failed); in CompatibleReceiverCheck()
3050 __ mov(receiver, FieldOperand(receiver, Map::kPrototypeOffset)); in CompatibleReceiverCheck()
3051 __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
3053 __ jmp(&prototype_loop_start, Label::kNear); in CompatibleReceiverCheck()
3055 __ bind(&receiver_check_passed); in CompatibleReceiverCheck()
3071 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate_HandleFastApiCall()
3072 __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kFunctionDataOffset)); in Generate_HandleFastApiCall()
3076 __ mov(ecx, Operand(esp, eax, times_pointer_size, kPCOnStackSize)); in Generate_HandleFastApiCall()
3077 __ Push(eax); in Generate_HandleFastApiCall()
3079 __ Pop(eax); in Generate_HandleFastApiCall()
3082 __ mov(edx, FieldOperand(ebx, FunctionTemplateInfo::kCallCodeOffset)); in Generate_HandleFastApiCall()
3083 __ mov(edx, FieldOperand(edx, CallHandlerInfo::kFastHandlerOffset)); in Generate_HandleFastApiCall()
3084 __ add(edx, Immediate(Code::kHeaderSize - kHeapObjectTag)); in Generate_HandleFastApiCall()
3085 __ jmp(edx); in Generate_HandleFastApiCall()
3089 __ bind(&receiver_check_failed); in Generate_HandleFastApiCall()
3090 __ Pop(eax); in Generate_HandleFastApiCall()
3091 __ PopReturnAddressTo(ebx); in Generate_HandleFastApiCall()
3092 __ lea(eax, Operand(eax, times_pointer_size, 1 * kPointerSize)); in Generate_HandleFastApiCall()
3093 __ add(esp, eax); in Generate_HandleFastApiCall()
3094 __ PushReturnAddressFrom(ebx); in Generate_HandleFastApiCall()
3097 __ TailCallRuntime(Runtime::kThrowIllegalInvocation); in Generate_HandleFastApiCall()
3105 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); in Generate_OnStackReplacementHelper()
3106 __ mov(eax, Operand(eax, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
3108 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
3114 __ push(eax); in Generate_OnStackReplacementHelper()
3115 __ CallRuntime(Runtime::kCompileForOnStackReplacement); in Generate_OnStackReplacementHelper()
3120 __ cmp(eax, Immediate(0)); in Generate_OnStackReplacementHelper()
3121 __ j(not_equal, &skip, Label::kNear); in Generate_OnStackReplacementHelper()
3122 __ ret(0); in Generate_OnStackReplacementHelper()
3124 __ bind(&skip); in Generate_OnStackReplacementHelper()
3129 __ leave(); in Generate_OnStackReplacementHelper()
3133 __ mov(ebx, Operand(eax, Code::kDeoptimizationDataOffset - kHeapObjectTag)); in Generate_OnStackReplacementHelper()
3136 __ mov(ebx, Operand(ebx, FixedArray::OffsetOfElementAt( in Generate_OnStackReplacementHelper()
3139 __ SmiUntag(ebx); in Generate_OnStackReplacementHelper()
3142 __ lea(eax, Operand(eax, ebx, times_1, Code::kHeaderSize - kHeapObjectTag)); in Generate_OnStackReplacementHelper()
3145 __ mov(Operand(esp, 0), eax); in Generate_OnStackReplacementHelper()
3148 __ ret(0); in Generate_OnStackReplacementHelper()
3159 #undef __