23 static void InitializeArrayConstructorDescriptor(
24 Isolate* isolate, CodeStubDescriptor* descriptor,
25 int constant_stack_parameter_count) {
27 Runtime::kArrayConstructor)->
entry;
29 if (constant_stack_parameter_count == 0) {
30 descriptor->Initialize(deopt_handler, constant_stack_parameter_count,
33 descriptor->Initialize(
rax, deopt_handler, constant_stack_parameter_count,
39 static void InitializeInternalArrayConstructorDescriptor(
40 Isolate* isolate, CodeStubDescriptor* descriptor,
41 int constant_stack_parameter_count) {
43 Runtime::kInternalArrayConstructor)->
entry;
45 if (constant_stack_parameter_count == 0) {
46 descriptor->Initialize(deopt_handler, constant_stack_parameter_count,
49 descriptor->Initialize(
rax, deopt_handler, constant_stack_parameter_count,
55 void ArrayNoArgumentConstructorStub::InitializeDescriptor(
56 CodeStubDescriptor* descriptor) {
57 InitializeArrayConstructorDescriptor(isolate(), descriptor, 0);
61 void ArraySingleArgumentConstructorStub::InitializeDescriptor(
62 CodeStubDescriptor* descriptor) {
63 InitializeArrayConstructorDescriptor(isolate(), descriptor, 1);
67 void ArrayNArgumentsConstructorStub::InitializeDescriptor(
68 CodeStubDescriptor* descriptor) {
69 InitializeArrayConstructorDescriptor(isolate(), descriptor, -1);
73 void InternalArrayNoArgumentConstructorStub::InitializeDescriptor(
74 CodeStubDescriptor* descriptor) {
75 InitializeInternalArrayConstructorDescriptor(isolate(), descriptor, 0);
79 void InternalArraySingleArgumentConstructorStub::InitializeDescriptor(
80 CodeStubDescriptor* descriptor) {
81 InitializeInternalArrayConstructorDescriptor(isolate(), descriptor, 1);
85 void InternalArrayNArgumentsConstructorStub::InitializeDescriptor(
86 CodeStubDescriptor* descriptor) {
87 InitializeInternalArrayConstructorDescriptor(isolate(), descriptor, -1);
91 #define __ ACCESS_MASM(masm)
95 ExternalReference miss) {
97 isolate()->counters()->code_stubs()->Increment();
99 CallInterfaceDescriptor descriptor = GetCallInterfaceDescriptor();
100 int param_count = descriptor.GetEnvironmentParameterCount();
104 DCHECK(param_count == 0 ||
105 rax.
is(descriptor.GetEnvironmentParameterRegister(param_count - 1)));
107 for (
int i = 0;
i < param_count; ++
i) {
108 __ Push(descriptor.GetEnvironmentParameterRegister(
i));
110 __ CallExternalReference(miss, param_count);
119 const int argument_count = 1;
120 __ PrepareCallCFunction(argument_count);
122 ExternalReference::isolate_address(isolate()));
124 AllowExternalCallThatCantCauseGC scope(masm);
126 ExternalReference::store_buffer_overflow_function(isolate()),
133 class FloatingPointHelper :
public AllStatic {
135 enum ConvertUndefined {
136 CONVERT_UNDEFINED_TO_ZERO,
143 static void LoadSSE2UnknownOperands(MacroAssembler* masm,
149 Register input_reg = this->
source();
153 Label check_negative, process_64_bits, done;
155 int double_offset =
offset();
165 Register scratch_candidates[3] = {
rbx,
rdx,
rdi };
166 for (
int i = 0;
i < 3;
i++) {
167 scratch1 = scratch_candidates[
i];
168 if (!final_result_reg.is(scratch1) && !input_reg.is(scratch1))
break;
173 Register result_reg = final_result_reg.
is(
rcx) ?
rax : final_result_reg;
177 Register save_reg = final_result_reg.
is(
rcx) ?
rax :
rcx;
181 bool stash_exponent_copy = !input_reg.is(
rsp);
182 __ movl(scratch1, mantissa_operand);
183 __ movsd(
xmm0, mantissa_operand);
184 __ movl(
rcx, exponent_operand);
185 if (stash_exponent_copy)
__ pushq(
rcx);
195 __ subl(
rcx, Immediate(delta));
196 __ xorl(result_reg, result_reg);
197 __ cmpl(
rcx, Immediate(31));
199 __ shll_cl(scratch1);
200 __ jmp(&check_negative);
202 __ bind(&process_64_bits);
203 __ cvttsd2siq(result_reg,
xmm0);
204 __ jmp(&done, Label::kNear);
207 __ bind(&check_negative);
208 __ movl(result_reg, scratch1);
210 if (stash_exponent_copy) {
213 __ cmpl(exponent_operand, Immediate(0));
219 if (stash_exponent_copy) {
222 if (!final_result_reg.is(result_reg)) {
224 __ movl(final_result_reg, result_reg);
232 void FloatingPointHelper::LoadSSE2UnknownOperands(MacroAssembler* masm,
233 Label* not_numbers) {
234 Label load_smi_rdx, load_nonsmi_rax, load_smi_rax, load_float_rax, done;
236 __ LoadRoot(
rcx, Heap::kHeapNumberMapRootIndex);
237 __ JumpIfSmi(
rdx, &load_smi_rdx);
242 __ JumpIfSmi(
rax, &load_smi_rax);
244 __ bind(&load_nonsmi_rax);
250 __ bind(&load_smi_rdx);
253 __ JumpIfNotSmi(
rax, &load_nonsmi_rax);
255 __ bind(&load_smi_rax);
265 const Register base =
rax;
266 const Register scratch =
rcx;
267 const XMMRegister double_result =
xmm3;
268 const XMMRegister double_base =
xmm2;
269 const XMMRegister double_exponent =
xmm1;
270 const XMMRegister double_scratch =
xmm4;
272 Label call_runtime, done, exponent_not_smi, int_exponent;
275 __ movp(scratch, Immediate(1));
276 __ Cvtlsi2sd(double_result, scratch);
279 Label base_is_smi, unpack_exponent;
284 __ movp(base, args.GetArgumentOperand(0));
285 __ movp(exponent, args.GetArgumentOperand(1));
286 __ JumpIfSmi(base, &base_is_smi, Label::kNear);
288 Heap::kHeapNumberMapRootIndex);
292 __ jmp(&unpack_exponent, Label::kNear);
294 __ bind(&base_is_smi);
295 __ SmiToInteger32(base, base);
296 __ Cvtlsi2sd(double_base, base);
297 __ bind(&unpack_exponent);
299 __ JumpIfNotSmi(exponent, &exponent_not_smi, Label::kNear);
300 __ SmiToInteger32(exponent, exponent);
301 __ jmp(&int_exponent);
303 __ bind(&exponent_not_smi);
305 Heap::kHeapNumberMapRootIndex);
309 __ JumpIfNotSmi(exponent, &exponent_not_smi, Label::kNear);
310 __ SmiToInteger32(exponent, exponent);
311 __ jmp(&int_exponent);
313 __ bind(&exponent_not_smi);
318 Label fast_power, try_arithmetic_simplification;
320 __ DoubleToI(exponent, double_exponent, double_scratch,
322 &try_arithmetic_simplification,
323 &try_arithmetic_simplification);
324 __ jmp(&int_exponent);
326 __ bind(&try_arithmetic_simplification);
327 __ cvttsd2si(exponent, double_exponent);
329 __ cmpl(exponent, Immediate(0x1));
336 Label continue_sqrt, continue_rsqrt, not_plus_half;
340 __ movq(double_scratch, scratch);
342 __ ucomisd(double_scratch, double_exponent);
350 __ movq(double_scratch, scratch);
351 __ ucomisd(double_scratch, double_base);
355 __ j(
carry, &continue_sqrt, Label::kNear);
358 __ xorps(double_result, double_result);
359 __ subsd(double_result, double_scratch);
362 __ bind(&continue_sqrt);
364 __ xorps(double_scratch, double_scratch);
365 __ addsd(double_scratch, double_base);
366 __ sqrtsd(double_result, double_scratch);
370 __ bind(¬_plus_half);
372 __ subsd(double_scratch, double_result);
374 __ ucomisd(double_scratch, double_exponent);
382 __ movq(double_scratch, scratch);
383 __ ucomisd(double_scratch, double_base);
387 __ j(
carry, &continue_rsqrt, Label::kNear);
390 __ xorps(double_result, double_result);
393 __ bind(&continue_rsqrt);
395 __ xorps(double_exponent, double_exponent);
396 __ addsd(double_exponent, double_base);
397 __ sqrtsd(double_exponent, double_exponent);
398 __ divsd(double_result, double_exponent);
403 Label fast_power_failed;
404 __ bind(&fast_power);
408 __ movsd(Operand(
rsp, 0), double_exponent);
409 __ fld_d(Operand(
rsp, 0));
410 __ movsd(Operand(
rsp, 0), double_base);
411 __ fld_d(Operand(
rsp, 0));
430 __ testb(
rax, Immediate(0x5F));
431 __ j(
not_zero, &fast_power_failed, Label::kNear);
432 __ fstp_d(Operand(
rsp, 0));
433 __ movsd(double_result, Operand(
rsp, 0));
437 __ bind(&fast_power_failed);
440 __ jmp(&call_runtime);
444 __ bind(&int_exponent);
445 const XMMRegister double_scratch2 = double_exponent;
447 __ movp(scratch, exponent);
448 __ movsd(double_scratch, double_base);
449 __ movsd(double_scratch2, double_result);
452 Label no_neg, while_true, while_false;
453 __ testl(scratch, scratch);
458 __ j(
zero, &while_false, Label::kNear);
459 __ shrl(scratch, Immediate(1));
462 __ j(
above, &while_true, Label::kNear);
463 __ movsd(double_result, double_scratch);
464 __ j(
zero, &while_false, Label::kNear);
466 __ bind(&while_true);
467 __ shrl(scratch, Immediate(1));
468 __ mulsd(double_scratch, double_scratch);
469 __ j(
above, &while_true, Label::kNear);
470 __ mulsd(double_result, double_scratch);
473 __ bind(&while_false);
475 __ testl(exponent, exponent);
477 __ divsd(double_scratch2, double_result);
478 __ movsd(double_result, double_scratch2);
481 __ xorps(double_scratch2, double_scratch2);
482 __ ucomisd(double_scratch2, double_result);
487 __ Cvtlsi2sd(double_exponent, exponent);
490 Counters* counters = isolate()->counters();
493 __ bind(&call_runtime);
494 __ TailCallRuntime(Runtime::kMathPowRT, 2, 1);
499 __ AllocateHeapNumber(
rax,
rcx, &call_runtime);
501 __ IncrementCounter(counters->math_pow(), 1);
504 __ bind(&call_runtime);
506 __ movsd(
xmm0, double_base);
509 AllowExternalCallThatCantCauseGC scope(masm);
510 __ PrepareCallCFunction(2);
512 ExternalReference::power_double_double_function(isolate()), 2);
515 __ movsd(double_result,
xmm0);
518 __ IncrementCounter(counters->math_pow(), 1);
531 PropertyAccessCompiler::TailCallBuiltin(
532 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
543 __ JumpIfNotSmi(
rdx, &slow);
565 __ movp(
rax, args.GetArgumentOperand(0));
579 StackArgumentsAccessor adaptor_args(
rbx,
rcx,
581 __ movp(
rax, adaptor_args.GetArgumentOperand(0));
587 __ PopReturnAddressTo(
rbx);
589 __ PushReturnAddressFrom(
rbx);
590 __ TailCallRuntime(Runtime::kGetArgumentsProperty, 1, 1);
604 Factory* factory = isolate()->factory();
607 __ SmiToInteger64(
rbx, args.GetArgumentOperand(2));
612 Label adaptor_frame, try_allocate;
620 __ jmp(&try_allocate, Label::kNear);
623 __ bind(&adaptor_frame);
624 __ SmiToInteger64(
rcx,
629 __ movp(args.GetArgumentOperand(1),
rdx);
638 __ bind(&try_allocate);
642 const int kParameterMapHeaderSize =
644 Label no_parameter_map;
647 __ j(
zero, &no_parameter_map, Label::kNear);
649 __ bind(&no_parameter_map);
663 Label has_mapped_parameters, instantiate;
667 __ j(
not_zero, &has_mapped_parameters, Label::kNear);
671 __ jmp(&instantiate, Label::kNear);
674 __ bind(&has_mapped_parameters);
676 __ bind(&instantiate);
689 __ movp(
rdx, args.GetArgumentOperand(0));
690 __ AssertNotSmi(
rdx);
715 Label skip_parameter_map;
717 __ j(
zero, &skip_parameter_map);
722 __ Integer64PlusConstantToSmi(
r9,
rbx, 2);
736 Label parameters_loop, parameters_test;
741 __ addp(
r8, args.GetArgumentOperand(2));
743 __ Move(
r11, factory->the_hole_value());
751 __ jmp(¶meters_test, Label::kNear);
753 __ bind(¶meters_loop);
758 kParameterMapHeaderSize),
765 __ bind(¶meters_test);
767 __ j(
not_zero, ¶meters_loop, Label::kNear);
769 __ bind(&skip_parameter_map);
775 factory->fixed_array_map());
778 Label arguments_loop, arguments_test;
780 __ movp(
rdx, args.GetArgumentOperand(1));
785 __ jmp(&arguments_test, Label::kNear);
787 __ bind(&arguments_loop);
794 __ addp(
r8, Immediate(1));
796 __ bind(&arguments_test);
798 __ j(
less, &arguments_loop, Label::kNear);
807 __ movp(args.GetArgumentOperand(2),
rcx);
808 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
828 __ movp(args.GetArgumentOperand(2),
rcx);
832 __ movp(args.GetArgumentOperand(1),
rdx);
835 __ TailCallRuntime(Runtime::kNewSloppyArguments, 3, 1);
845 Register scratch =
rax;
846 DCHECK(!scratch.is(receiver) && !scratch.is(key));
850 __ JumpUnlessNonNegativeSmi(key, &slow);
853 __ PopReturnAddressTo(scratch);
856 __ PushReturnAddressFrom(scratch);
859 __ TailCallExternalReference(
860 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor),
865 PropertyAccessCompiler::TailCallBuiltin(
866 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
877 Label adaptor_frame, try_allocate, runtime;
885 __ movp(
rcx, args.GetArgumentOperand(2));
887 __ jmp(&try_allocate);
890 __ bind(&adaptor_frame);
892 __ movp(args.GetArgumentOperand(2),
rcx);
896 __ movp(args.GetArgumentOperand(1),
rdx);
900 Label add_arguments_object;
901 __ bind(&try_allocate);
903 __ j(
zero, &add_arguments_object, Label::kNear);
905 __ bind(&add_arguments_object);
924 __ movp(
rcx, args.GetArgumentOperand(2));
935 __ movp(
rdx, args.GetArgumentOperand(1));
965 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
973 #ifdef V8_INTERPRETED_REGEXP
974 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1);
984 enum RegExpExecStubArgumentIndices {
985 JS_REG_EXP_OBJECT_ARGUMENT_INDEX,
986 SUBJECT_STRING_ARGUMENT_INDEX,
987 PREVIOUS_INDEX_ARGUMENT_INDEX,
988 LAST_MATCH_INFO_ARGUMENT_INDEX,
989 REG_EXP_EXEC_ARGUMENT_COUNT
992 StackArgumentsAccessor args(
rsp, REG_EXP_EXEC_ARGUMENT_COUNT,
996 ExternalReference address_of_regexp_stack_memory_address =
997 ExternalReference::address_of_regexp_stack_memory_address(isolate());
998 ExternalReference address_of_regexp_stack_memory_size =
999 ExternalReference::address_of_regexp_stack_memory_size(isolate());
1005 __ movp(
rax, args.GetArgumentOperand(JS_REG_EXP_OBJECT_ARGUMENT_INDEX));
1006 __ JumpIfSmi(
rax, &runtime);
1012 if (FLAG_debug_code) {
1015 kUnexpectedTypeForRegExpDataFixedArrayExpected);
1017 __ Check(
equal, kUnexpectedTypeForRegExpDataFixedArrayExpected);
1028 __ SmiToInteger32(
rdx,
1038 __ movp(
rdi, args.GetArgumentOperand(SUBJECT_STRING_ARGUMENT_INDEX));
1039 __ JumpIfSmi(
rdi, &runtime);
1066 Label seq_one_byte_string , seq_two_byte_string ,
1067 external_string , check_underlying ,
1068 not_seq_nor_cons , check_code ,
1077 __ j(
zero, &seq_two_byte_string);
1084 __ j(
zero, &seq_one_byte_string, Label::kNear);
1099 Heap::kempty_stringRootIndex);
1102 __ bind(&check_underlying);
1109 __ j(
zero, &seq_two_byte_string);
1118 __ bind(&seq_one_byte_string);
1124 __ bind(&check_code);
1129 __ JumpIfSmi(
r11, &runtime);
1140 __ movp(
rbx, args.GetArgumentOperand(PREVIOUS_INDEX_ARGUMENT_INDEX));
1141 __ JumpIfNotSmi(
rbx, &runtime);
1151 Counters* counters = isolate()->counters();
1152 __ IncrementCounter(counters->regexp_entry_native(), 1);
1155 static const int kRegExpExecuteArguments = 9;
1156 int argument_slots_on_stack =
1157 masm->ArgumentStackSlotsForCFunctionCall(kRegExpExecuteArguments);
1158 __ EnterApiExitFrame(argument_slots_on_stack);
1162 ExternalReference::isolate_address(isolate()));
1189 r8, ExternalReference::address_of_static_offsets_vector(isolate()));
1207 Label setup_two_byte, setup_rest, got_length, length_not_from_slice;
1218 __ j(
zero, &setup_two_byte, Label::kNear);
1223 __ jmp(&setup_rest, Label::kNear);
1224 __ bind(&setup_two_byte);
1229 __ bind(&setup_rest);
1242 __ LeaveApiExitFrame(
true);
1247 __ cmpl(
rax, Immediate(1));
1250 __ j(
equal, &success, Label::kNear);
1259 __ LoadRoot(
rax, Heap::kNullValueRootIndex);
1264 __ movp(
rax, args.GetArgumentOperand(JS_REG_EXP_OBJECT_ARGUMENT_INDEX));
1266 __ SmiToInteger32(
rax,
1273 __ movp(
r15, args.GetArgumentOperand(LAST_MATCH_INFO_ARGUMENT_INDEX));
1274 __ JumpIfSmi(
r15, &runtime);
1280 __ CompareRoot(
rax, Heap::kFixedArrayMapRootIndex);
1297 __ movp(
rax, args.GetArgumentOperand(SUBJECT_STRING_ARGUMENT_INDEX));
1300 __ RecordWriteField(
rbx,
1307 __ RecordWriteField(
rbx,
1315 rcx, ExternalReference::address_of_static_offsets_vector(isolate()));
1320 Label next_capture, done;
1323 __ bind(&next_capture);
1324 __ subp(
rdx, Immediate(1));
1335 __ jmp(&next_capture);
1342 __ bind(&exception);
1347 ExternalReference pending_exception_address(
1348 Isolate::kPendingExceptionAddress, isolate());
1349 Operand pending_exception_operand =
1350 masm->ExternalOperand(pending_exception_address,
rbx);
1351 __ movp(
rax, pending_exception_operand);
1352 __ LoadRoot(
rdx, Heap::kTheHoleValueRootIndex);
1355 __ movp(pending_exception_operand,
rdx);
1357 __ CompareRoot(
rax, Heap::kTerminationExceptionRootIndex);
1358 Label termination_exception;
1359 __ j(
equal, &termination_exception, Label::kNear);
1362 __ bind(&termination_exception);
1363 __ ThrowUncatchable(
rax);
1367 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1);
1371 __ bind(¬_seq_nor_cons);
1373 __ j(
greater, ¬_long_external, Label::kNear);
1376 __ bind(&external_string);
1379 if (FLAG_debug_code) {
1383 __ Assert(
zero, kExternalStringExpectedButNotFound);
1397 __ bind(&seq_two_byte_string);
1400 __ jmp(&check_code);
1403 __ bind(¬_long_external);
1413 __ jmp(&check_underlying);
1418 static int NegativeComparisonResult(
Condition cc) {
1426 static void CheckInputType(MacroAssembler* masm, Register input,
1430 __ JumpIfNotSmi(input, fail);
1432 __ JumpIfSmi(input, &ok);
1433 __ CompareMap(input, masm->isolate()->factory()->heap_number_map());
1442 static void BranchIfNotInternalizedString(MacroAssembler* masm,
1446 __ JumpIfSmi(
object, label);
1457 Label check_unequal_objects, done;
1459 Factory* factory = isolate()->factory();
1462 CheckInputType(masm,
rdx,
left(), &miss);
1463 CheckInputType(masm,
rax,
right(), &miss);
1466 Label non_smi, smi_done;
1467 __ JumpIfNotBothSmi(
rax,
rdx, &non_smi);
1483 Label not_identical;
1490 Label check_for_nan;
1491 __ CompareRoot(
rdx, Heap::kUndefinedValueRootIndex);
1493 __ Set(
rax, NegativeComparisonResult(
cc));
1495 __ bind(&check_for_nan);
1503 factory->heap_number_map());
1504 __ j(
equal, &heap_number, Label::kNear);
1513 __ bind(&heap_number);
1528 __ bind(¬_identical);
1547 factory->heap_number_map());
1563 Label first_non_object;
1565 __ j(
below, &first_non_object, Label::kNear);
1567 Label return_not_equal;
1569 __ bind(&return_not_equal);
1572 __ bind(&first_non_object);
1575 __ j(
equal, &return_not_equal);
1582 __ j(
equal, &return_not_equal);
1590 Label non_number_comparison;
1592 FloatingPointHelper::LoadSSE2UnknownOperands(masm, &non_number_comparison);
1607 __ bind(&unordered);
1617 __ bind(&non_number_comparison);
1620 Label check_for_strings;
1622 BranchIfNotInternalizedString(
1624 BranchIfNotInternalizedString(
1633 __ bind(&check_for_strings);
1636 &check_unequal_objects);
1647 __ Abort(kUnexpectedFallThroughFromStringComparison);
1650 __ bind(&check_unequal_objects);
1655 Label not_both_objects, return_unequal;
1663 __ j(
not_zero, ¬_both_objects, Label::kNear);
1665 __ j(
below, ¬_both_objects, Label::kNear);
1667 __ j(
below, ¬_both_objects, Label::kNear);
1670 __ j(
zero, &return_unequal, Label::kNear);
1673 __ j(
zero, &return_unequal, Label::kNear);
1677 __ bind(&return_unequal);
1681 __ bind(¬_both_objects);
1685 __ PopReturnAddressTo(
rcx);
1692 builtin =
strict() ? Builtins::STRICT_EQUALS : Builtins::EQUALS;
1694 builtin = Builtins::COMPARE;
1698 __ PushReturnAddressFrom(
rcx);
1709 static void GenerateRecordCallTarget(MacroAssembler* masm) {
1717 Isolate* isolate = masm->isolate();
1718 Label initialize, done, miss, megamorphic, not_array_function,
1719 done_no_smi_convert;
1733 if (!FLAG_pretenuring_call_new) {
1738 Handle<Map> allocation_site_map =
1739 masm->isolate()->factory()->allocation_site_map();
1758 __ bind(&megamorphic);
1765 __ bind(&initialize);
1767 if (!FLAG_pretenuring_call_new) {
1784 CreateAllocationSiteStub create_stub(isolate);
1785 __ CallStub(&create_stub);
1793 __ jmp(&done_no_smi_convert);
1795 __ bind(¬_array_function);
1814 __ bind(&done_no_smi_convert);
1818 static void EmitContinueIfStrictOrNative(MacroAssembler* masm, Label* cont) {
1833 static void EmitSlowCase(Isolate* isolate,
1834 MacroAssembler* masm,
1835 StackArgumentsAccessor* args,
1837 Label* non_function) {
1841 __ PopReturnAddressTo(
rcx);
1843 __ PushReturnAddressFrom(
rcx);
1844 __ Set(
rax, argc + 1);
1846 __ GetBuiltinEntry(
rdx, Builtins::CALL_FUNCTION_PROXY);
1848 Handle<Code> adaptor =
1849 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline();
1855 __ bind(non_function);
1856 __ movp(args->GetReceiverOperand(),
rdi);
1859 __ GetBuiltinEntry(
rdx, Builtins::CALL_NON_FUNCTION);
1860 Handle<Code> adaptor =
1861 isolate->builtins()->ArgumentsAdaptorTrampoline();
1866 static void EmitWrapCase(MacroAssembler* masm,
1867 StackArgumentsAccessor* args,
1876 __ movp(args->GetReceiverOperand(),
rax);
1881 static void CallFunctionNoFeedback(MacroAssembler* masm,
1882 int argc,
bool needs_checks,
1883 bool call_as_method) {
1887 Isolate* isolate = masm->isolate();
1888 Label slow, non_function, wrap, cont;
1889 StackArgumentsAccessor args(
rsp, argc);
1893 __ JumpIfSmi(
rdi, &non_function);
1901 ParameterCount actual(argc);
1903 if (call_as_method) {
1905 EmitContinueIfStrictOrNative(masm, &cont);
1909 __ movp(
rax, args.GetReceiverOperand());
1912 __ JumpIfSmi(
rax, &wrap);
1928 EmitSlowCase(isolate, masm, &args, argc, &non_function);
1931 if (call_as_method) {
1933 EmitWrapCase(masm, &args, &cont);
1949 Label slow, non_function_call;
1952 __ JumpIfSmi(
rdi, &non_function_call);
1958 GenerateRecordCallTarget(masm);
1961 if (FLAG_pretenuring_call_new) {
1968 Label feedback_register_initialized;
1973 __ j(
equal, &feedback_register_initialized);
1974 __ LoadRoot(
rbx, Heap::kUndefinedValueRootIndex);
1975 __ bind(&feedback_register_initialized);
1978 __ AssertUndefinedOrAllocationSite(
rbx);
1982 Register jmp_reg =
rcx;
1996 __ GetBuiltinEntry(
rdx, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR);
1999 __ bind(&non_function_call);
2000 __ GetBuiltinEntry(
rdx, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
2004 __ Jump(isolate()->builtins()->ArgumentsAdaptorTrampoline(),
2009 static void EmitLoadTypeFeedbackVector(MacroAssembler* masm, Register vector) {
2022 ParameterCount actual(argc);
2024 EmitLoadTypeFeedbackVector(masm,
rbx);
2035 Factory* factory = masm->isolate()->factory();
2037 factory->allocation_site_map());
2041 ArrayConstructorStub stub(masm->isolate(),
arg_count());
2042 __ TailCallStub(&stub);
2048 CallFunctionNoFeedback(masm,
2061 Isolate* isolate = masm->isolate();
2062 Label extra_checks_or_miss, slow_start;
2063 Label slow, non_function, wrap, cont;
2064 Label have_js_function;
2066 StackArgumentsAccessor args(
rsp, argc);
2067 ParameterCount actual(argc);
2069 EmitLoadTypeFeedbackVector(masm,
rbx);
2077 __ bind(&have_js_function);
2079 EmitContinueIfStrictOrNative(masm, &cont);
2082 __ movp(
rax, args.GetReceiverOperand());
2084 __ JumpIfSmi(
rax, &wrap);
2095 EmitSlowCase(isolate, masm, &args, argc, &non_function);
2099 EmitWrapCase(masm, &args, &cont);
2102 __ bind(&extra_checks_or_miss);
2112 if (!FLAG_trace_ic) {
2115 __ AssertNotSmi(
rcx);
2120 __ jmp(&slow_start);
2128 __ bind(&slow_start);
2130 __ JumpIfSmi(
rdi, &non_function);
2134 __ jmp(&have_js_function);
2157 : IC::kCallIC_Customization_Miss;
2159 ExternalReference miss = ExternalReference(IC_Utility(
id),
2161 __ CallExternalReference(miss, 4);
2174 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
2182 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
2186 void CodeStub::GenerateFPStubs(Isolate* isolate) {
2209 int arg_stack_space = (result_size() < 2 ? 2 : 4);
2211 int arg_stack_space = 0;
2226 if (FLAG_debug_code) {
2227 __ CheckStackAlignment();
2235 if (result_size() < 2) {
2240 __ Move(
r8, ExternalReference::isolate_address(isolate()));
2248 __ Move(
r9, ExternalReference::isolate_address(isolate()));
2255 __ Move(
rdx, ExternalReference::isolate_address(isolate()));
2262 if (result_size() > 1) {
2274 if (FLAG_debug_code) {
2276 __ CompareRoot(
rax, Heap::kTheHoleValueRootIndex);
2283 Label exception_returned;
2284 __ CompareRoot(
rax, Heap::kExceptionRootIndex);
2285 __ j(
equal, &exception_returned);
2287 ExternalReference pending_exception_address(
2288 Isolate::kPendingExceptionAddress, isolate());
2292 if (FLAG_debug_code) {
2294 __ LoadRoot(
r14, Heap::kTheHoleValueRootIndex);
2295 Operand pending_exception_operand =
2296 masm->ExternalOperand(pending_exception_address);
2297 __ cmpp(
r14, pending_exception_operand);
2298 __ j(
equal, &okay, Label::kNear);
2308 __ bind(&exception_returned);
2311 Operand pending_exception_operand =
2312 masm->ExternalOperand(pending_exception_address);
2313 __ movp(
rax, pending_exception_operand);
2316 __ LoadRoot(
rdx, Heap::kTheHoleValueRootIndex);
2317 __ movp(pending_exception_operand,
rdx);
2321 Label throw_termination_exception;
2322 __ CompareRoot(
rax, Heap::kTerminationExceptionRootIndex);
2323 __ j(
equal, &throw_termination_exception);
2328 __ bind(&throw_termination_exception);
2329 __ ThrowUncatchable(
rax);
2334 Label invoke, handler_entry, exit;
2335 Label not_outermost_js, not_outermost_js_2;
2340 MacroAssembler::NoRootArrayScope uninitialized_root_register(masm);
2346 int marker =
type();
2366 __ subp(
rsp, Immediate(EntryFrameConstants::kXMMRegistersBlockSize));
2367 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 0),
xmm6);
2368 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 1),
xmm7);
2369 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 2),
xmm8);
2370 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 3),
xmm9);
2371 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 4),
xmm10);
2372 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 5),
xmm11);
2373 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 6),
xmm12);
2374 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 7),
xmm13);
2375 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 8),
xmm14);
2376 __ movdqu(Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 9),
xmm15);
2381 __ InitializeSmiConstantRegister();
2382 __ InitializeRootRegister();
2386 ExternalReference c_entry_fp(Isolate::kCEntryFPAddress, isolate());
2388 Operand c_entry_fp_operand = masm->ExternalOperand(c_entry_fp);
2389 __ Push(c_entry_fp_operand);
2393 ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
2394 __ Load(
rax, js_entry_sp);
2399 __ Store(js_entry_sp,
rax);
2402 __ bind(¬_outermost_js);
2409 __ bind(&handler_entry);
2413 ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
2415 __ Store(pending_exception,
rax);
2416 __ LoadRoot(
rax, Heap::kExceptionRootIndex);
2422 __ PushTryHandler(StackHandler::JS_ENTRY, 0);
2425 __ LoadRoot(
rax, Heap::kTheHoleValueRootIndex);
2426 __ Store(pending_exception,
rax);
2436 if (
type() == StackFrame::ENTRY_CONSTRUCT) {
2437 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline,
2439 __ Load(
rax, construct_entry);
2441 ExternalReference entry(Builtins::kJSEntryTrampoline, isolate());
2442 __ Load(
rax, entry);
2457 __ bind(¬_outermost_js_2);
2460 { Operand c_entry_fp_operand = masm->ExternalOperand(c_entry_fp);
2461 __ Pop(c_entry_fp_operand);
2467 __ movdqu(
xmm6, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 0));
2468 __ movdqu(
xmm7, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 1));
2469 __ movdqu(
xmm8, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 2));
2470 __ movdqu(
xmm9, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 3));
2471 __ movdqu(
xmm10, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 4));
2472 __ movdqu(
xmm11, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 5));
2473 __ movdqu(
xmm12, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 6));
2474 __ movdqu(
xmm13, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 7));
2475 __ movdqu(
xmm14, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 8));
2476 __ movdqu(
xmm15, Operand(
rsp, EntryFrameConstants::kXMMRegisterSize * 9));
2477 __ addp(
rsp, Immediate(EntryFrameConstants::kXMMRegistersBlockSize));
2514 Register
object =
rax;
2516 Register
function =
rdx;
2517 Register prototype =
rdi;
2518 Register scratch =
rcx;
2520 static const int kOffsetToMapCheckValue = 2;
2526 static const unsigned int kWordBeforeMapCheckValue =
2532 static const unsigned int kWordBeforeResultValue =
2543 StackArgumentsAccessor args(
rsp, 2 + extra_argument_offset,
2546 __ movp(
object, args.GetArgumentOperand(0));
2547 __ movp(
function, args.GetArgumentOperand(1));
2549 __ JumpIfSmi(
object, &slow);
2562 __ CompareRoot(
function, Heap::kInstanceofCacheFunctionRootIndex);
2564 __ CompareRoot(
map, Heap::kInstanceofCacheMapRootIndex);
2566 __ LoadRoot(
rax, Heap::kInstanceofCacheAnswerRootIndex);
2572 __ TryGetFunctionPrototype(
function, prototype, &slow,
true);
2575 __ JumpIfSmi(prototype, &slow);
2584 __ StoreRoot(
function, Heap::kInstanceofCacheFunctionRootIndex);
2585 __ StoreRoot(
map, Heap::kInstanceofCacheMapRootIndex);
2593 if (FLAG_debug_code) {
2594 __ movl(scratch, Immediate(kWordBeforeMapCheckValue));
2596 __ Assert(
equal, kInstanceofStubUnexpectedCallSiteCacheCheck);
2605 Label loop, is_instance, is_not_instance;
2608 __ cmpp(scratch, prototype);
2609 __ j(
equal, &is_instance, Label::kNear);
2613 __ j(
equal, &is_not_instance, Label::kNear);
2618 __ bind(&is_instance);
2623 __ StoreRoot(
rax, Heap::kInstanceofCacheAnswerRootIndex);
2625 __ LoadRoot(
rax, Heap::kTrueValueRootIndex);
2629 int true_offset = 0x100 +
2632 DCHECK(true_offset >= 0 && true_offset < 0x100);
2633 __ movl(
rax, Immediate(true_offset));
2637 if (FLAG_debug_code) {
2638 __ movl(
rax, Immediate(kWordBeforeResultValue));
2640 __ Assert(
equal, kInstanceofStubUnexpectedCallSiteCacheMov);
2649 __ bind(&is_not_instance);
2654 __ LoadRoot(
rax, Heap::kFalseValueRootIndex);
2658 int false_offset = 0x100 +
2661 DCHECK(false_offset >= 0 && false_offset < 0x100);
2662 __ movl(
rax, Immediate(false_offset));
2666 if (FLAG_debug_code) {
2667 __ movl(
rax, Immediate(kWordBeforeResultValue));
2669 __ Assert(
equal, kInstanceofStubUnexpectedCallSiteCacheMov);
2682 __ PopReturnAddressTo(
rcx);
2684 __ PushReturnAddressFrom(
rcx);
2695 Label true_value, done;
2697 __ j(
zero, &true_value, Label::kNear);
2698 __ LoadRoot(
rax, Heap::kFalseValueRootIndex);
2699 __ jmp(&done, Label::kNear);
2700 __ bind(&true_value);
2701 __ LoadRoot(
rax, Heap::kTrueValueRootIndex);
2742 MacroAssembler* masm,
2743 const RuntimeCallHelper& call_helper) {
2744 __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase);
2746 Factory* factory = masm->isolate()->factory();
2751 factory->heap_number_map(),
2754 call_helper.BeforeCall(masm);
2758 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
2762 __ CallRuntime(Runtime::kNumberToSmi, 1);
2773 call_helper.AfterCall(masm);
2783 call_helper.BeforeCall(masm);
2787 __ CallRuntime(Runtime::kStringCharCodeAtRT, 2);
2791 call_helper.AfterCall(masm);
2794 __ Abort(kUnexpectedFallthroughFromCharCodeAtSlowCase);
2807 __ LoadRoot(
result_, Heap::kSingleCharacterStringCacheRootIndex);
2811 __ CompareRoot(
result_, Heap::kUndefinedValueRootIndex);
2818 MacroAssembler* masm,
2819 const RuntimeCallHelper& call_helper) {
2820 __ Abort(kUnexpectedFallthroughToCharFromCodeSlowCase);
2823 call_helper.BeforeCall(masm);
2825 __ CallRuntime(Runtime::kCharFromCode, 1);
2829 call_helper.AfterCall(masm);
2832 __ Abort(kUnexpectedFallthroughFromCharFromCodeSlowCase);
2843 __ testl(count, count);
2844 __ j(
zero, &done, Label::kNear);
2849 __ addl(count, count);
2875 enum SubStringStubArgumentIndices {
2876 STRING_ARGUMENT_INDEX,
2877 FROM_ARGUMENT_INDEX,
2879 SUB_STRING_ARGUMENT_COUNT
2882 StackArgumentsAccessor args(
rsp, SUB_STRING_ARGUMENT_COUNT,
2886 __ movp(
rax, args.GetArgumentOperand(STRING_ARGUMENT_INDEX));
2896 __ movp(
rcx, args.GetArgumentOperand(TO_ARGUMENT_INDEX));
2897 __ movp(
rdx, args.GetArgumentOperand(FROM_ARGUMENT_INDEX));
2898 __ JumpUnlessBothNonNegativeSmi(
rcx,
rdx, &runtime);
2902 Label not_original_string;
2904 __ j(
below, ¬_original_string, Label::kNear);
2908 Counters* counters = isolate()->counters();
2909 __ IncrementCounter(counters->sub_string_native(), 1);
2911 __ bind(¬_original_string);
2925 Label underlying_unpacked, sliced_string, seq_or_external_string;
2930 __ j(
zero, &seq_or_external_string, Label::kNear);
2933 __ j(
not_zero, &sliced_string, Label::kNear);
2937 Heap::kempty_stringRootIndex);
2943 __ jmp(&underlying_unpacked, Label::kNear);
2945 __ bind(&sliced_string);
2952 __ jmp(&underlying_unpacked, Label::kNear);
2954 __ bind(&seq_or_external_string);
2958 __ bind(&underlying_unpacked);
2960 if (FLAG_string_slices) {
2970 __ j(
less, ©_routine);
2976 Label two_byte_slice, set_slice_header;
2980 __ j(
zero, &two_byte_slice, Label::kNear);
2981 __ AllocateOneByteSlicedString(
rax,
rbx,
r14, &runtime);
2982 __ jmp(&set_slice_header, Label::kNear);
2983 __ bind(&two_byte_slice);
2984 __ AllocateTwoByteSlicedString(
rax,
rbx,
r14, &runtime);
2985 __ bind(&set_slice_header);
2992 __ IncrementCounter(counters->sub_string_native(), 1);
2995 __ bind(©_routine);
3004 Label two_byte_sequential, sequential_string;
3008 __ j(
zero, &sequential_string);
3020 __ bind(&sequential_string);
3023 __ j(
zero, &two_byte_sequential);
3031 SmiIndex smi_as_index = masm->SmiToIndex(
rdx,
rdx,
times_1);
3032 __ leap(
r14, Operand(
rdi, smi_as_index.reg, smi_as_index.scale,
3044 __ IncrementCounter(counters->sub_string_native(), 1);
3047 __ bind(&two_byte_sequential);
3054 SmiIndex smi_as_index = masm->SmiToIndex(
rdx,
rdx,
times_2);
3055 __ leap(
r14, Operand(
rdi, smi_as_index.reg, smi_as_index.scale,
3067 __ IncrementCounter(counters->sub_string_native(), 1);
3072 __ TailCallRuntime(Runtime::kSubString, 3, 1);
3074 __ bind(&single_char);
3079 StringCharAtGenerator generator(
3081 generator.GenerateFast(masm);
3083 generator.SkipSlow(masm, &runtime);
3091 Register scratch2) {
3092 Register length = scratch1;
3095 Label check_zero_length;
3098 __ j(
equal, &check_zero_length, Label::kNear);
3103 Label compare_chars;
3104 __ bind(&check_zero_length);
3107 __ j(
not_zero, &compare_chars, Label::kNear);
3112 __ bind(&compare_chars);
3113 Label strings_not_equal;
3115 &strings_not_equal, Label::kNear);
3122 __ bind(&strings_not_equal);
3129 MacroAssembler* masm, Register left, Register right, Register scratch1,
3130 Register scratch2, Register scratch3, Register scratch4) {
3137 __ movp(scratch4, scratch1);
3142 const Register length_difference = scratch4;
3144 __ j(
less, &left_shorter, Label::kNear);
3148 __ SmiSub(scratch1, scratch1, length_difference);
3149 __ bind(&left_shorter);
3151 const Register min_length = scratch1;
3153 Label compare_lengths;
3155 __ SmiTest(min_length);
3156 __ j(
zero, &compare_lengths, Label::kNear);
3159 Label result_not_equal;
3161 masm, left, right, min_length, scratch2, &result_not_equal,
3168 __ bind(&compare_lengths);
3169 __ SmiTest(length_difference);
3170 Label length_not_equal;
3171 __ j(
not_zero, &length_not_equal, Label::kNear);
3177 Label result_greater;
3179 __ bind(&length_not_equal);
3180 __ j(
greater, &result_greater, Label::kNear);
3181 __ jmp(&result_less, Label::kNear);
3182 __ bind(&result_not_equal);
3184 __ j(
above, &result_greater, Label::kNear);
3185 __ bind(&result_less);
3192 __ bind(&result_greater);
3199 MacroAssembler* masm, Register left, Register right, Register length,
3200 Register scratch, Label* chars_not_equal, Label::Distance near_jump) {
3204 __ SmiToInteger32(length, length);
3210 Register index = length;
3215 __ movb(scratch, Operand(left, index,
times_1, 0));
3216 __ cmpb(scratch, Operand(right, index,
times_1, 0));
3232 __ movp(
rdx, args.GetArgumentOperand(0));
3233 __ movp(
rax, args.GetArgumentOperand(1));
3240 Counters* counters = isolate()->counters();
3241 __ IncrementCounter(counters->string_compare_native(), 1);
3247 __ JumpIfNotBothSequentialOneByteStrings(
rdx,
rax,
rcx,
rbx, &runtime);
3250 __ IncrementCounter(counters->string_compare_native(), 1);
3252 __ PopReturnAddressTo(
rcx);
3254 __ PushReturnAddressFrom(
rcx);
3261 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
3265 void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
3275 __ Move(
rcx,
handle(isolate()->heap()->undefined_value()));
3278 if (FLAG_debug_code) {
3282 isolate()->factory()->allocation_site_map());
3283 __ Assert(
equal, kExpectedAllocationSite);
3288 BinaryOpWithAllocationSiteStub stub(isolate(), state());
3289 __ TailCallStub(&stub);
3296 __ JumpIfNotBothSmi(
rdx,
rax, &miss, Label::kNear);
3321 Label unordered, maybe_undefined1, maybe_undefined2;
3325 __ JumpIfNotSmi(
rdx, &miss);
3328 __ JumpIfNotSmi(
rax, &miss);
3332 Label done,
left, left_smi, right_smi;
3333 __ JumpIfSmi(
rax, &right_smi, Label::kNear);
3334 __ CompareMap(
rax, isolate()->factory()->heap_number_map());
3337 __ jmp(&
left, Label::kNear);
3338 __ bind(&right_smi);
3343 __ JumpIfSmi(
rdx, &left_smi, Label::kNear);
3344 __ CompareMap(
rdx, isolate()->factory()->heap_number_map());
3361 __ movl(
rax, Immediate(0));
3362 __ movl(
rcx, Immediate(0));
3367 __ bind(&unordered);
3368 __ bind(&generic_stub);
3373 __ bind(&maybe_undefined1);
3375 __ Cmp(
rax, isolate()->factory()->undefined_value());
3377 __ JumpIfSmi(
rdx, &unordered);
3383 __ bind(&maybe_undefined2);
3385 __ Cmp(
rdx, isolate()->factory()->undefined_value());
3401 Register tmp1 =
rcx;
3402 Register tmp2 =
rbx;
3407 __ j(cond, &miss, Label::kNear);
3444 Register tmp1 =
rcx;
3445 Register tmp2 =
rbx;
3450 __ j(cond, &miss, Label::kNear);
3459 __ JumpIfNotUniqueNameInstanceType(tmp1, &miss, Label::kNear);
3460 __ JumpIfNotUniqueNameInstanceType(tmp2, &miss, Label::kNear);
3489 Register tmp1 =
rcx;
3490 Register tmp2 =
rbx;
3491 Register tmp3 =
rdi;
3503 __ movp(tmp3, tmp1);
3534 __ bind(&do_compare);
3539 __ JumpIfNotBothSequentialOneByteStrings(
left,
right, tmp1, tmp2, &runtime);
3552 __ PopReturnAddressTo(tmp1);
3555 __ PushReturnAddressFrom(tmp1);
3557 __ TailCallRuntime(Runtime::kStringEquals, 2, 1);
3559 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
3571 __ j(either_smi, &miss, Label::kNear);
3590 __ j(either_smi, &miss, Label::kNear);
3610 ExternalReference miss =
3611 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate());
3619 __ CallExternalReference(miss, 3);
3635 Register properties,
3652 Immediate(
name->Hash() + NameDictionary::GetProbeOffset(
i)));
3658 Register entity_name =
r0;
3661 __ movp(entity_name, Operand(properties,
3665 __ Cmp(entity_name, masm->isolate()->factory()->undefined_value());
3669 __ Cmp(entity_name, Handle<Name>(
name));
3674 __ CompareRoot(entity_name, Heap::kTheHoleValueRootIndex);
3675 __ j(
equal, &good, Label::kNear);
3679 __ JumpIfNotUniqueNameInstanceType(
3721 __ addl(
r1, Immediate(NameDictionary::GetProbeOffset(
i)));
3764 Label in_dictionary, maybe_in_dictionary, not_in_dictionary;
3766 Register scratch =
result();
3781 __ movp(scratch, args.GetArgumentOperand(1));
3783 __ addl(scratch, Immediate(NameDictionary::GetProbeOffset(
i)));
3785 __ andp(scratch, Operand(
rsp, 0));
3795 __ Cmp(scratch, isolate()->factory()->undefined_value());
3796 __ j(
equal, ¬_in_dictionary);
3799 __ cmpp(scratch, args.GetArgumentOperand(0));
3809 __ JumpIfNotUniqueNameInstanceType(
3811 &maybe_in_dictionary);
3815 __ bind(&maybe_in_dictionary);
3820 __ movp(scratch, Immediate(0));
3825 __ bind(&in_dictionary);
3826 __ movp(scratch, Immediate(1));
3830 __ bind(¬_in_dictionary);
3831 __ movp(scratch, Immediate(0));
3851 Label skip_to_incremental_noncompacting;
3852 Label skip_to_incremental_compacting;
3859 __ jmp(&skip_to_incremental_noncompacting, Label::kNear);
3860 __ jmp(&skip_to_incremental_compacting, Label::kFar);
3869 __ bind(&skip_to_incremental_noncompacting);
3872 __ bind(&skip_to_incremental_compacting);
3886 Label dont_need_remembered_set;
3891 &dont_need_remembered_set);
3897 &dont_need_remembered_set);
3908 __ bind(&dont_need_remembered_set);
3930 ExternalReference::isolate_address(isolate()));
3931 int argument_count = 3;
3933 AllowExternalCallThatCantCauseGC scope(masm);
3934 __ PrepareCallCFunction(argument_count);
3936 ExternalReference::incremental_marking_record_write_function(isolate()),
3943 MacroAssembler* masm,
3944 OnNoNeedToInformIncrementalMarker on_no_need,
3947 Label need_incremental;
3948 Label need_incremental_pop_object;
3983 Label ensure_not_white;
3998 __ bind(&ensure_not_white);
4007 &need_incremental_pop_object,
4019 __ bind(&need_incremental_pop_object);
4022 __ bind(&need_incremental);
4039 Label double_elements;
4041 Label slow_elements;
4042 Label fast_elements;
4046 __ movp(
rdx, args.GetArgumentOperand(1));
4047 __ movp(
rbx, args.GetArgumentOperand(0));
4050 __ CheckFastElements(
rdi, &double_elements);
4053 __ JumpIfSmi(
rax, &smi_element);
4054 __ CheckFastSmiElements(
rdi, &fast_elements);
4059 __ bind(&slow_elements);
4060 __ PopReturnAddressTo(
rdi);
4067 __ PushReturnAddressFrom(
rdi);
4068 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1);
4071 __ bind(&fast_elements);
4086 __ bind(&smi_element);
4094 __ bind(&double_elements);
4098 __ StoreNumberToDoubleElements(
rax,
4110 int parameter_count_offset =
4113 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
4114 __ PopReturnAddressTo(
rcx);
4115 int additional_offset =
4124 VectorLoadStub stub(isolate(),
state());
4131 VectorKeyedLoadStub stub(isolate());
4137 if (masm->isolate()->function_entry_hook() !=
NULL) {
4139 masm->CallStub(&stub);
4147 const size_t kNumSavedRegisters = 2;
4166 AllowExternalCallThatCantCauseGC scope(masm);
4168 const int kArgumentCount = 2;
4169 __ PrepareCallCFunction(kArgumentCount);
4170 __ CallCFunction(
rax, kArgumentCount);
4182 static void CreateArrayDispatch(MacroAssembler* masm,
4186 __ TailCallStub(&stub);
4190 for (
int i = 0;
i <= last_index; ++
i) {
4193 __ cmpl(
rdx, Immediate(kind));
4195 T stub(masm->isolate(), kind);
4196 __ TailCallStub(&stub);
4201 __ Abort(kUnexpectedElementsKindInArrayConstructor);
4208 static void CreateArrayDispatchOneArgument(MacroAssembler* masm,
4216 Handle<Object> undefined_sentinel(
4217 masm->isolate()->heap()->undefined_value(),
4220 Label normal_sequence;
4230 __ testb(
rdx, Immediate(1));
4236 __ movp(
rcx, args.GetArgumentOperand(0));
4238 __ j(
zero, &normal_sequence);
4244 ArraySingleArgumentConstructorStub stub_holey(masm->isolate(),
4247 __ TailCallStub(&stub_holey);
4249 __ bind(&normal_sequence);
4250 ArraySingleArgumentConstructorStub stub(masm->isolate(),
4253 __ TailCallStub(&stub);
4259 if (FLAG_debug_code) {
4260 Handle<Map> allocation_site_map =
4261 masm->isolate()->factory()->allocation_site_map();
4263 __ Assert(
equal, kExpectedAllocationSite);
4273 __ bind(&normal_sequence);
4276 for (
int i = 0;
i <= last_index; ++
i) {
4279 __ cmpl(
rdx, Immediate(kind));
4281 ArraySingleArgumentConstructorStub stub(masm->isolate(), kind);
4282 __ TailCallStub(&stub);
4287 __ Abort(kUnexpectedElementsKindInArrayConstructor);
4295 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
4298 for (
int i = 0;
i <= to_index; ++
i) {
4300 T stub(isolate, kind);
4311 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>(
4313 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>(
4315 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>(
4323 for (
int i = 0;
i < 2;
i++) {
4325 InternalArrayNoArgumentConstructorStub stubh1(isolate, kinds[
i]);
4327 InternalArraySingleArgumentConstructorStub stubh2(isolate, kinds[
i]);
4329 InternalArrayNArgumentsConstructorStub stubh3(isolate, kinds[
i]);
4336 MacroAssembler* masm,
4339 Label not_zero_case, not_one_case;
4342 CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm,
mode);
4344 __ bind(¬_zero_case);
4345 __ cmpl(
rax, Immediate(1));
4347 CreateArrayDispatchOneArgument(masm,
mode);
4349 __ bind(¬_one_case);
4350 CreateArrayDispatch<ArrayNArgumentsConstructorStub>(masm,
mode);
4352 CreateArrayDispatch<ArrayNoArgumentConstructorStub>(masm,
mode);
4354 CreateArrayDispatchOneArgument(masm,
mode);
4356 CreateArrayDispatch<ArrayNArgumentsConstructorStub>(masm,
mode);
4371 if (FLAG_debug_code) {
4380 __ Check(not_smi, kUnexpectedInitialMapForArrayFunction);
4382 __ Check(
equal, kUnexpectedInitialMapForArrayFunction);
4385 __ AssertUndefinedOrAllocationSite(
rbx);
4391 __ CompareRoot(
rbx, Heap::kUndefinedValueRootIndex);
4408 Label not_zero_case, not_one_case;
4409 Label normal_sequence;
4413 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind);
4414 __ TailCallStub(&stub0);
4416 __ bind(¬_zero_case);
4417 __ cmpl(
rax, Immediate(1));
4424 __ movp(
rcx, args.GetArgumentOperand(0));
4426 __ j(
zero, &normal_sequence);
4428 InternalArraySingleArgumentConstructorStub
4430 __ TailCallStub(&stub1_holey);
4433 __ bind(&normal_sequence);
4434 InternalArraySingleArgumentConstructorStub stub1(isolate(), kind);
4435 __ TailCallStub(&stub1);
4437 __ bind(¬_one_case);
4438 InternalArrayNArgumentsConstructorStub stubN(isolate(), kind);
4439 __ TailCallStub(&stubN);
4451 if (FLAG_debug_code) {
4460 __ Check(not_smi, kUnexpectedInitialMapForArrayFunction);
4462 __ Check(
equal, kUnexpectedInitialMapForArrayFunction);
4472 __ DecodeField<Map::ElementsKindBits>(
rcx);
4474 if (FLAG_debug_code) {
4480 kInvalidElementsKindForInternalArrayOrInternalPackedArray);
4484 Label fast_elements_case;
4486 __ j(
equal, &fast_elements_case);
4489 __ bind(&fast_elements_case);
4509 Register callee =
rax;
4510 Register call_data =
rbx;
4511 Register holder =
rcx;
4512 Register api_function_address =
rdx;
4513 Register return_address =
rdi;
4514 Register context =
rsi;
4520 typedef FunctionCallbackArguments FCA;
4531 __ PopReturnAddressTo(return_address);
4543 Register scratch = call_data;
4545 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
4553 ExternalReference::isolate_address(isolate()));
4558 __ movp(scratch,
rsp);
4560 __ PushReturnAddressFrom(return_address);
4564 const int kApiStackSpace = 4;
4566 __ PrepareCallApiFunction(kApiStackSpace);
4576 #if defined(__MINGW64__) || defined(_WIN64)
4577 Register arguments_arg =
rcx;
4578 Register callback_arg =
rdx;
4580 Register arguments_arg =
rdi;
4581 Register callback_arg =
rsi;
4586 DCHECK(!api_function_address.is(arguments_arg));
4591 ExternalReference thunk_ref =
4592 ExternalReference::invoke_function_callback(isolate());
4595 StackArgumentsAccessor args_from_rbp(
rbp, FCA::kArgsLength + 1,
4597 Operand context_restore_operand = args_from_rbp.GetArgumentOperand(
4598 FCA::kArgsLength - FCA::kContextSaveIndex);
4600 Operand return_value_operand = args_from_rbp.GetArgumentOperand(
4601 is_store ? 0 : FCA::kArgsLength - FCA::kReturnValueOffset);
4602 __ CallApiFunctionAndReturn(
4603 api_function_address,
4606 argc + FCA::kArgsLength + 1,
4607 return_value_operand,
4608 &context_restore_operand);
4621 #if defined(__MINGW64__) || defined(_WIN64)
4622 Register getter_arg =
r8;
4623 Register accessor_info_arg =
rdx;
4624 Register name_arg =
rcx;
4626 Register getter_arg =
rdx;
4627 Register accessor_info_arg =
rsi;
4628 Register name_arg =
rdi;
4631 DCHECK(api_function_address.is(
r8));
4632 Register scratch =
rax;
4638 const int kArgStackSpace = 1;
4642 __ PrepareCallApiFunction(kArgStackSpace);
4652 ExternalReference thunk_ref =
4653 ExternalReference::invoke_accessor_getter_callback(isolate());
4657 DCHECK(!api_function_address.is(accessor_info_arg) &&
4658 !api_function_address.is(name_arg));
4662 Operand return_value_operand = args.GetArgumentOperand(
4665 __ CallApiFunctionAndReturn(api_function_address,
4669 return_value_operand,
static AllocationSiteMode GetMode(ElementsKind boilerplate_elements_kind)
static const int kTransitionInfoOffset
static const Register function_address()
static const Register parameter_count()
static const Register index()
void GenerateReadElement(MacroAssembler *masm)
void GenerateNewSloppySlow(MacroAssembler *masm)
void GenerateNewStrict(MacroAssembler *masm)
void GenerateNewSloppyFast(MacroAssembler *masm)
static const int kLengthOffset
static void GenerateStubsAheadOfTime(Isolate *isolate)
void GenerateDispatchToArrayStub(MacroAssembler *masm, AllocationSiteOverrideMode mode)
ArgumentCountKey argument_count() const
static const int kShortCallInstructionLength
static RelocInfo::Mode RelocInfoNone()
static void GenerateAheadOfTime(Isolate *isolate)
bool save_doubles() const
static void GenerateAheadOfTime(Isolate *isolate)
CEntryStub(Isolate *isolate, int result_size, SaveFPRegsMode save_doubles=kDontSaveFPRegs)
bool NeedsImmovableCode()
bool call_data_undefined() const
STATIC_ASSERT(Code::kArgumentsBits+2<=kStubMinorKeyBits)
bool RecordCallTarget() const
bool CallAsMethod() const
bool CallAsMethod() const
void GenerateMiss(MacroAssembler *masm)
virtual InlineCacheState GetICState() const OVERRIDE
static const int kHeaderSize
Condition GetCondition() const
void GenerateInternalizedStrings(MacroAssembler *masm)
void GenerateStrings(MacroAssembler *masm)
CompareICState::State state() const
void GenerateMiss(MacroAssembler *masm)
CompareICState::State left() const
void GenerateGeneric(MacroAssembler *masm)
CompareICState::State right() const
void GenerateObjects(MacroAssembler *masm)
CompareICStub(Isolate *isolate, Token::Value op, CompareICState::State left, CompareICState::State right, CompareICState::State state)
void GenerateNumbers(MacroAssembler *masm)
void GenerateUniqueNames(MacroAssembler *masm)
void GenerateKnownObjects(MacroAssembler *masm)
void GenerateSmis(MacroAssembler *masm)
static const int kFirstOffset
static const int kMinLength
static const int kSecondOffset
@ SLOPPY_ARGUMENTS_MAP_INDEX
@ STRICT_ARGUMENTS_MAP_INDEX
@ ALIASED_ARGUMENTS_MAP_INDEX
static int SlotOffset(int index)
static void GenerateAheadOfTime(Isolate *isolate)
static const int kReturnValueOffset
bool is_truncating() const
Register destination() const
static const int kPhysicalSignificandSize
static const int kMaxShortLength
static const int kResourceDataOffset
static const int kLengthOffset
static const int kHeaderSize
static const int kMaxLength
static const int kNativeContextOffset
static const int kEntrySize
static const int kMantissaBits
static const int kValueOffset
static const uint32_t kExponentMask
static const int kExponentBias
static const int kExponentShift
static const int kMapOffset
static const int kStrictArgumentsObjectSize
static const int kSloppyArgumentsObjectSize
static const int kArgumentsCalleeIndex
static const int kArgumentsLengthIndex
void GenerateLightweightMiss(MacroAssembler *masm, ExternalReference miss)
bool HasCallSiteInlineCheck() const
bool HasArgsInRegisters() const
bool ReturnTrueFalseObject() const
static void GenerateStubsAheadOfTime(Isolate *isolate)
void GenerateCase(MacroAssembler *masm, ElementsKind kind)
static const int kJSRegexpStaticOffsetsVectorSize
StackFrame::Type type() const
static const int kSharedFunctionInfoOffset
static const int kContextOffset
static const int kLiteralsOffset
static const int kPrototypeOrInitialMapOffset
static const int kHeaderSize
static const int kPropertiesOffset
static const int kElementsOffset
static const int kDataOneByteCodeOffset
static const int kIrregexpCaptureCountOffset
static const int kDataTagOffset
static const int kDataOffset
static const int kDataUC16CodeOffset
static const int kFunctionOffset
static const Register ReceiverRegister()
static const Register NameRegister()
LoadICState state() const
static const int kIsUndetectable
static const int kBitFieldOffset
static const int kInstanceTypeOffset
static const int kBitField2Offset
static const int kPrototypeOffset
ExponentType exponent_type() const
static const Register exponent()
static const size_t kWriteBarrierCounterOffset
static const int kEvacuationCandidateMask
static const int kSkipEvacuationSlotsRecordingMask
static const int kElementsStartOffset
NameDictionaryLookupStub(Isolate *isolate, LookupMode mode)
static const int kCapacityOffset
Register dictionary() const
static void GeneratePositiveLookup(MacroAssembler *masm, Label *miss, Label *done, Register elements, Register name, Register r0, Register r1)
static const int kTotalProbes
static const int kInlinedProbes
static void GenerateNegativeLookup(MacroAssembler *masm, Label *miss, Label *done, Register receiver, Register properties, Handle< Name > name, Register scratch0)
static const int kHashShift
static const int kEmptyHashField
static const int kHashFieldOffset
static void GenerateLoadFunctionPrototype(MacroAssembler *masm, Register receiver, Register scratch1, Register scratch2, Label *miss_label)
static const intptr_t kPageAlignmentMask
ProfileEntryHookStub(Isolate *isolate)
static void MaybeCallEntryHook(MacroAssembler *masm)
static const int kArgsLength
void Restore(MacroAssembler *masm)
void SaveCallerSaveRegisters(MacroAssembler *masm, SaveFPRegsMode mode)
void Save(MacroAssembler *masm)
void RestoreCallerSaveRegisters(MacroAssembler *masm, SaveFPRegsMode mode)
void GenerateIncremental(MacroAssembler *masm, Mode mode)
void InformIncrementalMarker(MacroAssembler *masm)
RememberedSetAction remembered_set_action() const
SaveFPRegsMode save_fp_regs_mode() const
@ kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
@ kReturnOnNoNeedToInformIncrementalMarker
static const byte kTwoByteNopInstruction
void CheckNeedsToInformIncrementalMarker(MacroAssembler *masm, OnNoNeedToInformIncrementalMarker on_no_need, Mode mode)
static const byte kFiveByteNopInstruction
virtual void Generate(MacroAssembler *masm) OVERRIDE
static const int kLastCaptureCountOffset
static const int kLastSubjectOffset
static const int kLastMatchOverhead
static const int kLastInputOffset
static const int kFirstCaptureOffset
static const Function * FunctionForId(FunctionId id)
static const int kHeaderSize
static const int kConstructStubOffset
static const int kFeedbackVectorOffset
static const int kNativeBitWithinByte
static const int kStrictModeBitWithinByte
static const int kMinLength
static const int kParentOffset
static const int kOffsetOffset
static Smi * FromInt(int value)
static const int kContextOffset
static const int kCallerSPOffset
static const int kCallerFPOffset
static void GenerateFixedRegStubsAheadOfTime(Isolate *isolate)
StoreBufferOverflowStub(Isolate *isolate, SaveFPRegsMode save_fp)
bool save_doubles() const
StringIndexFlags index_flags_
Label * receiver_not_string_
Label * index_out_of_range_
void GenerateFast(MacroAssembler *masm)
Label * index_not_number_
void GenerateSlow(MacroAssembler *masm, const RuntimeCallHelper &call_helper)
void GenerateFast(MacroAssembler *masm)
void GenerateSlow(MacroAssembler *masm, const RuntimeCallHelper &call_helper)
static void Generate(MacroAssembler *masm, Register string, Register index, Register result, Label *call_runtime)
static void GenerateOneByteCharsCompareLoop(MacroAssembler *masm, Register left, Register right, Register length, Register scratch1, Register scratch2, Label *chars_not_equal)
static void GenerateCompareFlatOneByteStrings(MacroAssembler *masm, Register left, Register right, Register scratch1, Register scratch2, Register scratch3, Register scratch4)
static void GenerateCopyCharacters(MacroAssembler *masm, Register dest, Register src, Register count, Register scratch, String::Encoding encoding)
static void GenerateFlatOneByteStringEquals(MacroAssembler *masm, Register left, Register right, Register scratch1, Register scratch2, Register scratch3)
static const int32_t kMaxOneByteCharCode
static const int kMaxLength
static const int kLengthOffset
static const int kCallerStackParameterCountFrameOffset
StubFunctionMode function_mode() const
static void GenerateAheadOfTime(Isolate *isolate)
static bool IsOrderedRelationalCompareOp(Value op)
static bool IsEqualityOp(Value op)
static Handle< Object > UninitializedSentinel(Isolate *isolate)
static Handle< Object > MegamorphicSentinel(Isolate *isolate)
static const Register VectorRegister()
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
static int Push(SpecialRPOStackFrame *stack, int depth, BasicBlock *child, int unvisited)
const uint32_t kStringEncodingMask
ElementsKind GetFastElementsKindFromSequenceIndex(int sequence_number)
@ DONT_TRACK_ALLOCATION_SITE
Operand StackOperandForReturnAddress(int32_t disp)
const Register kScratchRegister
Operand StackSpaceOperand(int index)
const uint32_t kTwoByteStringTag
const uint32_t kShortExternalStringTag
const int kFastElementsKindPackedToHoley
const uint32_t kNotStringTag
Operand FieldOperand(Register object, int offset)
const int kPointerSizeLog2
const uint32_t kStringTag
@ FAST_HOLEY_DOUBLE_ELEMENTS
@ TERMINAL_FAST_ELEMENTS_KIND
@ FAST_HOLEY_SMI_ELEMENTS
Handle< T > handle(T *t, Isolate *isolate)
const uint32_t kOneByteStringTag
@ TREAT_MINUS_ZERO_AS_ZERO
int GetSequenceIndexFromFastElementsKind(ElementsKind elements_kind)
bool IsFastPackedElementsKind(ElementsKind kind)
const uint32_t kShortExternalStringMask
ElementsKind GetHoleyElementsKind(ElementsKind packed_kind)
AllocationSiteOverrideMode
@ DISABLE_ALLOCATION_SITES
Condition NegateCondition(Condition cond)
const uint32_t kStringRepresentationMask
@ ARGUMENTS_DONT_CONTAIN_RECEIVER
const uint32_t kSlicedNotConsMask
const int kRootRegisterBias
const uint32_t kInternalizedTag
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
const intptr_t kSmiTagMask
const uint32_t kIsNotInternalizedMask
const uint32_t kIsNotStringMask
ElementsKind GetInitialFastElementsKind()
@ STRING_INDEX_IS_ARRAY_INDEX
const uint32_t kIsIndirectStringMask
Debugger support for the V8 JavaScript engine.
static Handle< Value > Throw(Isolate *isolate, const char *message)
bool is(Register reg) const
#define T(name, string, precedence)