Lines Matching full:__

17 #define __ ACCESS_MASM(masm)  macro
22 __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, result); in GenerateLoadArrayFunction()
29 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); in GenerateLoadInternalArrayFunction()
43 __ AssertFunction(x1); in Generate_Adaptor()
49 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); in Generate_Adaptor()
54 __ Add(x0, x0, num_extra_args + 1); in Generate_Adaptor()
57 __ SmiTag(x0); in Generate_Adaptor()
58 __ Push(x0, x1, x3); in Generate_Adaptor()
59 __ SmiUntag(x0); in Generate_Adaptor()
61 __ JumpToExternalReference(ExternalReference(address, masm->isolate()), in Generate_Adaptor()
79 __ Ldr(x10, FieldMemOperand(x1, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_InternalArrayCode()
80 __ Tst(x10, kSmiTagMask); in Generate_InternalArrayCode()
81 __ Assert(ne, kUnexpectedInitialMapForInternalArrayFunction); in Generate_InternalArrayCode()
82 __ CompareObjectType(x10, x11, x12, MAP_TYPE); in Generate_InternalArrayCode()
83 __ Assert(eq, kUnexpectedInitialMapForInternalArrayFunction); in Generate_InternalArrayCode()
89 __ TailCallStub(&stub); in Generate_InternalArrayCode()
106 __ Ldr(x10, FieldMemOperand(x1, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_ArrayCode()
107 __ Tst(x10, kSmiTagMask); in Generate_ArrayCode()
108 __ Assert(ne, kUnexpectedInitialMapForArrayFunction); in Generate_ArrayCode()
109 __ CompareObjectType(x10, x11, x12, MAP_TYPE); in Generate_ArrayCode()
110 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); in Generate_ArrayCode()
114 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); in Generate_ArrayCode()
115 __ Mov(x3, x1); in Generate_ArrayCode()
117 __ TailCallStub(&stub); in Generate_ArrayCode()
138 __ LoadRoot(x5, root_index); in Generate_MathMaxMin()
139 __ Ldr(d5, FieldMemOperand(x5, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
142 __ mov(x4, x0); in Generate_MathMaxMin()
143 __ Bind(&loop); in Generate_MathMaxMin()
146 __ Subs(x4, x4, 1); in Generate_MathMaxMin()
147 __ B(lt, &done_loop); in Generate_MathMaxMin()
150 __ Peek(x2, Operand(x4, LSL, kPointerSizeLog2)); in Generate_MathMaxMin()
155 __ JumpIfSmi(x2, &convert_smi); in Generate_MathMaxMin()
156 __ JumpIfHeapNumber(x2, &convert_number); in Generate_MathMaxMin()
160 __ SmiTag(x0); in Generate_MathMaxMin()
161 __ SmiTag(x4); in Generate_MathMaxMin()
162 __ EnterBuiltinFrame(cp, x1, x0); in Generate_MathMaxMin()
163 __ Push(x5, x4); in Generate_MathMaxMin()
164 __ Mov(x0, x2); in Generate_MathMaxMin()
165 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_MathMaxMin()
166 __ Mov(x2, x0); in Generate_MathMaxMin()
167 __ Pop(x4, x5); in Generate_MathMaxMin()
168 __ LeaveBuiltinFrame(cp, x1, x0); in Generate_MathMaxMin()
169 __ SmiUntag(x4); in Generate_MathMaxMin()
170 __ SmiUntag(x0); in Generate_MathMaxMin()
174 __ SmiUntagToDouble(d5, x5, kSpeculativeUntag); in Generate_MathMaxMin()
175 __ JumpIfSmi(x5, &done_restore); in Generate_MathMaxMin()
176 __ Ldr(d5, FieldMemOperand(x5, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
177 __ Bind(&done_restore); in Generate_MathMaxMin()
180 __ AssertNumber(x2); in Generate_MathMaxMin()
181 __ JumpIfSmi(x2, &convert_smi); in Generate_MathMaxMin()
183 __ Bind(&convert_number); in Generate_MathMaxMin()
184 __ Ldr(d2, FieldMemOperand(x2, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
185 __ B(&done_convert); in Generate_MathMaxMin()
187 __ Bind(&convert_smi); in Generate_MathMaxMin()
188 __ SmiUntagToDouble(d2, x2); in Generate_MathMaxMin()
189 __ Bind(&done_convert); in Generate_MathMaxMin()
193 __ Fmov(x11, d5); in Generate_MathMaxMin()
195 __ Fmin(d5, d5, d2); in Generate_MathMaxMin()
198 __ Fmax(d5, d5, d2); in Generate_MathMaxMin()
200 __ Fmov(x10, d5); in Generate_MathMaxMin()
201 __ Cmp(x10, x11); in Generate_MathMaxMin()
202 __ Csel(x5, x5, x2, eq); in Generate_MathMaxMin()
203 __ B(&loop); in Generate_MathMaxMin()
206 __ Bind(&done_loop); in Generate_MathMaxMin()
208 __ Add(x0, x0, 1); in Generate_MathMaxMin()
209 __ Drop(x0); in Generate_MathMaxMin()
210 __ Mov(x0, x5); in Generate_MathMaxMin()
211 __ Ret(); in Generate_MathMaxMin()
229 __ Cbz(x0, &no_arguments); in Generate_NumberConstructor()
230 __ Mov(x2, x0); // Store argc in x2. in Generate_NumberConstructor()
231 __ Sub(x0, x0, 1); in Generate_NumberConstructor()
232 __ Ldr(x0, MemOperand(jssp, x0, LSL, kPointerSizeLog2)); in Generate_NumberConstructor()
238 __ SmiTag(x2); in Generate_NumberConstructor()
239 __ EnterBuiltinFrame(cp, x1, x2); in Generate_NumberConstructor()
240 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor()
241 __ LeaveBuiltinFrame(cp, x1, x2); in Generate_NumberConstructor()
242 __ SmiUntag(x2); in Generate_NumberConstructor()
247 __ Drop(x2); in Generate_NumberConstructor()
251 __ Bind(&no_arguments); in Generate_NumberConstructor()
252 __ Drop(1); in Generate_NumberConstructor()
253 __ Ret(); in Generate_NumberConstructor()
270 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); in Generate_NumberConstructor_ConstructStub()
275 __ Move(x6, x0); // Store argc in x6. in Generate_NumberConstructor_ConstructStub()
276 __ Cbz(x0, &no_arguments); in Generate_NumberConstructor_ConstructStub()
277 __ Sub(x0, x0, 1); in Generate_NumberConstructor_ConstructStub()
278 __ Ldr(x2, MemOperand(jssp, x0, LSL, kPointerSizeLog2)); in Generate_NumberConstructor_ConstructStub()
279 __ B(&done); in Generate_NumberConstructor_ConstructStub()
280 __ Bind(&no_arguments); in Generate_NumberConstructor_ConstructStub()
281 __ Mov(x2, Smi::kZero); in Generate_NumberConstructor_ConstructStub()
282 __ Bind(&done); in Generate_NumberConstructor_ConstructStub()
288 __ JumpIfSmi(x2, &done_convert); in Generate_NumberConstructor_ConstructStub()
289 __ JumpIfObjectType(x2, x4, x4, HEAP_NUMBER_TYPE, &done_convert, eq); in Generate_NumberConstructor_ConstructStub()
292 __ SmiTag(x6); in Generate_NumberConstructor_ConstructStub()
293 __ EnterBuiltinFrame(cp, x1, x6); in Generate_NumberConstructor_ConstructStub()
294 __ Push(x3); in Generate_NumberConstructor_ConstructStub()
295 __ Move(x0, x2); in Generate_NumberConstructor_ConstructStub()
296 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor_ConstructStub()
297 __ Move(x2, x0); in Generate_NumberConstructor_ConstructStub()
298 __ Pop(x3); in Generate_NumberConstructor_ConstructStub()
299 __ LeaveBuiltinFrame(cp, x1, x6); in Generate_NumberConstructor_ConstructStub()
300 __ SmiUntag(x6); in Generate_NumberConstructor_ConstructStub()
302 __ Bind(&done_convert); in Generate_NumberConstructor_ConstructStub()
307 __ Cmp(x1, x3); in Generate_NumberConstructor_ConstructStub()
308 __ B(ne, &new_object); in Generate_NumberConstructor_ConstructStub()
311 __ AllocateJSValue(x0, x1, x2, x4, x5, &new_object); in Generate_NumberConstructor_ConstructStub()
312 __ B(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
315 __ bind(&new_object); in Generate_NumberConstructor_ConstructStub()
319 __ SmiTag(x6); in Generate_NumberConstructor_ConstructStub()
320 __ EnterBuiltinFrame(cp, x1, x6); in Generate_NumberConstructor_ConstructStub()
321 __ Push(x2); // first argument in Generate_NumberConstructor_ConstructStub()
322 __ CallStub(&stub); in Generate_NumberConstructor_ConstructStub()
323 __ Pop(x2); in Generate_NumberConstructor_ConstructStub()
324 __ LeaveBuiltinFrame(cp, x1, x6); in Generate_NumberConstructor_ConstructStub()
325 __ SmiUntag(x6); in Generate_NumberConstructor_ConstructStub()
327 __ Str(x2, FieldMemOperand(x0, JSValue::kValueOffset)); in Generate_NumberConstructor_ConstructStub()
329 __ bind(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
331 __ Drop(x6); in Generate_NumberConstructor_ConstructStub()
332 __ Drop(1); in Generate_NumberConstructor_ConstructStub()
333 __ Ret(); in Generate_NumberConstructor_ConstructStub()
352 __ Cbz(x0, &no_arguments); in Generate_StringConstructor()
353 __ Mov(x2, x0); // Store argc in x2. in Generate_StringConstructor()
354 __ Sub(x0, x0, 1); in Generate_StringConstructor()
355 __ Ldr(x0, MemOperand(jssp, x0, LSL, kPointerSizeLog2)); in Generate_StringConstructor()
362 __ JumpIfSmi(x0, &to_string); in Generate_StringConstructor()
364 __ CompareObjectType(x0, x3, x3, FIRST_NONSTRING_TYPE); in Generate_StringConstructor()
365 __ B(hi, &to_string); in Generate_StringConstructor()
366 __ B(eq, &symbol_descriptive_string); in Generate_StringConstructor()
367 __ b(&drop_frame_and_ret); in Generate_StringConstructor()
371 __ Bind(&no_arguments); in Generate_StringConstructor()
373 __ LoadRoot(x0, Heap::kempty_stringRootIndex); in Generate_StringConstructor()
374 __ Drop(1); in Generate_StringConstructor()
375 __ Ret(); in Generate_StringConstructor()
379 __ Bind(&to_string); in Generate_StringConstructor()
382 __ SmiTag(x2); in Generate_StringConstructor()
383 __ EnterBuiltinFrame(cp, x1, x2); in Generate_StringConstructor()
384 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor()
385 __ LeaveBuiltinFrame(cp, x1, x2); in Generate_StringConstructor()
386 __ SmiUntag(x2); in Generate_StringConstructor()
388 __ b(&drop_frame_and_ret); in Generate_StringConstructor()
391 __ Bind(&symbol_descriptive_string); in Generate_StringConstructor()
393 __ Drop(x2); in Generate_StringConstructor()
394 __ Drop(1); in Generate_StringConstructor()
395 __ Push(x0); in Generate_StringConstructor()
396 __ TailCallRuntime(Runtime::kSymbolDescriptiveString); in Generate_StringConstructor()
399 __ bind(&drop_frame_and_ret); in Generate_StringConstructor()
401 __ Drop(x2); in Generate_StringConstructor()
402 __ Drop(1); in Generate_StringConstructor()
403 __ Ret(); in Generate_StringConstructor()
421 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); in Generate_StringConstructor_ConstructStub()
426 __ mov(x6, x0); // Store argc in x6. in Generate_StringConstructor_ConstructStub()
427 __ Cbz(x0, &no_arguments); in Generate_StringConstructor_ConstructStub()
428 __ Sub(x0, x0, 1); in Generate_StringConstructor_ConstructStub()
429 __ Ldr(x2, MemOperand(jssp, x0, LSL, kPointerSizeLog2)); in Generate_StringConstructor_ConstructStub()
430 __ B(&done); in Generate_StringConstructor_ConstructStub()
431 __ Bind(&no_arguments); in Generate_StringConstructor_ConstructStub()
432 __ LoadRoot(x2, Heap::kempty_stringRootIndex); in Generate_StringConstructor_ConstructStub()
433 __ Bind(&done); in Generate_StringConstructor_ConstructStub()
439 __ JumpIfSmi(x2, &convert); in Generate_StringConstructor_ConstructStub()
440 __ JumpIfObjectType(x2, x4, x4, FIRST_NONSTRING_TYPE, &done_convert, lo); in Generate_StringConstructor_ConstructStub()
441 __ Bind(&convert); in Generate_StringConstructor_ConstructStub()
444 __ SmiTag(x6); in Generate_StringConstructor_ConstructStub()
445 __ EnterBuiltinFrame(cp, x1, x6); in Generate_StringConstructor_ConstructStub()
446 __ Push(x3); in Generate_StringConstructor_ConstructStub()
447 __ Move(x0, x2); in Generate_StringConstructor_ConstructStub()
448 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor_ConstructStub()
449 __ Move(x2, x0); in Generate_StringConstructor_ConstructStub()
450 __ Pop(x3); in Generate_StringConstructor_ConstructStub()
451 __ LeaveBuiltinFrame(cp, x1, x6); in Generate_StringConstructor_ConstructStub()
452 __ SmiUntag(x6); in Generate_StringConstructor_ConstructStub()
454 __ Bind(&done_convert); in Generate_StringConstructor_ConstructStub()
459 __ Cmp(x1, x3); in Generate_StringConstructor_ConstructStub()
460 __ B(ne, &new_object); in Generate_StringConstructor_ConstructStub()
463 __ AllocateJSValue(x0, x1, x2, x4, x5, &new_object); in Generate_StringConstructor_ConstructStub()
464 __ B(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
467 __ bind(&new_object); in Generate_StringConstructor_ConstructStub()
471 __ SmiTag(x6); in Generate_StringConstructor_ConstructStub()
472 __ EnterBuiltinFrame(cp, x1, x6); in Generate_StringConstructor_ConstructStub()
473 __ Push(x2); // first argument in Generate_StringConstructor_ConstructStub()
474 __ CallStub(&stub); in Generate_StringConstructor_ConstructStub()
475 __ Pop(x2); in Generate_StringConstructor_ConstructStub()
476 __ LeaveBuiltinFrame(cp, x1, x6); in Generate_StringConstructor_ConstructStub()
477 __ SmiUntag(x6); in Generate_StringConstructor_ConstructStub()
479 __ Str(x2, FieldMemOperand(x0, JSValue::kValueOffset)); in Generate_StringConstructor_ConstructStub()
481 __ bind(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
483 __ Drop(x6); in Generate_StringConstructor_ConstructStub()
484 __ Drop(1); in Generate_StringConstructor_ConstructStub()
485 __ Ret(); in Generate_StringConstructor_ConstructStub()
490 __ Ldr(x2, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); in GenerateTailCallToSharedCode()
491 __ Ldr(x2, FieldMemOperand(x2, SharedFunctionInfo::kCodeOffset)); in GenerateTailCallToSharedCode()
492 __ Add(x2, x2, Code::kHeaderSize - kHeapObjectTag); in GenerateTailCallToSharedCode()
493 __ Br(x2); in GenerateTailCallToSharedCode()
507 __ SmiTag(x0); in GenerateTailCallToReturnedCode()
508 __ Push(x0, x1, x3, x1); in GenerateTailCallToReturnedCode()
510 __ CallRuntime(function_id, 1); in GenerateTailCallToReturnedCode()
511 __ Move(x2, x0); in GenerateTailCallToReturnedCode()
514 __ Pop(x3, x1, x0); in GenerateTailCallToReturnedCode()
515 __ SmiUntag(x0); in GenerateTailCallToReturnedCode()
518 __ Add(x2, x2, Code::kHeaderSize - kHeapObjectTag); in GenerateTailCallToReturnedCode()
519 __ Br(x2); in GenerateTailCallToReturnedCode()
529 __ CompareRoot(masm->StackPointer(), Heap::kStackLimitRootIndex); in Generate_InOptimizationQueue()
530 __ B(hs, &ok); in Generate_InOptimizationQueue()
534 __ Bind(&ok); in Generate_InOptimizationQueue()
566 __ SmiTag(argc); in Generate_JSConstructStubHelper()
567 __ Push(cp, argc); in Generate_JSConstructStubHelper()
571 __ Push(constructor, new_target); in Generate_JSConstructStubHelper()
573 __ CallStub(&stub); in Generate_JSConstructStubHelper()
574 __ Mov(x4, x0); in Generate_JSConstructStubHelper()
575 __ Pop(new_target, constructor); in Generate_JSConstructStubHelper()
586 __ Peek(argc, 0); // Load number of arguments. in Generate_JSConstructStubHelper()
589 __ SmiUntag(argc); in Generate_JSConstructStubHelper()
595 __ Push(x4, x4); in Generate_JSConstructStubHelper()
597 __ PushRoot(Heap::kTheHoleValueRootIndex); in Generate_JSConstructStubHelper()
601 __ Add(x2, fp, StandardFrameConstants::kCallerSPOffset); in Generate_JSConstructStubHelper()
613 __ Add(x4, x2, Operand(argc, LSL, kPointerSizeLog2)); in Generate_JSConstructStubHelper()
615 __ B(&entry); in Generate_JSConstructStubHelper()
616 __ Bind(&loop); in Generate_JSConstructStubHelper()
617 __ Ldp(x10, x11, MemOperand(x4, -2 * kPointerSize, PreIndex)); in Generate_JSConstructStubHelper()
618 __ Push(x11, x10); in Generate_JSConstructStubHelper()
619 __ Bind(&entry); in Generate_JSConstructStubHelper()
620 __ Cmp(x4, x2); in Generate_JSConstructStubHelper()
621 __ B(gt, &loop); in Generate_JSConstructStubHelper()
624 __ B(eq, &done_copying_arguments); in Generate_JSConstructStubHelper()
625 __ Drop(1); in Generate_JSConstructStubHelper()
626 __ Bind(&done_copying_arguments); in Generate_JSConstructStubHelper()
633 __ InvokeFunction(constructor, new_target, actual, CALL_FUNCTION, in Generate_JSConstructStubHelper()
645 __ Ldr(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); in Generate_JSConstructStubHelper()
657 __ JumpIfSmi(x0, &use_receiver); in Generate_JSConstructStubHelper()
661 __ JumpIfObjectType(x0, x1, x3, FIRST_JS_RECEIVER_TYPE, &exit, ge); in Generate_JSConstructStubHelper()
665 __ Bind(&use_receiver); in Generate_JSConstructStubHelper()
666 __ Peek(x0, 0); in Generate_JSConstructStubHelper()
670 __ Bind(&exit); in Generate_JSConstructStubHelper()
674 __ Peek(x1, 1 * kXRegSize); in Generate_JSConstructStubHelper()
676 __ Peek(x1, 0); in Generate_JSConstructStubHelper()
687 __ JumpIfNotSmi(x0, &dont_throw); in Generate_JSConstructStubHelper()
690 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); in Generate_JSConstructStubHelper()
692 __ Bind(&dont_throw); in Generate_JSConstructStubHelper()
695 __ DropBySMI(x1); in Generate_JSConstructStubHelper()
696 __ Drop(1); in Generate_JSConstructStubHelper()
698 __ IncrementCounter(isolate->counters()->constructed_objects(), 1, x1, x2); in Generate_JSConstructStubHelper()
700 __ Ret(); in Generate_JSConstructStubHelper()
724 __ Push(x1); in Generate_ConstructedNonConstructable()
725 __ CallRuntime(Runtime::kThrowConstructedNonConstructable); in Generate_ConstructedNonConstructable()
736 __ AssertGeneratorObject(x1); in Generate_ResumeGeneratorTrampoline()
739 __ Str(x0, FieldMemOperand(x1, JSGeneratorObject::kInputOrDebugPosOffset)); in Generate_ResumeGeneratorTrampoline()
740 __ RecordWriteField(x1, JSGeneratorObject::kInputOrDebugPosOffset, x0, x3, in Generate_ResumeGeneratorTrampoline()
744 __ Str(x2, FieldMemOperand(x1, JSGeneratorObject::kResumeModeOffset)); in Generate_ResumeGeneratorTrampoline()
747 __ Ldr(cp, FieldMemOperand(x1, JSGeneratorObject::kContextOffset)); in Generate_ResumeGeneratorTrampoline()
748 __ Ldr(x4, FieldMemOperand(x1, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
756 __ Mov(x10, Operand(last_step_action)); in Generate_ResumeGeneratorTrampoline()
757 __ Ldrsb(x10, MemOperand(x10)); in Generate_ResumeGeneratorTrampoline()
758 __ CompareAndBranch(x10, Operand(StepIn), ge, &prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
763 __ Mov(x10, Operand(debug_suspended_generator)); in Generate_ResumeGeneratorTrampoline()
764 __ Ldr(x10, MemOperand(x10)); in Generate_ResumeGeneratorTrampoline()
765 __ CompareAndBranch(x10, Operand(x1), eq, in Generate_ResumeGeneratorTrampoline()
767 __ Bind(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
770 __ Ldr(x5, FieldMemOperand(x1, JSGeneratorObject::kReceiverOffset)); in Generate_ResumeGeneratorTrampoline()
771 __ Push(x5); in Generate_ResumeGeneratorTrampoline()
786 __ Ldr(x10, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
787 __ Ldr(w10, in Generate_ResumeGeneratorTrampoline()
789 __ LoadRoot(x11, Heap::kTheHoleValueRootIndex); in Generate_ResumeGeneratorTrampoline()
790 __ PushMultipleTimes(x11, w10); in Generate_ResumeGeneratorTrampoline()
794 __ Ldr(x3, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
795 __ Ldr(x3, FieldMemOperand(x3, SharedFunctionInfo::kFunctionDataOffset)); in Generate_ResumeGeneratorTrampoline()
796 __ CompareObjectType(x3, x3, x3, BYTECODE_ARRAY_TYPE); in Generate_ResumeGeneratorTrampoline()
797 __ B(ne, &old_generator); in Generate_ResumeGeneratorTrampoline()
801 __ Ldr(x0, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
802 __ Ldr(w0, FieldMemOperand( in Generate_ResumeGeneratorTrampoline()
807 __ Move(x3, x1); in Generate_ResumeGeneratorTrampoline()
808 __ Move(x1, x4); in Generate_ResumeGeneratorTrampoline()
809 __ Ldr(x5, FieldMemOperand(x1, JSFunction::kCodeEntryOffset)); in Generate_ResumeGeneratorTrampoline()
810 __ Jump(x5); in Generate_ResumeGeneratorTrampoline()
814 __ bind(&old_generator); in Generate_ResumeGeneratorTrampoline()
819 __ Push(lr, fp); in Generate_ResumeGeneratorTrampoline()
820 __ Move(fp, jssp); in Generate_ResumeGeneratorTrampoline()
821 __ Push(cp, x4); in Generate_ResumeGeneratorTrampoline()
824 __ Ldr(x0, FieldMemOperand(x1, JSGeneratorObject::kOperandStackOffset)); in Generate_ResumeGeneratorTrampoline()
825 __ Ldr(w3, UntagSmiFieldMemOperand(x0, FixedArray::kLengthOffset)); in Generate_ResumeGeneratorTrampoline()
826 __ Add(x0, x0, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); in Generate_ResumeGeneratorTrampoline()
827 __ Add(x3, x0, Operand(x3, LSL, kPointerSizeLog2)); in Generate_ResumeGeneratorTrampoline()
830 __ Bind(&loop); in Generate_ResumeGeneratorTrampoline()
831 __ Cmp(x0, x3); in Generate_ResumeGeneratorTrampoline()
832 __ B(eq, &done_loop); in Generate_ResumeGeneratorTrampoline()
833 __ Ldr(x10, MemOperand(x0, kPointerSize, PostIndex)); in Generate_ResumeGeneratorTrampoline()
834 __ Push(x10); in Generate_ResumeGeneratorTrampoline()
835 __ B(&loop); in Generate_ResumeGeneratorTrampoline()
836 __ Bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
840 __ LoadRoot(x10, Heap::kEmptyFixedArrayRootIndex); in Generate_ResumeGeneratorTrampoline()
841 __ Str(x10, FieldMemOperand(x1, JSGeneratorObject::kOperandStackOffset)); in Generate_ResumeGeneratorTrampoline()
844 __ Ldr(x10, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
845 __ Ldr(x10, FieldMemOperand(x10, SharedFunctionInfo::kCodeOffset)); in Generate_ResumeGeneratorTrampoline()
846 __ Add(x10, x10, Code::kHeaderSize - kHeapObjectTag); in Generate_ResumeGeneratorTrampoline()
847 __ Ldrsw(x11, UntagSmiFieldMemOperand( in Generate_ResumeGeneratorTrampoline()
849 __ Add(x10, x10, x11); in Generate_ResumeGeneratorTrampoline()
850 __ Mov(x12, Smi::FromInt(JSGeneratorObject::kGeneratorExecuting)); in Generate_ResumeGeneratorTrampoline()
851 __ Str(x12, FieldMemOperand(x1, JSGeneratorObject::kContinuationOffset)); in Generate_ResumeGeneratorTrampoline()
852 __ Move(x0, x1); // Continuation expects generator object in x0. in Generate_ResumeGeneratorTrampoline()
853 __ Br(x10); in Generate_ResumeGeneratorTrampoline()
856 __ Bind(&prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
859 __ Push(x1, x2, x4); in Generate_ResumeGeneratorTrampoline()
860 __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); in Generate_ResumeGeneratorTrampoline()
861 __ Pop(x2, x1); in Generate_ResumeGeneratorTrampoline()
862 __ Ldr(x4, FieldMemOperand(x1, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
864 __ B(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
866 __ Bind(&prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
869 __ Push(x1, x2); in Generate_ResumeGeneratorTrampoline()
870 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); in Generate_ResumeGeneratorTrampoline()
871 __ Pop(x2, x1); in Generate_ResumeGeneratorTrampoline()
872 __ Ldr(x4, FieldMemOperand(x1, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
874 __ B(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
886 __ LoadRoot(x10, Heap::kRealStackLimitRootIndex); in Generate_CheckStackOverflow()
890 __ Sub(x10, jssp, x10); in Generate_CheckStackOverflow()
893 __ Cmp(x10, Operand::UntagSmiAndScale(argc, kPointerSizeLog2)); in Generate_CheckStackOverflow()
896 __ Cmp(x10, Operand(argc, LSL, kPointerSizeLog2)); in Generate_CheckStackOverflow()
898 __ B(gt, &enough_stack_space); in Generate_CheckStackOverflow()
899 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_CheckStackOverflow()
901 if (__ emit_debug_code()) { in Generate_CheckStackOverflow()
902 __ Unreachable(); in Generate_CheckStackOverflow()
905 __ Bind(&enough_stack_space); in Generate_CheckStackOverflow()
933 __ Mov(scratch, Operand(ExternalReference(Isolate::kContextAddress, in Generate_JSEntryTrampolineHelper()
935 __ Ldr(cp, MemOperand(scratch)); in Generate_JSEntryTrampolineHelper()
937 __ InitializeRootRegister(); in Generate_JSEntryTrampolineHelper()
940 __ Push(function, receiver); in Generate_JSEntryTrampolineHelper()
951 __ Add(scratch, argv, Operand(argc, LSL, kPointerSizeLog2)); in Generate_JSEntryTrampolineHelper()
953 __ B(&entry); in Generate_JSEntryTrampolineHelper()
954 __ Bind(&loop); in Generate_JSEntryTrampolineHelper()
955 __ Ldr(x11, MemOperand(argv, kPointerSize, PostIndex)); in Generate_JSEntryTrampolineHelper()
956 __ Ldr(x12, MemOperand(x11)); // Dereference the handle. in Generate_JSEntryTrampolineHelper()
957 __ Push(x12); // Push the argument. in Generate_JSEntryTrampolineHelper()
958 __ Bind(&entry); in Generate_JSEntryTrampolineHelper()
959 __ Cmp(scratch, argv); in Generate_JSEntryTrampolineHelper()
960 __ B(ne, &loop); in Generate_JSEntryTrampolineHelper()
962 __ Mov(scratch, argc); in Generate_JSEntryTrampolineHelper()
963 __ Mov(argc, new_target); in Generate_JSEntryTrampolineHelper()
964 __ Mov(new_target, scratch); in Generate_JSEntryTrampolineHelper()
971 __ LoadRoot(x19, Heap::kUndefinedValueRootIndex); in Generate_JSEntryTrampolineHelper()
972 __ Mov(x20, x19); in Generate_JSEntryTrampolineHelper()
973 __ Mov(x21, x19); in Generate_JSEntryTrampolineHelper()
974 __ Mov(x22, x19); in Generate_JSEntryTrampolineHelper()
975 __ Mov(x23, x19); in Generate_JSEntryTrampolineHelper()
976 __ Mov(x24, x19); in Generate_JSEntryTrampolineHelper()
977 __ Mov(x25, x19); in Generate_JSEntryTrampolineHelper()
987 __ Call(builtin, RelocInfo::CODE_TARGET); in Generate_JSEntryTrampolineHelper()
994 __ Ret(); in Generate_JSEntryTrampolineHelper()
1009 __ ldr(args_count, in LeaveInterpreterFrame()
1011 __ Ldr(args_count.W(), in LeaveInterpreterFrame()
1015 __ LeaveFrame(StackFrame::JAVA_SCRIPT); in LeaveInterpreterFrame()
1018 __ Drop(args_count, 1); in LeaveInterpreterFrame()
1043 __ Push(lr, fp, cp, x1); in Generate_InterpreterEntryTrampoline()
1044 __ Add(fp, jssp, StandardFrameConstants::kFixedFrameSizeFromFp); in Generate_InterpreterEntryTrampoline()
1048 __ Ldr(x0, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
1052 __ Ldr(debug_info, FieldMemOperand(x0, SharedFunctionInfo::kDebugInfoOffset)); in Generate_InterpreterEntryTrampoline()
1053 __ Cmp(debug_info, Operand(DebugInfo::uninitialized())); in Generate_InterpreterEntryTrampoline()
1054 __ B(ne, &load_debug_bytecode_array); in Generate_InterpreterEntryTrampoline()
1055 __ Ldr(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1057 __ Bind(&bytecode_array_loaded); in Generate_InterpreterEntryTrampoline()
1061 __ Ldr(x0, FieldMemOperand(x0, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
1062 __ Cmp(x0, Operand(masm->CodeObject())); // Self-reference to this code. in Generate_InterpreterEntryTrampoline()
1063 __ B(ne, &switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
1066 __ Ldr(x11, FieldMemOperand(x1, JSFunction::kLiteralsOffset)); in Generate_InterpreterEntryTrampoline()
1067 __ Ldr(x11, FieldMemOperand(x11, LiteralsArray::kFeedbackVectorOffset)); in Generate_InterpreterEntryTrampoline()
1068 __ Ldr(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * in Generate_InterpreterEntryTrampoline()
1071 __ Add(x10, x10, Operand(Smi::FromInt(1))); in Generate_InterpreterEntryTrampoline()
1072 __ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * in Generate_InterpreterEntryTrampoline()
1078 __ AssertNotSmi(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1080 __ CompareObjectType(kInterpreterBytecodeArrayRegister, x0, x0, in Generate_InterpreterEntryTrampoline()
1082 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEntryTrampoline()
1086 __ Mov(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEntryTrampoline()
1090 __ SmiTag(x0, kInterpreterBytecodeOffsetRegister); in Generate_InterpreterEntryTrampoline()
1091 __ Push(x3, kInterpreterBytecodeArrayRegister, x0); in Generate_InterpreterEntryTrampoline()
1096 __ Ldr(w11, FieldMemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1101 DCHECK(jssp.Is(__ StackPointer())); in Generate_InterpreterEntryTrampoline()
1102 __ Sub(x10, jssp, Operand(x11)); in Generate_InterpreterEntryTrampoline()
1103 __ CompareRoot(x10, Heap::kRealStackLimitRootIndex); in Generate_InterpreterEntryTrampoline()
1104 __ B(hs, &ok); in Generate_InterpreterEntryTrampoline()
1105 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterEntryTrampoline()
1106 __ Bind(&ok); in Generate_InterpreterEntryTrampoline()
1112 __ LoadRoot(x10, Heap::kUndefinedValueRootIndex); in Generate_InterpreterEntryTrampoline()
1115 __ Lsr(x11, x11, kPointerSizeLog2); in Generate_InterpreterEntryTrampoline()
1116 __ PushMultipleTimes(x10, x11); in Generate_InterpreterEntryTrampoline()
1117 __ Bind(&loop_header); in Generate_InterpreterEntryTrampoline()
1121 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); in Generate_InterpreterEntryTrampoline()
1122 __ Mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEntryTrampoline()
1127 __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1129 __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); in Generate_InterpreterEntryTrampoline()
1130 __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); in Generate_InterpreterEntryTrampoline()
1131 __ Call(ip0); in Generate_InterpreterEntryTrampoline()
1136 __ Ret(); in Generate_InterpreterEntryTrampoline()
1139 __ Bind(&load_debug_bytecode_array); in Generate_InterpreterEntryTrampoline()
1140 __ Ldr(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1142 __ B(&bytecode_array_loaded); in Generate_InterpreterEntryTrampoline()
1147 __ bind(&switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
1148 __ LeaveFrame(StackFrame::JAVA_SCRIPT); in Generate_InterpreterEntryTrampoline()
1149 __ Ldr(x7, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
1150 __ Ldr(x7, FieldMemOperand(x7, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
1151 __ Add(x7, x7, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_InterpreterEntryTrampoline()
1152 __ Str(x7, FieldMemOperand(x1, JSFunction::kCodeEntryOffset)); in Generate_InterpreterEntryTrampoline()
1153 __ RecordWriteCodeEntryField(x1, x7, x5); in Generate_InterpreterEntryTrampoline()
1154 __ Jump(x7); in Generate_InterpreterEntryTrampoline()
1164 __ LoadRoot(scratch, Heap::kRealStackLimitRootIndex); in Generate_StackOverflowCheck()
1167 __ Sub(scratch, jssp, scratch); in Generate_StackOverflowCheck()
1169 __ Cmp(scratch, Operand(num_args, LSL, kPointerSizeLog2)); in Generate_StackOverflowCheck()
1170 __ B(le, stack_overflow); in Generate_StackOverflowCheck()
1181 __ Mov(scratch, num_args); in Generate_InterpreterPushArgs()
1182 __ lsl(scratch, scratch, kPointerSizeLog2); in Generate_InterpreterPushArgs()
1183 __ sub(last_arg, index, scratch); in Generate_InterpreterPushArgs()
1186 __ Mov(stack_addr, jssp); in Generate_InterpreterPushArgs()
1187 __ Claim(scratch, 1); in Generate_InterpreterPushArgs()
1191 __ B(&loop_check); in Generate_InterpreterPushArgs()
1192 __ Bind(&loop_header); in Generate_InterpreterPushArgs()
1194 __ Ldr(scratch, MemOperand(index, -kPointerSize, PostIndex)); in Generate_InterpreterPushArgs()
1195 __ Str(scratch, MemOperand(stack_addr, -kPointerSize, PreIndex)); in Generate_InterpreterPushArgs()
1196 __ Bind(&loop_check); in Generate_InterpreterPushArgs()
1197 __ Cmp(index, last_arg); in Generate_InterpreterPushArgs()
1198 __ B(gt, &loop_header); in Generate_InterpreterPushArgs()
1215 __ add(x3, x0, Operand(1)); in Generate_InterpreterPushArgsAndCallImpl()
1222 __ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
1227 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
1232 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndCallImpl()
1234 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndCallImpl()
1235 __ Unreachable(); in Generate_InterpreterPushArgsAndCallImpl()
1252 __ Push(xzr); in Generate_InterpreterPushArgsAndConstructImpl()
1257 __ AssertUndefinedOrAllocationSite(x2, x6); in Generate_InterpreterPushArgsAndConstructImpl()
1259 __ AssertFunction(x1); in Generate_InterpreterPushArgsAndConstructImpl()
1263 __ Ldr(x4, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
1264 __ Ldr(x4, FieldMemOperand(x4, SharedFunctionInfo::kConstructStubOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
1265 __ Add(x4, x4, Code::kHeaderSize - kHeapObjectTag); in Generate_InterpreterPushArgsAndConstructImpl()
1266 __ Br(x4); in Generate_InterpreterPushArgsAndConstructImpl()
1270 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_InterpreterPushArgsAndConstructImpl()
1273 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructImpl()
1275 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructImpl()
1276 __ Unreachable(); in Generate_InterpreterPushArgsAndConstructImpl()
1291 __ add(x4, x0, Operand(1)); // Add one for the receiver. in Generate_InterpreterPushArgsAndConstructArray()
1297 __ mov(x3, x1); in Generate_InterpreterPushArgsAndConstructArray()
1300 __ TailCallStub(&stub); in Generate_InterpreterPushArgsAndConstructArray()
1302 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructArray()
1304 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructArray()
1305 __ Unreachable(); in Generate_InterpreterPushArgsAndConstructArray()
1315 __ LoadObject(x1, masm->isolate()->builtins()->InterpreterEntryTrampoline()); in Generate_InterpreterEnterBytecode()
1316 __ Add(lr, x1, Operand(interpreter_entry_return_pc_offset->value() + in Generate_InterpreterEnterBytecode()
1320 __ Mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEnterBytecode()
1325 __ Ldr(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1330 __ AssertNotSmi(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1332 __ CompareObjectType(kInterpreterBytecodeArrayRegister, x1, x1, in Generate_InterpreterEnterBytecode()
1334 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEnterBytecode()
1338 __ Ldr(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEnterBytecode()
1340 __ SmiUntag(kInterpreterBytecodeOffsetRegister); in Generate_InterpreterEnterBytecode()
1343 __ Ldrb(x1, MemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1345 __ Mov(x1, Operand(x1, LSL, kPointerSizeLog2)); in Generate_InterpreterEnterBytecode()
1346 __ Ldr(ip0, MemOperand(kInterpreterDispatchTableRegister, x1)); in Generate_InterpreterEnterBytecode()
1347 __ Jump(ip0); in Generate_InterpreterEnterBytecode()
1354 __ Ldr(x1, MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1355 __ Ldr(x2, MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1356 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); in Generate_InterpreterEnterBytecodeAdvance()
1359 __ Push(kInterpreterAccumulatorRegister, x1, x2); in Generate_InterpreterEnterBytecodeAdvance()
1360 __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); in Generate_InterpreterEnterBytecodeAdvance()
1361 __ Mov(x2, x0); // Result is the new bytecode offset. in Generate_InterpreterEnterBytecodeAdvance()
1362 __ Pop(kInterpreterAccumulatorRegister); in Generate_InterpreterEnterBytecodeAdvance()
1364 __ Str(x2, MemOperand(fp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1387 __ Ldr(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); in Generate_CompileLazy()
1388 __ Ldr(map, in Generate_CompileLazy()
1390 __ Ldrsw(index, UntagSmiFieldMemOperand(map, FixedArray::kLengthOffset)); in Generate_CompileLazy()
1391 __ Cmp(index, Operand(2)); in Generate_CompileLazy()
1392 __ B(lt, &gotta_call_runtime); in Generate_CompileLazy()
1401 __ Ldr(native_context, NativeContextMemOperand()); in Generate_CompileLazy()
1403 __ Bind(&loop_top); in Generate_CompileLazy()
1408 __ Add(array_pointer, map, Operand(index, LSL, kPointerSizeLog2)); in Generate_CompileLazy()
1409 __ Ldr(temp, FieldMemOperand(array_pointer, in Generate_CompileLazy()
1411 __ Ldr(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1412 __ Cmp(temp, native_context); in Generate_CompileLazy()
1413 __ B(ne, &loop_bottom); in Generate_CompileLazy()
1415 __ Ldr(temp, FieldMemOperand(array_pointer, in Generate_CompileLazy()
1418 __ Cmp(temp, Operand(Smi::FromInt(bailout_id))); in Generate_CompileLazy()
1419 __ B(ne, &loop_bottom); in Generate_CompileLazy()
1421 __ Ldr(temp, FieldMemOperand(array_pointer, in Generate_CompileLazy()
1423 __ Ldr(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1424 __ JumpIfSmi(temp, &gotta_call_runtime); in Generate_CompileLazy()
1427 __ Str(temp, FieldMemOperand(closure, JSFunction::kLiteralsOffset)); in Generate_CompileLazy()
1428 __ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, x7, in Generate_CompileLazy()
1434 __ Ldr(entry, in Generate_CompileLazy()
1437 __ Ldr(entry, FieldMemOperand(entry, WeakCell::kValueOffset)); in Generate_CompileLazy()
1438 __ JumpIfSmi(entry, &try_shared); in Generate_CompileLazy()
1441 __ Add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_CompileLazy()
1442 __ Str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); in Generate_CompileLazy()
1443 __ RecordWriteCodeEntryField(closure, entry, x5); in Generate_CompileLazy()
1449 __ Ldr(x8, in Generate_CompileLazy()
1451 __ Str(x8, FieldMemOperand(closure, JSFunction::kNextFunctionLinkOffset)); in Generate_CompileLazy()
1452 __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, x8, x13, in Generate_CompileLazy()
1457 __ Str(closure, in Generate_CompileLazy()
1459 __ Mov(x5, closure); in Generate_CompileLazy()
1460 __ RecordWriteContextSlot(native_context, function_list_offset, x5, x13, in Generate_CompileLazy()
1462 __ Jump(entry); in Generate_CompileLazy()
1464 __ Bind(&loop_bottom); in Generate_CompileLazy()
1465 __ Sub(index, index, Operand(SharedFunctionInfo::kEntryLength)); in Generate_CompileLazy()
1466 __ Cmp(index, Operand(1)); in Generate_CompileLazy()
1467 __ B(gt, &loop_top); in Generate_CompileLazy()
1470 __ B(&gotta_call_runtime); in Generate_CompileLazy()
1472 __ Bind(&try_shared); in Generate_CompileLazy()
1473 __ Ldr(entry, in Generate_CompileLazy()
1476 __ Ldrb(temp, FieldMemOperand( in Generate_CompileLazy()
1478 __ TestAndBranchIfAnySet( in Generate_CompileLazy()
1482 __ Ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); in Generate_CompileLazy()
1483 __ Ldr(x5, FieldMemOperand(entry, Code::kFlagsOffset)); in Generate_CompileLazy()
1484 __ and_(x5, x5, Operand(Code::KindField::kMask)); in Generate_CompileLazy()
1485 __ Mov(x5, Operand(x5, LSR, Code::KindField::kShift)); in Generate_CompileLazy()
1486 __ Cmp(x5, Operand(Code::BUILTIN)); in Generate_CompileLazy()
1487 __ B(eq, &gotta_call_runtime); in Generate_CompileLazy()
1489 __ Add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_CompileLazy()
1490 __ Str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); in Generate_CompileLazy()
1491 __ RecordWriteCodeEntryField(closure, entry, x5); in Generate_CompileLazy()
1492 __ Jump(entry); in Generate_CompileLazy()
1494 __ Bind(&gotta_call_runtime); in Generate_CompileLazy()
1521 __ Move(x4, x0); in Generate_InstantiateAsmJs()
1523 __ SmiTag(x0); in Generate_InstantiateAsmJs()
1525 __ Push(x0, x1, x3, x1); in Generate_InstantiateAsmJs()
1532 __ cmp(x4, Operand(j)); in Generate_InstantiateAsmJs()
1533 __ B(ne, &over); in Generate_InstantiateAsmJs()
1536 __ ldr(x4, MemOperand(fp, StandardFrameConstants::kCallerSPOffset + in Generate_InstantiateAsmJs()
1538 __ push(x4); in Generate_InstantiateAsmJs()
1541 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_InstantiateAsmJs()
1544 __ jmp(&args_done); in Generate_InstantiateAsmJs()
1545 __ bind(&over); in Generate_InstantiateAsmJs()
1548 __ bind(&args_done); in Generate_InstantiateAsmJs()
1551 __ CallRuntime(Runtime::kInstantiateAsmJs, 4); in Generate_InstantiateAsmJs()
1553 __ JumpIfSmi(x0, &failed); in Generate_InstantiateAsmJs()
1555 __ Drop(2); in Generate_InstantiateAsmJs()
1556 __ pop(x4); in Generate_InstantiateAsmJs()
1557 __ SmiUntag(x4); in Generate_InstantiateAsmJs()
1560 __ add(x4, x4, Operand(1)); in Generate_InstantiateAsmJs()
1561 __ Drop(x4); in Generate_InstantiateAsmJs()
1562 __ Ret(); in Generate_InstantiateAsmJs()
1564 __ bind(&failed); in Generate_InstantiateAsmJs()
1566 __ Pop(x3, x1, x0); in Generate_InstantiateAsmJs()
1567 __ SmiUntag(x0); in Generate_InstantiateAsmJs()
1590 __ Push(x0, x1, x3, fp, lr); in GenerateMakeCodeYoungAgainCommon()
1591 __ Mov(x1, ExternalReference::isolate_address(masm->isolate())); in GenerateMakeCodeYoungAgainCommon()
1592 __ CallCFunction( in GenerateMakeCodeYoungAgainCommon()
1594 __ Pop(lr, fp, x3, x1, x0); in GenerateMakeCodeYoungAgainCommon()
1599 __ Br(x0); in GenerateMakeCodeYoungAgainCommon()
1630 __ Push(x0, x1, x3, fp, lr); in CODE_AGE_LIST()
1631 __ Mov(x1, ExternalReference::isolate_address(masm->isolate())); in CODE_AGE_LIST()
1632 __ CallCFunction( in CODE_AGE_LIST()
1635 __ Pop(lr, fp, x3, x1, x0); in CODE_AGE_LIST()
1638 __ EmitFrameSetupForCodeAgePatching(masm); in CODE_AGE_LIST()
1642 __ Add(x0, x0, kNoCodeAgeSequenceLength); in CODE_AGE_LIST()
1643 __ Br(x0); in CODE_AGE_LIST()
1665 __ PushXRegList(kSafepointSavedRegisters); in Generate_NotifyStubFailureHelper()
1667 __ CallRuntime(Runtime::kNotifyStubFailure, save_doubles); in Generate_NotifyStubFailureHelper()
1668 __ PopXRegList(kSafepointSavedRegisters); in Generate_NotifyStubFailureHelper()
1672 __ Drop(1); in Generate_NotifyStubFailureHelper()
1676 __ Br(lr); in Generate_NotifyStubFailureHelper()
1692 __ Mov(x0, Smi::FromInt(static_cast<int>(type))); in Generate_NotifyDeoptimizedHelper()
1693 __ Push(x0); in Generate_NotifyDeoptimizedHelper()
1694 __ CallRuntime(Runtime::kNotifyDeoptimized); in Generate_NotifyDeoptimizedHelper()
1699 __ Peek(state, 0); in Generate_NotifyDeoptimizedHelper()
1700 __ SmiUntag(state); in Generate_NotifyDeoptimizedHelper()
1704 __ CompareAndBranch(state, in Generate_NotifyDeoptimizedHelper()
1707 __ Drop(1); // Remove state. in Generate_NotifyDeoptimizedHelper()
1708 __ Ret(); in Generate_NotifyDeoptimizedHelper()
1710 __ Bind(&with_tos_register); in Generate_NotifyDeoptimizedHelper()
1713 __ Peek(x0, kPointerSize); in Generate_NotifyDeoptimizedHelper()
1714 __ CompareAndBranch(state, in Generate_NotifyDeoptimizedHelper()
1717 __ Drop(2); // Remove state and TOS. in Generate_NotifyDeoptimizedHelper()
1718 __ Ret(); in Generate_NotifyDeoptimizedHelper()
1720 __ Bind(&unknown_state); in Generate_NotifyDeoptimizedHelper()
1721 __ Abort(kInvalidFullCodegenState); in Generate_NotifyDeoptimizedHelper()
1746 __ Ldr(signature, FieldMemOperand(function_template_info, in CompatibleReceiverCheck()
1748 __ CompareRoot(signature, Heap::kUndefinedValueRootIndex); in CompatibleReceiverCheck()
1750 __ B(eq, &receiver_check_passed); in CompatibleReceiverCheck()
1753 __ Ldr(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
1755 __ Bind(&prototype_loop_start); in CompatibleReceiverCheck()
1758 __ GetMapConstructor(constructor, map, x16, x16); in CompatibleReceiverCheck()
1759 __ cmp(x16, Operand(JS_FUNCTION_TYPE)); in CompatibleReceiverCheck()
1761 __ B(ne, &next_prototype); in CompatibleReceiverCheck()
1763 __ Ldr(type, in CompatibleReceiverCheck()
1765 __ Ldr(type, FieldMemOperand(type, SharedFunctionInfo::kFunctionDataOffset)); in CompatibleReceiverCheck()
1769 __ Bind(&function_template_loop); in CompatibleReceiverCheck()
1772 __ Cmp(signature, type); in CompatibleReceiverCheck()
1773 __ B(eq, &receiver_check_passed); in CompatibleReceiverCheck()
1777 __ JumpIfSmi(type, &next_prototype); in CompatibleReceiverCheck()
1778 __ CompareObjectType(type, x16, x17, FUNCTION_TEMPLATE_INFO_TYPE); in CompatibleReceiverCheck()
1779 __ B(ne, &next_prototype); in CompatibleReceiverCheck()
1782 __ Ldr(type, in CompatibleReceiverCheck()
1784 __ B(&function_template_loop); in CompatibleReceiverCheck()
1787 __ Bind(&next_prototype); in CompatibleReceiverCheck()
1788 __ Ldr(x16, FieldMemOperand(map, Map::kBitField3Offset)); in CompatibleReceiverCheck()
1789 __ Tst(x16, Operand(Map::HasHiddenPrototype::kMask)); in CompatibleReceiverCheck()
1790 __ B(eq, receiver_check_failed); in CompatibleReceiverCheck()
1791 __ Ldr(receiver, FieldMemOperand(map, Map::kPrototypeOffset)); in CompatibleReceiverCheck()
1792 __ Ldr(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
1794 __ B(&prototype_loop_start); in CompatibleReceiverCheck()
1796 __ Bind(&receiver_check_passed); in CompatibleReceiverCheck()
1811 __ Ldr(x3, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); in Generate_HandleFastApiCall()
1812 __ Ldr(x3, FieldMemOperand(x3, SharedFunctionInfo::kFunctionDataOffset)); in Generate_HandleFastApiCall()
1816 __ Ldr(x2, MemOperand(jssp, x0, LSL, kPointerSizeLog2)); in Generate_HandleFastApiCall()
1821 __ Ldr(x4, FieldMemOperand(x3, FunctionTemplateInfo::kCallCodeOffset)); in Generate_HandleFastApiCall()
1822 __ Ldr(x4, FieldMemOperand(x4, CallHandlerInfo::kFastHandlerOffset)); in Generate_HandleFastApiCall()
1823 __ Add(x4, x4, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_HandleFastApiCall()
1824 __ Jump(x4); in Generate_HandleFastApiCall()
1827 __ Bind(&receiver_check_failed); in Generate_HandleFastApiCall()
1829 __ add(x0, x0, Operand(1)); in Generate_HandleFastApiCall()
1830 __ Drop(x0); in Generate_HandleFastApiCall()
1831 __ TailCallRuntime(Runtime::kThrowIllegalInvocation); in Generate_HandleFastApiCall()
1838 __ Ldr(x0, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in Generate_OnStackReplacementHelper()
1839 __ Ldr(x0, MemOperand(x0, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
1841 __ Ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
1847 __ Push(x0); in Generate_OnStackReplacementHelper()
1848 __ CallRuntime(Runtime::kCompileForOnStackReplacement); in Generate_OnStackReplacementHelper()
1853 __ CompareAndBranch(x0, Smi::kZero, ne, &skip); in Generate_OnStackReplacementHelper()
1854 __ Ret(); in Generate_OnStackReplacementHelper()
1856 __ Bind(&skip); in Generate_OnStackReplacementHelper()
1861 __ LeaveFrame(StackFrame::STUB); in Generate_OnStackReplacementHelper()
1866 __ Ldr(x1, MemOperand(x0, Code::kDeoptimizationDataOffset - kHeapObjectTag)); in Generate_OnStackReplacementHelper()
1870 __ Ldrsw(w1, UntagSmiFieldMemOperand( in Generate_OnStackReplacementHelper()
1876 __ Add(x0, x0, x1); in Generate_OnStackReplacementHelper()
1877 __ Add(lr, x0, Code::kHeaderSize - kHeapObjectTag); in Generate_OnStackReplacementHelper()
1880 __ Ret(); in Generate_OnStackReplacementHelper()
1908 __ LoadRoot(undefined_value, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1909 __ LoadRoot(null_value, Heap::kNullValueRootIndex); in Generate_FunctionPrototypeApply()
1917 __ Claim(2); in Generate_FunctionPrototypeApply()
1918 __ Drop(argc); in Generate_FunctionPrototypeApply()
1926 __ Cmp(argc, 1); in Generate_FunctionPrototypeApply()
1927 __ Pop(arg_array, this_arg); // Overwrites argc. in Generate_FunctionPrototypeApply()
1928 __ CmovX(this_arg, undefined_value, lo); // undefined if argc == 0. in Generate_FunctionPrototypeApply()
1929 __ CmovX(arg_array, undefined_value, ls); // undefined if argc <= 1. in Generate_FunctionPrototypeApply()
1931 __ Peek(receiver, 0); in Generate_FunctionPrototypeApply()
1932 __ Poke(this_arg, 0); in Generate_FunctionPrototypeApply()
1944 __ JumpIfSmi(receiver, &receiver_not_callable); in Generate_FunctionPrototypeApply()
1945 __ Ldr(x10, FieldMemOperand(receiver, HeapObject::kMapOffset)); in Generate_FunctionPrototypeApply()
1946 __ Ldrb(w10, FieldMemOperand(x10, Map::kBitFieldOffset)); in Generate_FunctionPrototypeApply()
1947 __ TestAndBranchIfAllClear(x10, 1 << Map::kIsCallable, in Generate_FunctionPrototypeApply()
1952 __ Cmp(arg_array, null_value); in Generate_FunctionPrototypeApply()
1953 __ Ccmp(arg_array, undefined_value, ZFlag, ne); in Generate_FunctionPrototypeApply()
1954 __ B(eq, &no_arguments); in Generate_FunctionPrototypeApply()
1959 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1963 __ Bind(&no_arguments); in Generate_FunctionPrototypeApply()
1965 __ Mov(x0, 0); in Generate_FunctionPrototypeApply()
1967 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1971 __ Bind(&receiver_not_callable); in Generate_FunctionPrototypeApply()
1973 __ Poke(receiver, 0); in Generate_FunctionPrototypeApply()
1974 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_FunctionPrototypeApply()
1990 __ Cbnz(argc, &done); in Generate_FunctionPrototypeCall()
1991 __ LoadRoot(scratch1, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeCall()
1992 __ Push(scratch1); in Generate_FunctionPrototypeCall()
1993 __ Mov(argc, 1); in Generate_FunctionPrototypeCall()
1994 __ Bind(&done); in Generate_FunctionPrototypeCall()
1998 __ Peek(function, Operand(argc, LSL, kXRegSizeLog2)); in Generate_FunctionPrototypeCall()
2006 __ Add(scratch2, jssp, Operand(argc, LSL, kPointerSizeLog2)); in Generate_FunctionPrototypeCall()
2007 __ Sub(scratch1, scratch2, kPointerSize); in Generate_FunctionPrototypeCall()
2009 __ Bind(&loop); in Generate_FunctionPrototypeCall()
2010 __ Ldr(x12, MemOperand(scratch1, -kPointerSize, PostIndex)); in Generate_FunctionPrototypeCall()
2011 __ Str(x12, MemOperand(scratch2, -kPointerSize, PostIndex)); in Generate_FunctionPrototypeCall()
2012 __ Cmp(scratch1, jssp); in Generate_FunctionPrototypeCall()
2013 __ B(ge, &loop); in Generate_FunctionPrototypeCall()
2016 __ Sub(argc, argc, 1); in Generate_FunctionPrototypeCall()
2017 __ Drop(1); in Generate_FunctionPrototypeCall()
2021 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeCall()
2040 __ LoadRoot(undefined_value, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
2048 __ Claim(3); in Generate_ReflectApply()
2049 __ Drop(argc); in Generate_ReflectApply()
2058 __ Adds(x10, argc, 0); // Preserve argc, and set the Z flag if it is zero. in Generate_ReflectApply()
2059 __ Pop(arguments_list, this_argument, target); // Overwrites argc. in Generate_ReflectApply()
2060 __ CmovX(target, undefined_value, eq); // undefined if argc == 0. in Generate_ReflectApply()
2061 __ Cmp(x10, 2); in Generate_ReflectApply()
2062 __ CmovX(this_argument, undefined_value, lo); // undefined if argc <= 1. in Generate_ReflectApply()
2063 __ CmovX(arguments_list, undefined_value, ls); // undefined if argc <= 2. in Generate_ReflectApply()
2065 __ Poke(this_argument, 0); // Overwrite receiver. in Generate_ReflectApply()
2076 __ JumpIfSmi(target, &target_not_callable); in Generate_ReflectApply()
2077 __ Ldr(x10, FieldMemOperand(target, HeapObject::kMapOffset)); in Generate_ReflectApply()
2078 __ Ldr(x10, FieldMemOperand(x10, Map::kBitFieldOffset)); in Generate_ReflectApply()
2079 __ TestAndBranchIfAllClear(x10, 1 << Map::kIsCallable, &target_not_callable); in Generate_ReflectApply()
2084 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectApply()
2087 __ Bind(&target_not_callable); in Generate_ReflectApply()
2089 __ Poke(target, 0); in Generate_ReflectApply()
2090 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_ReflectApply()
2110 __ LoadRoot(undefined_value, Heap::kUndefinedValueRootIndex); in Generate_ReflectConstruct()
2119 __ Claim(3); in Generate_ReflectConstruct()
2120 __ Drop(argc); in Generate_ReflectConstruct()
2129 __ Adds(x10, argc, 0); // Preserve argc, and set the Z flag if it is zero. in Generate_ReflectConstruct()
2130 __ Pop(new_target, arguments_list, target); // Overwrites argc. in Generate_ReflectConstruct()
2131 __ CmovX(target, undefined_value, eq); // undefined if argc == 0. in Generate_ReflectConstruct()
2132 __ Cmp(x10, 2); in Generate_ReflectConstruct()
2133 __ CmovX(arguments_list, undefined_value, lo); // undefined if argc <= 1. in Generate_ReflectConstruct()
2134 __ CmovX(new_target, target, ls); // target if argc <= 2. in Generate_ReflectConstruct()
2136 __ Poke(undefined_value, 0); // Overwrite receiver. in Generate_ReflectConstruct()
2148 __ JumpIfSmi(target, &target_not_constructor); in Generate_ReflectConstruct()
2149 __ Ldr(x10, FieldMemOperand(target, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
2150 __ Ldrb(x10, FieldMemOperand(x10, Map::kBitFieldOffset)); in Generate_ReflectConstruct()
2151 __ TestAndBranchIfAllClear(x10, 1 << Map::kIsConstructor, in Generate_ReflectConstruct()
2156 __ JumpIfSmi(new_target, &new_target_not_constructor); in Generate_ReflectConstruct()
2157 __ Ldr(x10, FieldMemOperand(new_target, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
2158 __ Ldrb(x10, FieldMemOperand(x10, Map::kBitFieldOffset)); in Generate_ReflectConstruct()
2159 __ TestAndBranchIfAllClear(x10, 1 << Map::kIsConstructor, in Generate_ReflectConstruct()
2163 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectConstruct()
2166 __ Bind(&target_not_constructor); in Generate_ReflectConstruct()
2168 __ Poke(target, 0); in Generate_ReflectConstruct()
2169 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
2173 __ Bind(&new_target_not_constructor); in Generate_ReflectConstruct()
2175 __ Poke(new_target, 0); in Generate_ReflectConstruct()
2176 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
2181 __ SmiTag(x10, x0); in EnterArgumentsAdaptorFrame()
2182 __ Mov(x11, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); in EnterArgumentsAdaptorFrame()
2183 __ Push(lr, fp); in EnterArgumentsAdaptorFrame()
2184 __ Push(x11, x1, x10); in EnterArgumentsAdaptorFrame()
2185 __ Add(fp, jssp, in EnterArgumentsAdaptorFrame()
2195 __ Ldr(x10, MemOperand(fp, -(StandardFrameConstants::kFixedFrameSizeFromFp + in LeaveArgumentsAdaptorFrame()
2197 __ Mov(jssp, fp); in LeaveArgumentsAdaptorFrame()
2198 __ Pop(fp, lr); in LeaveArgumentsAdaptorFrame()
2199 __ DropBySMI(x10, kXRegSize); in LeaveArgumentsAdaptorFrame()
2200 __ Drop(1); in LeaveArgumentsAdaptorFrame()
2222 __ JumpIfSmi(arguments_list, &create_runtime); in Generate_Apply()
2226 __ Ldr(native_context, NativeContextMemOperand()); in Generate_Apply()
2230 __ Ldr(arguments_list_map, in Generate_Apply()
2234 __ Ldr(x10, ContextMemOperand(native_context, in Generate_Apply()
2236 __ Ldr(x11, ContextMemOperand(native_context, in Generate_Apply()
2238 __ Cmp(arguments_list_map, x10); in Generate_Apply()
2239 __ Ccmp(arguments_list_map, x11, ZFlag, ne); in Generate_Apply()
2240 __ B(eq, &create_arguments); in Generate_Apply()
2243 __ CompareInstanceType(arguments_list_map, native_context, JS_ARRAY_TYPE); in Generate_Apply()
2244 __ B(eq, &create_array); in Generate_Apply()
2247 __ Bind(&create_runtime); in Generate_Apply()
2250 __ Push(target, new_target, arguments_list); in Generate_Apply()
2251 __ CallRuntime(Runtime::kCreateListFromArrayLike); in Generate_Apply()
2252 __ Pop(new_target, target); in Generate_Apply()
2253 __ Ldrsw(len, UntagSmiFieldMemOperand(arguments_list, in Generate_Apply()
2256 __ B(&done_create); in Generate_Apply()
2259 __ Bind(&create_arguments); in Generate_Apply()
2260 __ Ldrsw(len, UntagSmiFieldMemOperand(arguments_list, in Generate_Apply()
2262 __ Ldr(x10, FieldMemOperand(arguments_list, JSObject::kElementsOffset)); in Generate_Apply()
2263 __ Ldrsw(x11, UntagSmiFieldMemOperand(x10, FixedArray::kLengthOffset)); in Generate_Apply()
2264 __ CompareAndBranch(len, x11, ne, &create_runtime); in Generate_Apply()
2265 __ Mov(args, x10); in Generate_Apply()
2266 __ B(&done_create); in Generate_Apply()
2269 __ Bind(&create_array); in Generate_Apply()
2270 __ Ldr(x10, FieldMemOperand(arguments_list_map, Map::kBitField2Offset)); in Generate_Apply()
2271 __ DecodeField<Map::ElementsKindBits>(x10); in Generate_Apply()
2275 __ TestAndBranchIfAnySet(x10, ~FAST_ELEMENTS, &create_runtime); in Generate_Apply()
2276 __ Ldrsw(len, in Generate_Apply()
2278 __ Ldr(args, FieldMemOperand(arguments_list, JSArray::kElementsOffset)); in Generate_Apply()
2280 __ Bind(&done_create); in Generate_Apply()
2288 __ LoadRoot(x10, Heap::kRealStackLimitRootIndex); in Generate_Apply()
2291 __ Sub(x10, masm->StackPointer(), x10); in Generate_Apply()
2293 __ Cmp(x10, Operand(len, LSL, kPointerSizeLog2)); in Generate_Apply()
2294 __ B(gt, &done); // Signed comparison. in Generate_Apply()
2295 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_Apply()
2296 __ Bind(&done); in Generate_Apply()
2312 __ Add(src, args, FixedArray::kHeaderSize - kHeapObjectTag); in Generate_Apply()
2313 __ Mov(x0, len); // The 'len' argument for Call() or Construct(). in Generate_Apply()
2314 __ Cbz(len, &done); in Generate_Apply()
2315 __ Claim(len); in Generate_Apply()
2316 __ Bind(&loop); in Generate_Apply()
2317 __ Sub(len, len, 1); in Generate_Apply()
2318 __ Ldr(x10, MemOperand(src, kPointerSize, PostIndex)); in Generate_Apply()
2319 __ Poke(x10, Operand(len, LSL, kPointerSizeLog2)); in Generate_Apply()
2320 __ Cbnz(len, &loop); in Generate_Apply()
2321 __ Bind(&done); in Generate_Apply()
2337 __ CompareRoot(new_target, 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 __ Ldrb(scratch1, MemOperand(scratch1)); in PrepareForTailCall()
2385 __ Cmp(scratch1, Operand(0)); in PrepareForTailCall()
2386 __ B(eq, &done); in PrepareForTailCall()
2391 __ Ldr(scratch3, in PrepareForTailCall()
2393 __ Cmp(scratch3, Operand(Smi::FromInt(StackFrame::STUB))); in PrepareForTailCall()
2394 __ B(ne, &no_interpreter_frame); in PrepareForTailCall()
2395 __ Ldr(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2396 __ bind(&no_interpreter_frame); in PrepareForTailCall()
2402 __ Ldr(scratch2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2403 __ Ldr(scratch3, in PrepareForTailCall()
2405 __ Cmp(scratch3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); in PrepareForTailCall()
2406 __ B(ne, &no_arguments_adaptor); in PrepareForTailCall()
2409 __ mov(fp, scratch2); in PrepareForTailCall()
2410 __ Ldr(caller_args_count_reg, in PrepareForTailCall()
2412 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2413 __ B(&formal_parameter_count_loaded); in PrepareForTailCall()
2415 __ bind(&no_arguments_adaptor); in PrepareForTailCall()
2417 __ Ldr(scratch1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); in PrepareForTailCall()
2418 __ Ldr(scratch1, in PrepareForTailCall()
2420 __ Ldrsw(caller_args_count_reg, in PrepareForTailCall()
2423 __ bind(&formal_parameter_count_loaded); in PrepareForTailCall()
2426 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, in PrepareForTailCall()
2428 __ bind(&done); in PrepareForTailCall()
2441 __ AssertFunction(x1); in Generate_CallFunction()
2446 __ Ldr(x2, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2447 __ Ldr(w3, FieldMemOperand(x2, SharedFunctionInfo::kCompilerHintsOffset)); in Generate_CallFunction()
2448 __ TestAndBranchIfAnySet(w3, FunctionKind::kClassConstructor in Generate_CallFunction()
2455 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); in Generate_CallFunction()
2458 __ TestAndBranchIfAnySet(w3, in Generate_CallFunction()
2472 __ LoadGlobalProxy(x3); in Generate_CallFunction()
2475 __ Peek(x3, Operand(x0, LSL, kXRegSizeLog2)); in Generate_CallFunction()
2476 __ JumpIfSmi(x3, &convert_to_object); in Generate_CallFunction()
2478 __ CompareObjectType(x3, x4, x4, FIRST_JS_RECEIVER_TYPE); in Generate_CallFunction()
2479 __ B(hs, &done_convert); in Generate_CallFunction()
2482 __ JumpIfRoot(x3, Heap::kUndefinedValueRootIndex, in Generate_CallFunction()
2484 __ JumpIfNotRoot(x3, Heap::kNullValueRootIndex, &convert_to_object); in Generate_CallFunction()
2485 __ Bind(&convert_global_proxy); in Generate_CallFunction()
2488 __ LoadGlobalProxy(x3); in Generate_CallFunction()
2490 __ B(&convert_receiver); in Generate_CallFunction()
2492 __ Bind(&convert_to_object); in Generate_CallFunction()
2498 __ SmiTag(x0); in Generate_CallFunction()
2499 __ Push(x0, x1); in Generate_CallFunction()
2500 __ Mov(x0, x3); in Generate_CallFunction()
2501 __ Push(cp); in Generate_CallFunction()
2502 __ Call(masm->isolate()->builtins()->ToObject(), in Generate_CallFunction()
2504 __ Pop(cp); in Generate_CallFunction()
2505 __ Mov(x3, x0); in Generate_CallFunction()
2506 __ Pop(x1, x0); in Generate_CallFunction()
2507 __ SmiUntag(x0); in Generate_CallFunction()
2509 __ Ldr(x2, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2510 __ Bind(&convert_receiver); in Generate_CallFunction()
2512 __ Poke(x3, Operand(x0, LSL, kXRegSizeLog2)); in Generate_CallFunction()
2514 __ Bind(&done_convert); in Generate_CallFunction()
2527 __ Ldrsw( in Generate_CallFunction()
2531 __ InvokeFunctionCode(x1, no_reg, expected, actual, JUMP_FUNCTION, in Generate_CallFunction()
2535 __ bind(&class_constructor); in Generate_CallFunction()
2538 __ Push(x1); in Generate_CallFunction()
2539 __ CallRuntime(Runtime::kThrowConstructorNonCallableError); in Generate_CallFunction()
2554 __ Ldr(x2, FieldMemOperand(x1, JSBoundFunction::kBoundArgumentsOffset)); in Generate_PushBoundArguments()
2555 __ Ldrsw(x4, UntagSmiFieldMemOperand(x2, FixedArray::kLengthOffset)); in Generate_PushBoundArguments()
2556 __ Cmp(x4, 0); in Generate_PushBoundArguments()
2557 __ B(eq, &no_bound_arguments); in Generate_PushBoundArguments()
2570 __ Claim(x4); in Generate_PushBoundArguments()
2574 __ CompareRoot(jssp, Heap::kRealStackLimitRootIndex); in Generate_PushBoundArguments()
2575 __ B(gt, &done); // Signed comparison. in Generate_PushBoundArguments()
2577 __ Drop(x4); in Generate_PushBoundArguments()
2580 __ EnterFrame(StackFrame::INTERNAL); in Generate_PushBoundArguments()
2581 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_PushBoundArguments()
2583 __ Bind(&done); in Generate_PushBoundArguments()
2589 __ Mov(x5, 0); in Generate_PushBoundArguments()
2590 __ Bind(&loop); in Generate_PushBoundArguments()
2591 __ Cmp(x5, x0); in Generate_PushBoundArguments()
2592 __ B(gt, &done_loop); in Generate_PushBoundArguments()
2593 __ Peek(x10, Operand(x4, LSL, kPointerSizeLog2)); in Generate_PushBoundArguments()
2594 __ Poke(x10, Operand(x5, LSL, kPointerSizeLog2)); in Generate_PushBoundArguments()
2595 __ Add(x4, x4, 1); in Generate_PushBoundArguments()
2596 __ Add(x5, x5, 1); in Generate_PushBoundArguments()
2597 __ B(&loop); in Generate_PushBoundArguments()
2598 __ Bind(&done_loop); in Generate_PushBoundArguments()
2604 __ Ldrsw(x4, UntagSmiFieldMemOperand(x2, FixedArray::kLengthOffset)); in Generate_PushBoundArguments()
2605 __ Add(x2, x2, FixedArray::kHeaderSize - kHeapObjectTag); in Generate_PushBoundArguments()
2606 __ Bind(&loop); in Generate_PushBoundArguments()
2607 __ Sub(x4, x4, 1); in Generate_PushBoundArguments()
2608 __ Ldr(x10, MemOperand(x2, x4, LSL, kPointerSizeLog2)); in Generate_PushBoundArguments()
2609 __ Poke(x10, Operand(x0, LSL, kPointerSizeLog2)); in Generate_PushBoundArguments()
2610 __ Add(x0, x0, 1); in Generate_PushBoundArguments()
2611 __ Cmp(x4, 0); in Generate_PushBoundArguments()
2612 __ B(gt, &loop); in Generate_PushBoundArguments()
2615 __ Bind(&no_bound_arguments); in Generate_PushBoundArguments()
2627 __ AssertBoundFunction(x1); in Generate_CallBoundFunctionImpl()
2634 __ Ldr(x10, FieldMemOperand(x1, JSBoundFunction::kBoundThisOffset)); in Generate_CallBoundFunctionImpl()
2635 __ Poke(x10, Operand(x0, LSL, kPointerSizeLog2)); in Generate_CallBoundFunctionImpl()
2641 __ Ldr(x1, FieldMemOperand(x1, JSBoundFunction::kBoundTargetFunctionOffset)); in Generate_CallBoundFunctionImpl()
2642 __ Mov(x10, in Generate_CallBoundFunctionImpl()
2644 __ Ldr(x11, MemOperand(x10)); in Generate_CallBoundFunctionImpl()
2645 __ Add(x12, x11, Code::kHeaderSize - kHeapObjectTag); in Generate_CallBoundFunctionImpl()
2646 __ Br(x12); in Generate_CallBoundFunctionImpl()
2658 __ JumpIfSmi(x1, &non_callable); in Generate_Call()
2659 __ Bind(&non_smi); in Generate_Call()
2660 __ CompareObjectType(x1, x4, x5, JS_FUNCTION_TYPE); in Generate_Call()
2661 __ Jump(masm->isolate()->builtins()->CallFunction(mode, tail_call_mode), in Generate_Call()
2663 __ Cmp(x5, JS_BOUND_FUNCTION_TYPE); in Generate_Call()
2664 __ Jump(masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), in Generate_Call()
2668 __ Ldrb(x4, FieldMemOperand(x4, Map::kBitFieldOffset)); in Generate_Call()
2669 __ TestAndBranchIfAllClear(x4, 1 << Map::kIsCallable, &non_callable); in Generate_Call()
2671 __ Cmp(x5, JS_PROXY_TYPE); in Generate_Call()
2672 __ B(ne, &non_function); in Generate_Call()
2680 __ Push(x1); in Generate_Call()
2683 __ Add(x0, x0, Operand(2)); in Generate_Call()
2685 __ JumpToExternalReference( in Generate_Call()
2690 __ Bind(&non_function); in Generate_Call()
2692 __ Poke(x1, Operand(x0, LSL, kXRegSizeLog2)); in Generate_Call()
2694 __ LoadNativeContextSlot(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, x1); in Generate_Call()
2695 __ Jump(masm->isolate()->builtins()->CallFunction( in Generate_Call()
2700 __ bind(&non_callable); in Generate_Call()
2703 __ Push(x1); in Generate_Call()
2704 __ CallRuntime(Runtime::kThrowCalledNonCallable); in Generate_Call()
2715 __ AssertFunction(x1); in Generate_ConstructFunction()
2719 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); in Generate_ConstructFunction()
2723 __ Ldr(x4, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); in Generate_ConstructFunction()
2724 __ Ldr(x4, FieldMemOperand(x4, SharedFunctionInfo::kConstructStubOffset)); in Generate_ConstructFunction()
2725 __ Add(x4, x4, Code::kHeaderSize - kHeapObjectTag); in Generate_ConstructFunction()
2726 __ Br(x4); in Generate_ConstructFunction()
2736 __ AssertBoundFunction(x1); in Generate_ConstructBoundFunction()
2744 __ Cmp(x1, x3); in Generate_ConstructBoundFunction()
2745 __ B(ne, &done); in Generate_ConstructBoundFunction()
2746 __ Ldr(x3, in Generate_ConstructBoundFunction()
2748 __ Bind(&done); in Generate_ConstructBoundFunction()
2752 __ Ldr(x1, FieldMemOperand(x1, JSBoundFunction::kBoundTargetFunctionOffset)); in Generate_ConstructBoundFunction()
2753 __ Mov(x10, ExternalReference(Builtins::kConstruct, masm->isolate())); in Generate_ConstructBoundFunction()
2754 __ Ldr(x11, MemOperand(x10)); in Generate_ConstructBoundFunction()
2755 __ Add(x12, x11, Code::kHeaderSize - kHeapObjectTag); in Generate_ConstructBoundFunction()
2756 __ Br(x12); in Generate_ConstructBoundFunction()
2769 __ Push(x1); in Generate_ConstructProxy()
2770 __ Push(x3); in Generate_ConstructProxy()
2772 __ Add(x0, x0, 3); in Generate_ConstructProxy()
2774 __ JumpToExternalReference( in Generate_ConstructProxy()
2789 __ JumpIfSmi(x1, &non_constructor); in Generate_Construct()
2792 __ CompareObjectType(x1, x4, x5, JS_FUNCTION_TYPE); in Generate_Construct()
2793 __ Jump(masm->isolate()->builtins()->ConstructFunction(), in Generate_Construct()
2797 __ Ldrb(x2, FieldMemOperand(x4, Map::kBitFieldOffset)); in Generate_Construct()
2798 __ TestAndBranchIfAllClear(x2, 1 << Map::kIsConstructor, &non_constructor); in Generate_Construct()
2802 __ Cmp(x5, JS_BOUND_FUNCTION_TYPE); in Generate_Construct()
2803 __ Jump(masm->isolate()->builtins()->ConstructBoundFunction(), in Generate_Construct()
2807 __ Cmp(x5, JS_PROXY_TYPE); in Generate_Construct()
2808 __ Jump(masm->isolate()->builtins()->ConstructProxy(), RelocInfo::CODE_TARGET, in Generate_Construct()
2814 __ Poke(x1, Operand(x0, LSL, kXRegSizeLog2)); in Generate_Construct()
2816 __ LoadNativeContextSlot(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, x1); in Generate_Construct()
2817 __ Jump(masm->isolate()->builtins()->CallFunction(), in Generate_Construct()
2823 __ bind(&non_constructor); in Generate_Construct()
2824 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), in Generate_Construct()
2835 __ SmiTag(x1); in Generate_AllocateInNewSpace()
2836 __ Push(x1); in Generate_AllocateInNewSpace()
2837 __ Move(cp, Smi::kZero); in Generate_AllocateInNewSpace()
2838 __ TailCallRuntime(Runtime::kAllocateInNewSpace); in Generate_AllocateInNewSpace()
2848 __ SmiTag(x1); in Generate_AllocateInOldSpace()
2849 __ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); in Generate_AllocateInOldSpace()
2850 __ Push(x1, x2); in Generate_AllocateInOldSpace()
2851 __ Move(cp, Smi::kZero); in Generate_AllocateInOldSpace()
2852 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); in Generate_AllocateInOldSpace()
2863 __ Push(x1); in Generate_Abort()
2864 __ Move(cp, Smi::kZero); in Generate_Abort()
2865 __ TailCallRuntime(Runtime::kAbort); in Generate_Abort()
2885 __ Cmp(argc_actual, argc_expected); in Generate_ArgumentsAdaptorTrampoline()
2886 __ B(lt, &too_few); in Generate_ArgumentsAdaptorTrampoline()
2887 __ Cmp(argc_expected, SharedFunctionInfo::kDontAdaptArgumentsSentinel); in Generate_ArgumentsAdaptorTrampoline()
2888 __ B(eq, &dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
2899 __ Lsl(scratch2, argc_expected, kPointerSizeLog2); in Generate_ArgumentsAdaptorTrampoline()
2902 __ Add(copy_start, fp, 3 * kPointerSize); in Generate_ArgumentsAdaptorTrampoline()
2903 __ Add(copy_start, copy_start, Operand(argc_actual, LSL, kPointerSizeLog2)); in Generate_ArgumentsAdaptorTrampoline()
2904 __ Sub(copy_end, copy_start, scratch2); in Generate_ArgumentsAdaptorTrampoline()
2905 __ Sub(copy_end, copy_end, kPointerSize); in Generate_ArgumentsAdaptorTrampoline()
2906 __ Mov(copy_to, jssp); in Generate_ArgumentsAdaptorTrampoline()
2911 __ Add(scratch1, scratch2, 2 * kPointerSize); in Generate_ArgumentsAdaptorTrampoline()
2912 __ Claim(scratch1, 1); in Generate_ArgumentsAdaptorTrampoline()
2916 __ Bind(&copy_2_by_2); in Generate_ArgumentsAdaptorTrampoline()
2917 __ Ldp(scratch1, scratch2, in Generate_ArgumentsAdaptorTrampoline()
2919 __ Stp(scratch1, scratch2, in Generate_ArgumentsAdaptorTrampoline()
2921 __ Cmp(copy_start, copy_end); in Generate_ArgumentsAdaptorTrampoline()
2922 __ B(hi, &copy_2_by_2); in Generate_ArgumentsAdaptorTrampoline()
2925 __ Drop(1); in Generate_ArgumentsAdaptorTrampoline()
2927 __ B(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2931 __ Bind(&too_few); in Generate_ArgumentsAdaptorTrampoline()
2941 __ Lsl(scratch2, argc_expected, kPointerSizeLog2); in Generate_ArgumentsAdaptorTrampoline()
2942 __ Lsl(argc_actual, argc_actual, kPointerSizeLog2); in Generate_ArgumentsAdaptorTrampoline()
2945 __ Add(copy_from, fp, 3 * kPointerSize); in Generate_ArgumentsAdaptorTrampoline()
2946 __ Add(copy_from, copy_from, argc_actual); in Generate_ArgumentsAdaptorTrampoline()
2947 __ Mov(copy_to, jssp); in Generate_ArgumentsAdaptorTrampoline()
2948 __ Sub(copy_end, copy_to, 1 * kPointerSize); // Adjust for the receiver. in Generate_ArgumentsAdaptorTrampoline()
2949 __ Sub(copy_end, copy_end, argc_actual); in Generate_ArgumentsAdaptorTrampoline()
2954 __ Add(scratch1, scratch2, 2 * kPointerSize); in Generate_ArgumentsAdaptorTrampoline()
2955 __ Claim(scratch1, 1); in Generate_ArgumentsAdaptorTrampoline()
2959 __ Bind(&copy_2_by_2); in Generate_ArgumentsAdaptorTrampoline()
2960 __ Ldp(scratch1, scratch2, in Generate_ArgumentsAdaptorTrampoline()
2962 __ Stp(scratch1, scratch2, in Generate_ArgumentsAdaptorTrampoline()
2964 __ Cmp(copy_to, copy_end); in Generate_ArgumentsAdaptorTrampoline()
2965 __ B(hi, &copy_2_by_2); in Generate_ArgumentsAdaptorTrampoline()
2967 __ Mov(copy_to, copy_end); in Generate_ArgumentsAdaptorTrampoline()
2970 __ LoadRoot(scratch1, Heap::kUndefinedValueRootIndex); in Generate_ArgumentsAdaptorTrampoline()
2971 __ Add(copy_end, jssp, kPointerSize); in Generate_ArgumentsAdaptorTrampoline()
2974 __ Bind(&fill); in Generate_ArgumentsAdaptorTrampoline()
2975 __ Stp(scratch1, scratch1, in Generate_ArgumentsAdaptorTrampoline()
2977 __ Cmp(copy_to, copy_end); in Generate_ArgumentsAdaptorTrampoline()
2978 __ B(hi, &fill); in Generate_ArgumentsAdaptorTrampoline()
2981 __ Drop(1); in Generate_ArgumentsAdaptorTrampoline()
2985 __ Bind(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2986 __ Mov(argc_actual, argc_expected); in Generate_ArgumentsAdaptorTrampoline()
2990 __ Ldr(code_entry, FieldMemOperand(function, JSFunction::kCodeEntryOffset)); in Generate_ArgumentsAdaptorTrampoline()
2991 __ Call(code_entry); in Generate_ArgumentsAdaptorTrampoline()
2998 __ Ret(); in Generate_ArgumentsAdaptorTrampoline()
3001 __ Bind(&dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
3002 __ Ldr(code_entry, FieldMemOperand(function, JSFunction::kCodeEntryOffset)); in Generate_ArgumentsAdaptorTrampoline()
3003 __ Jump(code_entry); in Generate_ArgumentsAdaptorTrampoline()
3005 __ Bind(&stack_overflow); in Generate_ArgumentsAdaptorTrampoline()
3008 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_ArgumentsAdaptorTrampoline()
3009 __ Unreachable(); in Generate_ArgumentsAdaptorTrampoline()
3013 #undef __