Lines Matching full:__

16 #define __ ACCESS_MASM(masm)  macro
29 __ AssertFunction(r3); in Generate_Adaptor()
35 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); in Generate_Adaptor()
40 __ AddP(r2, r2, Operand(num_extra_args + 1)); in Generate_Adaptor()
43 __ SmiTag(r2); in Generate_Adaptor()
44 __ Push(r2, r3, r5); in Generate_Adaptor()
45 __ SmiUntag(r2); in Generate_Adaptor()
47 __ JumpToExternalReference(ExternalReference(address, masm->isolate()), in Generate_Adaptor()
55 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); in GenerateLoadInternalArrayFunction()
61 __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, result); in GenerateLoadArrayFunction()
77 __ LoadP(r4, FieldMemOperand(r3, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_InternalArrayCode()
78 __ TestIfSmi(r4); in Generate_InternalArrayCode()
79 __ Assert(ne, kUnexpectedInitialMapForInternalArrayFunction, cr0); in Generate_InternalArrayCode()
80 __ CompareObjectType(r4, r5, r6, MAP_TYPE); in Generate_InternalArrayCode()
81 __ Assert(eq, kUnexpectedInitialMapForInternalArrayFunction); in Generate_InternalArrayCode()
88 __ TailCallStub(&stub); in Generate_InternalArrayCode()
104 __ LoadP(r4, FieldMemOperand(r3, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_ArrayCode()
105 __ TestIfSmi(r4); in Generate_ArrayCode()
106 __ Assert(ne, kUnexpectedInitialMapForArrayFunction, cr0); in Generate_ArrayCode()
107 __ CompareObjectType(r4, r5, r6, MAP_TYPE); in Generate_ArrayCode()
108 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); in Generate_ArrayCode()
111 __ LoadRR(r5, r3); in Generate_ArrayCode()
114 __ LoadRoot(r4, Heap::kUndefinedValueRootIndex); in Generate_ArrayCode()
116 __ TailCallStub(&stub); in Generate_ArrayCode()
137 __ LoadRoot(r7, root_index); in Generate_MathMaxMin()
138 __ LoadDouble(d1, FieldMemOperand(r7, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
143 __ AddP(r6, r2, Operand(1)); in Generate_MathMaxMin()
146 __ LoadRR(r6, r2); in Generate_MathMaxMin()
147 __ bind(&loop); in Generate_MathMaxMin()
150 __ SubP(r6, Operand(1)); in Generate_MathMaxMin()
151 __ blt(&done_loop); in Generate_MathMaxMin()
154 __ ShiftLeftP(r1, r6, Operand(kPointerSizeLog2)); in Generate_MathMaxMin()
155 __ LoadP(r4, MemOperand(sp, r1)); in Generate_MathMaxMin()
160 __ bind(&convert); in Generate_MathMaxMin()
161 __ JumpIfSmi(r4, &convert_smi); in Generate_MathMaxMin()
162 __ LoadP(r5, FieldMemOperand(r4, HeapObject::kMapOffset)); in Generate_MathMaxMin()
163 __ JumpIfRoot(r5, Heap::kHeapNumberMapRootIndex, &convert_number); in Generate_MathMaxMin()
168 __ SmiTag(r2); in Generate_MathMaxMin()
169 __ SmiTag(r6); in Generate_MathMaxMin()
170 __ EnterBuiltinFrame(cp, r3, r2); in Generate_MathMaxMin()
171 __ Push(r6, r7); in Generate_MathMaxMin()
172 __ LoadRR(r2, r4); in Generate_MathMaxMin()
173 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_MathMaxMin()
174 __ LoadRR(r4, r2); in Generate_MathMaxMin()
175 __ Pop(r6, r7); in Generate_MathMaxMin()
176 __ LeaveBuiltinFrame(cp, r3, r2); in Generate_MathMaxMin()
177 __ SmiUntag(r6); in Generate_MathMaxMin()
178 __ SmiUntag(r2); in Generate_MathMaxMin()
182 __ SmiToDouble(d1, r7); in Generate_MathMaxMin()
183 __ JumpIfSmi(r7, &done_restore); in Generate_MathMaxMin()
184 __ LoadDouble(d1, FieldMemOperand(r7, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
185 __ bind(&done_restore); in Generate_MathMaxMin()
188 __ b(&convert); in Generate_MathMaxMin()
189 __ bind(&convert_number); in Generate_MathMaxMin()
190 __ LoadDouble(d2, FieldMemOperand(r4, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
191 __ b(&done_convert); in Generate_MathMaxMin()
192 __ bind(&convert_smi); in Generate_MathMaxMin()
193 __ SmiToDouble(d2, r4); in Generate_MathMaxMin()
194 __ bind(&done_convert); in Generate_MathMaxMin()
199 __ cdbr(d1, d2); in Generate_MathMaxMin()
200 __ bunordered(&compare_nan); in Generate_MathMaxMin()
201 __ b(cond_done, &loop); in Generate_MathMaxMin()
202 __ b(CommuteCondition(cond_done), &compare_swap); in Generate_MathMaxMin()
205 __ TestDoubleIsMinusZero(reg, r1, r0); in Generate_MathMaxMin()
206 __ bne(&loop); in Generate_MathMaxMin()
209 __ bind(&compare_swap); in Generate_MathMaxMin()
210 __ ldr(d1, d2); in Generate_MathMaxMin()
211 __ LoadRR(r7, r4); in Generate_MathMaxMin()
212 __ b(&loop); in Generate_MathMaxMin()
216 __ bind(&compare_nan); in Generate_MathMaxMin()
217 __ LoadRoot(r7, Heap::kNanValueRootIndex); in Generate_MathMaxMin()
218 __ LoadDouble(d1, FieldMemOperand(r7, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
219 __ b(&loop); in Generate_MathMaxMin()
222 __ bind(&done_loop); in Generate_MathMaxMin()
224 __ AddP(r2, Operand(1)); in Generate_MathMaxMin()
225 __ Drop(r2); in Generate_MathMaxMin()
226 __ LoadRR(r2, r7); in Generate_MathMaxMin()
227 __ Ret(); in Generate_MathMaxMin()
244 __ LoadRR(r4, r2); // Store argc in r4. in Generate_NumberConstructor()
245 __ CmpP(r2, Operand::Zero()); in Generate_NumberConstructor()
246 __ beq(&no_arguments); in Generate_NumberConstructor()
247 __ SubP(r2, r2, Operand(1)); in Generate_NumberConstructor()
248 __ ShiftLeftP(r2, r2, Operand(kPointerSizeLog2)); in Generate_NumberConstructor()
249 __ LoadP(r2, MemOperand(sp, r2)); in Generate_NumberConstructor()
255 __ SmiTag(r4); in Generate_NumberConstructor()
256 __ EnterBuiltinFrame(cp, r3, r4); in Generate_NumberConstructor()
257 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor()
258 __ LeaveBuiltinFrame(cp, r3, r4); in Generate_NumberConstructor()
259 __ SmiUntag(r4); in Generate_NumberConstructor()
264 __ Drop(r4); in Generate_NumberConstructor()
265 __ Ret(1); in Generate_NumberConstructor()
269 __ bind(&no_arguments); in Generate_NumberConstructor()
270 __ LoadSmiLiteral(r2, Smi::kZero); in Generate_NumberConstructor()
271 __ Ret(1); in Generate_NumberConstructor()
286 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); in Generate_NumberConstructor_ConstructStub()
291 __ LoadRR(r8, r2); // Store argc in r8. in Generate_NumberConstructor_ConstructStub()
292 __ CmpP(r2, Operand::Zero()); in Generate_NumberConstructor_ConstructStub()
293 __ beq(&no_arguments); in Generate_NumberConstructor_ConstructStub()
294 __ SubP(r2, r2, Operand(1)); in Generate_NumberConstructor_ConstructStub()
295 __ ShiftLeftP(r4, r2, Operand(kPointerSizeLog2)); in Generate_NumberConstructor_ConstructStub()
296 __ LoadP(r4, MemOperand(sp, r4)); in Generate_NumberConstructor_ConstructStub()
297 __ b(&done); in Generate_NumberConstructor_ConstructStub()
298 __ bind(&no_arguments); in Generate_NumberConstructor_ConstructStub()
299 __ LoadSmiLiteral(r4, Smi::kZero); in Generate_NumberConstructor_ConstructStub()
300 __ bind(&done); in Generate_NumberConstructor_ConstructStub()
306 __ JumpIfSmi(r4, &done_convert); in Generate_NumberConstructor_ConstructStub()
307 __ CompareObjectType(r4, r6, r6, HEAP_NUMBER_TYPE); in Generate_NumberConstructor_ConstructStub()
308 __ beq(&done_convert); in Generate_NumberConstructor_ConstructStub()
311 __ SmiTag(r8); in Generate_NumberConstructor_ConstructStub()
312 __ EnterBuiltinFrame(cp, r3, r8); in Generate_NumberConstructor_ConstructStub()
313 __ Push(r5); in Generate_NumberConstructor_ConstructStub()
314 __ LoadRR(r2, r4); in Generate_NumberConstructor_ConstructStub()
315 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor_ConstructStub()
316 __ LoadRR(r4, r2); in Generate_NumberConstructor_ConstructStub()
317 __ Pop(r5); in Generate_NumberConstructor_ConstructStub()
318 __ LeaveBuiltinFrame(cp, r3, r8); in Generate_NumberConstructor_ConstructStub()
319 __ SmiUntag(r8); in Generate_NumberConstructor_ConstructStub()
321 __ bind(&done_convert); in Generate_NumberConstructor_ConstructStub()
326 __ CmpP(r3, r5); in Generate_NumberConstructor_ConstructStub()
327 __ bne(&new_object); in Generate_NumberConstructor_ConstructStub()
330 __ AllocateJSValue(r2, r3, r4, r6, r7, &new_object); in Generate_NumberConstructor_ConstructStub()
331 __ b(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
334 __ bind(&new_object); in Generate_NumberConstructor_ConstructStub()
338 __ SmiTag(r8); in Generate_NumberConstructor_ConstructStub()
339 __ EnterBuiltinFrame(cp, r3, r8); in Generate_NumberConstructor_ConstructStub()
340 __ Push(r4); // first argument in Generate_NumberConstructor_ConstructStub()
341 __ CallStub(&stub); in Generate_NumberConstructor_ConstructStub()
342 __ Pop(r4); in Generate_NumberConstructor_ConstructStub()
343 __ LeaveBuiltinFrame(cp, r3, r8); in Generate_NumberConstructor_ConstructStub()
344 __ SmiUntag(r8); in Generate_NumberConstructor_ConstructStub()
346 __ StoreP(r4, FieldMemOperand(r2, JSValue::kValueOffset), r0); in Generate_NumberConstructor_ConstructStub()
348 __ bind(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
350 __ Drop(r8); in Generate_NumberConstructor_ConstructStub()
351 __ Ret(1); in Generate_NumberConstructor_ConstructStub()
368 __ LoadRR(r4, r2); // Store argc in r4 in Generate_StringConstructor()
369 __ CmpP(r2, Operand::Zero()); in Generate_StringConstructor()
370 __ beq(&no_arguments); in Generate_StringConstructor()
371 __ SubP(r2, r2, Operand(1)); in Generate_StringConstructor()
372 __ ShiftLeftP(r2, r2, Operand(kPointerSizeLog2)); in Generate_StringConstructor()
373 __ LoadP(r2, MemOperand(sp, r2)); in Generate_StringConstructor()
380 __ JumpIfSmi(r2, &to_string); in Generate_StringConstructor()
382 __ CompareObjectType(r2, r5, r5, FIRST_NONSTRING_TYPE); in Generate_StringConstructor()
383 __ bgt(&to_string); in Generate_StringConstructor()
384 __ beq(&symbol_descriptive_string); in Generate_StringConstructor()
385 __ b(&drop_frame_and_ret); in Generate_StringConstructor()
389 __ bind(&no_arguments); in Generate_StringConstructor()
391 __ LoadRoot(r2, Heap::kempty_stringRootIndex); in Generate_StringConstructor()
392 __ Ret(1); in Generate_StringConstructor()
396 __ bind(&to_string); in Generate_StringConstructor()
399 __ SmiTag(r4); in Generate_StringConstructor()
400 __ EnterBuiltinFrame(cp, r3, r4); in Generate_StringConstructor()
401 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor()
402 __ LeaveBuiltinFrame(cp, r3, r4); in Generate_StringConstructor()
403 __ SmiUntag(r4); in Generate_StringConstructor()
405 __ b(&drop_frame_and_ret); in Generate_StringConstructor()
407 __ bind(&symbol_descriptive_string); in Generate_StringConstructor()
409 __ Drop(r4); in Generate_StringConstructor()
410 __ Drop(1); in Generate_StringConstructor()
411 __ Push(r2); in Generate_StringConstructor()
412 __ TailCallRuntime(Runtime::kSymbolDescriptiveString); in Generate_StringConstructor()
415 __ bind(&drop_frame_and_ret); in Generate_StringConstructor()
417 __ Drop(r4); in Generate_StringConstructor()
418 __ Ret(1); in Generate_StringConstructor()
435 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); in Generate_StringConstructor_ConstructStub()
440 __ LoadRR(r8, r2); // Store argc in r8. in Generate_StringConstructor_ConstructStub()
441 __ CmpP(r2, Operand::Zero()); in Generate_StringConstructor_ConstructStub()
442 __ beq(&no_arguments); in Generate_StringConstructor_ConstructStub()
443 __ SubP(r2, r2, Operand(1)); in Generate_StringConstructor_ConstructStub()
444 __ ShiftLeftP(r4, r2, Operand(kPointerSizeLog2)); in Generate_StringConstructor_ConstructStub()
445 __ LoadP(r4, MemOperand(sp, r4)); in Generate_StringConstructor_ConstructStub()
446 __ b(&done); in Generate_StringConstructor_ConstructStub()
447 __ bind(&no_arguments); in Generate_StringConstructor_ConstructStub()
448 __ LoadRoot(r4, Heap::kempty_stringRootIndex); in Generate_StringConstructor_ConstructStub()
449 __ bind(&done); in Generate_StringConstructor_ConstructStub()
455 __ JumpIfSmi(r4, &convert); in Generate_StringConstructor_ConstructStub()
456 __ CompareObjectType(r4, r6, r6, FIRST_NONSTRING_TYPE); in Generate_StringConstructor_ConstructStub()
457 __ blt(&done_convert); in Generate_StringConstructor_ConstructStub()
458 __ bind(&convert); in Generate_StringConstructor_ConstructStub()
461 __ SmiTag(r8); in Generate_StringConstructor_ConstructStub()
462 __ EnterBuiltinFrame(cp, r3, r8); in Generate_StringConstructor_ConstructStub()
463 __ Push(r5); in Generate_StringConstructor_ConstructStub()
464 __ LoadRR(r2, r4); in Generate_StringConstructor_ConstructStub()
465 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor_ConstructStub()
466 __ LoadRR(r4, r2); in Generate_StringConstructor_ConstructStub()
467 __ Pop(r5); in Generate_StringConstructor_ConstructStub()
468 __ LeaveBuiltinFrame(cp, r3, r8); in Generate_StringConstructor_ConstructStub()
469 __ SmiUntag(r8); in Generate_StringConstructor_ConstructStub()
471 __ bind(&done_convert); in Generate_StringConstructor_ConstructStub()
476 __ CmpP(r3, r5); in Generate_StringConstructor_ConstructStub()
477 __ bne(&new_object); in Generate_StringConstructor_ConstructStub()
480 __ AllocateJSValue(r2, r3, r4, r6, r7, &new_object); in Generate_StringConstructor_ConstructStub()
481 __ b(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
484 __ bind(&new_object); in Generate_StringConstructor_ConstructStub()
488 __ SmiTag(r8); in Generate_StringConstructor_ConstructStub()
489 __ EnterBuiltinFrame(cp, r3, r8); in Generate_StringConstructor_ConstructStub()
490 __ Push(r4); // first argument in Generate_StringConstructor_ConstructStub()
491 __ CallStub(&stub); in Generate_StringConstructor_ConstructStub()
492 __ Pop(r4); in Generate_StringConstructor_ConstructStub()
493 __ LeaveBuiltinFrame(cp, r3, r8); in Generate_StringConstructor_ConstructStub()
494 __ SmiUntag(r8); in Generate_StringConstructor_ConstructStub()
496 __ StoreP(r4, FieldMemOperand(r2, JSValue::kValueOffset), r0); in Generate_StringConstructor_ConstructStub()
498 __ bind(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
500 __ Drop(r8); in Generate_StringConstructor_ConstructStub()
501 __ Ret(1); in Generate_StringConstructor_ConstructStub()
506 __ LoadP(ip, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); in GenerateTailCallToSharedCode()
507 __ LoadP(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); in GenerateTailCallToSharedCode()
508 __ AddP(ip, Operand(Code::kHeaderSize - kHeapObjectTag)); in GenerateTailCallToSharedCode()
509 __ JumpToJSEntry(ip); in GenerateTailCallToSharedCode()
524 __ SmiTag(r2); in GenerateTailCallToReturnedCode()
525 __ Push(r2, r3, r5, r3); in GenerateTailCallToReturnedCode()
527 __ CallRuntime(function_id, 1); in GenerateTailCallToReturnedCode()
528 __ LoadRR(r4, r2); in GenerateTailCallToReturnedCode()
531 __ Pop(r2, r3, r5); in GenerateTailCallToReturnedCode()
532 __ SmiUntag(r2); in GenerateTailCallToReturnedCode()
534 __ AddP(ip, r4, Operand(Code::kHeaderSize - kHeapObjectTag)); in GenerateTailCallToReturnedCode()
535 __ JumpToJSEntry(ip); in GenerateTailCallToReturnedCode()
545 __ CmpLogicalP(sp, RootMemOperand(Heap::kStackLimitRootIndex)); in Generate_InOptimizationQueue()
546 __ bge(&ok, Label::kNear); in Generate_InOptimizationQueue()
550 __ bind(&ok); in Generate_InOptimizationQueue()
577 __ SmiTag(r6, r2); in Generate_JSConstructStubHelper()
578 __ LoadAndTestP(r6, r6); in Generate_JSConstructStubHelper()
579 __ Push(cp, r6); in Generate_JSConstructStubHelper()
580 __ PushRoot(Heap::kTheHoleValueRootIndex); in Generate_JSConstructStubHelper()
582 __ SmiTag(r2); in Generate_JSConstructStubHelper()
583 __ Push(cp, r2); in Generate_JSConstructStubHelper()
586 __ Push(r3, r5); in Generate_JSConstructStubHelper()
588 __ CallStub(&stub); in Generate_JSConstructStubHelper()
589 __ LoadRR(r6, r2); in Generate_JSConstructStubHelper()
590 __ Pop(r3, r5); in Generate_JSConstructStubHelper()
599 __ LoadP(r2, MemOperand(sp)); in Generate_JSConstructStubHelper()
600 __ SmiUntag(r2); in Generate_JSConstructStubHelper()
601 __ LoadAndTestP(r2, r2); in Generate_JSConstructStubHelper()
606 __ Push(r6, r6); in Generate_JSConstructStubHelper()
610 __ la(r4, MemOperand(fp, StandardFrameConstants::kCallerSPOffset)); in Generate_JSConstructStubHelper()
622 __ beq(&no_args); in Generate_JSConstructStubHelper()
623 __ ShiftLeftP(ip, r2, Operand(kPointerSizeLog2)); in Generate_JSConstructStubHelper()
624 __ SubP(sp, sp, ip); in Generate_JSConstructStubHelper()
625 __ LoadRR(r1, r2); in Generate_JSConstructStubHelper()
626 __ bind(&loop); in Generate_JSConstructStubHelper()
627 __ lay(ip, MemOperand(ip, -kPointerSize)); in Generate_JSConstructStubHelper()
628 __ LoadP(r0, MemOperand(ip, r4)); in Generate_JSConstructStubHelper()
629 __ StoreP(r0, MemOperand(ip, sp)); in Generate_JSConstructStubHelper()
630 __ BranchOnCount(r1, &loop); in Generate_JSConstructStubHelper()
631 __ bind(&no_args); in Generate_JSConstructStubHelper()
639 __ InvokeFunction(r3, r5, actual, CALL_FUNCTION, in Generate_JSConstructStubHelper()
651 __ LoadP(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); in Generate_JSConstructStubHelper()
664 __ JumpIfSmi(r2, &use_receiver); in Generate_JSConstructStubHelper()
668 __ CompareObjectType(r2, r3, r5, FIRST_JS_RECEIVER_TYPE); in Generate_JSConstructStubHelper()
669 __ bge(&exit); in Generate_JSConstructStubHelper()
673 __ bind(&use_receiver); in Generate_JSConstructStubHelper()
674 __ LoadP(r2, MemOperand(sp)); in Generate_JSConstructStubHelper()
678 __ bind(&exit); in Generate_JSConstructStubHelper()
682 __ LoadP(r3, MemOperand(sp, 1 * kPointerSize)); in Generate_JSConstructStubHelper()
684 __ LoadP(r3, MemOperand(sp)); in Generate_JSConstructStubHelper()
695 __ JumpIfNotSmi(r2, &dont_throw); in Generate_JSConstructStubHelper()
698 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); in Generate_JSConstructStubHelper()
700 __ bind(&dont_throw); in Generate_JSConstructStubHelper()
703 __ SmiToPtrArrayOffset(r3, r3); in Generate_JSConstructStubHelper()
704 __ AddP(sp, sp, r3); in Generate_JSConstructStubHelper()
705 __ AddP(sp, sp, Operand(kPointerSize)); in Generate_JSConstructStubHelper()
707 __ IncrementCounter(isolate->counters()->constructed_objects(), 1, r3, r4); in Generate_JSConstructStubHelper()
709 __ Ret(); in Generate_JSConstructStubHelper()
739 __ AssertGeneratorObject(r3); in Generate_ResumeGeneratorTrampoline()
742 __ StoreP(r2, FieldMemOperand(r3, JSGeneratorObject::kInputOrDebugPosOffset), in Generate_ResumeGeneratorTrampoline()
744 __ RecordWriteField(r3, JSGeneratorObject::kInputOrDebugPosOffset, r2, r5, in Generate_ResumeGeneratorTrampoline()
748 __ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kResumeModeOffset)); in Generate_ResumeGeneratorTrampoline()
751 __ LoadP(cp, FieldMemOperand(r3, JSGeneratorObject::kContextOffset)); in Generate_ResumeGeneratorTrampoline()
752 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
760 __ mov(ip, Operand(last_step_action)); in Generate_ResumeGeneratorTrampoline()
761 __ LoadB(ip, MemOperand(ip)); in Generate_ResumeGeneratorTrampoline()
762 __ CmpP(ip, Operand(StepIn)); in Generate_ResumeGeneratorTrampoline()
763 __ bge(&prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
770 __ mov(ip, Operand(debug_suspended_generator)); in Generate_ResumeGeneratorTrampoline()
771 __ LoadP(ip, MemOperand(ip)); in Generate_ResumeGeneratorTrampoline()
772 __ CmpP(ip, r3); in Generate_ResumeGeneratorTrampoline()
773 __ beq(&prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
774 __ bind(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
777 __ LoadP(ip, FieldMemOperand(r3, JSGeneratorObject::kReceiverOffset)); in Generate_ResumeGeneratorTrampoline()
778 __ Push(ip); in Generate_ResumeGeneratorTrampoline()
793 __ LoadP(r5, FieldMemOperand(r6, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
794 __ LoadW( in Generate_ResumeGeneratorTrampoline()
798 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); in Generate_ResumeGeneratorTrampoline()
800 __ CmpP(r2, Operand::Zero()); in Generate_ResumeGeneratorTrampoline()
801 __ beq(&done_loop); in Generate_ResumeGeneratorTrampoline()
803 __ SmiUntag(r2); in Generate_ResumeGeneratorTrampoline()
804 __ LoadAndTestP(r2, r2); in Generate_ResumeGeneratorTrampoline()
805 __ beq(&done_loop); in Generate_ResumeGeneratorTrampoline()
807 __ LoadRR(r1, r2); in Generate_ResumeGeneratorTrampoline()
808 __ bind(&loop); in Generate_ResumeGeneratorTrampoline()
809 __ push(ip); in Generate_ResumeGeneratorTrampoline()
810 __ BranchOnCount(r1, &loop); in Generate_ResumeGeneratorTrampoline()
811 __ bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
816 __ LoadP(r5, FieldMemOperand(r5, SharedFunctionInfo::kFunctionDataOffset)); in Generate_ResumeGeneratorTrampoline()
817 __ CompareObjectType(r5, r5, r5, BYTECODE_ARRAY_TYPE); in Generate_ResumeGeneratorTrampoline()
818 __ bne(&old_generator, Label::kNear); in Generate_ResumeGeneratorTrampoline()
825 __ LoadRR(r5, r3); in Generate_ResumeGeneratorTrampoline()
826 __ LoadRR(r3, r6); in Generate_ResumeGeneratorTrampoline()
827 __ LoadP(ip, FieldMemOperand(r3, JSFunction::kCodeEntryOffset)); in Generate_ResumeGeneratorTrampoline()
828 __ JumpToJSEntry(ip); in Generate_ResumeGeneratorTrampoline()
831 __ bind(&old_generator); in Generate_ResumeGeneratorTrampoline()
836 __ PushStandardFrame(r6); in Generate_ResumeGeneratorTrampoline()
839 __ LoadP(r2, FieldMemOperand(r3, JSGeneratorObject::kOperandStackOffset)); in Generate_ResumeGeneratorTrampoline()
840 __ LoadP(r5, FieldMemOperand(r2, FixedArray::kLengthOffset)); in Generate_ResumeGeneratorTrampoline()
841 __ AddP(r2, r2, in Generate_ResumeGeneratorTrampoline()
845 __ SmiUntag(r5); in Generate_ResumeGeneratorTrampoline()
846 __ LoadAndTestP(r5, r5); in Generate_ResumeGeneratorTrampoline()
847 __ beq(&done_loop); in Generate_ResumeGeneratorTrampoline()
848 __ LoadRR(r1, r5); in Generate_ResumeGeneratorTrampoline()
849 __ bind(&loop); in Generate_ResumeGeneratorTrampoline()
850 __ LoadP(ip, MemOperand(r2, kPointerSize)); in Generate_ResumeGeneratorTrampoline()
851 __ la(r2, MemOperand(r2, kPointerSize)); in Generate_ResumeGeneratorTrampoline()
852 __ Push(ip); in Generate_ResumeGeneratorTrampoline()
853 __ BranchOnCount(r1, &loop); in Generate_ResumeGeneratorTrampoline()
854 __ bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
858 __ LoadRoot(ip, Heap::kEmptyFixedArrayRootIndex); in Generate_ResumeGeneratorTrampoline()
859 __ StoreP(ip, FieldMemOperand(r3, JSGeneratorObject::kOperandStackOffset), in Generate_ResumeGeneratorTrampoline()
863 __ LoadP(r5, FieldMemOperand(r6, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
864 __ LoadP(r5, FieldMemOperand(r5, SharedFunctionInfo::kCodeOffset)); in Generate_ResumeGeneratorTrampoline()
865 __ AddP(r5, r5, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_ResumeGeneratorTrampoline()
868 __ LoadP(r4, FieldMemOperand(r3, JSGeneratorObject::kContinuationOffset)); in Generate_ResumeGeneratorTrampoline()
869 __ SmiUntag(r4); in Generate_ResumeGeneratorTrampoline()
870 __ AddP(r5, r5, r4); in Generate_ResumeGeneratorTrampoline()
871 __ LoadSmiLiteral(r4, in Generate_ResumeGeneratorTrampoline()
873 __ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kContinuationOffset), in Generate_ResumeGeneratorTrampoline()
875 __ LoadRR(r2, r3); // Continuation expects generator object in r2. in Generate_ResumeGeneratorTrampoline()
876 __ Jump(r5); in Generate_ResumeGeneratorTrampoline()
880 __ bind(&prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
883 __ Push(r3, r4, r6); in Generate_ResumeGeneratorTrampoline()
884 __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); in Generate_ResumeGeneratorTrampoline()
885 __ Pop(r3, r4); in Generate_ResumeGeneratorTrampoline()
886 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
888 __ b(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
890 __ bind(&prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
893 __ Push(r3, r4); in Generate_ResumeGeneratorTrampoline()
894 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); in Generate_ResumeGeneratorTrampoline()
895 __ Pop(r3, r4); in Generate_ResumeGeneratorTrampoline()
896 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
898 __ b(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
903 __ push(r3); in Generate_ConstructedNonConstructable()
904 __ CallRuntime(Runtime::kThrowConstructedNonConstructable); in Generate_ConstructedNonConstructable()
916 __ LoadRoot(r4, Heap::kRealStackLimitRootIndex); in Generate_CheckStackOverflow()
919 __ SubP(r4, sp, r4); in Generate_CheckStackOverflow()
922 __ SmiToPtrArrayOffset(r0, argc); in Generate_CheckStackOverflow()
925 __ ShiftLeftP(r0, argc, Operand(kPointerSizeLog2)); in Generate_CheckStackOverflow()
927 __ CmpP(r4, r0); in Generate_CheckStackOverflow()
928 __ bgt(&okay); // Signed comparison. in Generate_CheckStackOverflow()
931 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_CheckStackOverflow()
933 __ bind(&okay); in Generate_CheckStackOverflow()
955 __ mov(cp, Operand(context_address)); in Generate_JSEntryTrampolineHelper()
956 __ LoadP(cp, MemOperand(cp)); in Generate_JSEntryTrampolineHelper()
958 __ InitializeRootRegister(); in Generate_JSEntryTrampolineHelper()
961 __ Push(r3, r4); in Generate_JSEntryTrampolineHelper()
978 __ ShiftLeftP(r7, r5, Operand(kPointerSizeLog2)); in Generate_JSEntryTrampolineHelper()
979 __ SubRR(sp, r7); // Buy the stack frame to fit args in Generate_JSEntryTrampolineHelper()
980 __ LoadImmP(r9, Operand(zero)); // Initialize argv index in Generate_JSEntryTrampolineHelper()
981 __ bind(&argLoop); in Generate_JSEntryTrampolineHelper()
982 __ CmpPH(r7, Operand(zero)); in Generate_JSEntryTrampolineHelper()
983 __ beq(&argExit, Label::kNear); in Generate_JSEntryTrampolineHelper()
984 __ lay(r7, MemOperand(r7, -kPointerSize)); in Generate_JSEntryTrampolineHelper()
985 __ LoadP(r8, MemOperand(r9, r6)); // read next parameter in Generate_JSEntryTrampolineHelper()
986 __ la(r9, MemOperand(r9, kPointerSize)); // r9++; in Generate_JSEntryTrampolineHelper()
987 __ LoadP(r0, MemOperand(r8)); // dereference handle in Generate_JSEntryTrampolineHelper()
988 __ StoreP(r0, MemOperand(r7, sp)); // push parameter in Generate_JSEntryTrampolineHelper()
989 __ b(&argLoop); in Generate_JSEntryTrampolineHelper()
990 __ bind(&argExit); in Generate_JSEntryTrampolineHelper()
993 __ LoadRR(r6, r2); in Generate_JSEntryTrampolineHelper()
994 __ LoadRR(r2, r5); in Generate_JSEntryTrampolineHelper()
995 __ LoadRR(r5, r6); in Generate_JSEntryTrampolineHelper()
999 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); in Generate_JSEntryTrampolineHelper()
1000 __ LoadRR(r7, r6); in Generate_JSEntryTrampolineHelper()
1001 __ LoadRR(r8, r6); in Generate_JSEntryTrampolineHelper()
1002 __ LoadRR(r9, r6); in Generate_JSEntryTrampolineHelper()
1008 __ Call(builtin, RelocInfo::CODE_TARGET); in Generate_JSEntryTrampolineHelper()
1013 __ b(r14); in Generate_JSEntryTrampolineHelper()
1030 __ LoadP(args_count, in LeaveInterpreterFrame()
1032 __ LoadlW(args_count, in LeaveInterpreterFrame()
1036 __ LeaveFrame(StackFrame::JAVA_SCRIPT); in LeaveInterpreterFrame()
1038 __ AddP(sp, sp, args_count); in LeaveInterpreterFrame()
1064 __ PushStandardFrame(r3); in Generate_InterpreterEntryTrampoline()
1068 __ LoadP(r2, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
1072 __ LoadP(debug_info, in Generate_InterpreterEntryTrampoline()
1075 __ LoadP(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1077 __ CmpSmiLiteral(debug_info, DebugInfo::uninitialized(), r0); in Generate_InterpreterEntryTrampoline()
1078 __ beq(&array_done); in Generate_InterpreterEntryTrampoline()
1079 __ LoadP(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1081 __ bind(&array_done); in Generate_InterpreterEntryTrampoline()
1085 __ LoadP(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
1086 __ CmpP(r2, Operand(masm->CodeObject())); // Self-reference to this code. in Generate_InterpreterEntryTrampoline()
1087 __ bne(&switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
1090 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); in Generate_InterpreterEntryTrampoline()
1091 __ LoadP(r6, FieldMemOperand(r6, LiteralsArray::kFeedbackVectorOffset)); in Generate_InterpreterEntryTrampoline()
1092 __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * in Generate_InterpreterEntryTrampoline()
1095 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); in Generate_InterpreterEntryTrampoline()
1096 __ StoreP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * in Generate_InterpreterEntryTrampoline()
1102 __ TestIfSmi(kInterpreterBytecodeArrayRegister); in Generate_InterpreterEntryTrampoline()
1103 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEntryTrampoline()
1104 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r2, no_reg, in Generate_InterpreterEntryTrampoline()
1106 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEntryTrampoline()
1110 __ mov(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEntryTrampoline()
1114 __ SmiTag(r4, kInterpreterBytecodeOffsetRegister); in Generate_InterpreterEntryTrampoline()
1115 __ Push(r5, kInterpreterBytecodeArrayRegister, r4); in Generate_InterpreterEntryTrampoline()
1120 __ LoadlW(r4, FieldMemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1125 __ SubP(r5, sp, r4); in Generate_InterpreterEntryTrampoline()
1126 __ LoadRoot(r0, Heap::kRealStackLimitRootIndex); in Generate_InterpreterEntryTrampoline()
1127 __ CmpLogicalP(r5, r0); in Generate_InterpreterEntryTrampoline()
1128 __ bge(&ok); in Generate_InterpreterEntryTrampoline()
1129 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterEntryTrampoline()
1130 __ bind(&ok); in Generate_InterpreterEntryTrampoline()
1135 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); in Generate_InterpreterEntryTrampoline()
1136 __ ShiftRightP(r4, r4, Operand(kPointerSizeLog2)); in Generate_InterpreterEntryTrampoline()
1137 __ LoadAndTestP(r4, r4); in Generate_InterpreterEntryTrampoline()
1138 __ beq(&no_args); in Generate_InterpreterEntryTrampoline()
1139 __ LoadRR(r1, r4); in Generate_InterpreterEntryTrampoline()
1140 __ bind(&loop); in Generate_InterpreterEntryTrampoline()
1141 __ push(r5); in Generate_InterpreterEntryTrampoline()
1142 __ SubP(r1, Operand(1)); in Generate_InterpreterEntryTrampoline()
1143 __ bne(&loop); in Generate_InterpreterEntryTrampoline()
1144 __ bind(&no_args); in Generate_InterpreterEntryTrampoline()
1148 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); in Generate_InterpreterEntryTrampoline()
1149 __ mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEntryTrampoline()
1154 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1156 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); in Generate_InterpreterEntryTrampoline()
1157 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); in Generate_InterpreterEntryTrampoline()
1158 __ Call(ip); in Generate_InterpreterEntryTrampoline()
1164 __ Ret(); in Generate_InterpreterEntryTrampoline()
1169 __ bind(&switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
1170 __ LeaveFrame(StackFrame::JAVA_SCRIPT); in Generate_InterpreterEntryTrampoline()
1171 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
1172 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
1173 __ AddP(r6, r6, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_InterpreterEntryTrampoline()
1174 __ StoreP(r6, FieldMemOperand(r3, JSFunction::kCodeEntryOffset), r0); in Generate_InterpreterEntryTrampoline()
1175 __ RecordWriteCodeEntryField(r3, r6, r7); in Generate_InterpreterEntryTrampoline()
1176 __ JumpToJSEntry(r6); in Generate_InterpreterEntryTrampoline()
1185 __ LoadRoot(scratch, Heap::kRealStackLimitRootIndex); in Generate_StackOverflowCheck()
1188 __ SubP(scratch, sp, scratch); in Generate_StackOverflowCheck()
1190 __ ShiftLeftP(r0, num_args, Operand(kPointerSizeLog2)); in Generate_StackOverflowCheck()
1191 __ CmpP(scratch, r0); in Generate_StackOverflowCheck()
1192 __ ble(stack_overflow); // Signed comparison. in Generate_StackOverflowCheck()
1203 __ AddP(index, index, Operand(kPointerSize)); // Bias up for LoadPU in Generate_InterpreterPushArgs()
1204 __ LoadRR(r0, count); in Generate_InterpreterPushArgs()
1205 __ bind(&loop); in Generate_InterpreterPushArgs()
1206 __ LoadP(scratch, MemOperand(index, -kPointerSize)); in Generate_InterpreterPushArgs()
1207 __ lay(index, MemOperand(index, -kPointerSize)); in Generate_InterpreterPushArgs()
1208 __ push(scratch); in Generate_InterpreterPushArgs()
1209 __ SubP(r0, Operand(1)); in Generate_InterpreterPushArgs()
1210 __ bne(&loop); in Generate_InterpreterPushArgs()
1227 __ AddP(r5, r2, Operand(1)); in Generate_InterpreterPushArgsAndCallImpl()
1234 __ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
1239 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
1244 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndCallImpl()
1246 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndCallImpl()
1248 __ bkpt(0); in Generate_InterpreterPushArgsAndCallImpl()
1265 __ LoadImmP(r0, Operand::Zero()); in Generate_InterpreterPushArgsAndConstructImpl()
1266 __ push(r0); in Generate_InterpreterPushArgsAndConstructImpl()
1270 __ CmpP(r2, Operand::Zero()); in Generate_InterpreterPushArgsAndConstructImpl()
1271 __ beq(&skip); in Generate_InterpreterPushArgsAndConstructImpl()
1273 __ bind(&skip); in Generate_InterpreterPushArgsAndConstructImpl()
1275 __ AssertUndefinedOrAllocationSite(r4, r7); in Generate_InterpreterPushArgsAndConstructImpl()
1277 __ AssertFunction(r3); in Generate_InterpreterPushArgsAndConstructImpl()
1281 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
1282 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kConstructStubOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
1284 __ AddP(ip, r6, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_InterpreterPushArgsAndConstructImpl()
1285 __ Jump(ip); in Generate_InterpreterPushArgsAndConstructImpl()
1290 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_InterpreterPushArgsAndConstructImpl()
1293 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructImpl()
1295 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructImpl()
1297 __ bkpt(0); in Generate_InterpreterPushArgsAndConstructImpl()
1312 __ AddP(r6, r2, Operand(1)); // Add one for receiver. in Generate_InterpreterPushArgsAndConstructArray()
1318 __ LoadRR(r5, r3); in Generate_InterpreterPushArgsAndConstructArray()
1321 __ TailCallStub(&stub); in Generate_InterpreterPushArgsAndConstructArray()
1323 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructArray()
1325 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructArray()
1327 __ bkpt(0); in Generate_InterpreterPushArgsAndConstructArray()
1337 __ Move(r4, masm->isolate()->builtins()->InterpreterEntryTrampoline()); in Generate_InterpreterEnterBytecode()
1338 __ AddP(r14, r4, Operand(interpreter_entry_return_pc_offset->value() + in Generate_InterpreterEnterBytecode()
1342 __ mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEnterBytecode()
1347 __ LoadP(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1352 __ TestIfSmi(kInterpreterBytecodeArrayRegister); in Generate_InterpreterEnterBytecode()
1353 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEnterBytecode()
1354 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r3, no_reg, in Generate_InterpreterEnterBytecode()
1356 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEnterBytecode()
1360 __ LoadP(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEnterBytecode()
1362 __ SmiUntag(kInterpreterBytecodeOffsetRegister); in Generate_InterpreterEnterBytecode()
1365 __ LoadlB(r3, MemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1367 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); in Generate_InterpreterEnterBytecode()
1368 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); in Generate_InterpreterEnterBytecode()
1369 __ Jump(ip); in Generate_InterpreterEnterBytecode()
1376 __ LoadP(r3, MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1377 __ LoadP(r4, in Generate_InterpreterEnterBytecodeAdvance()
1379 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); in Generate_InterpreterEnterBytecodeAdvance()
1382 __ Push(kInterpreterAccumulatorRegister, r3, r4); in Generate_InterpreterEnterBytecodeAdvance()
1383 __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); in Generate_InterpreterEnterBytecodeAdvance()
1384 __ Move(r4, r2); // Result is the new bytecode offset. in Generate_InterpreterEnterBytecodeAdvance()
1385 __ Pop(kInterpreterAccumulatorRegister); in Generate_InterpreterEnterBytecodeAdvance()
1387 __ StoreP(r4, in Generate_InterpreterEnterBytecodeAdvance()
1411 __ LoadP(map, in Generate_CompileLazy()
1413 __ LoadP(map, in Generate_CompileLazy()
1415 __ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset)); in Generate_CompileLazy()
1416 __ CmpSmiLiteral(index, Smi::FromInt(2), r0); in Generate_CompileLazy()
1417 __ blt(&gotta_call_runtime); in Generate_CompileLazy()
1426 __ LoadP(native_context, NativeContextMemOperand()); in Generate_CompileLazy()
1428 __ bind(&loop_top); in Generate_CompileLazy()
1433 __ SmiToPtrArrayOffset(array_pointer, index); in Generate_CompileLazy()
1434 __ AddP(array_pointer, map, array_pointer); in Generate_CompileLazy()
1435 __ LoadP(temp, FieldMemOperand(array_pointer, in Generate_CompileLazy()
1437 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1438 __ CmpP(temp, native_context); in Generate_CompileLazy()
1439 __ bne(&loop_bottom, Label::kNear); in Generate_CompileLazy()
1441 __ LoadP(temp, in Generate_CompileLazy()
1445 __ CmpSmiLiteral(temp, Smi::FromInt(bailout_id), r0); in Generate_CompileLazy()
1446 __ bne(&loop_bottom, Label::kNear); in Generate_CompileLazy()
1448 __ LoadP(temp, in Generate_CompileLazy()
1451 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1452 __ JumpIfSmi(temp, &gotta_call_runtime); in Generate_CompileLazy()
1455 __ StoreP(temp, FieldMemOperand(closure, JSFunction::kLiteralsOffset), r0); in Generate_CompileLazy()
1456 __ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, r6, in Generate_CompileLazy()
1462 __ LoadP(entry, in Generate_CompileLazy()
1465 __ LoadP(entry, FieldMemOperand(entry, WeakCell::kValueOffset)); in Generate_CompileLazy()
1466 __ JumpIfSmi(entry, &try_shared); in Generate_CompileLazy()
1470 __ AddP(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_CompileLazy()
1471 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); in Generate_CompileLazy()
1472 __ RecordWriteCodeEntryField(closure, entry, r7); in Generate_CompileLazy()
1478 __ LoadP( in Generate_CompileLazy()
1480 __ StoreP(r7, FieldMemOperand(closure, JSFunction::kNextFunctionLinkOffset), in Generate_CompileLazy()
1482 __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, r7, temp, in Generate_CompileLazy()
1487 __ StoreP( in Generate_CompileLazy()
1491 __ LoadRR(r7, closure); in Generate_CompileLazy()
1492 __ RecordWriteContextSlot(native_context, function_list_offset, r7, temp, in Generate_CompileLazy()
1494 __ JumpToJSEntry(entry); in Generate_CompileLazy()
1496 __ bind(&loop_bottom); in Generate_CompileLazy()
1497 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength), in Generate_CompileLazy()
1499 __ CmpSmiLiteral(index, Smi::FromInt(1), r0); in Generate_CompileLazy()
1500 __ bgt(&loop_top); in Generate_CompileLazy()
1503 __ b(&gotta_call_runtime); in Generate_CompileLazy()
1505 __ bind(&try_shared); in Generate_CompileLazy()
1506 __ LoadP(entry, in Generate_CompileLazy()
1509 __ LoadlB(temp, FieldMemOperand( in Generate_CompileLazy()
1511 __ TestBit(temp, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); in Generate_CompileLazy()
1512 __ bne(&gotta_call_runtime); in Generate_CompileLazy()
1514 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); in Generate_CompileLazy()
1515 __ LoadlW(r7, FieldMemOperand(entry, Code::kFlagsOffset)); in Generate_CompileLazy()
1516 __ DecodeField<Code::KindField>(r7); in Generate_CompileLazy()
1517 __ CmpP(r7, Operand(Code::BUILTIN)); in Generate_CompileLazy()
1518 __ beq(&gotta_call_runtime); in Generate_CompileLazy()
1520 __ AddP(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_CompileLazy()
1521 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); in Generate_CompileLazy()
1522 __ RecordWriteCodeEntryField(closure, entry, r7); in Generate_CompileLazy()
1523 __ JumpToJSEntry(entry); in Generate_CompileLazy()
1525 __ bind(&gotta_call_runtime); in Generate_CompileLazy()
1552 __ Move(r6, r2); in Generate_InstantiateAsmJs()
1554 __ SmiTag(r2); in Generate_InstantiateAsmJs()
1556 __ Push(r2, r3, r5, r3); in Generate_InstantiateAsmJs()
1563 __ CmpP(r6, Operand(j)); in Generate_InstantiateAsmJs()
1564 __ b(ne, &over); in Generate_InstantiateAsmJs()
1567 __ LoadP(r6, MemOperand(fp, StandardFrameConstants::kCallerSPOffset + in Generate_InstantiateAsmJs()
1569 __ push(r6); in Generate_InstantiateAsmJs()
1572 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_InstantiateAsmJs()
1575 __ jmp(&args_done); in Generate_InstantiateAsmJs()
1576 __ bind(&over); in Generate_InstantiateAsmJs()
1579 __ bind(&args_done); in Generate_InstantiateAsmJs()
1582 __ CallRuntime(Runtime::kInstantiateAsmJs, 4); in Generate_InstantiateAsmJs()
1584 __ JumpIfSmi(r2, &failed); in Generate_InstantiateAsmJs()
1586 __ Drop(2); in Generate_InstantiateAsmJs()
1587 __ pop(r6); in Generate_InstantiateAsmJs()
1588 __ SmiUntag(r6); in Generate_InstantiateAsmJs()
1591 __ AddP(r6, r6, Operand(1)); in Generate_InstantiateAsmJs()
1592 __ Drop(r6); in Generate_InstantiateAsmJs()
1593 __ Ret(); in Generate_InstantiateAsmJs()
1595 __ bind(&failed); in Generate_InstantiateAsmJs()
1597 __ Pop(r2, r3, r5); in Generate_InstantiateAsmJs()
1598 __ SmiUntag(r2); in Generate_InstantiateAsmJs()
1612 __ CleanseP(r14); in GenerateMakeCodeYoungAgainCommon()
1613 __ SubP(r14, Operand(kCodeAgingSequenceLength)); in GenerateMakeCodeYoungAgainCommon()
1614 __ LoadRR(r2, r14); in GenerateMakeCodeYoungAgainCommon()
1616 __ pop(r14); in GenerateMakeCodeYoungAgainCommon()
1625 __ MultiPush(r14.bit() | r2.bit() | r3.bit() | r5.bit() | fp.bit()); in GenerateMakeCodeYoungAgainCommon()
1626 __ PrepareCallCFunction(2, 0, r4); in GenerateMakeCodeYoungAgainCommon()
1627 __ mov(r3, Operand(ExternalReference::isolate_address(masm->isolate()))); in GenerateMakeCodeYoungAgainCommon()
1628 __ CallCFunction( in GenerateMakeCodeYoungAgainCommon()
1630 __ MultiPop(r14.bit() | r2.bit() | r3.bit() | r5.bit() | fp.bit()); in GenerateMakeCodeYoungAgainCommon()
1631 __ LoadRR(ip, r2); in GenerateMakeCodeYoungAgainCommon()
1632 __ Jump(ip); in GenerateMakeCodeYoungAgainCommon()
1655 __ CleanseP(r14); in CODE_AGE_LIST()
1656 __ SubP(r14, Operand(kCodeAgingSequenceLength)); in CODE_AGE_LIST()
1657 __ LoadRR(r2, r14); in CODE_AGE_LIST()
1659 __ pop(r14); in CODE_AGE_LIST()
1668 __ MultiPush(r14.bit() | r2.bit() | r3.bit() | r5.bit() | fp.bit()); in CODE_AGE_LIST()
1669 __ PrepareCallCFunction(2, 0, r4); in CODE_AGE_LIST()
1670 __ mov(r3, Operand(ExternalReference::isolate_address(masm->isolate()))); in CODE_AGE_LIST()
1671 __ CallCFunction( in CODE_AGE_LIST()
1674 __ MultiPop(r14.bit() | r2.bit() | r3.bit() | r5.bit() | fp.bit()); in CODE_AGE_LIST()
1675 __ LoadRR(ip, r2); in CODE_AGE_LIST()
1678 __ PushStandardFrame(r3); in CODE_AGE_LIST()
1681 __ AddP(r2, ip, Operand(kNoCodeAgeSequenceLength)); in CODE_AGE_LIST()
1682 __ Jump(r2); in CODE_AGE_LIST()
1701 __ MultiPush(kJSCallerSaved | kCalleeSaved); in Generate_NotifyStubFailureHelper()
1703 __ CallRuntime(Runtime::kNotifyStubFailure, save_doubles); in Generate_NotifyStubFailureHelper()
1704 __ MultiPop(kJSCallerSaved | kCalleeSaved); in Generate_NotifyStubFailureHelper()
1707 __ la(sp, MemOperand(sp, kPointerSize)); // Ignore state in Generate_NotifyStubFailureHelper()
1708 __ Ret(); // Jump to miss handler in Generate_NotifyStubFailureHelper()
1724 __ LoadSmiLiteral(r2, Smi::FromInt(static_cast<int>(type))); in Generate_NotifyDeoptimizedHelper()
1725 __ push(r2); in Generate_NotifyDeoptimizedHelper()
1726 __ CallRuntime(Runtime::kNotifyDeoptimized); in Generate_NotifyDeoptimizedHelper()
1730 __ LoadP(r8, MemOperand(sp, 0 * kPointerSize)); in Generate_NotifyDeoptimizedHelper()
1731 __ SmiUntag(r8); in Generate_NotifyDeoptimizedHelper()
1734 __ CmpP( in Generate_NotifyDeoptimizedHelper()
1737 __ bne(&with_tos_register); in Generate_NotifyDeoptimizedHelper()
1738 __ la(sp, MemOperand(sp, 1 * kPointerSize)); // Remove state. in Generate_NotifyDeoptimizedHelper()
1739 __ Ret(); in Generate_NotifyDeoptimizedHelper()
1741 __ bind(&with_tos_register); in Generate_NotifyDeoptimizedHelper()
1743 __ LoadP(r2, MemOperand(sp, 1 * kPointerSize)); in Generate_NotifyDeoptimizedHelper()
1744 __ CmpP( in Generate_NotifyDeoptimizedHelper()
1747 __ bne(&unknown_state); in Generate_NotifyDeoptimizedHelper()
1748 __ la(sp, MemOperand(sp, 2 * kPointerSize)); // Remove state. in Generate_NotifyDeoptimizedHelper()
1749 __ Ret(); in Generate_NotifyDeoptimizedHelper()
1751 __ bind(&unknown_state); in Generate_NotifyDeoptimizedHelper()
1752 __ stop("no cases left"); in Generate_NotifyDeoptimizedHelper()
1777 __ LoadP(signature, FieldMemOperand(function_template_info, in CompatibleReceiverCheck()
1780 __ JumpIfRoot(signature, Heap::kUndefinedValueRootIndex, in CompatibleReceiverCheck()
1784 __ LoadP(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
1786 __ bind(&prototype_loop_start); in CompatibleReceiverCheck()
1789 __ GetMapConstructor(constructor, map, scratch, scratch); in CompatibleReceiverCheck()
1790 __ CmpP(scratch, Operand(JS_FUNCTION_TYPE)); in CompatibleReceiverCheck()
1792 __ bne(&next_prototype); in CompatibleReceiverCheck()
1794 __ LoadP(type, in CompatibleReceiverCheck()
1796 __ LoadP(type, in CompatibleReceiverCheck()
1801 __ bind(&function_template_loop); in CompatibleReceiverCheck()
1804 __ CmpP(signature, type); in CompatibleReceiverCheck()
1805 __ beq(&receiver_check_passed); in CompatibleReceiverCheck()
1809 __ JumpIfSmi(type, &next_prototype); in CompatibleReceiverCheck()
1810 __ CompareObjectType(type, scratch, scratch, FUNCTION_TEMPLATE_INFO_TYPE); in CompatibleReceiverCheck()
1811 __ bne(&next_prototype); in CompatibleReceiverCheck()
1814 __ LoadP(type, in CompatibleReceiverCheck()
1816 __ b(&function_template_loop); in CompatibleReceiverCheck()
1819 __ bind(&next_prototype); in CompatibleReceiverCheck()
1820 __ LoadlW(scratch, FieldMemOperand(map, Map::kBitField3Offset)); in CompatibleReceiverCheck()
1821 __ DecodeField<Map::HasHiddenPrototype>(scratch); in CompatibleReceiverCheck()
1822 __ beq(receiver_check_failed); in CompatibleReceiverCheck()
1824 __ LoadP(receiver, FieldMemOperand(map, Map::kPrototypeOffset)); in CompatibleReceiverCheck()
1825 __ LoadP(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
1827 __ b(&prototype_loop_start); in CompatibleReceiverCheck()
1829 __ bind(&receiver_check_passed); in CompatibleReceiverCheck()
1844 __ LoadP(r5, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); in Generate_HandleFastApiCall()
1845 __ LoadP(r5, FieldMemOperand(r5, SharedFunctionInfo::kFunctionDataOffset)); in Generate_HandleFastApiCall()
1849 __ ShiftLeftP(r1, r2, Operand(kPointerSizeLog2)); in Generate_HandleFastApiCall()
1850 __ LoadP(r4, MemOperand(sp, r1)); in Generate_HandleFastApiCall()
1855 __ LoadP(r6, FieldMemOperand(r5, FunctionTemplateInfo::kCallCodeOffset)); in Generate_HandleFastApiCall()
1856 __ LoadP(r6, FieldMemOperand(r6, CallHandlerInfo::kFastHandlerOffset)); in Generate_HandleFastApiCall()
1857 __ AddP(ip, r6, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_HandleFastApiCall()
1858 __ JumpToJSEntry(ip); in Generate_HandleFastApiCall()
1861 __ bind(&receiver_check_failed); in Generate_HandleFastApiCall()
1863 __ AddP(r1, r1, Operand(kPointerSize)); in Generate_HandleFastApiCall()
1864 __ AddP(sp, sp, r1); in Generate_HandleFastApiCall()
1865 __ TailCallRuntime(Runtime::kThrowIllegalInvocation); in Generate_HandleFastApiCall()
1872 __ LoadP(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in Generate_OnStackReplacementHelper()
1873 __ LoadP(r2, MemOperand(r2, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
1875 __ LoadP(r2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
1881 __ push(r2); in Generate_OnStackReplacementHelper()
1882 __ CallRuntime(Runtime::kCompileForOnStackReplacement); in Generate_OnStackReplacementHelper()
1887 __ CmpSmiLiteral(r2, Smi::kZero, r0); in Generate_OnStackReplacementHelper()
1888 __ bne(&skip); in Generate_OnStackReplacementHelper()
1889 __ Ret(); in Generate_OnStackReplacementHelper()
1891 __ bind(&skip); in Generate_OnStackReplacementHelper()
1896 __ LeaveFrame(StackFrame::STUB); in Generate_OnStackReplacementHelper()
1901 __ LoadP(r3, FieldMemOperand(r2, Code::kDeoptimizationDataOffset)); in Generate_OnStackReplacementHelper()
1905 __ LoadP( in Generate_OnStackReplacementHelper()
1908 __ SmiUntag(r3); in Generate_OnStackReplacementHelper()
1912 __ AddP(r2, r3); in Generate_OnStackReplacementHelper()
1913 __ AddP(r0, r2, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_OnStackReplacementHelper()
1914 __ LoadRR(r14, r0); in Generate_OnStackReplacementHelper()
1917 __ Ret(); in Generate_OnStackReplacementHelper()
1945 __ ShiftLeftP(arg_size, r2, Operand(kPointerSizeLog2)); in Generate_FunctionPrototypeApply()
1946 __ AddP(new_sp, sp, arg_size); in Generate_FunctionPrototypeApply()
1947 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1948 __ LoadRR(scratch, r2); in Generate_FunctionPrototypeApply()
1949 __ LoadP(r3, MemOperand(new_sp, 0)); // receiver in Generate_FunctionPrototypeApply()
1950 __ CmpP(arg_size, Operand(kPointerSize)); in Generate_FunctionPrototypeApply()
1951 __ blt(&skip); in Generate_FunctionPrototypeApply()
1952 __ LoadP(scratch, MemOperand(new_sp, 1 * -kPointerSize)); // thisArg in Generate_FunctionPrototypeApply()
1953 __ beq(&skip); in Generate_FunctionPrototypeApply()
1954 __ LoadP(r2, MemOperand(new_sp, 2 * -kPointerSize)); // argArray in Generate_FunctionPrototypeApply()
1955 __ bind(&skip); in Generate_FunctionPrototypeApply()
1956 __ LoadRR(sp, new_sp); in Generate_FunctionPrototypeApply()
1957 __ StoreP(scratch, MemOperand(sp, 0)); in Generate_FunctionPrototypeApply()
1968 __ JumpIfSmi(r3, &receiver_not_callable); in Generate_FunctionPrototypeApply()
1969 __ LoadP(r6, FieldMemOperand(r3, HeapObject::kMapOffset)); in Generate_FunctionPrototypeApply()
1970 __ LoadlB(r6, FieldMemOperand(r6, Map::kBitFieldOffset)); in Generate_FunctionPrototypeApply()
1971 __ TestBit(r6, Map::kIsCallable); in Generate_FunctionPrototypeApply()
1972 __ beq(&receiver_not_callable); in Generate_FunctionPrototypeApply()
1976 __ JumpIfRoot(r2, Heap::kNullValueRootIndex, &no_arguments); in Generate_FunctionPrototypeApply()
1977 __ JumpIfRoot(r2, Heap::kUndefinedValueRootIndex, &no_arguments); in Generate_FunctionPrototypeApply()
1981 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1982 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1986 __ bind(&no_arguments); in Generate_FunctionPrototypeApply()
1988 __ LoadImmP(r2, Operand::Zero()); in Generate_FunctionPrototypeApply()
1989 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1993 __ bind(&receiver_not_callable); in Generate_FunctionPrototypeApply()
1995 __ StoreP(r3, MemOperand(sp, 0)); in Generate_FunctionPrototypeApply()
1996 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_FunctionPrototypeApply()
2006 __ CmpP(r2, Operand::Zero()); in Generate_FunctionPrototypeCall()
2007 __ bne(&done, Label::kNear); in Generate_FunctionPrototypeCall()
2008 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeCall()
2009 __ AddP(r2, Operand(1)); in Generate_FunctionPrototypeCall()
2010 __ bind(&done); in Generate_FunctionPrototypeCall()
2015 __ ShiftLeftP(r4, r2, Operand(kPointerSizeLog2)); in Generate_FunctionPrototypeCall()
2016 __ LoadP(r3, MemOperand(sp, r4)); in Generate_FunctionPrototypeCall()
2026 __ AddP(r4, sp, r4); in Generate_FunctionPrototypeCall()
2028 __ bind(&loop); in Generate_FunctionPrototypeCall()
2029 __ LoadP(ip, MemOperand(r4, -kPointerSize)); in Generate_FunctionPrototypeCall()
2030 __ StoreP(ip, MemOperand(r4)); in Generate_FunctionPrototypeCall()
2031 __ SubP(r4, Operand(kPointerSize)); in Generate_FunctionPrototypeCall()
2032 __ CmpP(r4, sp); in Generate_FunctionPrototypeCall()
2033 __ bne(&loop); in Generate_FunctionPrototypeCall()
2036 __ SubP(r2, Operand(1)); in Generate_FunctionPrototypeCall()
2037 __ pop(); in Generate_FunctionPrototypeCall()
2041 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeCall()
2061 __ ShiftLeftP(arg_size, r2, Operand(kPointerSizeLog2)); in Generate_ReflectApply()
2062 __ AddP(new_sp, sp, arg_size); in Generate_ReflectApply()
2063 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
2064 __ LoadRR(scratch, r3); in Generate_ReflectApply()
2065 __ LoadRR(r2, r3); in Generate_ReflectApply()
2066 __ CmpP(arg_size, Operand(kPointerSize)); in Generate_ReflectApply()
2067 __ blt(&skip); in Generate_ReflectApply()
2068 __ LoadP(r3, MemOperand(new_sp, 1 * -kPointerSize)); // target in Generate_ReflectApply()
2069 __ beq(&skip); in Generate_ReflectApply()
2070 __ LoadP(scratch, MemOperand(new_sp, 2 * -kPointerSize)); // thisArgument in Generate_ReflectApply()
2071 __ CmpP(arg_size, Operand(2 * kPointerSize)); in Generate_ReflectApply()
2072 __ beq(&skip); in Generate_ReflectApply()
2073 __ LoadP(r2, MemOperand(new_sp, 3 * -kPointerSize)); // argumentsList in Generate_ReflectApply()
2074 __ bind(&skip); in Generate_ReflectApply()
2075 __ LoadRR(sp, new_sp); in Generate_ReflectApply()
2076 __ StoreP(scratch, MemOperand(sp, 0)); in Generate_ReflectApply()
2087 __ JumpIfSmi(r3, &target_not_callable); in Generate_ReflectApply()
2088 __ LoadP(r6, FieldMemOperand(r3, HeapObject::kMapOffset)); in Generate_ReflectApply()
2089 __ LoadlB(r6, FieldMemOperand(r6, Map::kBitFieldOffset)); in Generate_ReflectApply()
2090 __ TestBit(r6, Map::kIsCallable); in Generate_ReflectApply()
2091 __ beq(&target_not_callable); in Generate_ReflectApply()
2095 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
2096 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectApply()
2099 __ bind(&target_not_callable); in Generate_ReflectApply()
2101 __ StoreP(r3, MemOperand(sp, 0)); in Generate_ReflectApply()
2102 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_ReflectApply()
2123 __ ShiftLeftP(arg_size, r2, Operand(kPointerSizeLog2)); in Generate_ReflectConstruct()
2124 __ AddP(new_sp, sp, arg_size); in Generate_ReflectConstruct()
2125 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); in Generate_ReflectConstruct()
2126 __ LoadRR(r2, r3); in Generate_ReflectConstruct()
2127 __ LoadRR(r5, r3); in Generate_ReflectConstruct()
2128 __ StoreP(r3, MemOperand(new_sp, 0)); // receiver (undefined) in Generate_ReflectConstruct()
2129 __ CmpP(arg_size, Operand(kPointerSize)); in Generate_ReflectConstruct()
2130 __ blt(&skip); in Generate_ReflectConstruct()
2131 __ LoadP(r3, MemOperand(new_sp, 1 * -kPointerSize)); // target in Generate_ReflectConstruct()
2132 __ LoadRR(r5, r3); // new.target defaults to target in Generate_ReflectConstruct()
2133 __ beq(&skip); in Generate_ReflectConstruct()
2134 __ LoadP(r2, MemOperand(new_sp, 2 * -kPointerSize)); // argumentsList in Generate_ReflectConstruct()
2135 __ CmpP(arg_size, Operand(2 * kPointerSize)); in Generate_ReflectConstruct()
2136 __ beq(&skip); in Generate_ReflectConstruct()
2137 __ LoadP(r5, MemOperand(new_sp, 3 * -kPointerSize)); // new.target in Generate_ReflectConstruct()
2138 __ bind(&skip); in Generate_ReflectConstruct()
2139 __ LoadRR(sp, new_sp); in Generate_ReflectConstruct()
2151 __ JumpIfSmi(r3, &target_not_constructor); in Generate_ReflectConstruct()
2152 __ LoadP(r6, FieldMemOperand(r3, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
2153 __ LoadlB(r6, FieldMemOperand(r6, Map::kBitFieldOffset)); in Generate_ReflectConstruct()
2154 __ TestBit(r6, Map::kIsConstructor); in Generate_ReflectConstruct()
2155 __ beq(&target_not_constructor); in Generate_ReflectConstruct()
2159 __ JumpIfSmi(r5, &new_target_not_constructor); in Generate_ReflectConstruct()
2160 __ LoadP(r6, FieldMemOperand(r5, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
2161 __ LoadlB(r6, FieldMemOperand(r6, Map::kBitFieldOffset)); in Generate_ReflectConstruct()
2162 __ TestBit(r6, Map::kIsConstructor); in Generate_ReflectConstruct()
2163 __ beq(&new_target_not_constructor); in Generate_ReflectConstruct()
2166 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectConstruct()
2169 __ bind(&target_not_constructor); in Generate_ReflectConstruct()
2171 __ StoreP(r3, MemOperand(sp, 0)); in Generate_ReflectConstruct()
2172 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
2176 __ bind(&new_target_not_constructor); in Generate_ReflectConstruct()
2178 __ StoreP(r5, MemOperand(sp, 0)); in Generate_ReflectConstruct()
2179 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
2184 __ SmiTag(r2); in EnterArgumentsAdaptorFrame()
2185 __ LoadSmiLiteral(r6, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); in EnterArgumentsAdaptorFrame()
2193 __ lay(sp, MemOperand(sp, -5 * kPointerSize)); in EnterArgumentsAdaptorFrame()
2196 __ CleanseP(r14); in EnterArgumentsAdaptorFrame()
2197 __ StoreP(r14, MemOperand(sp, 4 * kPointerSize)); in EnterArgumentsAdaptorFrame()
2198 __ StoreP(fp, MemOperand(sp, 3 * kPointerSize)); in EnterArgumentsAdaptorFrame()
2199 __ StoreP(r6, MemOperand(sp, 2 * kPointerSize)); in EnterArgumentsAdaptorFrame()
2200 __ StoreP(r3, MemOperand(sp, 1 * kPointerSize)); in EnterArgumentsAdaptorFrame()
2201 __ StoreP(r2, MemOperand(sp, 0 * kPointerSize)); in EnterArgumentsAdaptorFrame()
2202 __ la(fp, MemOperand(sp, StandardFrameConstants::kFixedFrameSizeFromFp + in EnterArgumentsAdaptorFrame()
2212 __ LoadP(r3, MemOperand(fp, -(StandardFrameConstants::kFixedFrameSizeFromFp + in LeaveArgumentsAdaptorFrame()
2215 __ LeaveFrame(StackFrame::ARGUMENTS_ADAPTOR, stack_adjustment); in LeaveArgumentsAdaptorFrame()
2216 __ SmiToPtrArrayOffset(r3, r3); in LeaveArgumentsAdaptorFrame()
2217 __ lay(sp, MemOperand(sp, r3)); in LeaveArgumentsAdaptorFrame()
2232 __ JumpIfSmi(r2, &create_runtime); in Generate_Apply()
2235 __ LoadP(r4, FieldMemOperand(r2, HeapObject::kMapOffset)); in Generate_Apply()
2238 __ LoadP(r6, NativeContextMemOperand()); in Generate_Apply()
2241 __ LoadP(ip, ContextMemOperand(r6, Context::SLOPPY_ARGUMENTS_MAP_INDEX)); in Generate_Apply()
2242 __ CmpP(ip, r4); in Generate_Apply()
2243 __ beq(&create_arguments); in Generate_Apply()
2244 __ LoadP(ip, ContextMemOperand(r6, Context::STRICT_ARGUMENTS_MAP_INDEX)); in Generate_Apply()
2245 __ CmpP(ip, r4); in Generate_Apply()
2246 __ beq(&create_arguments); in Generate_Apply()
2249 __ CompareInstanceType(r4, ip, JS_ARRAY_TYPE); in Generate_Apply()
2250 __ beq(&create_array); in Generate_Apply()
2253 __ bind(&create_runtime); in Generate_Apply()
2256 __ Push(r3, r5, r2); in Generate_Apply()
2257 __ CallRuntime(Runtime::kCreateListFromArrayLike); in Generate_Apply()
2258 __ Pop(r3, r5); in Generate_Apply()
2259 __ LoadP(r4, FieldMemOperand(r2, FixedArray::kLengthOffset)); in Generate_Apply()
2260 __ SmiUntag(r4); in Generate_Apply()
2262 __ b(&done_create); in Generate_Apply()
2265 __ bind(&create_arguments); in Generate_Apply()
2266 __ LoadP(r4, FieldMemOperand(r2, JSArgumentsObject::kLengthOffset)); in Generate_Apply()
2267 __ LoadP(r6, FieldMemOperand(r2, JSObject::kElementsOffset)); in Generate_Apply()
2268 __ LoadP(ip, FieldMemOperand(r6, FixedArray::kLengthOffset)); in Generate_Apply()
2269 __ CmpP(r4, ip); in Generate_Apply()
2270 __ bne(&create_runtime); in Generate_Apply()
2271 __ SmiUntag(r4); in Generate_Apply()
2272 __ LoadRR(r2, r6); in Generate_Apply()
2273 __ b(&done_create); in Generate_Apply()
2276 __ bind(&create_array); in Generate_Apply()
2277 __ LoadlB(r4, FieldMemOperand(r4, Map::kBitField2Offset)); in Generate_Apply()
2278 __ DecodeField<Map::ElementsKindBits>(r4); in Generate_Apply()
2282 __ CmpP(r4, Operand(FAST_ELEMENTS)); in Generate_Apply()
2283 __ bgt(&create_runtime); in Generate_Apply()
2284 __ CmpP(r4, Operand(FAST_HOLEY_SMI_ELEMENTS)); in Generate_Apply()
2285 __ beq(&create_runtime); in Generate_Apply()
2286 __ LoadP(r4, FieldMemOperand(r2, JSArray::kLengthOffset)); in Generate_Apply()
2287 __ LoadP(r2, FieldMemOperand(r2, JSArray::kElementsOffset)); in Generate_Apply()
2288 __ SmiUntag(r4); in Generate_Apply()
2290 __ bind(&done_create); in Generate_Apply()
2298 __ LoadRoot(ip, Heap::kRealStackLimitRootIndex); in Generate_Apply()
2301 __ SubP(ip, sp, ip); in Generate_Apply()
2303 __ ShiftLeftP(r0, r4, Operand(kPointerSizeLog2)); in Generate_Apply()
2304 __ CmpP(ip, r0); // Signed comparison. in Generate_Apply()
2305 __ bgt(&done); in Generate_Apply()
2306 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_Apply()
2307 __ bind(&done); in Generate_Apply()
2321 __ CmpP(r4, Operand::Zero()); in Generate_Apply()
2322 __ beq(&no_args); in Generate_Apply()
2323 __ AddP(r2, r2, in Generate_Apply()
2325 __ LoadRR(r1, r4); in Generate_Apply()
2326 __ bind(&loop); in Generate_Apply()
2327 __ LoadP(r0, MemOperand(r2, kPointerSize)); in Generate_Apply()
2328 __ la(r2, MemOperand(r2, kPointerSize)); in Generate_Apply()
2329 __ push(r0); in Generate_Apply()
2330 __ BranchOnCount(r1, &loop); in Generate_Apply()
2331 __ bind(&no_args); in Generate_Apply()
2332 __ LoadRR(r2, r4); in Generate_Apply()
2337 __ CompareRoot(r5, Heap::kUndefinedValueRootIndex); in Generate_Apply()
2338 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET, eq); in Generate_Apply()
2339 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_Apply()
2383 __ mov(scratch1, Operand(is_tail_call_elimination_enabled)); in PrepareForTailCall()
2384 __ LoadlB(scratch1, MemOperand(scratch1)); in PrepareForTailCall()
2385 __ CmpP(scratch1, Operand::Zero()); in PrepareForTailCall()
2386 __ beq(&done); in PrepareForTailCall()
2391 __ LoadP(scratch3, in PrepareForTailCall()
2393 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::STUB), r0); in PrepareForTailCall()
2394 __ bne(&no_interpreter_frame); in PrepareForTailCall()
2395 __ LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2396 __ bind(&no_interpreter_frame); in PrepareForTailCall()
2402 __ LoadP(scratch2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2403 __ LoadP( in PrepareForTailCall()
2406 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); in PrepareForTailCall()
2407 __ bne(&no_arguments_adaptor); in PrepareForTailCall()
2410 __ LoadRR(fp, scratch2); in PrepareForTailCall()
2411 __ LoadP(caller_args_count_reg, in PrepareForTailCall()
2413 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2414 __ b(&formal_parameter_count_loaded); in PrepareForTailCall()
2416 __ bind(&no_arguments_adaptor); in PrepareForTailCall()
2418 __ LoadP(scratch1, in PrepareForTailCall()
2420 __ LoadP(scratch1, in PrepareForTailCall()
2422 __ LoadW(caller_args_count_reg, in PrepareForTailCall()
2426 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2429 __ bind(&formal_parameter_count_loaded); in PrepareForTailCall()
2432 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, in PrepareForTailCall()
2434 __ bind(&done); in PrepareForTailCall()
2446 __ AssertFunction(r3); in Generate_CallFunction()
2451 __ LoadP(r4, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2452 __ LoadlW(r5, FieldMemOperand(r4, SharedFunctionInfo::kCompilerHintsOffset)); in Generate_CallFunction()
2453 __ TestBitMask(r5, FunctionKind::kClassConstructor in Generate_CallFunction()
2456 __ bne(&class_constructor); in Generate_CallFunction()
2461 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); in Generate_CallFunction()
2464 __ AndP(r0, r5, Operand((1 << SharedFunctionInfo::kStrictModeBit) | in Generate_CallFunction()
2466 __ bne(&done_convert); in Generate_CallFunction()
2477 __ LoadGlobalProxy(r5); in Generate_CallFunction()
2480 __ ShiftLeftP(r5, r2, Operand(kPointerSizeLog2)); in Generate_CallFunction()
2481 __ LoadP(r5, MemOperand(sp, r5)); in Generate_CallFunction()
2482 __ JumpIfSmi(r5, &convert_to_object); in Generate_CallFunction()
2484 __ CompareObjectType(r5, r6, r6, FIRST_JS_RECEIVER_TYPE); in Generate_CallFunction()
2485 __ bge(&done_convert); in Generate_CallFunction()
2488 __ JumpIfRoot(r5, Heap::kUndefinedValueRootIndex, in Generate_CallFunction()
2490 __ JumpIfNotRoot(r5, Heap::kNullValueRootIndex, &convert_to_object); in Generate_CallFunction()
2491 __ bind(&convert_global_proxy); in Generate_CallFunction()
2494 __ LoadGlobalProxy(r5); in Generate_CallFunction()
2496 __ b(&convert_receiver); in Generate_CallFunction()
2498 __ bind(&convert_to_object); in Generate_CallFunction()
2504 __ SmiTag(r2); in Generate_CallFunction()
2505 __ Push(r2, r3); in Generate_CallFunction()
2506 __ LoadRR(r2, r5); in Generate_CallFunction()
2507 __ Push(cp); in Generate_CallFunction()
2508 __ Call(masm->isolate()->builtins()->ToObject(), in Generate_CallFunction()
2510 __ Pop(cp); in Generate_CallFunction()
2511 __ LoadRR(r5, r2); in Generate_CallFunction()
2512 __ Pop(r2, r3); in Generate_CallFunction()
2513 __ SmiUntag(r2); in Generate_CallFunction()
2515 __ LoadP(r4, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2516 __ bind(&convert_receiver); in Generate_CallFunction()
2518 __ ShiftLeftP(r6, r2, Operand(kPointerSizeLog2)); in Generate_CallFunction()
2519 __ StoreP(r5, MemOperand(sp, r6)); in Generate_CallFunction()
2521 __ bind(&done_convert); in Generate_CallFunction()
2534 __ LoadW( in Generate_CallFunction()
2537 __ SmiUntag(r4); in Generate_CallFunction()
2541 __ InvokeFunctionCode(r3, no_reg, expected, actual, JUMP_FUNCTION, in Generate_CallFunction()
2545 __ bind(&class_constructor); in Generate_CallFunction()
2548 __ push(r3); in Generate_CallFunction()
2549 __ CallRuntime(Runtime::kThrowConstructorNonCallableError); in Generate_CallFunction()
2564 __ LoadP(r4, FieldMemOperand(r3, JSBoundFunction::kBoundArgumentsOffset)); in Generate_PushBoundArguments()
2565 __ LoadP(r6, FieldMemOperand(r4, FixedArray::kLengthOffset)); in Generate_PushBoundArguments()
2566 __ SmiUntag(r6); in Generate_PushBoundArguments()
2567 __ LoadAndTestP(r6, r6); in Generate_PushBoundArguments()
2568 __ beq(&no_bound_arguments); in Generate_PushBoundArguments()
2581 __ LoadRR(r8, sp); // preserve previous stack pointer in Generate_PushBoundArguments()
2582 __ ShiftLeftP(r9, r6, Operand(kPointerSizeLog2)); in Generate_PushBoundArguments()
2583 __ SubP(sp, sp, r9); in Generate_PushBoundArguments()
2587 __ CompareRoot(sp, Heap::kRealStackLimitRootIndex); in Generate_PushBoundArguments()
2588 __ bgt(&done); // Signed comparison. in Generate_PushBoundArguments()
2590 __ LoadRR(sp, r8); in Generate_PushBoundArguments()
2593 __ EnterFrame(StackFrame::INTERNAL); in Generate_PushBoundArguments()
2594 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_PushBoundArguments()
2596 __ bind(&done); in Generate_PushBoundArguments()
2605 __ LoadImmP(r7, Operand::Zero()); in Generate_PushBoundArguments()
2606 __ CmpP(r2, Operand::Zero()); in Generate_PushBoundArguments()
2607 __ beq(&skip); in Generate_PushBoundArguments()
2608 __ LoadRR(r1, r2); in Generate_PushBoundArguments()
2609 __ bind(&loop); in Generate_PushBoundArguments()
2610 __ LoadP(r0, MemOperand(r8, r7)); in Generate_PushBoundArguments()
2611 __ StoreP(r0, MemOperand(sp, r7)); in Generate_PushBoundArguments()
2612 __ AddP(r7, r7, Operand(kPointerSize)); in Generate_PushBoundArguments()
2613 __ BranchOnCount(r1, &loop); in Generate_PushBoundArguments()
2614 __ bind(&skip); in Generate_PushBoundArguments()
2620 __ AddP(r4, r4, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); in Generate_PushBoundArguments()
2621 __ AddP(r4, r4, r9); in Generate_PushBoundArguments()
2622 __ LoadRR(r1, r6); in Generate_PushBoundArguments()
2623 __ bind(&loop); in Generate_PushBoundArguments()
2624 __ LoadP(r0, MemOperand(r4, -kPointerSize)); in Generate_PushBoundArguments()
2625 __ lay(r4, MemOperand(r4, -kPointerSize)); in Generate_PushBoundArguments()
2626 __ StoreP(r0, MemOperand(sp, r7)); in Generate_PushBoundArguments()
2627 __ AddP(r7, r7, Operand(kPointerSize)); in Generate_PushBoundArguments()
2628 __ BranchOnCount(r1, &loop); in Generate_PushBoundArguments()
2629 __ AddP(r2, r2, r6); in Generate_PushBoundArguments()
2632 __ bind(&no_bound_arguments); in Generate_PushBoundArguments()
2644 __ AssertBoundFunction(r3); in Generate_CallBoundFunctionImpl()
2651 __ LoadP(ip, FieldMemOperand(r3, JSBoundFunction::kBoundThisOffset)); in Generate_CallBoundFunctionImpl()
2652 __ ShiftLeftP(r1, r2, Operand(kPointerSizeLog2)); in Generate_CallBoundFunctionImpl()
2653 __ StoreP(ip, MemOperand(sp, r1)); in Generate_CallBoundFunctionImpl()
2659 __ LoadP(r3, in Generate_CallBoundFunctionImpl()
2661 __ mov(ip, Operand(ExternalReference(Builtins::kCall_ReceiverIsAny, in Generate_CallBoundFunctionImpl()
2663 __ LoadP(ip, MemOperand(ip)); in Generate_CallBoundFunctionImpl()
2664 __ AddP(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_CallBoundFunctionImpl()
2665 __ JumpToJSEntry(ip); in Generate_CallBoundFunctionImpl()
2677 __ JumpIfSmi(r3, &non_callable); in Generate_Call()
2678 __ bind(&non_smi); in Generate_Call()
2679 __ CompareObjectType(r3, r6, r7, JS_FUNCTION_TYPE); in Generate_Call()
2680 __ Jump(masm->isolate()->builtins()->CallFunction(mode, tail_call_mode), in Generate_Call()
2682 __ CmpP(r7, Operand(JS_BOUND_FUNCTION_TYPE)); in Generate_Call()
2683 __ Jump(masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), in Generate_Call()
2687 __ LoadlB(r6, FieldMemOperand(r6, Map::kBitFieldOffset)); in Generate_Call()
2688 __ TestBit(r6, Map::kIsCallable); in Generate_Call()
2689 __ beq(&non_callable); in Generate_Call()
2691 __ CmpP(r7, Operand(JS_PROXY_TYPE)); in Generate_Call()
2692 __ bne(&non_function); in Generate_Call()
2700 __ Push(r3); in Generate_Call()
2703 __ AddP(r2, r2, Operand(2)); in Generate_Call()
2705 __ JumpToExternalReference( in Generate_Call()
2710 __ bind(&non_function); in Generate_Call()
2712 __ ShiftLeftP(r7, r2, Operand(kPointerSizeLog2)); in Generate_Call()
2713 __ StoreP(r3, MemOperand(sp, r7)); in Generate_Call()
2715 __ LoadNativeContextSlot(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, r3); in Generate_Call()
2716 __ Jump(masm->isolate()->builtins()->CallFunction( in Generate_Call()
2721 __ bind(&non_callable); in Generate_Call()
2724 __ Push(r3); in Generate_Call()
2725 __ CallRuntime(Runtime::kThrowCalledNonCallable); in Generate_Call()
2736 __ AssertFunction(r3); in Generate_ConstructFunction()
2740 __ LoadRoot(r4, Heap::kUndefinedValueRootIndex); in Generate_ConstructFunction()
2744 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); in Generate_ConstructFunction()
2745 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kConstructStubOffset)); in Generate_ConstructFunction()
2746 __ AddP(ip, r6, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_ConstructFunction()
2747 __ JumpToJSEntry(ip); in Generate_ConstructFunction()
2757 __ AssertBoundFunction(r3); in Generate_ConstructBoundFunction()
2764 __ CmpP(r3, r5); in Generate_ConstructBoundFunction()
2765 __ bne(&skip); in Generate_ConstructBoundFunction()
2766 __ LoadP(r5, in Generate_ConstructBoundFunction()
2768 __ bind(&skip); in Generate_ConstructBoundFunction()
2771 __ LoadP(r3, in Generate_ConstructBoundFunction()
2773 __ mov(ip, Operand(ExternalReference(Builtins::kConstruct, masm->isolate()))); in Generate_ConstructBoundFunction()
2774 __ LoadP(ip, MemOperand(ip)); in Generate_ConstructBoundFunction()
2775 __ AddP(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_ConstructBoundFunction()
2776 __ JumpToJSEntry(ip); in Generate_ConstructBoundFunction()
2789 __ Push(r3, r5); in Generate_ConstructProxy()
2791 __ AddP(r2, r2, Operand(3)); in Generate_ConstructProxy()
2793 __ JumpToExternalReference( in Generate_ConstructProxy()
2808 __ JumpIfSmi(r3, &non_constructor); in Generate_Construct()
2811 __ CompareObjectType(r3, r6, r7, JS_FUNCTION_TYPE); in Generate_Construct()
2812 __ Jump(masm->isolate()->builtins()->ConstructFunction(), in Generate_Construct()
2816 __ LoadlB(r4, FieldMemOperand(r6, Map::kBitFieldOffset)); in Generate_Construct()
2817 __ TestBit(r4, Map::kIsConstructor); in Generate_Construct()
2818 __ beq(&non_constructor); in Generate_Construct()
2822 __ CmpP(r7, Operand(JS_BOUND_FUNCTION_TYPE)); in Generate_Construct()
2823 __ Jump(masm->isolate()->builtins()->ConstructBoundFunction(), in Generate_Construct()
2827 __ CmpP(r7, Operand(JS_PROXY_TYPE)); in Generate_Construct()
2828 __ Jump(masm->isolate()->builtins()->ConstructProxy(), RelocInfo::CODE_TARGET, in Generate_Construct()
2834 __ ShiftLeftP(r7, r2, Operand(kPointerSizeLog2)); in Generate_Construct()
2835 __ StoreP(r3, MemOperand(sp, r7)); in Generate_Construct()
2837 __ LoadNativeContextSlot(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, r3); in Generate_Construct()
2838 __ Jump(masm->isolate()->builtins()->CallFunction(), in Generate_Construct()
2844 __ bind(&non_constructor); in Generate_Construct()
2845 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), in Generate_Construct()
2855 __ SmiTag(r3); in Generate_AllocateInNewSpace()
2856 __ Push(r3); in Generate_AllocateInNewSpace()
2857 __ LoadSmiLiteral(cp, Smi::kZero); in Generate_AllocateInNewSpace()
2858 __ TailCallRuntime(Runtime::kAllocateInNewSpace); in Generate_AllocateInNewSpace()
2867 __ SmiTag(r3); in Generate_AllocateInOldSpace()
2868 __ LoadSmiLiteral(r4, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); in Generate_AllocateInOldSpace()
2869 __ Push(r3, r4); in Generate_AllocateInOldSpace()
2870 __ LoadSmiLiteral(cp, Smi::kZero); in Generate_AllocateInOldSpace()
2871 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); in Generate_AllocateInOldSpace()
2880 __ push(r3); in Generate_Abort()
2881 __ LoadSmiLiteral(cp, Smi::kZero); in Generate_Abort()
2882 __ TailCallRuntime(Runtime::kAbort); in Generate_Abort()
2896 __ LoadP(ip, FieldMemOperand(r3, JSFunction::kCodeEntryOffset)); in Generate_ArgumentsAdaptorTrampoline()
2897 __ CmpP(r2, r4); in Generate_ArgumentsAdaptorTrampoline()
2898 __ blt(&too_few); in Generate_ArgumentsAdaptorTrampoline()
2899 __ CmpP(r4, Operand(SharedFunctionInfo::kDontAdaptArgumentsSentinel)); in Generate_ArgumentsAdaptorTrampoline()
2900 __ beq(&dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
2903 __ bind(&enough); in Generate_ArgumentsAdaptorTrampoline()
2913 __ SmiToPtrArrayOffset(r2, r2); in Generate_ArgumentsAdaptorTrampoline()
2914 __ AddP(r2, fp); in Generate_ArgumentsAdaptorTrampoline()
2916 __ AddP(r2, r2, Operand(2 * kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2917 __ ShiftLeftP(r6, r4, Operand(kPointerSizeLog2)); in Generate_ArgumentsAdaptorTrampoline()
2918 __ SubP(r6, r2, r6); in Generate_ArgumentsAdaptorTrampoline()
2929 __ bind(&copy); in Generate_ArgumentsAdaptorTrampoline()
2930 __ LoadP(r0, MemOperand(r2, 0)); in Generate_ArgumentsAdaptorTrampoline()
2931 __ push(r0); in Generate_ArgumentsAdaptorTrampoline()
2932 __ CmpP(r2, r6); // Compare before moving to next argument. in Generate_ArgumentsAdaptorTrampoline()
2933 __ lay(r2, MemOperand(r2, -kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2934 __ bne(&copy); in Generate_ArgumentsAdaptorTrampoline()
2936 __ b(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2940 __ bind(&too_few); in Generate_ArgumentsAdaptorTrampoline()
2951 __ SmiToPtrArrayOffset(r2, r2); in Generate_ArgumentsAdaptorTrampoline()
2952 __ lay(r2, MemOperand(r2, fp)); in Generate_ArgumentsAdaptorTrampoline()
2961 __ bind(&copy); in Generate_ArgumentsAdaptorTrampoline()
2963 __ LoadP(r0, MemOperand(r2, 2 * kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2964 __ push(r0); in Generate_ArgumentsAdaptorTrampoline()
2965 __ CmpP(r2, fp); // Compare before moving to next argument. in Generate_ArgumentsAdaptorTrampoline()
2966 __ lay(r2, MemOperand(r2, -kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2967 __ bne(&copy); in Generate_ArgumentsAdaptorTrampoline()
2973 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); in Generate_ArgumentsAdaptorTrampoline()
2974 __ ShiftLeftP(r6, r4, Operand(kPointerSizeLog2)); in Generate_ArgumentsAdaptorTrampoline()
2975 __ SubP(r6, fp, r6); in Generate_ArgumentsAdaptorTrampoline()
2977 __ SubP(r6, r6, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + in Generate_ArgumentsAdaptorTrampoline()
2981 __ bind(&fill); in Generate_ArgumentsAdaptorTrampoline()
2982 __ push(r0); in Generate_ArgumentsAdaptorTrampoline()
2983 __ CmpP(sp, r6); in Generate_ArgumentsAdaptorTrampoline()
2984 __ bne(&fill); in Generate_ArgumentsAdaptorTrampoline()
2988 __ bind(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2989 __ LoadRR(r2, r4); in Generate_ArgumentsAdaptorTrampoline()
2993 __ CallJSEntry(ip); in Generate_ArgumentsAdaptorTrampoline()
3000 __ Ret(); in Generate_ArgumentsAdaptorTrampoline()
3005 __ bind(&dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
3006 __ JumpToJSEntry(ip); in Generate_ArgumentsAdaptorTrampoline()
3008 __ bind(&stack_overflow); in Generate_ArgumentsAdaptorTrampoline()
3011 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_ArgumentsAdaptorTrampoline()
3012 __ bkpt(0); in Generate_ArgumentsAdaptorTrampoline()
3016 #undef __