Lines Matching full:__

25 #define __ ACCESS_MASM(masm)  macro
28 __ pop(ecx); in Generate()
29 __ mov(MemOperand(esp, eax, times_4, 0), edi); in Generate()
30 __ push(edi); in Generate()
31 __ push(ebx); in Generate()
32 __ push(ecx); in Generate()
33 __ add(eax, Immediate(3)); in Generate()
34 __ TailCallRuntime(Runtime::kNewArray); in Generate()
62 __ push(descriptor.GetRegisterParameter(i)); in GenerateLightweightMiss()
64 __ CallExternalReference(miss, param_count); in GenerateLightweightMiss()
67 __ ret(0); in GenerateLightweightMiss()
75 __ pushad(); in Generate()
78 __ sub(esp, Immediate(108)); in Generate()
79 __ fnsave(Operand(esp, 0)); in Generate()
84 __ PrepareCallCFunction(argument_count, ecx); in Generate()
85 __ mov(Operand(esp, 0 * kPointerSize), in Generate()
87 __ CallCFunction( in Generate()
92 __ frstor(Operand(esp, 0)); in Generate()
93 __ add(esp, Immediate(108)); in Generate()
95 __ popad(); in Generate()
96 __ ret(0); in Generate()
153 __ push(scratch1); in Generate()
154 __ push(save_reg); in Generate()
157 __ mov(scratch1, mantissa_operand); in Generate()
158 __ mov(ecx, exponent_operand); in Generate()
159 if (stash_exponent_copy) __ push(ecx); in Generate()
161 __ and_(ecx, HeapNumber::kExponentMask); in Generate()
162 __ shr(ecx, HeapNumber::kExponentShift); in Generate()
163 __ lea(result_reg, MemOperand(ecx, -HeapNumber::kExponentBias)); in Generate()
164 __ cmp(result_reg, Immediate(HeapNumber::kMantissaBits)); in Generate()
165 __ j(below, &process_64_bits); in Generate()
169 __ sub(ecx, Immediate(delta)); in Generate()
170 __ xor_(result_reg, result_reg); in Generate()
171 __ cmp(ecx, Immediate(31)); in Generate()
172 __ j(above, &done); in Generate()
173 __ shl_cl(scratch1); in Generate()
174 __ jmp(&check_negative); in Generate()
176 __ bind(&process_64_bits); in Generate()
178 __ sub(ecx, Immediate(delta)); in Generate()
179 __ neg(ecx); in Generate()
181 __ mov(result_reg, MemOperand(esp, 0)); in Generate()
183 __ mov(result_reg, exponent_operand); in Generate()
185 __ and_(result_reg, in Generate()
187 __ add(result_reg, in Generate()
189 __ shrd_cl(scratch1, result_reg); in Generate()
190 __ shr_cl(result_reg); in Generate()
191 __ test(ecx, Immediate(32)); in Generate()
194 __ j(equal, &skip_mov, Label::kNear); in Generate()
195 __ mov(scratch1, result_reg); in Generate()
196 __ bind(&skip_mov); in Generate()
200 __ bind(&check_negative); in Generate()
201 __ mov(result_reg, scratch1); in Generate()
202 __ neg(result_reg); in Generate()
204 __ cmp(MemOperand(esp, 0), Immediate(0)); in Generate()
206 __ cmp(exponent_operand, Immediate(0)); in Generate()
210 __ j(less_equal, &skip_mov, Label::kNear); in Generate()
211 __ mov(result_reg, scratch1); in Generate()
212 __ bind(&skip_mov); in Generate()
216 __ bind(&done); in Generate()
218 __ add(esp, Immediate(kDoubleSize / 2)); in Generate()
220 __ bind(&done_no_stash); in Generate()
223 __ mov(final_result_reg, result_reg); in Generate()
225 __ pop(save_reg); in Generate()
226 __ pop(scratch1); in Generate()
227 __ ret(0); in Generate()
235 __ JumpIfSmi(number, &load_smi, Label::kNear); in LoadFloatOperand()
236 __ fld_d(FieldOperand(number, HeapNumber::kValueOffset)); in LoadFloatOperand()
237 __ jmp(&done, Label::kNear); in LoadFloatOperand()
239 __ bind(&load_smi); in LoadFloatOperand()
240 __ SmiUntag(number); in LoadFloatOperand()
241 __ push(number); in LoadFloatOperand()
242 __ fild_s(Operand(esp, 0)); in LoadFloatOperand()
243 __ pop(number); in LoadFloatOperand()
245 __ bind(&done); in LoadFloatOperand()
255 __ JumpIfSmi(edx, &test_other, Label::kNear); in CheckFloatOperands()
256 __ mov(scratch, FieldOperand(edx, HeapObject::kMapOffset)); in CheckFloatOperands()
258 __ cmp(scratch, factory->heap_number_map()); in CheckFloatOperands()
259 __ j(not_equal, non_float); // argument in edx is not a number -> NaN in CheckFloatOperands()
261 __ bind(&test_other); in CheckFloatOperands()
262 __ JumpIfSmi(eax, &done, Label::kNear); in CheckFloatOperands()
263 __ mov(scratch, FieldOperand(eax, HeapObject::kMapOffset)); in CheckFloatOperands()
264 __ cmp(scratch, factory->heap_number_map()); in CheckFloatOperands()
265 __ j(not_equal, non_float); // argument in eax is not a number -> NaN in CheckFloatOperands()
268 __ bind(&done); in CheckFloatOperands()
276 __ fld_d(Operand(esp, 0 * kDoubleSize + 4)); in Generate()
278 __ fld_d(Operand(esp, 1 * kDoubleSize + 4)); in Generate()
283 __ PrepareCallCFunction(4, scratch); in Generate()
285 __ fstp_d(Operand(esp, 0 * kDoubleSize)); in Generate()
287 __ fstp_d(Operand(esp, 1 * kDoubleSize)); in Generate()
288 __ CallCFunction(ExternalReference::power_double_double_function(isolate()), in Generate()
292 __ ret(0); in Generate()
302 __ cmp(FieldOperand(receiver, JSFunction::kPrototypeOrInitialMapOffset), in Generate()
304 __ j(equal, &miss); in Generate()
305 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); in Generate()
306 __ ret(0); in Generate()
308 __ bind(&miss); in Generate()
337 __ ret(0); in Generate()
342 __ bind(&miss); in Generate()
353 __ TailCallRuntime(Runtime::kRegExpExec); in Generate()
376 __ mov(ebx, Operand::StaticVariable(address_of_regexp_stack_memory_size)); in Generate()
377 __ test(ebx, ebx); in Generate()
378 __ j(zero, &runtime); in Generate()
381 __ mov(eax, Operand(esp, kJSRegExpOffset)); in Generate()
383 __ JumpIfSmi(eax, &runtime); in Generate()
384 __ CmpObjectType(eax, JS_REGEXP_TYPE, ecx); in Generate()
385 __ j(not_equal, &runtime); in Generate()
388 __ mov(ecx, FieldOperand(eax, JSRegExp::kDataOffset)); in Generate()
390 __ test(ecx, Immediate(kSmiTagMask)); in Generate()
391 __ Check(not_zero, kUnexpectedTypeForRegExpDataFixedArrayExpected); in Generate()
392 __ CmpObjectType(ecx, FIXED_ARRAY_TYPE, ebx); in Generate()
393 __ Check(equal, kUnexpectedTypeForRegExpDataFixedArrayExpected); in Generate()
398 __ mov(ebx, FieldOperand(ecx, JSRegExp::kDataTagOffset)); in Generate()
399 __ cmp(ebx, Immediate(Smi::FromInt(JSRegExp::IRREGEXP))); in Generate()
400 __ j(not_equal, &runtime); in Generate()
404 __ mov(edx, FieldOperand(ecx, JSRegExp::kIrregexpCaptureCountOffset)); in Generate()
411 __ cmp(edx, Isolate::kJSRegexpStaticOffsetsVectorSize - 2); in Generate()
412 __ j(above, &runtime); in Generate()
415 __ Move(edi, Immediate(0)); in Generate()
416 __ mov(eax, Operand(esp, kSubjectOffset)); in Generate()
417 __ JumpIfSmi(eax, &runtime); in Generate()
418 __ mov(edx, eax); // Make a copy of the original subject string. in Generate()
445 __ bind(&check_underlying); in Generate()
447 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); in Generate()
448 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); in Generate()
450 __ and_(ebx, kIsNotStringMask | in Generate()
455 __ j(zero, &seq_two_byte_string); // Go to (9). in Generate()
459 __ and_(ebx, Immediate(kIsNotStringMask | in Generate()
462 __ j(zero, &seq_one_byte_string, Label::kNear); // Go to (5). in Generate()
471 __ cmp(ebx, Immediate(kExternalStringTag)); in Generate()
472 __ j(greater_equal, &not_seq_nor_cons); // Go to (6). in Generate()
476 __ cmp(FieldOperand(eax, ConsString::kSecondOffset), factory->empty_string()); in Generate()
477 __ j(not_equal, &runtime); in Generate()
478 __ mov(eax, FieldOperand(eax, ConsString::kFirstOffset)); in Generate()
479 __ jmp(&check_underlying); in Generate()
485 __ bind(&seq_one_byte_string); in Generate()
489 __ mov(ebx, Operand(esp, kPreviousIndexOffset)); in Generate()
490 __ JumpIfNotSmi(ebx, &runtime); in Generate()
491 __ cmp(ebx, FieldOperand(edx, String::kLengthOffset)); in Generate()
492 __ j(above_equal, &runtime); in Generate()
493 __ mov(edx, FieldOperand(ecx, JSRegExp::kDataOneByteCodeOffset)); in Generate()
494 __ Move(ecx, Immediate(1)); // Type is one byte. in Generate()
497 __ bind(&check_code); in Generate()
502 __ JumpIfSmi(edx, &runtime); in Generate()
510 __ IncrementCounter(counters->regexp_entry_native(), 1); in Generate()
514 __ EnterApiExitFrame(kRegExpExecuteArguments); in Generate()
517 __ mov(Operand(esp, 8 * kPointerSize), in Generate()
521 __ mov(Operand(esp, 7 * kPointerSize), Immediate(1)); in Generate()
524 __ mov(esi, Operand::StaticVariable(address_of_regexp_stack_memory_address)); in Generate()
525 __ add(esi, Operand::StaticVariable(address_of_regexp_stack_memory_size)); in Generate()
526 __ mov(Operand(esp, 6 * kPointerSize), esi); in Generate()
530 __ mov(Operand(esp, 5 * kPointerSize), Immediate(0)); in Generate()
533 __ mov(Operand(esp, 4 * kPointerSize), in Generate()
538 __ SmiUntag(ebx); in Generate()
539 __ mov(Operand(esp, 1 * kPointerSize), ebx); in Generate()
546 __ mov(esi, Operand(ebp, kSubjectOffset + kPointerSize)); in Generate()
547 __ mov(Operand(esp, 0 * kPointerSize), esi); in Generate()
558 __ mov(esi, FieldOperand(esi, String::kLengthOffset)); in Generate()
559 __ add(esi, edi); // Calculate input end wrt offset. in Generate()
560 __ SmiUntag(edi); in Generate()
561 __ add(ebx, edi); // Calculate input start wrt offset. in Generate()
566 __ test(ecx, ecx); in Generate()
567 __ j(zero, &setup_two_byte, Label::kNear); in Generate()
568 __ SmiUntag(esi); in Generate()
569 __ lea(ecx, FieldOperand(eax, esi, times_1, SeqOneByteString::kHeaderSize)); in Generate()
570 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Argument 4. in Generate()
571 __ lea(ecx, FieldOperand(eax, ebx, times_1, SeqOneByteString::kHeaderSize)); in Generate()
572 __ mov(Operand(esp, 2 * kPointerSize), ecx); // Argument 3. in Generate()
573 __ jmp(&setup_rest, Label::kNear); in Generate()
575 __ bind(&setup_two_byte); in Generate()
578 __ lea(ecx, FieldOperand(eax, esi, times_1, SeqTwoByteString::kHeaderSize)); in Generate()
579 __ mov(Operand(esp, 3 * kPointerSize), ecx); // Argument 4. in Generate()
580 __ lea(ecx, FieldOperand(eax, ebx, times_2, SeqTwoByteString::kHeaderSize)); in Generate()
581 __ mov(Operand(esp, 2 * kPointerSize), ecx); // Argument 3. in Generate()
583 __ bind(&setup_rest); in Generate()
586 __ add(edx, Immediate(Code::kHeaderSize - kHeapObjectTag)); in Generate()
587 __ call(edx); in Generate()
590 __ LeaveApiExitFrame(true); in Generate()
594 __ cmp(eax, 1); in Generate()
597 __ j(equal, &success); in Generate()
599 __ cmp(eax, NativeRegExpMacroAssembler::FAILURE); in Generate()
600 __ j(equal, &failure); in Generate()
601 __ cmp(eax, NativeRegExpMacroAssembler::EXCEPTION); in Generate()
603 __ j(not_equal, &runtime); in Generate()
610 __ mov(edx, Immediate(isolate()->factory()->the_hole_value())); in Generate()
611 __ mov(eax, Operand::StaticVariable(pending_exception)); in Generate()
612 __ cmp(edx, eax); in Generate()
613 __ j(equal, &runtime); in Generate()
616 __ TailCallRuntime(Runtime::kRegExpExecReThrow); in Generate()
618 __ bind(&failure); in Generate()
620 __ mov(eax, factory->null_value()); in Generate()
621 __ ret(4 * kPointerSize); in Generate()
624 __ bind(&success); in Generate()
625 __ mov(eax, Operand(esp, kJSRegExpOffset)); in Generate()
626 __ mov(ecx, FieldOperand(eax, JSRegExp::kDataOffset)); in Generate()
627 __ mov(edx, FieldOperand(ecx, JSRegExp::kIrregexpCaptureCountOffset)); in Generate()
631 __ add(edx, Immediate(2)); // edx was a smi. in Generate()
635 __ mov(ebx, Operand(esp, kLastMatchInfoOffset)); in Generate()
636 __ JumpIfSmi(ebx, &runtime); in Generate()
638 __ mov(eax, FieldOperand(ebx, HeapObject::kMapOffset)); in Generate()
639 __ cmp(eax, factory->fixed_array_map()); in Generate()
640 __ j(not_equal, &runtime); in Generate()
643 __ mov(eax, FieldOperand(ebx, FixedArray::kLengthOffset)); in Generate()
644 __ SmiUntag(eax); in Generate()
645 __ sub(eax, Immediate(RegExpMatchInfo::kLastMatchOverhead)); in Generate()
646 __ cmp(edx, eax); in Generate()
647 __ j(greater, &runtime); in Generate()
652 __ SmiTag(edx); // Number of capture registers to smi. in Generate()
653 __ mov(FieldOperand(ebx, RegExpMatchInfo::kNumberOfCapturesOffset), edx); in Generate()
654 __ SmiUntag(edx); // Number of capture registers back from smi. in Generate()
656 __ mov(eax, Operand(esp, kSubjectOffset)); in Generate()
657 __ mov(ecx, eax); in Generate()
658 __ mov(FieldOperand(ebx, RegExpMatchInfo::kLastSubjectOffset), eax); in Generate()
659 __ RecordWriteField(ebx, RegExpMatchInfo::kLastSubjectOffset, eax, edi, in Generate()
661 __ mov(eax, ecx); in Generate()
662 __ mov(FieldOperand(ebx, RegExpMatchInfo::kLastInputOffset), eax); in Generate()
663 __ RecordWriteField(ebx, RegExpMatchInfo::kLastInputOffset, eax, edi, in Generate()
669 __ mov(ecx, Immediate(address_of_static_offsets_vector)); in Generate()
677 __ bind(&next_capture); in Generate()
678 __ sub(edx, Immediate(1)); in Generate()
679 __ j(negative, &done, Label::kNear); in Generate()
681 __ mov(edi, Operand(ecx, edx, times_int_size, 0)); in Generate()
682 __ SmiTag(edi); in Generate()
684 __ mov(FieldOperand(ebx, edx, times_pointer_size, in Generate()
687 __ jmp(&next_capture); in Generate()
688 __ bind(&done); in Generate()
691 __ mov(eax, ebx); in Generate()
692 __ ret(4 * kPointerSize); in Generate()
695 __ bind(&runtime); in Generate()
696 __ TailCallRuntime(Runtime::kRegExpExec); in Generate()
700 __ bind(&not_seq_nor_cons); in Generate()
702 __ j(greater, &not_long_external, Label::kNear); // Go to (10). in Generate()
705 __ bind(&external_string); in Generate()
707 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); in Generate()
708 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); in Generate()
712 __ test_b(ebx, Immediate(kIsIndirectStringMask)); in Generate()
713 __ Assert(zero, kExternalStringExpectedButNotFound); in Generate()
715 __ mov(eax, FieldOperand(eax, ExternalString::kResourceDataOffset)); in Generate()
718 __ sub(eax, Immediate(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); in Generate()
721 __ test_b(ebx, Immediate(kStringEncodingMask)); in Generate()
722 __ j(not_zero, &seq_one_byte_string); // Go to (5). in Generate()
728 __ bind(&seq_two_byte_string); in Generate()
732 __ mov(ebx, Operand(esp, kPreviousIndexOffset)); in Generate()
733 __ JumpIfNotSmi(ebx, &runtime); in Generate()
734 __ cmp(ebx, FieldOperand(edx, String::kLengthOffset)); in Generate()
735 __ j(above_equal, &runtime); in Generate()
736 __ mov(edx, FieldOperand(ecx, JSRegExp::kDataUC16CodeOffset)); in Generate()
737 __ Move(ecx, Immediate(0)); // Type is two byte. in Generate()
738 __ jmp(&check_code); // Go to (E). in Generate()
741 __ bind(&not_long_external); in Generate()
744 __ test(ebx, Immediate(kIsNotStringMask | kShortExternalStringTag)); in Generate()
745 __ j(not_zero, &runtime); in Generate()
749 __ mov(edi, FieldOperand(eax, SlicedString::kOffsetOffset)); in Generate()
750 __ mov(eax, FieldOperand(eax, SlicedString::kParentOffset)); in Generate()
751 __ jmp(&check_underlying); // Go to (1). in Generate()
768 __ JumpIfNotSmi(input, fail); in CheckInputType()
770 __ JumpIfSmi(input, &ok); in CheckInputType()
771 __ cmp(FieldOperand(input, HeapObject::kMapOffset), in CheckInputType()
773 __ j(not_equal, fail); in CheckInputType()
777 __ bind(&ok); in CheckInputType()
785 __ JumpIfSmi(object, label); in BranchIfNotInternalizedString()
786 __ mov(scratch, FieldOperand(object, HeapObject::kMapOffset)); in BranchIfNotInternalizedString()
787 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); in BranchIfNotInternalizedString()
789 __ test(scratch, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); in BranchIfNotInternalizedString()
790 __ j(not_zero, label); in BranchIfNotInternalizedString()
804 __ mov(ecx, edx); in GenerateGeneric()
805 __ or_(ecx, eax); in GenerateGeneric()
806 __ JumpIfNotSmi(ecx, &non_smi, Label::kNear); in GenerateGeneric()
807 __ sub(edx, eax); // Return on the result of the subtraction. in GenerateGeneric()
808 __ j(no_overflow, &smi_done, Label::kNear); in GenerateGeneric()
809 __ not_(edx); // Correct sign in case of overflow. edx is never 0 here. in GenerateGeneric()
810 __ bind(&smi_done); in GenerateGeneric()
811 __ mov(eax, edx); in GenerateGeneric()
812 __ ret(0); in GenerateGeneric()
813 __ bind(&non_smi); in GenerateGeneric()
823 __ cmp(eax, edx); in GenerateGeneric()
824 __ j(not_equal, &not_identical); in GenerateGeneric()
829 __ cmp(edx, isolate()->factory()->undefined_value()); in GenerateGeneric()
831 __ j(not_equal, &check_for_nan, Label::kNear); in GenerateGeneric()
832 __ Move(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); in GenerateGeneric()
833 __ ret(0); in GenerateGeneric()
834 __ bind(&check_for_nan); in GenerateGeneric()
839 __ cmp(FieldOperand(edx, HeapObject::kMapOffset), in GenerateGeneric()
841 __ j(equal, &generic_heap_number_comparison, Label::kNear); in GenerateGeneric()
843 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); in GenerateGeneric()
844 __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); in GenerateGeneric()
846 __ cmpb(ecx, Immediate(FIRST_JS_RECEIVER_TYPE)); in GenerateGeneric()
847 __ j(above_equal, &runtime_call, Label::kFar); in GenerateGeneric()
849 __ cmpb(ecx, Immediate(SYMBOL_TYPE)); in GenerateGeneric()
850 __ j(equal, &runtime_call, Label::kFar); in GenerateGeneric()
852 __ cmpb(ecx, Immediate(SIMD128_VALUE_TYPE)); in GenerateGeneric()
853 __ j(equal, &runtime_call, Label::kFar); in GenerateGeneric()
855 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); in GenerateGeneric()
856 __ ret(0); in GenerateGeneric()
859 __ bind(&not_identical); in GenerateGeneric()
875 __ mov(ecx, Immediate(kSmiTagMask)); in GenerateGeneric()
876 __ and_(ecx, eax); in GenerateGeneric()
877 __ test(ecx, edx); in GenerateGeneric()
878 __ j(not_zero, &not_smis, Label::kNear); in GenerateGeneric()
884 __ sub(ecx, Immediate(0x01)); in GenerateGeneric()
885 __ mov(ebx, edx); in GenerateGeneric()
886 __ xor_(ebx, eax); in GenerateGeneric()
887 __ and_(ebx, ecx); // ebx holds either 0 or eax ^ edx. in GenerateGeneric()
888 __ xor_(ebx, eax); in GenerateGeneric()
892 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), in GenerateGeneric()
895 __ j(equal, &slow, Label::kNear); in GenerateGeneric()
897 __ mov(eax, ebx); in GenerateGeneric()
898 __ ret(0); in GenerateGeneric()
900 __ bind(&not_smis); in GenerateGeneric()
909 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); in GenerateGeneric()
910 __ j(below, &first_non_object, Label::kNear); in GenerateGeneric()
915 __ bind(&return_not_equal); in GenerateGeneric()
916 __ ret(0); in GenerateGeneric()
918 __ bind(&first_non_object); in GenerateGeneric()
920 __ CmpInstanceType(ecx, ODDBALL_TYPE); in GenerateGeneric()
921 __ j(equal, &return_not_equal); in GenerateGeneric()
923 __ CmpObjectType(edx, FIRST_JS_RECEIVER_TYPE, ecx); in GenerateGeneric()
924 __ j(above_equal, &return_not_equal); in GenerateGeneric()
927 __ CmpInstanceType(ecx, ODDBALL_TYPE); in GenerateGeneric()
928 __ j(equal, &return_not_equal); in GenerateGeneric()
931 __ bind(&slow); in GenerateGeneric()
937 __ bind(&generic_heap_number_comparison); in GenerateGeneric()
942 __ FCmp(); in GenerateGeneric()
945 __ j(parity_even, &unordered, Label::kNear); in GenerateGeneric()
949 __ j(below, &below_label, Label::kNear); in GenerateGeneric()
950 __ j(above, &above_label, Label::kNear); in GenerateGeneric()
952 __ Move(eax, Immediate(0)); in GenerateGeneric()
953 __ ret(0); in GenerateGeneric()
955 __ bind(&below_label); in GenerateGeneric()
956 __ mov(eax, Immediate(Smi::FromInt(-1))); in GenerateGeneric()
957 __ ret(0); in GenerateGeneric()
959 __ bind(&above_label); in GenerateGeneric()
960 __ mov(eax, Immediate(Smi::FromInt(1))); in GenerateGeneric()
961 __ ret(0); in GenerateGeneric()
965 __ bind(&unordered); in GenerateGeneric()
968 __ mov(eax, Immediate(Smi::FromInt(1))); in GenerateGeneric()
970 __ mov(eax, Immediate(Smi::FromInt(-1))); in GenerateGeneric()
972 __ ret(0); in GenerateGeneric()
975 __ bind(&non_number_comparison); in GenerateGeneric()
986 __ ret(0); in GenerateGeneric()
989 __ bind(&check_for_strings); in GenerateGeneric()
991 __ JumpIfNotBothSequentialOneByteStrings(edx, eax, ecx, ebx, in GenerateGeneric()
1002 __ Abort(kUnexpectedFallThroughFromStringComparison); in GenerateGeneric()
1005 __ bind(&check_unequal_objects); in GenerateGeneric()
1016 __ lea(ecx, Operand(eax, edx, times_1, 0)); in GenerateGeneric()
1017 __ test(ecx, Immediate(kSmiTagMask)); in GenerateGeneric()
1018 __ j(not_zero, &runtime_call); in GenerateGeneric()
1020 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); in GenerateGeneric()
1021 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); in GenerateGeneric()
1023 __ test_b(FieldOperand(ebx, Map::kBitFieldOffset), in GenerateGeneric()
1025 __ j(not_zero, &undetectable, Label::kNear); in GenerateGeneric()
1026 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in GenerateGeneric()
1028 __ j(not_zero, &return_unequal, Label::kNear); in GenerateGeneric()
1030 __ CmpInstanceType(ebx, FIRST_JS_RECEIVER_TYPE); in GenerateGeneric()
1031 __ j(below, &runtime_call, Label::kNear); in GenerateGeneric()
1032 __ CmpInstanceType(ecx, FIRST_JS_RECEIVER_TYPE); in GenerateGeneric()
1033 __ j(below, &runtime_call, Label::kNear); in GenerateGeneric()
1035 __ bind(&return_unequal); in GenerateGeneric()
1037 __ ret(0); // eax, edx were pushed in GenerateGeneric()
1039 __ bind(&undetectable); in GenerateGeneric()
1040 __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), in GenerateGeneric()
1042 __ j(zero, &return_unequal, Label::kNear); in GenerateGeneric()
1047 __ CmpInstanceType(ebx, ODDBALL_TYPE); in GenerateGeneric()
1048 __ j(zero, &return_equal, Label::kNear); in GenerateGeneric()
1049 __ CmpInstanceType(ecx, ODDBALL_TYPE); in GenerateGeneric()
1050 __ j(not_zero, &return_unequal, Label::kNear); in GenerateGeneric()
1052 __ bind(&return_equal); in GenerateGeneric()
1053 __ Move(eax, Immediate(EQUAL)); in GenerateGeneric()
1054 __ ret(0); // eax, edx were pushed in GenerateGeneric()
1056 __ bind(&runtime_call); in GenerateGeneric()
1061 __ Push(edx); in GenerateGeneric()
1062 __ Push(eax); in GenerateGeneric()
1063 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); in GenerateGeneric()
1067 __ sub(eax, Immediate(isolate()->factory()->true_value())); in GenerateGeneric()
1068 __ Ret(); in GenerateGeneric()
1071 __ pop(ecx); in GenerateGeneric()
1072 __ push(edx); in GenerateGeneric()
1073 __ push(eax); in GenerateGeneric()
1074 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); in GenerateGeneric()
1077 __ push(ecx); in GenerateGeneric()
1080 __ TailCallRuntime(Runtime::kCompare); in GenerateGeneric()
1083 __ bind(&miss); in GenerateGeneric()
1098 __ SmiTag(eax); in CallStubInRecordCallTarget()
1099 __ push(eax); in CallStubInRecordCallTarget()
1100 __ push(edi); in CallStubInRecordCallTarget()
1101 __ push(edx); in CallStubInRecordCallTarget()
1102 __ push(ebx); in CallStubInRecordCallTarget()
1103 __ push(esi); in CallStubInRecordCallTarget()
1105 __ CallStub(stub); in CallStubInRecordCallTarget()
1107 __ pop(esi); in CallStubInRecordCallTarget()
1108 __ pop(ebx); in CallStubInRecordCallTarget()
1109 __ pop(edx); in CallStubInRecordCallTarget()
1110 __ pop(edi); in CallStubInRecordCallTarget()
1111 __ pop(eax); in CallStubInRecordCallTarget()
1112 __ SmiUntag(eax); in CallStubInRecordCallTarget()
1129 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, in GenerateRecordCallTarget()
1138 __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); in GenerateRecordCallTarget()
1139 __ j(equal, &done, Label::kFar); in GenerateRecordCallTarget()
1140 __ CompareRoot(ecx, Heap::kmegamorphic_symbolRootIndex); in GenerateRecordCallTarget()
1141 __ j(equal, &done, Label::kFar); in GenerateRecordCallTarget()
1142 __ CompareRoot(FieldOperand(ecx, HeapObject::kMapOffset), in GenerateRecordCallTarget()
1144 __ j(not_equal, &check_allocation_site); in GenerateRecordCallTarget()
1147 __ JumpIfSmi(FieldOperand(ecx, WeakCell::kValueOffset), &initialize); in GenerateRecordCallTarget()
1148 __ jmp(&megamorphic); in GenerateRecordCallTarget()
1150 __ bind(&check_allocation_site); in GenerateRecordCallTarget()
1155 __ CompareRoot(FieldOperand(ecx, 0), Heap::kAllocationSiteMapRootIndex); in GenerateRecordCallTarget()
1156 __ j(not_equal, &miss); in GenerateRecordCallTarget()
1159 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); in GenerateRecordCallTarget()
1160 __ cmp(edi, ecx); in GenerateRecordCallTarget()
1161 __ j(not_equal, &megamorphic); in GenerateRecordCallTarget()
1162 __ jmp(&done, Label::kFar); in GenerateRecordCallTarget()
1164 __ bind(&miss); in GenerateRecordCallTarget()
1168 __ CompareRoot(ecx, Heap::kuninitialized_symbolRootIndex); in GenerateRecordCallTarget()
1169 __ j(equal, &initialize); in GenerateRecordCallTarget()
1172 __ bind(&megamorphic); in GenerateRecordCallTarget()
1173 __ mov( in GenerateRecordCallTarget()
1176 __ jmp(&done, Label::kFar); in GenerateRecordCallTarget()
1180 __ bind(&initialize); in GenerateRecordCallTarget()
1182 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); in GenerateRecordCallTarget()
1183 __ cmp(edi, ecx); in GenerateRecordCallTarget()
1184 __ j(not_equal, &not_array_function); in GenerateRecordCallTarget()
1191 __ jmp(&done); in GenerateRecordCallTarget()
1193 __ bind(&not_array_function); in GenerateRecordCallTarget()
1197 __ bind(&done); in GenerateRecordCallTarget()
1199 __ add(FieldOperand(ebx, edx, times_half_pointer_size, in GenerateRecordCallTarget()
1213 __ JumpIfSmi(edi, &non_function); in Generate()
1215 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); in Generate()
1216 __ j(not_equal, &non_function); in Generate()
1222 __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size, in Generate()
1225 __ cmp(FieldOperand(ebx, 0), Immediate(allocation_site_map)); in Generate()
1226 __ j(equal, &feedback_register_initialized); in Generate()
1227 __ mov(ebx, isolate()->factory()->undefined_value()); in Generate()
1228 __ bind(&feedback_register_initialized); in Generate()
1230 __ AssertUndefinedOrAllocationSite(ebx); in Generate()
1233 __ mov(edx, edi); in Generate()
1237 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate()
1238 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); in Generate()
1239 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); in Generate()
1240 __ jmp(ecx); in Generate()
1242 __ bind(&non_function); in Generate()
1243 __ mov(edx, edi); in Generate()
1244 __ Jump(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate()
1249 __ add(FieldOperand(feedback_vector, slot, times_half_pointer_size, in IncrementCallCount()
1259 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); in HandleArrayCase()
1260 __ cmp(edi, ecx); in HandleArrayCase()
1261 __ j(not_equal, miss); in HandleArrayCase()
1264 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, in HandleArrayCase()
1270 __ mov(ebx, ecx); in HandleArrayCase()
1271 __ mov(edx, edi); in HandleArrayCase()
1273 __ TailCallStub(&stub); in HandleArrayCase()
1288 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, in Generate()
1305 __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); in Generate()
1306 __ j(not_equal, &extra_checks_or_miss); in Generate()
1310 __ JumpIfSmi(edi, &extra_checks_or_miss); in Generate()
1312 __ bind(&call_function); in Generate()
1317 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), in Generate()
1321 __ bind(&extra_checks_or_miss); in Generate()
1324 __ cmp(ecx, Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate))); in Generate()
1325 __ j(equal, &call); in Generate()
1328 __ CompareRoot(FieldOperand(ecx, HeapObject::kMapOffset), in Generate()
1330 __ j(not_equal, &not_allocation_site); in Generate()
1335 __ bind(&not_allocation_site); in Generate()
1340 __ jmp(&miss); in Generate()
1343 __ cmp(ecx, Immediate(TypeFeedbackVector::UninitializedSentinel(isolate))); in Generate()
1344 __ j(equal, &uninitialized); in Generate()
1348 __ AssertNotSmi(ecx); in Generate()
1349 __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx); in Generate()
1350 __ j(not_equal, &miss); in Generate()
1351 __ mov( in Generate()
1355 __ bind(&call); in Generate()
1360 __ bind(&call_count_incremented); in Generate()
1362 __ Jump(masm->isolate()->builtins()->Call(convert_mode(), tail_call_mode()), in Generate()
1365 __ bind(&uninitialized); in Generate()
1368 __ JumpIfSmi(edi, &miss); in Generate()
1371 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); in Generate()
1372 __ j(not_equal, &miss); in Generate()
1376 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); in Generate()
1377 __ cmp(edi, ecx); in Generate()
1378 __ j(equal, &miss); in Generate()
1381 __ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset)); in Generate()
1382 __ mov(ecx, ContextOperand(ecx, Context::NATIVE_CONTEXT_INDEX)); in Generate()
1383 __ cmp(ecx, NativeContextOperand()); in Generate()
1384 __ j(not_equal, &miss); in Generate()
1394 __ SmiTag(eax); in Generate()
1395 __ push(eax); in Generate()
1396 __ push(ebx); in Generate()
1397 __ push(edx); in Generate()
1398 __ push(edi); in Generate()
1399 __ push(esi); in Generate()
1400 __ CallStub(&create_stub); in Generate()
1401 __ pop(esi); in Generate()
1402 __ pop(edi); in Generate()
1403 __ pop(edx); in Generate()
1404 __ pop(ebx); in Generate()
1405 __ pop(eax); in Generate()
1406 __ SmiUntag(eax); in Generate()
1409 __ jmp(&call_function); in Generate()
1413 __ bind(&miss); in Generate()
1416 __ jmp(&call_count_incremented); in Generate()
1419 __ int3(); in Generate()
1427 __ SmiTag(eax); in GenerateMiss()
1428 __ push(eax); in GenerateMiss()
1431 __ push(edi); in GenerateMiss()
1432 __ push(ebx); in GenerateMiss()
1433 __ push(edx); in GenerateMiss()
1436 __ CallRuntime(Runtime::kCallIC_Miss); in GenerateMiss()
1439 __ mov(edi, eax); in GenerateMiss()
1442 __ pop(eax); in GenerateMiss()
1443 __ SmiUntag(eax); in GenerateMiss()
1507 __ EnterApiExitFrame(arg_stack_space); in Generate()
1510 __ mov(esi, ecx); in Generate()
1511 __ mov(edi, eax); in Generate()
1513 __ EnterExitFrame( in Generate()
1528 __ CheckStackAlignment(); in Generate()
1532 __ mov(Operand(esp, 0 * kPointerSize), edi); // argc. in Generate()
1533 __ mov(Operand(esp, 1 * kPointerSize), esi); // argv. in Generate()
1534 __ mov(Operand(esp, 2 * kPointerSize), in Generate()
1539 __ lea(eax, Operand(esp, 4 * kPointerSize)); in Generate()
1540 __ mov(Operand(esp, 0 * kPointerSize), eax); in Generate()
1541 __ mov(Operand(esp, 1 * kPointerSize), edi); // argc. in Generate()
1542 __ mov(Operand(esp, 2 * kPointerSize), esi); // argv. in Generate()
1543 __ mov(Operand(esp, 3 * kPointerSize), in Generate()
1546 __ call(ebx); in Generate()
1552 __ sub(esp, Immediate(kPointerSize)); in Generate()
1555 __ mov(kReturnRegister0, Operand(esp, 4 * kPointerSize)); in Generate()
1556 __ mov(kReturnRegister1, Operand(esp, 5 * kPointerSize)); in Generate()
1557 __ mov(kReturnRegister2, Operand(esp, 6 * kPointerSize)); in Generate()
1563 __ cmp(eax, isolate()->factory()->exception()); in Generate()
1564 __ j(equal, &exception_returned); in Generate()
1569 __ push(edx); in Generate()
1570 __ mov(edx, Immediate(isolate()->factory()->the_hole_value())); in Generate()
1574 __ cmp(edx, Operand::StaticVariable(pending_exception_address)); in Generate()
1576 __ j(equal, &okay, Label::kNear); in Generate()
1577 __ int3(); in Generate()
1578 __ bind(&okay); in Generate()
1579 __ pop(edx); in Generate()
1583 __ LeaveExitFrame(save_doubles(), !argv_in_register()); in Generate()
1584 __ ret(0); in Generate()
1587 __ bind(&exception_returned); in Generate()
1606 __ PrepareCallCFunction(3, eax); in Generate()
1607 __ mov(Operand(esp, 0 * kPointerSize), Immediate(0)); // argc. in Generate()
1608 __ mov(Operand(esp, 1 * kPointerSize), Immediate(0)); // argv. in Generate()
1609 __ mov(Operand(esp, 2 * kPointerSize), in Generate()
1611 __ CallCFunction(find_handler, 3); in Generate()
1615 __ mov(esi, Operand::StaticVariable(pending_handler_context_address)); in Generate()
1616 __ mov(esp, Operand::StaticVariable(pending_handler_sp_address)); in Generate()
1617 __ mov(ebp, Operand::StaticVariable(pending_handler_fp_address)); in Generate()
1622 __ test(esi, esi); in Generate()
1623 __ j(zero, &skip, Label::kNear); in Generate()
1624 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), esi); in Generate()
1625 __ bind(&skip); in Generate()
1628 __ mov(edi, Operand::StaticVariable(pending_handler_code_address)); in Generate()
1629 __ mov(edx, Operand::StaticVariable(pending_handler_offset_address)); in Generate()
1632 __ push(eax); in Generate()
1633 __ mov(eax, Operand(edi, Code::kKindSpecificFlags1Offset - kHeapObjectTag)); in Generate()
1634 __ and_(eax, Immediate(1 << Code::kIsTurbofannedBit)); in Generate()
1635 __ j(zero, &not_turbo); in Generate()
1636 __ fninit(); in Generate()
1637 __ fld1(); in Generate()
1638 __ bind(&not_turbo); in Generate()
1639 __ pop(eax); in Generate()
1640 __ lea(edi, FieldOperand(edi, edx, times_1, Code::kHeaderSize)); in Generate()
1641 __ jmp(edi); in Generate()
1652 __ push(ebp); in Generate()
1653 __ mov(ebp, esp); in Generate()
1657 __ push(Immediate(Smi::FromInt(marker))); // marker in Generate()
1659 __ push(Operand::StaticVariable(context_address)); // context in Generate()
1661 __ push(edi); in Generate()
1662 __ push(esi); in Generate()
1663 __ push(ebx); in Generate()
1667 __ push(Operand::StaticVariable(c_entry_fp)); in Generate()
1671 __ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0)); in Generate()
1672 __ j(not_equal, &not_outermost_js, Label::kNear); in Generate()
1673 __ mov(Operand::StaticVariable(js_entry_sp), ebp); in Generate()
1674 __ push(Immediate(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME))); in Generate()
1675 __ jmp(&invoke, Label::kNear); in Generate()
1676 __ bind(&not_outermost_js); in Generate()
1677 __ push(Immediate(Smi::FromInt(StackFrame::INNER_JSENTRY_FRAME))); in Generate()
1681 __ jmp(&invoke); in Generate()
1682 __ bind(&handler_entry); in Generate()
1688 __ mov(Operand::StaticVariable(pending_exception), eax); in Generate()
1689 __ mov(eax, Immediate(isolate()->factory()->exception())); in Generate()
1690 __ jmp(&exit); in Generate()
1693 __ bind(&invoke); in Generate()
1694 __ PushStackHandler(); in Generate()
1697 __ push(Immediate(0)); // receiver in Generate()
1706 __ mov(edx, Immediate(construct_entry)); in Generate()
1709 __ mov(edx, Immediate(entry)); in Generate()
1711 __ mov(edx, Operand(edx, 0)); // deref address in Generate()
1712 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); in Generate()
1713 __ call(edx); in Generate()
1716 __ PopStackHandler(); in Generate()
1718 __ bind(&exit); in Generate()
1720 __ pop(ebx); in Generate()
1721 __ cmp(ebx, Immediate(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME))); in Generate()
1722 __ j(not_equal, &not_outermost_js_2); in Generate()
1723 __ mov(Operand::StaticVariable(js_entry_sp), Immediate(0)); in Generate()
1724 __ bind(&not_outermost_js_2); in Generate()
1727 __ pop(Operand::StaticVariable(ExternalReference( in Generate()
1731 __ pop(ebx); in Generate()
1732 __ pop(esi); in Generate()
1733 __ pop(edi); in Generate()
1734 __ add(esp, Immediate(2 * kPointerSize)); // remove markers in Generate()
1737 __ pop(ebp); in Generate()
1738 __ ret(0); in Generate()
1748 __ JumpIfSmi(object_, receiver_not_string_); in GenerateFast()
1751 __ mov(result_, FieldOperand(object_, HeapObject::kMapOffset)); in GenerateFast()
1752 __ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset)); in GenerateFast()
1754 __ test(result_, Immediate(kIsNotStringMask)); in GenerateFast()
1755 __ j(not_zero, receiver_not_string_); in GenerateFast()
1759 __ JumpIfNotSmi(index_, &index_not_smi_); in GenerateFast()
1760 __ bind(&got_smi_index_); in GenerateFast()
1763 __ cmp(index_, FieldOperand(object_, String::kLengthOffset)); in GenerateFast()
1764 __ j(above_equal, index_out_of_range_); in GenerateFast()
1766 __ SmiUntag(index_); in GenerateFast()
1772 __ SmiTag(result_); in GenerateFast()
1773 __ bind(&exit_); in GenerateFast()
1780 __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase); in GenerateSlow()
1783 __ bind(&index_not_smi_); in GenerateSlow()
1785 __ CheckMap(index_, in GenerateSlow()
1791 __ push(LoadWithVectorDescriptor::VectorRegister()); in GenerateSlow()
1792 __ push(LoadDescriptor::SlotRegister()); in GenerateSlow()
1794 __ push(object_); in GenerateSlow()
1795 __ push(index_); // Consumed by runtime conversion function. in GenerateSlow()
1796 __ CallRuntime(Runtime::kNumberToSmi); in GenerateSlow()
1800 __ mov(index_, eax); in GenerateSlow()
1802 __ pop(object_); in GenerateSlow()
1804 __ pop(LoadDescriptor::SlotRegister()); in GenerateSlow()
1805 __ pop(LoadWithVectorDescriptor::VectorRegister()); in GenerateSlow()
1808 __ mov(result_, FieldOperand(object_, HeapObject::kMapOffset)); in GenerateSlow()
1809 __ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset)); in GenerateSlow()
1813 __ JumpIfNotSmi(index_, index_out_of_range_); in GenerateSlow()
1815 __ jmp(&got_smi_index_); in GenerateSlow()
1820 __ bind(&call_runtime_); in GenerateSlow()
1822 __ push(object_); in GenerateSlow()
1823 __ SmiTag(index_); in GenerateSlow()
1824 __ push(index_); in GenerateSlow()
1825 __ CallRuntime(Runtime::kStringCharCodeAtRT); in GenerateSlow()
1827 __ mov(result_, eax); in GenerateSlow()
1830 __ jmp(&exit_); in GenerateSlow()
1832 __ Abort(kUnexpectedFallthroughFromCharCodeAtSlowCase); in GenerateSlow()
1844 __ test(code_, Immediate(kSmiTagMask | in GenerateFast()
1846 __ j(not_zero, &slow_case_); in GenerateFast()
1849 __ Move(result_, Immediate(factory->single_character_string_cache())); in GenerateFast()
1854 __ mov(result_, FieldOperand(result_, in GenerateFast()
1857 __ cmp(result_, factory->undefined_value()); in GenerateFast()
1858 __ j(equal, &slow_case_); in GenerateFast()
1859 __ bind(&exit_); in GenerateFast()
1866 __ Abort(kUnexpectedFallthroughToCharFromCodeSlowCase); in GenerateSlow()
1868 __ bind(&slow_case_); in GenerateSlow()
1870 __ push(code_); in GenerateSlow()
1871 __ CallRuntime(Runtime::kStringCharFromCode); in GenerateSlow()
1873 __ mov(result_, eax); in GenerateSlow()
1876 __ jmp(&exit_); in GenerateSlow()
1878 __ Abort(kUnexpectedFallthroughFromCharFromCodeSlowCase); in GenerateSlow()
1894 __ test(count, count); in GenerateCopyCharacters()
1895 __ j(zero, &done); in GenerateCopyCharacters()
1899 __ shl(count, 1); in GenerateCopyCharacters()
1903 __ bind(&loop); in GenerateCopyCharacters()
1904 __ mov_b(scratch, Operand(src, 0)); in GenerateCopyCharacters()
1905 __ mov_b(Operand(dest, 0), scratch); in GenerateCopyCharacters()
1906 __ inc(src); in GenerateCopyCharacters()
1907 __ inc(dest); in GenerateCopyCharacters()
1908 __ dec(count); in GenerateCopyCharacters()
1909 __ j(not_zero, &loop); in GenerateCopyCharacters()
1911 __ bind(&done); in GenerateCopyCharacters()
1924 __ mov(length, FieldOperand(left, String::kLengthOffset)); in GenerateFlatOneByteStringEquals()
1925 __ cmp(length, FieldOperand(right, String::kLengthOffset)); in GenerateFlatOneByteStringEquals()
1926 __ j(equal, &check_zero_length, Label::kNear); in GenerateFlatOneByteStringEquals()
1927 __ bind(&strings_not_equal); in GenerateFlatOneByteStringEquals()
1928 __ Move(eax, Immediate(Smi::FromInt(NOT_EQUAL))); in GenerateFlatOneByteStringEquals()
1929 __ ret(0); in GenerateFlatOneByteStringEquals()
1933 __ bind(&check_zero_length); in GenerateFlatOneByteStringEquals()
1935 __ test(length, length); in GenerateFlatOneByteStringEquals()
1936 __ j(not_zero, &compare_chars, Label::kNear); in GenerateFlatOneByteStringEquals()
1937 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); in GenerateFlatOneByteStringEquals()
1938 __ ret(0); in GenerateFlatOneByteStringEquals()
1941 __ bind(&compare_chars); in GenerateFlatOneByteStringEquals()
1946 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); in GenerateFlatOneByteStringEquals()
1947 __ ret(0); in GenerateFlatOneByteStringEquals()
1955 __ IncrementCounter(counters->string_compare_native(), 1); in GenerateCompareFlatOneByteStrings()
1959 __ mov(scratch1, FieldOperand(left, String::kLengthOffset)); in GenerateCompareFlatOneByteStrings()
1960 __ mov(scratch3, scratch1); in GenerateCompareFlatOneByteStrings()
1961 __ sub(scratch3, FieldOperand(right, String::kLengthOffset)); in GenerateCompareFlatOneByteStrings()
1965 __ j(less_equal, &left_shorter, Label::kNear); in GenerateCompareFlatOneByteStrings()
1967 __ sub(scratch1, length_delta); in GenerateCompareFlatOneByteStrings()
1968 __ bind(&left_shorter); in GenerateCompareFlatOneByteStrings()
1974 __ test(min_length, min_length); in GenerateCompareFlatOneByteStrings()
1975 __ j(zero, &compare_lengths, Label::kNear); in GenerateCompareFlatOneByteStrings()
1983 __ bind(&compare_lengths); in GenerateCompareFlatOneByteStrings()
1984 __ test(length_delta, length_delta); in GenerateCompareFlatOneByteStrings()
1986 __ j(not_zero, &length_not_equal, Label::kNear); in GenerateCompareFlatOneByteStrings()
1991 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); in GenerateCompareFlatOneByteStrings()
1992 __ ret(0); in GenerateCompareFlatOneByteStrings()
1996 __ bind(&length_not_equal); in GenerateCompareFlatOneByteStrings()
1997 __ j(greater, &result_greater, Label::kNear); in GenerateCompareFlatOneByteStrings()
1998 __ jmp(&result_less, Label::kNear); in GenerateCompareFlatOneByteStrings()
1999 __ bind(&result_not_equal); in GenerateCompareFlatOneByteStrings()
2000 __ j(above, &result_greater, Label::kNear); in GenerateCompareFlatOneByteStrings()
2001 __ bind(&result_less); in GenerateCompareFlatOneByteStrings()
2004 __ Move(eax, Immediate(Smi::FromInt(LESS))); in GenerateCompareFlatOneByteStrings()
2005 __ ret(0); in GenerateCompareFlatOneByteStrings()
2008 __ bind(&result_greater); in GenerateCompareFlatOneByteStrings()
2009 __ Move(eax, Immediate(Smi::FromInt(GREATER))); in GenerateCompareFlatOneByteStrings()
2010 __ ret(0); in GenerateCompareFlatOneByteStrings()
2021 __ SmiUntag(length); in GenerateOneByteCharsCompareLoop()
2022 __ lea(left, in GenerateOneByteCharsCompareLoop()
2024 __ lea(right, in GenerateOneByteCharsCompareLoop()
2026 __ neg(length); in GenerateOneByteCharsCompareLoop()
2031 __ bind(&loop); in GenerateOneByteCharsCompareLoop()
2032 __ mov_b(scratch, Operand(left, index, times_1, 0)); in GenerateOneByteCharsCompareLoop()
2033 __ cmpb(scratch, Operand(right, index, times_1, 0)); in GenerateOneByteCharsCompareLoop()
2034 __ j(not_equal, chars_not_equal, chars_not_equal_near); in GenerateOneByteCharsCompareLoop()
2035 __ inc(index); in GenerateOneByteCharsCompareLoop()
2036 __ j(not_zero, &loop); in GenerateOneByteCharsCompareLoop()
2050 __ mov(ecx, isolate()->factory()->undefined_value()); in Generate()
2054 __ test(ecx, Immediate(kSmiTagMask)); in Generate()
2055 __ Assert(not_equal, kExpectedAllocationSite); in Generate()
2056 __ cmp(FieldOperand(ecx, HeapObject::kMapOffset), in Generate()
2058 __ Assert(equal, kExpectedAllocationSite); in Generate()
2064 __ TailCallStub(&stub); in Generate()
2074 __ JumpIfSmi(edx, &miss, miss_distance); in GenerateBooleans()
2075 __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); in GenerateBooleans()
2076 __ JumpIfSmi(eax, &miss, miss_distance); in GenerateBooleans()
2077 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); in GenerateBooleans()
2078 __ JumpIfNotRoot(ecx, Heap::kBooleanMapRootIndex, &miss, miss_distance); in GenerateBooleans()
2079 __ JumpIfNotRoot(ebx, Heap::kBooleanMapRootIndex, &miss, miss_distance); in GenerateBooleans()
2081 __ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset)); in GenerateBooleans()
2082 __ AssertSmi(eax); in GenerateBooleans()
2083 __ mov(edx, FieldOperand(edx, Oddball::kToNumberOffset)); in GenerateBooleans()
2084 __ AssertSmi(edx); in GenerateBooleans()
2085 __ xchg(eax, edx); in GenerateBooleans()
2087 __ sub(eax, edx); in GenerateBooleans()
2088 __ Ret(); in GenerateBooleans()
2090 __ bind(&miss); in GenerateBooleans()
2098 __ mov(ecx, edx); in GenerateSmis()
2099 __ or_(ecx, eax); in GenerateSmis()
2100 __ JumpIfNotSmi(ecx, &miss, Label::kNear); in GenerateSmis()
2104 __ sub(eax, edx); in GenerateSmis()
2107 __ sub(edx, eax); in GenerateSmis()
2108 __ j(no_overflow, &done, Label::kNear); in GenerateSmis()
2110 __ not_(edx); in GenerateSmis()
2111 __ bind(&done); in GenerateSmis()
2112 __ mov(eax, edx); in GenerateSmis()
2114 __ ret(0); in GenerateSmis()
2116 __ bind(&miss); in GenerateSmis()
2129 __ JumpIfNotSmi(edx, &miss); in GenerateNumbers()
2132 __ JumpIfNotSmi(eax, &miss); in GenerateNumbers()
2137 __ JumpIfSmi(eax, &check_left, Label::kNear); in GenerateNumbers()
2138 __ cmp(FieldOperand(eax, HeapObject::kMapOffset), in GenerateNumbers()
2140 __ j(not_equal, &maybe_undefined1, Label::kNear); in GenerateNumbers()
2142 __ bind(&check_left); in GenerateNumbers()
2143 __ JumpIfSmi(edx, &generic_stub, Label::kNear); in GenerateNumbers()
2144 __ cmp(FieldOperand(edx, HeapObject::kMapOffset), in GenerateNumbers()
2146 __ j(not_equal, &maybe_undefined2, Label::kNear); in GenerateNumbers()
2148 __ bind(&unordered); in GenerateNumbers()
2149 __ bind(&generic_stub); in GenerateNumbers()
2152 __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); in GenerateNumbers()
2154 __ bind(&maybe_undefined1); in GenerateNumbers()
2156 __ cmp(eax, Immediate(isolate()->factory()->undefined_value())); in GenerateNumbers()
2157 __ j(not_equal, &miss); in GenerateNumbers()
2158 __ JumpIfSmi(edx, &unordered); in GenerateNumbers()
2159 __ CmpObjectType(edx, HEAP_NUMBER_TYPE, ecx); in GenerateNumbers()
2160 __ j(not_equal, &maybe_undefined2, Label::kNear); in GenerateNumbers()
2161 __ jmp(&unordered); in GenerateNumbers()
2164 __ bind(&maybe_undefined2); in GenerateNumbers()
2166 __ cmp(edx, Immediate(isolate()->factory()->undefined_value())); in GenerateNumbers()
2167 __ j(equal, &unordered); in GenerateNumbers()
2170 __ bind(&miss); in GenerateNumbers()
2187 __ mov(tmp1, left); in GenerateInternalizedStrings()
2189 __ and_(tmp1, right); in GenerateInternalizedStrings()
2190 __ JumpIfSmi(tmp1, &miss, Label::kNear); in GenerateInternalizedStrings()
2193 __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); in GenerateInternalizedStrings()
2194 __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); in GenerateInternalizedStrings()
2195 __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); in GenerateInternalizedStrings()
2196 __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); in GenerateInternalizedStrings()
2198 __ or_(tmp1, tmp2); in GenerateInternalizedStrings()
2199 __ test(tmp1, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); in GenerateInternalizedStrings()
2200 __ j(not_zero, &miss, Label::kNear); in GenerateInternalizedStrings()
2204 __ cmp(left, right); in GenerateInternalizedStrings()
2208 __ j(not_equal, &done, Label::kNear); in GenerateInternalizedStrings()
2211 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); in GenerateInternalizedStrings()
2212 __ bind(&done); in GenerateInternalizedStrings()
2213 __ ret(0); in GenerateInternalizedStrings()
2215 __ bind(&miss); in GenerateInternalizedStrings()
2232 __ mov(tmp1, left); in GenerateUniqueNames()
2234 __ and_(tmp1, right); in GenerateUniqueNames()
2235 __ JumpIfSmi(tmp1, &miss, Label::kNear); in GenerateUniqueNames()
2239 __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); in GenerateUniqueNames()
2240 __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); in GenerateUniqueNames()
2241 __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); in GenerateUniqueNames()
2242 __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); in GenerateUniqueNames()
2244 __ JumpIfNotUniqueNameInstanceType(tmp1, &miss, Label::kNear); in GenerateUniqueNames()
2245 __ JumpIfNotUniqueNameInstanceType(tmp2, &miss, Label::kNear); in GenerateUniqueNames()
2249 __ cmp(left, right); in GenerateUniqueNames()
2253 __ j(not_equal, &done, Label::kNear); in GenerateUniqueNames()
2256 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); in GenerateUniqueNames()
2257 __ bind(&done); in GenerateUniqueNames()
2258 __ ret(0); in GenerateUniqueNames()
2260 __ bind(&miss); in GenerateUniqueNames()
2279 __ mov(tmp1, left); in GenerateStrings()
2281 __ and_(tmp1, right); in GenerateStrings()
2282 __ JumpIfSmi(tmp1, &miss); in GenerateStrings()
2286 __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); in GenerateStrings()
2287 __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); in GenerateStrings()
2288 __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); in GenerateStrings()
2289 __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); in GenerateStrings()
2290 __ mov(tmp3, tmp1); in GenerateStrings()
2292 __ or_(tmp3, tmp2); in GenerateStrings()
2293 __ test(tmp3, Immediate(kIsNotStringMask)); in GenerateStrings()
2294 __ j(not_zero, &miss); in GenerateStrings()
2298 __ cmp(left, right); in GenerateStrings()
2299 __ j(not_equal, &not_same, Label::kNear); in GenerateStrings()
2302 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); in GenerateStrings()
2303 __ ret(0); in GenerateStrings()
2306 __ bind(&not_same); in GenerateStrings()
2315 __ or_(tmp1, tmp2); in GenerateStrings()
2316 __ test(tmp1, Immediate(kIsNotInternalizedMask)); in GenerateStrings()
2317 __ j(not_zero, &do_compare, Label::kNear); in GenerateStrings()
2321 __ ret(0); in GenerateStrings()
2322 __ bind(&do_compare); in GenerateStrings()
2327 __ JumpIfNotBothSequentialOneByteStrings(left, right, tmp1, tmp2, &runtime); in GenerateStrings()
2339 __ bind(&runtime); in GenerateStrings()
2343 __ Push(left); in GenerateStrings()
2344 __ Push(right); in GenerateStrings()
2345 __ CallRuntime(Runtime::kStringEqual); in GenerateStrings()
2347 __ sub(eax, Immediate(masm->isolate()->factory()->true_value())); in GenerateStrings()
2348 __ Ret(); in GenerateStrings()
2350 __ pop(tmp1); // Return address. in GenerateStrings()
2351 __ push(left); in GenerateStrings()
2352 __ push(right); in GenerateStrings()
2353 __ push(tmp1); in GenerateStrings()
2354 __ TailCallRuntime(Runtime::kStringCompare); in GenerateStrings()
2357 __ bind(&miss); in GenerateStrings()
2365 __ mov(ecx, edx); in GenerateReceivers()
2366 __ and_(ecx, eax); in GenerateReceivers()
2367 __ JumpIfSmi(ecx, &miss, Label::kNear); in GenerateReceivers()
2370 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); in GenerateReceivers()
2371 __ j(below, &miss, Label::kNear); in GenerateReceivers()
2372 __ CmpObjectType(edx, FIRST_JS_RECEIVER_TYPE, ecx); in GenerateReceivers()
2373 __ j(below, &miss, Label::kNear); in GenerateReceivers()
2376 __ sub(eax, edx); in GenerateReceivers()
2377 __ ret(0); in GenerateReceivers()
2379 __ bind(&miss); in GenerateReceivers()
2387 __ mov(ecx, edx); in GenerateKnownReceivers()
2388 __ and_(ecx, eax); in GenerateKnownReceivers()
2389 __ JumpIfSmi(ecx, &miss, Label::kNear); in GenerateKnownReceivers()
2391 __ GetWeakValue(edi, cell); in GenerateKnownReceivers()
2392 __ cmp(edi, FieldOperand(eax, HeapObject::kMapOffset)); in GenerateKnownReceivers()
2393 __ j(not_equal, &miss, Label::kNear); in GenerateKnownReceivers()
2394 __ cmp(edi, FieldOperand(edx, HeapObject::kMapOffset)); in GenerateKnownReceivers()
2395 __ j(not_equal, &miss, Label::kNear); in GenerateKnownReceivers()
2398 __ sub(eax, edx); in GenerateKnownReceivers()
2399 __ ret(0); in GenerateKnownReceivers()
2401 __ PopReturnAddressTo(ecx); in GenerateKnownReceivers()
2402 __ Push(edx); in GenerateKnownReceivers()
2403 __ Push(eax); in GenerateKnownReceivers()
2404 __ Push(Immediate(Smi::FromInt(NegativeComparisonResult(GetCondition())))); in GenerateKnownReceivers()
2405 __ PushReturnAddressFrom(ecx); in GenerateKnownReceivers()
2406 __ TailCallRuntime(Runtime::kCompare); in GenerateKnownReceivers()
2409 __ bind(&miss); in GenerateKnownReceivers()
2418 __ push(edx); // Preserve edx and eax. in GenerateMiss()
2419 __ push(eax); in GenerateMiss()
2420 __ push(edx); // And also use them as the arguments. in GenerateMiss()
2421 __ push(eax); in GenerateMiss()
2422 __ push(Immediate(Smi::FromInt(op()))); in GenerateMiss()
2423 __ CallRuntime(Runtime::kCompareIC_Miss); in GenerateMiss()
2425 __ lea(edi, FieldOperand(eax, Code::kHeaderSize)); in GenerateMiss()
2426 __ pop(eax); in GenerateMiss()
2427 __ pop(edx); in GenerateMiss()
2431 __ jmp(edi); in GenerateMiss()
2457 __ mov(index, FieldOperand(properties, kCapacityOffset)); in GenerateNegativeLookup()
2458 __ dec(index); in GenerateNegativeLookup()
2459 __ and_(index, in GenerateNegativeLookup()
2465 __ lea(index, Operand(index, index, times_2, 0)); // index *= 3. in GenerateNegativeLookup()
2469 __ mov(entity_name, Operand(properties, index, times_half_pointer_size, in GenerateNegativeLookup()
2471 __ cmp(entity_name, masm->isolate()->factory()->undefined_value()); in GenerateNegativeLookup()
2472 __ j(equal, done); in GenerateNegativeLookup()
2475 __ cmp(entity_name, Handle<Name>(name)); in GenerateNegativeLookup()
2476 __ j(equal, miss); in GenerateNegativeLookup()
2480 __ cmp(entity_name, masm->isolate()->factory()->the_hole_value()); in GenerateNegativeLookup()
2481 __ j(equal, &good, Label::kNear); in GenerateNegativeLookup()
2484 __ mov(entity_name, FieldOperand(entity_name, HeapObject::kMapOffset)); in GenerateNegativeLookup()
2485 __ JumpIfNotUniqueNameInstanceType( in GenerateNegativeLookup()
2487 __ bind(&good); in GenerateNegativeLookup()
2492 __ push(Immediate(Handle<Object>(name))); in GenerateNegativeLookup()
2493 __ push(Immediate(name->Hash())); in GenerateNegativeLookup()
2494 __ CallStub(&stub); in GenerateNegativeLookup()
2495 __ test(r0, r0); in GenerateNegativeLookup()
2496 __ j(not_zero, miss); in GenerateNegativeLookup()
2497 __ jmp(done); in GenerateNegativeLookup()
2517 __ AssertName(name); in GeneratePositiveLookup()
2519 __ mov(r1, FieldOperand(elements, kCapacityOffset)); in GeneratePositiveLookup()
2520 __ shr(r1, kSmiTagSize); // convert smi to int in GeneratePositiveLookup()
2521 __ dec(r1); in GeneratePositiveLookup()
2528 __ mov(r0, FieldOperand(name, Name::kHashFieldOffset)); in GeneratePositiveLookup()
2529 __ shr(r0, Name::kHashShift); in GeneratePositiveLookup()
2531 __ add(r0, Immediate(NameDictionary::GetProbeOffset(i))); in GeneratePositiveLookup()
2533 __ and_(r0, r1); in GeneratePositiveLookup()
2537 __ lea(r0, Operand(r0, r0, times_2, 0)); // r0 = r0 * 3 in GeneratePositiveLookup()
2540 __ cmp(name, Operand(elements, in GeneratePositiveLookup()
2544 __ j(equal, done); in GeneratePositiveLookup()
2549 __ push(name); in GeneratePositiveLookup()
2550 __ mov(r0, FieldOperand(name, Name::kHashFieldOffset)); in GeneratePositiveLookup()
2551 __ shr(r0, Name::kHashShift); in GeneratePositiveLookup()
2552 __ push(r0); in GeneratePositiveLookup()
2553 __ CallStub(&stub); in GeneratePositiveLookup()
2555 __ test(r1, r1); in GeneratePositiveLookup()
2556 __ j(zero, miss); in GeneratePositiveLookup()
2557 __ jmp(done); in GeneratePositiveLookup()
2580 __ mov(scratch, FieldOperand(dictionary(), kCapacityOffset)); in Generate()
2581 __ dec(scratch); in Generate()
2582 __ SmiUntag(scratch); in Generate()
2583 __ push(scratch); in Generate()
2592 __ mov(scratch, Operand(esp, 2 * kPointerSize)); in Generate()
2594 __ add(scratch, Immediate(NameDictionary::GetProbeOffset(i))); in Generate()
2596 __ and_(scratch, Operand(esp, 0)); in Generate()
2600 __ lea(index(), Operand(scratch, scratch, times_2, 0)); // index *= 3. in Generate()
2604 __ mov(scratch, Operand(dictionary(), index(), times_pointer_size, in Generate()
2606 __ cmp(scratch, isolate()->factory()->undefined_value()); in Generate()
2607 __ j(equal, &not_in_dictionary); in Generate()
2610 __ cmp(scratch, Operand(esp, 3 * kPointerSize)); in Generate()
2611 __ j(equal, &in_dictionary); in Generate()
2619 __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); in Generate()
2620 __ JumpIfNotUniqueNameInstanceType( in Generate()
2626 __ bind(&maybe_in_dictionary); in Generate()
2631 __ mov(result(), Immediate(0)); in Generate()
2632 __ Drop(1); in Generate()
2633 __ ret(2 * kPointerSize); in Generate()
2636 __ bind(&in_dictionary); in Generate()
2637 __ mov(result(), Immediate(1)); in Generate()
2638 __ Drop(1); in Generate()
2639 __ ret(2 * kPointerSize); in Generate()
2641 __ bind(&not_in_dictionary); in Generate()
2642 __ mov(result(), Immediate(0)); in Generate()
2643 __ Drop(1); in Generate()
2644 __ ret(2 * kPointerSize); in Generate()
2669 __ jmp(&skip_to_incremental_noncompacting, Label::kNear); in Generate()
2670 __ jmp(&skip_to_incremental_compacting, Label::kFar); in Generate()
2673 __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), in Generate()
2676 __ ret(0); in Generate()
2679 __ bind(&skip_to_incremental_noncompacting); in Generate()
2682 __ bind(&skip_to_incremental_compacting); in Generate()
2698 __ mov(regs_.scratch0(), Operand(regs_.address(), 0)); in GenerateIncremental()
2699 __ JumpIfNotInNewSpace(regs_.scratch0(), // Value. in GenerateIncremental()
2703 __ JumpIfInNewSpace(regs_.object(), regs_.scratch0(), in GenerateIncremental()
2714 __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), in GenerateIncremental()
2717 __ bind(&dont_need_remembered_set); in GenerateIncremental()
2726 __ ret(0); in GenerateIncremental()
2733 __ PrepareCallCFunction(argument_count, regs_.scratch0()); in InformIncrementalMarker()
2734 __ mov(Operand(esp, 0 * kPointerSize), regs_.object()); in InformIncrementalMarker()
2735 __ mov(Operand(esp, 1 * kPointerSize), regs_.address()); // Slot. in InformIncrementalMarker()
2736 __ mov(Operand(esp, 2 * kPointerSize), in InformIncrementalMarker()
2740 __ CallCFunction( in InformIncrementalMarker()
2756 __ JumpIfBlack(regs_.object(), in CheckNeedsToInformIncrementalMarker()
2764 __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), in CheckNeedsToInformIncrementalMarker()
2767 __ ret(0); in CheckNeedsToInformIncrementalMarker()
2770 __ bind(&object_is_black); in CheckNeedsToInformIncrementalMarker()
2773 __ mov(regs_.scratch0(), Operand(regs_.address(), 0)); in CheckNeedsToInformIncrementalMarker()
2778 __ CheckPageFlag(regs_.scratch0(), // Contains value. in CheckNeedsToInformIncrementalMarker()
2785 __ CheckPageFlag(regs_.object(), in CheckNeedsToInformIncrementalMarker()
2792 __ jmp(&need_incremental); in CheckNeedsToInformIncrementalMarker()
2794 __ bind(&ensure_not_white); in CheckNeedsToInformIncrementalMarker()
2799 __ push(regs_.object()); in CheckNeedsToInformIncrementalMarker()
2800 __ JumpIfWhite(regs_.scratch0(), // The value. in CheckNeedsToInformIncrementalMarker()
2804 __ pop(regs_.object()); in CheckNeedsToInformIncrementalMarker()
2808 __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), in CheckNeedsToInformIncrementalMarker()
2811 __ ret(0); in CheckNeedsToInformIncrementalMarker()
2814 __ bind(&need_incremental_pop_object); in CheckNeedsToInformIncrementalMarker()
2815 __ pop(regs_.object()); in CheckNeedsToInformIncrementalMarker()
2817 __ bind(&need_incremental); in CheckNeedsToInformIncrementalMarker()
2825 __ call(ces.GetCode(), RelocInfo::CODE_TARGET); in Generate()
2828 __ mov(ebx, MemOperand(ebp, parameter_count_offset)); in Generate()
2830 __ pop(ecx); in Generate()
2833 __ lea(esp, MemOperand(esp, ebx, times_pointer_size, additional_offset)); in Generate()
2834 __ jmp(ecx); // Return to IC Miss stub, continuation still on stack. in Generate()
2838 __ EmitLoadTypeFeedbackVector(StoreWithVectorDescriptor::VectorRegister()); in Generate()
2854 __ push(receiver); in HandlePolymorphicStoreCase()
2862 __ JumpIfSmi(receiver, &load_smi_map); in HandlePolymorphicStoreCase()
2863 __ mov(receiver_map, FieldOperand(receiver, 0)); in HandlePolymorphicStoreCase()
2864 __ bind(&compare_map); in HandlePolymorphicStoreCase()
2865 __ mov(cached_map, FieldOperand(feedback, FixedArray::OffsetOfElementAt(0))); in HandlePolymorphicStoreCase()
2870 __ cmp(receiver_map, FieldOperand(cached_map, WeakCell::kValueOffset)); in HandlePolymorphicStoreCase()
2871 __ j(not_equal, &start_polymorphic); in HandlePolymorphicStoreCase()
2876 __ mov(handler, FieldOperand(feedback, FixedArray::OffsetOfElementAt(1))); in HandlePolymorphicStoreCase()
2877 __ pop(receiver); in HandlePolymorphicStoreCase()
2878 __ lea(handler, FieldOperand(handler, Code::kHeaderSize)); in HandlePolymorphicStoreCase()
2879 __ jmp(handler); in HandlePolymorphicStoreCase()
2882 __ bind(&start_polymorphic); in HandlePolymorphicStoreCase()
2883 __ push(key); in HandlePolymorphicStoreCase()
2885 __ mov(counter, Immediate(Smi::FromInt(2))); in HandlePolymorphicStoreCase()
2890 __ cmp(counter, FieldOperand(feedback, FixedArray::kLengthOffset)); in HandlePolymorphicStoreCase()
2891 __ j(greater_equal, &pop_and_miss); in HandlePolymorphicStoreCase()
2894 __ bind(&next_loop); in HandlePolymorphicStoreCase()
2895 __ mov(cached_map, FieldOperand(feedback, counter, times_half_pointer_size, in HandlePolymorphicStoreCase()
2897 __ cmp(receiver_map, FieldOperand(cached_map, WeakCell::kValueOffset)); in HandlePolymorphicStoreCase()
2898 __ j(not_equal, &prepare_next); in HandlePolymorphicStoreCase()
2899 __ mov(handler, FieldOperand(feedback, counter, times_half_pointer_size, in HandlePolymorphicStoreCase()
2901 __ lea(handler, FieldOperand(handler, Code::kHeaderSize)); in HandlePolymorphicStoreCase()
2902 __ pop(key); in HandlePolymorphicStoreCase()
2903 __ pop(receiver); in HandlePolymorphicStoreCase()
2904 __ jmp(handler); in HandlePolymorphicStoreCase()
2906 __ bind(&prepare_next); in HandlePolymorphicStoreCase()
2907 __ add(counter, Immediate(Smi::FromInt(2))); in HandlePolymorphicStoreCase()
2908 __ cmp(counter, FieldOperand(feedback, FixedArray::kLengthOffset)); in HandlePolymorphicStoreCase()
2909 __ j(less, &next_loop); in HandlePolymorphicStoreCase()
2912 __ bind(&pop_and_miss); in HandlePolymorphicStoreCase()
2913 __ pop(key); in HandlePolymorphicStoreCase()
2914 __ pop(receiver); in HandlePolymorphicStoreCase()
2915 __ jmp(miss); in HandlePolymorphicStoreCase()
2917 __ bind(&load_smi_map); in HandlePolymorphicStoreCase()
2918 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); in HandlePolymorphicStoreCase()
2919 __ jmp(&compare_map); in HandlePolymorphicStoreCase()
2935 __ mov(ic_map, FieldOperand(weak_cell, WeakCell::kValueOffset)); in HandleMonomorphicStoreCase()
2938 __ JumpIfSmi(receiver, &compare_smi_map); in HandleMonomorphicStoreCase()
2939 __ cmp(ic_map, FieldOperand(receiver, 0)); in HandleMonomorphicStoreCase()
2940 __ j(not_equal, miss); in HandleMonomorphicStoreCase()
2941 __ mov(weak_cell, FieldOperand(vector, slot, times_half_pointer_size, in HandleMonomorphicStoreCase()
2943 __ lea(weak_cell, FieldOperand(weak_cell, Code::kHeaderSize)); in HandleMonomorphicStoreCase()
2945 __ jmp(weak_cell); in HandleMonomorphicStoreCase()
2949 __ bind(&compare_smi_map); in HandleMonomorphicStoreCase()
2950 __ CompareRoot(ic_map, Heap::kHeapNumberMapRootIndex); in HandleMonomorphicStoreCase()
2951 __ j(not_equal, miss); in HandleMonomorphicStoreCase()
2952 __ mov(weak_cell, FieldOperand(vector, slot, times_half_pointer_size, in HandleMonomorphicStoreCase()
2954 __ lea(weak_cell, FieldOperand(weak_cell, Code::kHeaderSize)); in HandleMonomorphicStoreCase()
2956 __ jmp(weak_cell); in HandleMonomorphicStoreCase()
2978 __ push(receiver); in HandlePolymorphicKeyedStoreCase()
2986 __ JumpIfSmi(receiver, &load_smi_map); in HandlePolymorphicKeyedStoreCase()
2987 __ mov(receiver_map, FieldOperand(receiver, 0)); in HandlePolymorphicKeyedStoreCase()
2988 __ bind(&compare_map); in HandlePolymorphicKeyedStoreCase()
2991 __ push(key); in HandlePolymorphicKeyedStoreCase()
3007 __ mov(counter, Immediate(Smi::kZero)); in HandlePolymorphicKeyedStoreCase()
3008 __ bind(&next_loop); in HandlePolymorphicKeyedStoreCase()
3009 __ mov(cached_map, FieldOperand(feedback, counter, times_half_pointer_size, in HandlePolymorphicKeyedStoreCase()
3011 __ cmp(receiver_map, FieldOperand(cached_map, WeakCell::kValueOffset)); in HandlePolymorphicKeyedStoreCase()
3012 __ j(not_equal, &prepare_next); in HandlePolymorphicKeyedStoreCase()
3013 __ mov(cached_map, FieldOperand(feedback, counter, times_half_pointer_size, in HandlePolymorphicKeyedStoreCase()
3015 __ CompareRoot(cached_map, Heap::kUndefinedValueRootIndex); in HandlePolymorphicKeyedStoreCase()
3016 __ j(not_equal, &transition_call); in HandlePolymorphicKeyedStoreCase()
3017 __ mov(feedback, FieldOperand(feedback, counter, times_half_pointer_size, in HandlePolymorphicKeyedStoreCase()
3019 __ pop(key); in HandlePolymorphicKeyedStoreCase()
3020 __ pop(receiver); in HandlePolymorphicKeyedStoreCase()
3021 __ lea(feedback, FieldOperand(feedback, Code::kHeaderSize)); in HandlePolymorphicKeyedStoreCase()
3022 __ jmp(feedback); in HandlePolymorphicKeyedStoreCase()
3024 __ bind(&transition_call); in HandlePolymorphicKeyedStoreCase()
3039 __ mov(feedback, FieldOperand(feedback, counter, times_half_pointer_size, in HandlePolymorphicKeyedStoreCase()
3041 __ lea(feedback, FieldOperand(feedback, Code::kHeaderSize)); in HandlePolymorphicKeyedStoreCase()
3043 __ mov(cached_map, FieldOperand(cached_map, WeakCell::kValueOffset)); in HandlePolymorphicKeyedStoreCase()
3045 __ JumpIfSmi(cached_map, &pop_and_miss); in HandlePolymorphicKeyedStoreCase()
3047 __ mov(StoreTransitionDescriptor::MapRegister(), cached_map); in HandlePolymorphicKeyedStoreCase()
3051 __ pop(key); in HandlePolymorphicKeyedStoreCase()
3052 __ pop(receiver); in HandlePolymorphicKeyedStoreCase()
3070 __ jmp(feedback); in HandlePolymorphicKeyedStoreCase()
3072 __ bind(&prepare_next); in HandlePolymorphicKeyedStoreCase()
3073 __ add(counter, Immediate(Smi::FromInt(3))); in HandlePolymorphicKeyedStoreCase()
3074 __ cmp(counter, FieldOperand(feedback, FixedArray::kLengthOffset)); in HandlePolymorphicKeyedStoreCase()
3075 __ j(less, &next_loop); in HandlePolymorphicKeyedStoreCase()
3078 __ bind(&pop_and_miss); in HandlePolymorphicKeyedStoreCase()
3079 __ pop(key); in HandlePolymorphicKeyedStoreCase()
3080 __ pop(receiver); in HandlePolymorphicKeyedStoreCase()
3081 __ jmp(miss); in HandlePolymorphicKeyedStoreCase()
3083 __ bind(&load_smi_map); in HandlePolymorphicKeyedStoreCase()
3084 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); in HandlePolymorphicKeyedStoreCase()
3085 __ jmp(&compare_map); in HandlePolymorphicKeyedStoreCase()
3104 __ RecordComment("[ StoreDescriptor -> StoreWithVectorDescriptor"); in GenerateImpl()
3108 __ push(Operand(esp, 0)); in GenerateImpl()
3109 __ mov(Operand(esp, 4), StoreWithVectorDescriptor::VectorRegister()); in GenerateImpl()
3110 __ RecordComment("]"); in GenerateImpl()
3112 __ mov(vector, Operand(esp, 1 * kPointerSize)); in GenerateImpl()
3114 __ mov(slot, Operand(esp, 2 * kPointerSize)); in GenerateImpl()
3118 __ mov(scratch, FieldOperand(vector, slot, times_half_pointer_size, in GenerateImpl()
3124 __ CompareRoot(FieldOperand(scratch, 0), Heap::kWeakCellMapRootIndex); in GenerateImpl()
3125 __ j(not_equal, &try_array); in GenerateImpl()
3129 __ bind(&try_array); in GenerateImpl()
3130 __ CompareRoot(FieldOperand(scratch, 0), Heap::kFixedArrayMapRootIndex); in GenerateImpl()
3131 __ j(not_equal, &not_array); in GenerateImpl()
3135 __ bind(&not_array); in GenerateImpl()
3137 __ CompareRoot(scratch, Heap::kmegamorphic_symbolRootIndex); in GenerateImpl()
3138 __ j(not_equal, &try_poly_name); in GenerateImpl()
3142 __ jmp(megamorphic_stub, RelocInfo::CODE_TARGET); in GenerateImpl()
3144 __ bind(&try_poly_name); in GenerateImpl()
3146 __ cmp(key, scratch); in GenerateImpl()
3147 __ j(not_equal, &miss); in GenerateImpl()
3150 __ mov(scratch, FieldOperand(vector, slot, times_half_pointer_size, in GenerateImpl()
3155 __ bind(&miss); in GenerateImpl()
3160 __ EmitLoadTypeFeedbackVector(ebx); in Generate()
3162 __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); in Generate()
3175 __ push(eax); in Generate()
3176 __ push(ecx); in Generate()
3177 __ push(edx); in Generate()
3180 __ lea(eax, Operand(esp, (kNumSavedRegisters + 1) * kPointerSize)); in Generate()
3181 __ push(eax); in Generate()
3185 __ mov(eax, Operand(esp, (kNumSavedRegisters + 1) * kPointerSize)); in Generate()
3186 __ sub(eax, Immediate(Assembler::kCallInstructionLength)); in Generate()
3187 __ push(eax); in Generate()
3191 __ call(FUNCTION_ADDR(isolate()->function_entry_hook()), in Generate()
3193 __ add(esp, Immediate(2 * kPointerSize)); in Generate()
3196 __ pop(edx); in Generate()
3197 __ pop(ecx); in Generate()
3198 __ pop(eax); in Generate()
3200 __ ret(0); in Generate()
3208 __ TailCallStub(&stub); in CreateArrayDispatch()
3215 __ cmp(edx, kind); in CreateArrayDispatch()
3216 __ j(not_equal, &next); in CreateArrayDispatch()
3218 __ TailCallStub(&stub); in CreateArrayDispatch()
3219 __ bind(&next); in CreateArrayDispatch()
3223 __ Abort(kUnexpectedElementsKindInArrayConstructor); in CreateArrayDispatch()
3247 __ test_b(edx, Immediate(1)); in CreateArrayDispatchOneArgument()
3248 __ j(not_zero, &normal_sequence); in CreateArrayDispatchOneArgument()
3252 __ mov(ecx, Operand(esp, kPointerSize)); in CreateArrayDispatchOneArgument()
3253 __ test(ecx, ecx); in CreateArrayDispatchOneArgument()
3254 __ j(zero, &normal_sequence); in CreateArrayDispatchOneArgument()
3262 __ TailCallStub(&stub_holey); in CreateArrayDispatchOneArgument()
3264 __ bind(&normal_sequence); in CreateArrayDispatchOneArgument()
3267 __ TailCallStub(&stub); in CreateArrayDispatchOneArgument()
3271 __ inc(edx); in CreateArrayDispatchOneArgument()
3276 __ cmp(FieldOperand(ebx, 0), Immediate(allocation_site_map)); in CreateArrayDispatchOneArgument()
3277 __ Assert(equal, kExpectedAllocationSite); in CreateArrayDispatchOneArgument()
3284 __ add(FieldOperand(ebx, AllocationSite::kTransitionInfoOffset), in CreateArrayDispatchOneArgument()
3287 __ bind(&normal_sequence); in CreateArrayDispatchOneArgument()
3293 __ cmp(edx, kind); in CreateArrayDispatchOneArgument()
3294 __ j(not_equal, &next); in CreateArrayDispatchOneArgument()
3296 __ TailCallStub(&stub); in CreateArrayDispatchOneArgument()
3297 __ bind(&next); in CreateArrayDispatchOneArgument()
3301 __ Abort(kUnexpectedElementsKindInArrayConstructor); in CreateArrayDispatchOneArgument()
3343 __ test(eax, eax); in GenerateDispatchToArrayStub()
3344 __ j(not_zero, &not_zero_case); in GenerateDispatchToArrayStub()
3347 __ bind(&not_zero_case); in GenerateDispatchToArrayStub()
3348 __ cmp(eax, 1); in GenerateDispatchToArrayStub()
3349 __ j(greater, &not_one_case); in GenerateDispatchToArrayStub()
3352 __ bind(&not_one_case); in GenerateDispatchToArrayStub()
3354 __ TailCallStub(&stub); in GenerateDispatchToArrayStub()
3371 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); in Generate()
3373 __ test(ecx, Immediate(kSmiTagMask)); in Generate()
3374 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); in Generate()
3375 __ CmpObjectType(ecx, MAP_TYPE, ecx); in Generate()
3376 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); in Generate()
3379 __ AssertUndefinedOrAllocationSite(ebx); in Generate()
3385 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); in Generate()
3387 __ cmp(edx, edi); in Generate()
3388 __ j(not_equal, &subclassing); in Generate()
3393 __ cmp(ebx, isolate()->factory()->undefined_value()); in Generate()
3394 __ j(equal, &no_info); in Generate()
3397 __ mov(edx, FieldOperand(ebx, AllocationSite::kTransitionInfoOffset)); in Generate()
3398 __ SmiUntag(edx); in Generate()
3400 __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask)); in Generate()
3403 __ bind(&no_info); in Generate()
3407 __ bind(&subclassing); in Generate()
3408 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); in Generate()
3409 __ add(eax, Immediate(3)); in Generate()
3410 __ PopReturnAddressTo(ecx); in Generate()
3411 __ Push(edx); in Generate()
3412 __ Push(ebx); in Generate()
3413 __ PushReturnAddressFrom(ecx); in Generate()
3414 __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); in Generate()
3422 __ test(eax, eax); in GenerateCase()
3423 __ j(not_zero, &not_zero_case); in GenerateCase()
3425 __ TailCallStub(&stub0); in GenerateCase()
3427 __ bind(&not_zero_case); in GenerateCase()
3428 __ cmp(eax, 1); in GenerateCase()
3429 __ j(greater, &not_one_case); in GenerateCase()
3434 __ mov(ecx, Operand(esp, kPointerSize)); in GenerateCase()
3435 __ test(ecx, ecx); in GenerateCase()
3436 __ j(zero, &normal_sequence); in GenerateCase()
3440 __ TailCallStub(&stub1_holey); in GenerateCase()
3443 __ bind(&normal_sequence); in GenerateCase()
3445 __ TailCallStub(&stub1); in GenerateCase()
3447 __ bind(&not_one_case); in GenerateCase()
3449 __ TailCallStub(&stubN); in GenerateCase()
3465 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); in Generate()
3467 __ test(ecx, Immediate(kSmiTagMask)); in Generate()
3468 __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); in Generate()
3469 __ CmpObjectType(ecx, MAP_TYPE, ecx); in Generate()
3470 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); in Generate()
3474 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); in Generate()
3478 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); in Generate()
3480 __ DecodeField<Map::ElementsKindBits>(ecx); in Generate()
3484 __ cmp(ecx, Immediate(FAST_ELEMENTS)); in Generate()
3485 __ j(equal, &done); in Generate()
3486 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS)); in Generate()
3487 __ Assert(equal, kInvalidElementsKindForInternalArrayOrInternalPackedArray); in Generate()
3488 __ bind(&done); in Generate()
3492 __ cmp(ecx, Immediate(FAST_ELEMENTS)); in Generate()
3493 __ j(equal, &fast_elements_case); in Generate()
3496 __ bind(&fast_elements_case); in Generate()
3507 __ AssertFunction(edi); in Generate()
3508 __ AssertReceiver(edx); in Generate()
3512 __ CmpObjectType(edx, JS_FUNCTION_TYPE, ebx); in Generate()
3513 __ j(not_equal, &new_object); in Generate()
3516 __ mov(ecx, FieldOperand(edx, JSFunction::kPrototypeOrInitialMapOffset)); in Generate()
3517 __ JumpIfSmi(ecx, &new_object); in Generate()
3518 __ CmpObjectType(ecx, MAP_TYPE, ebx); in Generate()
3519 __ j(not_equal, &new_object); in Generate()
3523 __ cmp(edi, FieldOperand(ecx, Map::kConstructorOrBackPointerOffset)); in Generate()
3524 __ j(not_equal, &new_object); in Generate()
3528 __ movzx_b(ebx, FieldOperand(ecx, Map::kInstanceSizeOffset)); in Generate()
3529 __ lea(ebx, Operand(ebx, times_pointer_size, 0)); in Generate()
3530 __ Allocate(ebx, eax, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS); in Generate()
3531 __ bind(&done_allocate); in Generate()
3534 __ mov(FieldOperand(eax, JSObject::kMapOffset), ecx); in Generate()
3535 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), in Generate()
3537 __ mov(FieldOperand(eax, JSObject::kElementsOffset), in Generate()
3540 __ lea(ebx, FieldOperand(eax, JSObject::kHeaderSize)); in Generate()
3554 __ test(FieldOperand(ecx, Map::kBitField3Offset), in Generate()
3556 __ j(not_zero, &slack_tracking, Label::kNear); in Generate()
3559 __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); in Generate()
3560 __ InitializeFieldsWithFiller(ebx, edi, edx); in Generate()
3561 __ Ret(); in Generate()
3563 __ bind(&slack_tracking); in Generate()
3567 __ sub(FieldOperand(ecx, Map::kBitField3Offset), in Generate()
3571 __ movzx_b(edx, FieldOperand(ecx, Map::kUnusedPropertyFieldsOffset)); in Generate()
3572 __ neg(edx); in Generate()
3573 __ lea(edx, Operand(edi, edx, times_pointer_size, 0)); in Generate()
3574 __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); in Generate()
3575 __ InitializeFieldsWithFiller(ebx, edx, edi); in Generate()
3578 __ movzx_b(edx, FieldOperand(ecx, Map::kUnusedPropertyFieldsOffset)); in Generate()
3579 __ lea(edx, Operand(ebx, edx, times_pointer_size, 0)); in Generate()
3580 __ LoadRoot(edi, Heap::kOnePointerFillerMapRootIndex); in Generate()
3581 __ InitializeFieldsWithFiller(ebx, edx, edi); in Generate()
3586 __ test(FieldOperand(ecx, Map::kBitField3Offset), in Generate()
3588 __ j(zero, &finalize, Label::kNear); in Generate()
3589 __ Ret(); in Generate()
3592 __ bind(&finalize); in Generate()
3595 __ Push(eax); in Generate()
3596 __ Push(ecx); in Generate()
3597 __ CallRuntime(Runtime::kFinalizeInstanceSize); in Generate()
3598 __ Pop(eax); in Generate()
3600 __ Ret(); in Generate()
3604 __ bind(&allocate); in Generate()
3607 __ SmiTag(ebx); in Generate()
3608 __ Push(ecx); in Generate()
3609 __ Push(ebx); in Generate()
3610 __ CallRuntime(Runtime::kAllocateInNewSpace); in Generate()
3611 __ Pop(ecx); in Generate()
3613 __ movzx_b(ebx, FieldOperand(ecx, Map::kInstanceSizeOffset)); in Generate()
3614 __ lea(edi, Operand(eax, ebx, times_pointer_size, 0)); in Generate()
3616 __ dec(edi); in Generate()
3617 __ jmp(&done_allocate); in Generate()
3620 __ bind(&new_object); in Generate()
3621 __ PopReturnAddressTo(ecx); in Generate()
3622 __ Push(edi); in Generate()
3623 __ Push(edx); in Generate()
3624 __ PushReturnAddressFrom(ecx); in Generate()
3625 __ TailCallRuntime(Runtime::kNewObject); in Generate()
3635 __ AssertFunction(edi); in Generate()
3638 __ mov(edx, ebp); in Generate()
3642 __ mov(edx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); in Generate()
3646 __ cmp(edi, Operand(edx, StandardFrameConstants::kFunctionOffset)); in Generate()
3647 __ j(equal, &ok); in Generate()
3648 __ Abort(kInvalidFrameForFastNewRestArgumentsStub); in Generate()
3649 __ bind(&ok); in Generate()
3655 __ mov(ebx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); in Generate()
3656 __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), in Generate()
3658 __ j(not_equal, &no_rest_parameters, Label::kNear); in Generate()
3663 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate()
3664 __ mov(eax, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); in Generate()
3665 __ sub(eax, in Generate()
3667 __ j(greater, &rest_parameters); in Generate()
3670 __ bind(&no_rest_parameters); in Generate()
3679 __ Allocate(JSArray::kSize, eax, edx, ecx, &allocate, NO_ALLOCATION_FLAGS); in Generate()
3680 __ bind(&done_allocate); in Generate()
3683 __ LoadGlobalFunction(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, ecx); in Generate()
3684 __ mov(FieldOperand(eax, JSArray::kMapOffset), ecx); in Generate()
3685 __ mov(ecx, isolate()->factory()->empty_fixed_array()); in Generate()
3686 __ mov(FieldOperand(eax, JSArray::kPropertiesOffset), ecx); in Generate()
3687 __ mov(FieldOperand(eax, JSArray::kElementsOffset), ecx); in Generate()
3688 __ mov(FieldOperand(eax, JSArray::kLengthOffset), Immediate(Smi::kZero)); in Generate()
3690 __ Ret(); in Generate()
3693 __ bind(&allocate); in Generate()
3696 __ Push(Smi::FromInt(JSArray::kSize)); in Generate()
3697 __ CallRuntime(Runtime::kAllocateInNewSpace); in Generate()
3699 __ jmp(&done_allocate); in Generate()
3702 __ bind(&rest_parameters); in Generate()
3705 __ lea(ebx, in Generate()
3718 __ lea(ecx, Operand(eax, times_half_pointer_size, in Generate()
3720 __ Allocate(ecx, edx, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS); in Generate()
3721 __ bind(&done_allocate); in Generate()
3724 __ mov(FieldOperand(edx, FixedArray::kMapOffset), in Generate()
3726 __ mov(FieldOperand(edx, FixedArray::kLengthOffset), eax); in Generate()
3729 __ Move(ecx, Smi::kZero); in Generate()
3730 __ bind(&loop); in Generate()
3731 __ cmp(ecx, eax); in Generate()
3732 __ j(equal, &done_loop, Label::kNear); in Generate()
3733 __ mov(edi, Operand(ebx, 0 * kPointerSize)); in Generate()
3734 __ mov(FieldOperand(edx, ecx, times_half_pointer_size, in Generate()
3737 __ sub(ebx, Immediate(1 * kPointerSize)); in Generate()
3738 __ add(ecx, Immediate(Smi::FromInt(1))); in Generate()
3739 __ jmp(&loop); in Generate()
3740 __ bind(&done_loop); in Generate()
3744 __ lea(edi, in Generate()
3746 __ LoadGlobalFunction(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, ecx); in Generate()
3747 __ mov(FieldOperand(edi, JSArray::kMapOffset), ecx); in Generate()
3748 __ mov(FieldOperand(edi, JSArray::kPropertiesOffset), in Generate()
3750 __ mov(FieldOperand(edi, JSArray::kElementsOffset), edx); in Generate()
3751 __ mov(FieldOperand(edi, JSArray::kLengthOffset), eax); in Generate()
3753 __ mov(eax, edi); in Generate()
3754 __ Ret(); in Generate()
3758 __ bind(&allocate); in Generate()
3759 __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize)); in Generate()
3760 __ j(greater, &too_big_for_new_space); in Generate()
3763 __ SmiTag(ecx); in Generate()
3764 __ Push(eax); in Generate()
3765 __ Push(ebx); in Generate()
3766 __ Push(ecx); in Generate()
3767 __ CallRuntime(Runtime::kAllocateInNewSpace); in Generate()
3768 __ mov(edx, eax); in Generate()
3769 __ Pop(ebx); in Generate()
3770 __ Pop(eax); in Generate()
3772 __ jmp(&done_allocate); in Generate()
3775 __ bind(&too_big_for_new_space); in Generate()
3776 __ PopReturnAddressTo(ecx); in Generate()
3782 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); in Generate()
3783 __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset)); in Generate()
3785 __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset)); in Generate()
3787 __ PushReturnAddressFrom(ecx); in Generate()
3788 __ TailCallRuntime(Runtime::kNewRestParameter); in Generate()
3799 __ AssertFunction(edi); in Generate()
3802 __ mov(ecx, ebp); in Generate()
3806 __ mov(ecx, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); in Generate()
3810 __ cmp(edi, Operand(ecx, StandardFrameConstants::kFunctionOffset)); in Generate()
3811 __ j(equal, &ok); in Generate()
3812 __ Abort(kInvalidFrameForFastNewSloppyArgumentsStub); in Generate()
3813 __ bind(&ok); in Generate()
3817 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate()
3818 __ mov(ebx, in Generate()
3820 __ lea(edx, Operand(ecx, ebx, times_half_pointer_size, in Generate()
3831 __ mov(eax, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); in Generate()
3832 __ mov(eax, Operand(eax, CommonFrameConstants::kContextOrFrameTypeOffset)); in Generate()
3833 __ cmp(eax, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); in Generate()
3834 __ j(equal, &adaptor_frame, Label::kNear); in Generate()
3837 __ mov(ecx, ebx); in Generate()
3838 __ push(ebx); in Generate()
3839 __ jmp(&try_allocate, Label::kNear); in Generate()
3842 __ bind(&adaptor_frame); in Generate()
3843 __ push(ebx); in Generate()
3844 __ mov(edx, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); in Generate()
3845 __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); in Generate()
3846 __ lea(edx, in Generate()
3852 __ cmp(ebx, ecx); in Generate()
3853 __ j(less_equal, &try_allocate, Label::kNear); in Generate()
3854 __ mov(ebx, ecx); in Generate()
3857 __ bind(&try_allocate); in Generate()
3858 __ push(edi); in Generate()
3859 __ push(ebx); in Generate()
3866 __ test(ebx, ebx); in Generate()
3867 __ j(zero, &no_parameter_map, Label::kNear); in Generate()
3868 __ lea(ebx, Operand(ebx, times_2, kParameterMapHeaderSize)); in Generate()
3869 __ bind(&no_parameter_map); in Generate()
3872 __ lea(ebx, Operand(ebx, ecx, times_2, FixedArray::kHeaderSize)); in Generate()
3875 __ add(ebx, Immediate(JSSloppyArgumentsObject::kSize)); in Generate()
3878 __ Allocate(ebx, eax, edi, no_reg, &runtime, NO_ALLOCATION_FLAGS); in Generate()
3887 __ mov(edi, NativeContextOperand()); in Generate()
3888 __ mov(ebx, Operand(esp, 0 * kPointerSize)); in Generate()
3889 __ test(ebx, ebx); in Generate()
3890 __ j(not_zero, &has_mapped_parameters, Label::kNear); in Generate()
3891 __ mov( in Generate()
3894 __ jmp(&instantiate, Label::kNear); in Generate()
3896 __ bind(&has_mapped_parameters); in Generate()
3897 __ mov(edi, Operand(edi, Context::SlotOffset( in Generate()
3899 __ bind(&instantiate); in Generate()
3909 __ mov(FieldOperand(eax, JSObject::kMapOffset), edi); in Generate()
3910 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), in Generate()
3912 __ mov(FieldOperand(eax, JSObject::kElementsOffset), in Generate()
3917 __ mov(edi, Operand(esp, 1 * kPointerSize)); in Generate()
3918 __ AssertNotSmi(edi); in Generate()
3919 __ mov(FieldOperand(eax, JSSloppyArgumentsObject::kCalleeOffset), edi); in Generate()
3922 __ AssertSmi(ecx); in Generate()
3923 __ mov(FieldOperand(eax, JSSloppyArgumentsObject::kLengthOffset), ecx); in Generate()
3928 __ lea(edi, Operand(eax, JSSloppyArgumentsObject::kSize)); in Generate()
3929 __ mov(FieldOperand(eax, JSObject::kElementsOffset), edi); in Generate()
3940 __ push(edx); in Generate()
3941 __ push(eax); in Generate()
3945 __ test(ebx, ebx); in Generate()
3946 __ j(zero, &skip_parameter_map); in Generate()
3948 __ mov(FieldOperand(edi, FixedArray::kMapOffset), in Generate()
3950 __ lea(eax, Operand(ebx, reinterpret_cast<intptr_t>(Smi::FromInt(2)))); in Generate()
3951 __ mov(FieldOperand(edi, FixedArray::kLengthOffset), eax); in Generate()
3952 __ mov(FieldOperand(edi, FixedArray::kHeaderSize + 0 * kPointerSize), esi); in Generate()
3953 __ lea(eax, Operand(edi, ebx, times_2, kParameterMapHeaderSize)); in Generate()
3954 __ mov(FieldOperand(edi, FixedArray::kHeaderSize + 1 * kPointerSize), eax); in Generate()
3965 __ push(ecx); in Generate()
3966 __ mov(eax, Operand(esp, 3 * kPointerSize)); in Generate()
3967 __ mov(ebx, Immediate(Smi::FromInt(Context::MIN_CONTEXT_SLOTS))); in Generate()
3968 __ add(ebx, Operand(esp, 5 * kPointerSize)); in Generate()
3969 __ sub(ebx, eax); in Generate()
3970 __ mov(ecx, isolate()->factory()->the_hole_value()); in Generate()
3971 __ mov(edx, edi); in Generate()
3972 __ lea(edi, Operand(edi, eax, times_2, kParameterMapHeaderSize)); in Generate()
3984 __ jmp(&parameters_test, Label::kNear); in Generate()
3986 __ bind(&parameters_loop); in Generate()
3987 __ sub(eax, Immediate(Smi::FromInt(1))); in Generate()
3988 __ mov(FieldOperand(edx, eax, times_2, kParameterMapHeaderSize), ebx); in Generate()
3989 __ mov(FieldOperand(edi, eax, times_2, FixedArray::kHeaderSize), ecx); in Generate()
3990 __ add(ebx, Immediate(Smi::FromInt(1))); in Generate()
3991 __ bind(&parameters_test); in Generate()
3992 __ test(eax, eax); in Generate()
3993 __ j(not_zero, &parameters_loop, Label::kNear); in Generate()
3994 __ pop(ecx); in Generate()
3996 __ bind(&skip_parameter_map); in Generate()
4006 __ mov(FieldOperand(edi, FixedArray::kMapOffset), in Generate()
4008 __ mov(FieldOperand(edi, FixedArray::kLengthOffset), ecx); in Generate()
4011 __ mov(ebx, Operand(esp, 2 * kPointerSize)); in Generate()
4012 __ mov(edx, Operand(esp, 1 * kPointerSize)); in Generate()
4013 __ sub(edx, ebx); // Is there a smarter way to do negative scaling? in Generate()
4014 __ sub(edx, ebx); in Generate()
4015 __ jmp(&arguments_test, Label::kNear); in Generate()
4017 __ bind(&arguments_loop); in Generate()
4018 __ sub(edx, Immediate(kPointerSize)); in Generate()
4019 __ mov(eax, Operand(edx, 0)); in Generate()
4020 __ mov(FieldOperand(edi, ebx, times_2, FixedArray::kHeaderSize), eax); in Generate()
4021 __ add(ebx, Immediate(Smi::FromInt(1))); in Generate()
4023 __ bind(&arguments_test); in Generate()
4024 __ cmp(ebx, ecx); in Generate()
4025 __ j(less, &arguments_loop, Label::kNear); in Generate()
4028 __ pop(eax); // Address of arguments object. in Generate()
4029 __ Drop(4); in Generate()
4032 __ ret(0); in Generate()
4035 __ bind(&runtime); in Generate()
4036 __ pop(eax); // Remove saved mapped parameter count. in Generate()
4037 __ pop(edi); // Pop saved function. in Generate()
4038 __ pop(eax); // Remove saved parameter count. in Generate()
4039 __ pop(eax); // Pop return address. in Generate()
4040 __ push(edi); // Push function. in Generate()
4041 __ push(edx); // Push parameters pointer. in Generate()
4042 __ push(ecx); // Push parameter count. in Generate()
4043 __ push(eax); // Push return address. in Generate()
4044 __ TailCallRuntime(Runtime::kNewSloppyArguments); in Generate()
4054 __ AssertFunction(edi); in Generate()
4057 __ mov(edx, ebp); in Generate()
4061 __ mov(edx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); in Generate()
4065 __ cmp(edi, Operand(edx, StandardFrameConstants::kFunctionOffset)); in Generate()
4066 __ j(equal, &ok); in Generate()
4067 __ Abort(kInvalidFrameForFastNewStrictArgumentsStub); in Generate()
4068 __ bind(&ok); in Generate()
4073 __ mov(ebx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); in Generate()
4074 __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), in Generate()
4076 __ j(equal, &arguments_adaptor, Label::kNear); in Generate()
4078 __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); in Generate()
4079 __ mov(eax, in Generate()
4081 __ lea(ebx, in Generate()
4085 __ jmp(&arguments_done, Label::kNear); in Generate()
4086 __ bind(&arguments_adaptor); in Generate()
4088 __ mov(eax, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); in Generate()
4089 __ lea(ebx, in Generate()
4093 __ bind(&arguments_done); in Generate()
4104 __ lea(ecx, in Generate()
4107 __ Allocate(ecx, edx, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS); in Generate()
4108 __ bind(&done_allocate); in Generate()
4111 __ mov(FieldOperand(edx, FixedArray::kMapOffset), in Generate()
4113 __ mov(FieldOperand(edx, FixedArray::kLengthOffset), eax); in Generate()
4116 __ Move(ecx, Smi::kZero); in Generate()
4117 __ bind(&loop); in Generate()
4118 __ cmp(ecx, eax); in Generate()
4119 __ j(equal, &done_loop, Label::kNear); in Generate()
4120 __ mov(edi, Operand(ebx, 0 * kPointerSize)); in Generate()
4121 __ mov(FieldOperand(edx, ecx, times_half_pointer_size, in Generate()
4124 __ sub(ebx, Immediate(1 * kPointerSize)); in Generate()
4125 __ add(ecx, Immediate(Smi::FromInt(1))); in Generate()
4126 __ jmp(&loop); in Generate()
4127 __ bind(&done_loop); in Generate()
4131 __ lea(edi, in Generate()
4133 __ LoadGlobalFunction(Context::STRICT_ARGUMENTS_MAP_INDEX, ecx); in Generate()
4134 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kMapOffset), ecx); in Generate()
4135 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kPropertiesOffset), in Generate()
4137 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kElementsOffset), edx); in Generate()
4138 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kLengthOffset), eax); in Generate()
4140 __ mov(eax, edi); in Generate()
4141 __ Ret(); in Generate()
4145 __ bind(&allocate); in Generate()
4146 __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize)); in Generate()
4147 __ j(greater, &too_big_for_new_space); in Generate()
4150 __ SmiTag(ecx); in Generate()
4151 __ Push(eax); in Generate()
4152 __ Push(ebx); in Generate()
4153 __ Push(ecx); in Generate()
4154 __ CallRuntime(Runtime::kAllocateInNewSpace); in Generate()
4155 __ mov(edx, eax); in Generate()
4156 __ Pop(ebx); in Generate()
4157 __ Pop(eax); in Generate()
4159 __ jmp(&done_allocate); in Generate()
4162 __ bind(&too_big_for_new_space); in Generate()
4163 __ PopReturnAddressTo(ecx); in Generate()
4169 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); in Generate()
4170 __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset)); in Generate()
4172 __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset)); in Generate()
4174 __ PushReturnAddressFrom(ecx); in Generate()
4175 __ TailCallRuntime(Runtime::kNewStrictArguments); in Generate()
4190 __ EnterApiExitFrame(argc); in PrepareCallApiFunction()
4191 if (__ emit_debug_code()) { in PrepareCallApiFunction()
4192 __ mov(esi, Immediate(bit_cast<int32_t>(kZapValue))); in PrepareCallApiFunction()
4219 __ mov(ebx, Operand::StaticVariable(next_address)); in CallApiFunctionAndReturn()
4220 __ mov(edi, Operand::StaticVariable(limit_address)); in CallApiFunctionAndReturn()
4221 __ add(Operand::StaticVariable(level_address), Immediate(1)); in CallApiFunctionAndReturn()
4225 __ PushSafepointRegisters(); in CallApiFunctionAndReturn()
4226 __ PrepareCallCFunction(1, eax); in CallApiFunctionAndReturn()
4227 __ mov(Operand(esp, 0), in CallApiFunctionAndReturn()
4229 __ CallCFunction(ExternalReference::log_enter_external_function(isolate), in CallApiFunctionAndReturn()
4231 __ PopSafepointRegisters(); in CallApiFunctionAndReturn()
4237 __ mov(eax, Immediate(ExternalReference::is_profiling_address(isolate))); in CallApiFunctionAndReturn()
4238 __ cmpb(Operand(eax, 0), Immediate(0)); in CallApiFunctionAndReturn()
4239 __ j(zero, &profiler_disabled); in CallApiFunctionAndReturn()
4242 __ mov(thunk_last_arg, function_address); in CallApiFunctionAndReturn()
4244 __ mov(eax, Immediate(thunk_ref)); in CallApiFunctionAndReturn()
4245 __ call(eax); in CallApiFunctionAndReturn()
4246 __ jmp(&end_profiler_check); in CallApiFunctionAndReturn()
4248 __ bind(&profiler_disabled); in CallApiFunctionAndReturn()
4250 __ call(function_address); in CallApiFunctionAndReturn()
4251 __ bind(&end_profiler_check); in CallApiFunctionAndReturn()
4255 __ PushSafepointRegisters(); in CallApiFunctionAndReturn()
4256 __ PrepareCallCFunction(1, eax); in CallApiFunctionAndReturn()
4257 __ mov(Operand(esp, 0), in CallApiFunctionAndReturn()
4259 __ CallCFunction(ExternalReference::log_leave_external_function(isolate), in CallApiFunctionAndReturn()
4261 __ PopSafepointRegisters(); in CallApiFunctionAndReturn()
4266 __ mov(eax, return_value_operand); in CallApiFunctionAndReturn()
4272 __ bind(&prologue); in CallApiFunctionAndReturn()
4275 __ mov(Operand::StaticVariable(next_address), ebx); in CallApiFunctionAndReturn()
4276 __ sub(Operand::StaticVariable(level_address), Immediate(1)); in CallApiFunctionAndReturn()
4277 __ Assert(above_equal, kInvalidHandleScopeLevel); in CallApiFunctionAndReturn()
4278 __ cmp(edi, Operand::StaticVariable(limit_address)); in CallApiFunctionAndReturn()
4279 __ j(not_equal, &delete_allocated_handles); in CallApiFunctionAndReturn()
4282 __ bind(&leave_exit_frame); in CallApiFunctionAndReturn()
4285 __ mov(esi, *context_restore_operand); in CallApiFunctionAndReturn()
4288 __ mov(ebx, *stack_space_operand); in CallApiFunctionAndReturn()
4290 __ LeaveApiExitFrame(!restore_context); in CallApiFunctionAndReturn()
4295 __ cmp(Operand::StaticVariable(scheduled_exception_address), in CallApiFunctionAndReturn()
4297 __ j(not_equal, &promote_scheduled_exception); in CallApiFunctionAndReturn()
4305 __ JumpIfSmi(return_value, &ok, Label::kNear); in CallApiFunctionAndReturn()
4306 __ mov(map, FieldOperand(return_value, HeapObject::kMapOffset)); in CallApiFunctionAndReturn()
4308 __ CmpInstanceType(map, LAST_NAME_TYPE); in CallApiFunctionAndReturn()
4309 __ j(below_equal, &ok, Label::kNear); in CallApiFunctionAndReturn()
4311 __ CmpInstanceType(map, FIRST_JS_RECEIVER_TYPE); in CallApiFunctionAndReturn()
4312 __ j(above_equal, &ok, Label::kNear); in CallApiFunctionAndReturn()
4314 __ cmp(map, isolate->factory()->heap_number_map()); in CallApiFunctionAndReturn()
4315 __ j(equal, &ok, Label::kNear); in CallApiFunctionAndReturn()
4317 __ cmp(return_value, isolate->factory()->undefined_value()); in CallApiFunctionAndReturn()
4318 __ j(equal, &ok, Label::kNear); in CallApiFunctionAndReturn()
4320 __ cmp(return_value, isolate->factory()->true_value()); in CallApiFunctionAndReturn()
4321 __ j(equal, &ok, Label::kNear); in CallApiFunctionAndReturn()
4323 __ cmp(return_value, isolate->factory()->false_value()); in CallApiFunctionAndReturn()
4324 __ j(equal, &ok, Label::kNear); in CallApiFunctionAndReturn()
4326 __ cmp(return_value, isolate->factory()->null_value()); in CallApiFunctionAndReturn()
4327 __ j(equal, &ok, Label::kNear); in CallApiFunctionAndReturn()
4329 __ Abort(kAPICallReturnedInvalidObject); in CallApiFunctionAndReturn()
4331 __ bind(&ok); in CallApiFunctionAndReturn()
4336 __ pop(ecx); in CallApiFunctionAndReturn()
4337 __ add(esp, ebx); in CallApiFunctionAndReturn()
4338 __ jmp(ecx); in CallApiFunctionAndReturn()
4340 __ ret(stack_space * kPointerSize); in CallApiFunctionAndReturn()
4344 __ bind(&promote_scheduled_exception); in CallApiFunctionAndReturn()
4345 __ TailCallRuntime(Runtime::kPromoteScheduledException); in CallApiFunctionAndReturn()
4350 __ bind(&delete_allocated_handles); in CallApiFunctionAndReturn()
4351 __ mov(Operand::StaticVariable(limit_address), edi); in CallApiFunctionAndReturn()
4352 __ mov(edi, eax); in CallApiFunctionAndReturn()
4353 __ mov(Operand(esp, 0), in CallApiFunctionAndReturn()
4355 __ mov(eax, Immediate(delete_extensions)); in CallApiFunctionAndReturn()
4356 __ call(eax); in CallApiFunctionAndReturn()
4357 __ mov(eax, edi); in CallApiFunctionAndReturn()
4358 __ jmp(&leave_exit_frame); in CallApiFunctionAndReturn()
4395 __ pop(return_address); in Generate()
4398 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate()
4401 __ push(context); in Generate()
4404 __ push(callee); in Generate()
4407 __ push(call_data); in Generate()
4412 __ push(Immediate(masm->isolate()->factory()->undefined_value())); in Generate()
4414 __ push(Immediate(masm->isolate()->factory()->undefined_value())); in Generate()
4417 __ push(scratch); in Generate()
4419 __ push(scratch); in Generate()
4422 __ push(Immediate(reinterpret_cast<int>(masm->isolate()))); in Generate()
4424 __ push(holder); in Generate()
4426 __ mov(scratch, esp); in Generate()
4429 __ push(return_address); in Generate()
4433 __ mov(context, FieldOperand(callee, JSFunction::kContextOffset)); in Generate()
4449 __ mov(ApiParameterOperand(2), scratch); in Generate()
4450 __ add(scratch, Immediate((argc() + FCA::kArgsLength - 1) * kPointerSize)); in Generate()
4452 __ mov(ApiParameterOperand(3), scratch); in Generate()
4454 __ Move(ApiParameterOperand(4), Immediate(argc())); in Generate()
4457 __ lea(scratch, ApiParameterOperand(2)); in Generate()
4458 __ mov(ApiParameterOperand(0), scratch); in Generate()
4503 __ pop(scratch); // Pop return address to extend the frame. in Generate()
4504 __ push(receiver); in Generate()
4505 __ push(FieldOperand(callback, AccessorInfo::kDataOffset)); in Generate()
4506 __ PushRoot(Heap::kUndefinedValueRootIndex); // ReturnValue in Generate()
4508 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate()
4509 __ push(Immediate(ExternalReference::isolate_address(isolate()))); in Generate()
4510 __ push(holder); in Generate()
4511 __ push(Immediate(Smi::kZero)); // should_throw_on_error -> false in Generate()
4512 __ push(FieldOperand(callback, AccessorInfo::kNameOffset)); in Generate()
4513 __ push(scratch); // Restore return address. in Generate()
4524 __ lea(scratch, Operand(esp, 2 * kPointerSize)); in Generate()
4530 __ mov(info_object, scratch); in Generate()
4533 __ sub(scratch, Immediate(kPointerSize)); in Generate()
4534 __ mov(ApiParameterOperand(0), scratch); in Generate()
4536 __ lea(scratch, info_object); in Generate()
4537 __ mov(ApiParameterOperand(1), scratch); in Generate()
4544 __ mov(scratch, FieldOperand(callback, AccessorInfo::kJsGetterOffset)); in Generate()
4546 __ mov(function_address, in Generate()
4556 #undef __