| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // Check that the object is a JS array. | 299 // Check that the object is a JS array. |
| 300 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch); | 300 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch); |
| 301 __ j(not_equal, miss_label); | 301 __ j(not_equal, miss_label); |
| 302 | 302 |
| 303 // Load length directly from the JS array. | 303 // Load length directly from the JS array. |
| 304 __ mov(eax, FieldOperand(receiver, JSArray::kLengthOffset)); | 304 __ mov(eax, FieldOperand(receiver, JSArray::kLengthOffset)); |
| 305 __ ret(0); | 305 __ ret(0); |
| 306 } | 306 } |
| 307 | 307 |
| 308 | 308 |
| 309 // Generate code to check if an object is a string. If the object is | |
| 310 // a string, the map's instance type is left in the scratch register. | |
| 311 static void GenerateStringCheck(MacroAssembler* masm, | |
| 312 Register receiver, | |
| 313 Register scratch, | |
| 314 Label* smi, | |
| 315 Label* non_string_object) { | |
| 316 // Check that the object isn't a smi. | |
| 317 __ JumpIfSmi(receiver, smi); | |
| 318 | |
| 319 // Check that the object is a string. | |
| 320 __ mov(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); | |
| 321 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); | |
| 322 STATIC_ASSERT(kNotStringTag != 0); | |
| 323 __ test(scratch, Immediate(kNotStringTag)); | |
| 324 __ j(not_zero, non_string_object); | |
| 325 } | |
| 326 | |
| 327 | |
| 328 void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm, | |
| 329 Register receiver, | |
| 330 Register scratch1, | |
| 331 Register scratch2, | |
| 332 Label* miss) { | |
| 333 Label check_wrapper; | |
| 334 | |
| 335 // Check if the object is a string leaving the instance type in the | |
| 336 // scratch register. | |
| 337 GenerateStringCheck(masm, receiver, scratch1, miss, &check_wrapper); | |
| 338 | |
| 339 // Load length from the string and convert to a smi. | |
| 340 __ mov(eax, FieldOperand(receiver, String::kLengthOffset)); | |
| 341 __ ret(0); | |
| 342 | |
| 343 // Check if the object is a JSValue wrapper. | |
| 344 __ bind(&check_wrapper); | |
| 345 __ cmp(scratch1, JS_VALUE_TYPE); | |
| 346 __ j(not_equal, miss); | |
| 347 | |
| 348 // Check if the wrapped value is a string and load the length | |
| 349 // directly if it is. | |
| 350 __ mov(scratch2, FieldOperand(receiver, JSValue::kValueOffset)); | |
| 351 GenerateStringCheck(masm, scratch2, scratch1, miss, miss); | |
| 352 __ mov(eax, FieldOperand(scratch2, String::kLengthOffset)); | |
| 353 __ ret(0); | |
| 354 } | |
| 355 | |
| 356 | |
| 357 void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm, | 309 void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm, |
| 358 Register receiver, | 310 Register receiver, |
| 359 Register scratch1, | 311 Register scratch1, |
| 360 Register scratch2, | 312 Register scratch2, |
| 361 Label* miss_label) { | 313 Label* miss_label) { |
| 362 __ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label); | 314 __ TryGetFunctionPrototype(receiver, scratch1, scratch2, miss_label); |
| 363 __ mov(eax, scratch1); | 315 __ mov(eax, scratch1); |
| 364 __ ret(0); | 316 __ ret(0); |
| 365 } | 317 } |
| 366 | 318 |
| 367 | 319 |
| 368 void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm, | 320 void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm, |
| 369 Register dst, | 321 Register dst, |
| 370 Register src, | 322 Register src, |
| 371 bool inobject, | 323 bool inobject, |
| 372 int index, | 324 int index, |
| 373 Representation representation) { | 325 Representation representation) { |
| 374 ASSERT(!FLAG_track_double_fields || !representation.IsDouble()); | 326 ASSERT(!representation.IsDouble()); |
| 375 int offset = index * kPointerSize; | 327 int offset = index * kPointerSize; |
| 376 if (!inobject) { | 328 if (!inobject) { |
| 377 // Calculate the offset into the properties array. | 329 // Calculate the offset into the properties array. |
| 378 offset = offset + FixedArray::kHeaderSize; | 330 offset = offset + FixedArray::kHeaderSize; |
| 379 __ mov(dst, FieldOperand(src, JSObject::kPropertiesOffset)); | 331 __ mov(dst, FieldOperand(src, JSObject::kPropertiesOffset)); |
| 380 src = dst; | 332 src = dst; |
| 381 } | 333 } |
| 382 __ mov(dst, FieldOperand(src, offset)); | 334 __ mov(dst, FieldOperand(src, offset)); |
| 383 } | 335 } |
| 384 | 336 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 int descriptor = transition->LastAdded(); | 518 int descriptor = transition->LastAdded(); |
| 567 DescriptorArray* descriptors = transition->instance_descriptors(); | 519 DescriptorArray* descriptors = transition->instance_descriptors(); |
| 568 PropertyDetails details = descriptors->GetDetails(descriptor); | 520 PropertyDetails details = descriptors->GetDetails(descriptor); |
| 569 Representation representation = details.representation(); | 521 Representation representation = details.representation(); |
| 570 ASSERT(!representation.IsNone()); | 522 ASSERT(!representation.IsNone()); |
| 571 | 523 |
| 572 if (details.type() == CONSTANT) { | 524 if (details.type() == CONSTANT) { |
| 573 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); | 525 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); |
| 574 __ CmpObject(value_reg, constant); | 526 __ CmpObject(value_reg, constant); |
| 575 __ j(not_equal, miss_label); | 527 __ j(not_equal, miss_label); |
| 576 } else if (FLAG_track_fields && representation.IsSmi()) { | 528 } else if (representation.IsSmi()) { |
| 577 __ JumpIfNotSmi(value_reg, miss_label); | 529 __ JumpIfNotSmi(value_reg, miss_label); |
| 578 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 530 } else if (representation.IsHeapObject()) { |
| 579 __ JumpIfSmi(value_reg, miss_label); | 531 __ JumpIfSmi(value_reg, miss_label); |
| 580 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 532 } else if (representation.IsDouble()) { |
| 581 Label do_store, heap_number; | 533 Label do_store, heap_number; |
| 582 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, slow); | 534 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, slow); |
| 583 | 535 |
| 584 __ JumpIfNotSmi(value_reg, &heap_number); | 536 __ JumpIfNotSmi(value_reg, &heap_number); |
| 585 __ SmiUntag(value_reg); | 537 __ SmiUntag(value_reg); |
| 586 if (CpuFeatures::IsSupported(SSE2)) { | 538 if (CpuFeatures::IsSupported(SSE2)) { |
| 587 CpuFeatureScope use_sse2(masm, SSE2); | 539 CpuFeatureScope use_sse2(masm, SSE2); |
| 588 __ Cvtsi2sd(xmm0, value_reg); | 540 __ Cvtsi2sd(xmm0, value_reg); |
| 589 } else { | 541 } else { |
| 590 __ push(value_reg); | 542 __ push(value_reg); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 // face of a transition we can use the old map here because the size of the | 613 // face of a transition we can use the old map here because the size of the |
| 662 // object and the number of in-object properties is not going to change. | 614 // object and the number of in-object properties is not going to change. |
| 663 index -= object->map()->inobject_properties(); | 615 index -= object->map()->inobject_properties(); |
| 664 | 616 |
| 665 SmiCheck smi_check = representation.IsTagged() | 617 SmiCheck smi_check = representation.IsTagged() |
| 666 ? INLINE_SMI_CHECK : OMIT_SMI_CHECK; | 618 ? INLINE_SMI_CHECK : OMIT_SMI_CHECK; |
| 667 // TODO(verwaest): Share this code as a code stub. | 619 // TODO(verwaest): Share this code as a code stub. |
| 668 if (index < 0) { | 620 if (index < 0) { |
| 669 // Set the property straight into the object. | 621 // Set the property straight into the object. |
| 670 int offset = object->map()->instance_size() + (index * kPointerSize); | 622 int offset = object->map()->instance_size() + (index * kPointerSize); |
| 671 if (FLAG_track_double_fields && representation.IsDouble()) { | 623 if (representation.IsDouble()) { |
| 672 __ mov(FieldOperand(receiver_reg, offset), storage_reg); | 624 __ mov(FieldOperand(receiver_reg, offset), storage_reg); |
| 673 } else { | 625 } else { |
| 674 __ mov(FieldOperand(receiver_reg, offset), value_reg); | 626 __ mov(FieldOperand(receiver_reg, offset), value_reg); |
| 675 } | 627 } |
| 676 | 628 |
| 677 if (!FLAG_track_fields || !representation.IsSmi()) { | 629 if (!representation.IsSmi()) { |
| 678 // Update the write barrier for the array address. | 630 // Update the write barrier for the array address. |
| 679 if (!FLAG_track_double_fields || !representation.IsDouble()) { | 631 if (!representation.IsDouble()) { |
| 680 __ mov(storage_reg, value_reg); | 632 __ mov(storage_reg, value_reg); |
| 681 } | 633 } |
| 682 __ RecordWriteField(receiver_reg, | 634 __ RecordWriteField(receiver_reg, |
| 683 offset, | 635 offset, |
| 684 storage_reg, | 636 storage_reg, |
| 685 scratch1, | 637 scratch1, |
| 686 kDontSaveFPRegs, | 638 kDontSaveFPRegs, |
| 687 EMIT_REMEMBERED_SET, | 639 EMIT_REMEMBERED_SET, |
| 688 smi_check); | 640 smi_check); |
| 689 } | 641 } |
| 690 } else { | 642 } else { |
| 691 // Write to the properties array. | 643 // Write to the properties array. |
| 692 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 644 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
| 693 // Get the properties array (optimistically). | 645 // Get the properties array (optimistically). |
| 694 __ mov(scratch1, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); | 646 __ mov(scratch1, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); |
| 695 if (FLAG_track_double_fields && representation.IsDouble()) { | 647 if (representation.IsDouble()) { |
| 696 __ mov(FieldOperand(scratch1, offset), storage_reg); | 648 __ mov(FieldOperand(scratch1, offset), storage_reg); |
| 697 } else { | 649 } else { |
| 698 __ mov(FieldOperand(scratch1, offset), value_reg); | 650 __ mov(FieldOperand(scratch1, offset), value_reg); |
| 699 } | 651 } |
| 700 | 652 |
| 701 if (!FLAG_track_fields || !representation.IsSmi()) { | 653 if (!representation.IsSmi()) { |
| 702 // Update the write barrier for the array address. | 654 // Update the write barrier for the array address. |
| 703 if (!FLAG_track_double_fields || !representation.IsDouble()) { | 655 if (!representation.IsDouble()) { |
| 704 __ mov(storage_reg, value_reg); | 656 __ mov(storage_reg, value_reg); |
| 705 } | 657 } |
| 706 __ RecordWriteField(scratch1, | 658 __ RecordWriteField(scratch1, |
| 707 offset, | 659 offset, |
| 708 storage_reg, | 660 storage_reg, |
| 709 receiver_reg, | 661 receiver_reg, |
| 710 kDontSaveFPRegs, | 662 kDontSaveFPRegs, |
| 711 EMIT_REMEMBERED_SET, | 663 EMIT_REMEMBERED_SET, |
| 712 smi_check); | 664 smi_check); |
| 713 } | 665 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 736 | 688 |
| 737 int index = lookup->GetFieldIndex().field_index(); | 689 int index = lookup->GetFieldIndex().field_index(); |
| 738 | 690 |
| 739 // Adjust for the number of properties stored in the object. Even in the | 691 // Adjust for the number of properties stored in the object. Even in the |
| 740 // face of a transition we can use the old map here because the size of the | 692 // face of a transition we can use the old map here because the size of the |
| 741 // object and the number of in-object properties is not going to change. | 693 // object and the number of in-object properties is not going to change. |
| 742 index -= object->map()->inobject_properties(); | 694 index -= object->map()->inobject_properties(); |
| 743 | 695 |
| 744 Representation representation = lookup->representation(); | 696 Representation representation = lookup->representation(); |
| 745 ASSERT(!representation.IsNone()); | 697 ASSERT(!representation.IsNone()); |
| 746 if (FLAG_track_fields && representation.IsSmi()) { | 698 if (representation.IsSmi()) { |
| 747 __ JumpIfNotSmi(value_reg, miss_label); | 699 __ JumpIfNotSmi(value_reg, miss_label); |
| 748 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 700 } else if (representation.IsHeapObject()) { |
| 749 __ JumpIfSmi(value_reg, miss_label); | 701 __ JumpIfSmi(value_reg, miss_label); |
| 750 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 702 } else if (representation.IsDouble()) { |
| 751 // Load the double storage. | 703 // Load the double storage. |
| 752 if (index < 0) { | 704 if (index < 0) { |
| 753 int offset = object->map()->instance_size() + (index * kPointerSize); | 705 int offset = object->map()->instance_size() + (index * kPointerSize); |
| 754 __ mov(scratch1, FieldOperand(receiver_reg, offset)); | 706 __ mov(scratch1, FieldOperand(receiver_reg, offset)); |
| 755 } else { | 707 } else { |
| 756 __ mov(scratch1, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); | 708 __ mov(scratch1, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); |
| 757 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 709 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
| 758 __ mov(scratch1, FieldOperand(scratch1, offset)); | 710 __ mov(scratch1, FieldOperand(scratch1, offset)); |
| 759 } | 711 } |
| 760 | 712 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 787 __ movsd(FieldOperand(scratch1, HeapNumber::kValueOffset), xmm0); | 739 __ movsd(FieldOperand(scratch1, HeapNumber::kValueOffset), xmm0); |
| 788 } else { | 740 } else { |
| 789 __ fstp_d(FieldOperand(scratch1, HeapNumber::kValueOffset)); | 741 __ fstp_d(FieldOperand(scratch1, HeapNumber::kValueOffset)); |
| 790 } | 742 } |
| 791 // Return the value (register eax). | 743 // Return the value (register eax). |
| 792 ASSERT(value_reg.is(eax)); | 744 ASSERT(value_reg.is(eax)); |
| 793 __ ret(0); | 745 __ ret(0); |
| 794 return; | 746 return; |
| 795 } | 747 } |
| 796 | 748 |
| 797 ASSERT(!FLAG_track_double_fields || !representation.IsDouble()); | 749 ASSERT(!representation.IsDouble()); |
| 798 // TODO(verwaest): Share this code as a code stub. | 750 // TODO(verwaest): Share this code as a code stub. |
| 799 SmiCheck smi_check = representation.IsTagged() | 751 SmiCheck smi_check = representation.IsTagged() |
| 800 ? INLINE_SMI_CHECK : OMIT_SMI_CHECK; | 752 ? INLINE_SMI_CHECK : OMIT_SMI_CHECK; |
| 801 if (index < 0) { | 753 if (index < 0) { |
| 802 // Set the property straight into the object. | 754 // Set the property straight into the object. |
| 803 int offset = object->map()->instance_size() + (index * kPointerSize); | 755 int offset = object->map()->instance_size() + (index * kPointerSize); |
| 804 __ mov(FieldOperand(receiver_reg, offset), value_reg); | 756 __ mov(FieldOperand(receiver_reg, offset), value_reg); |
| 805 | 757 |
| 806 if (!FLAG_track_fields || !representation.IsSmi()) { | 758 if (!representation.IsSmi()) { |
| 807 // Update the write barrier for the array address. | 759 // Update the write barrier for the array address. |
| 808 // Pass the value being stored in the now unused name_reg. | 760 // Pass the value being stored in the now unused name_reg. |
| 809 __ mov(name_reg, value_reg); | 761 __ mov(name_reg, value_reg); |
| 810 __ RecordWriteField(receiver_reg, | 762 __ RecordWriteField(receiver_reg, |
| 811 offset, | 763 offset, |
| 812 name_reg, | 764 name_reg, |
| 813 scratch1, | 765 scratch1, |
| 814 kDontSaveFPRegs, | 766 kDontSaveFPRegs, |
| 815 EMIT_REMEMBERED_SET, | 767 EMIT_REMEMBERED_SET, |
| 816 smi_check); | 768 smi_check); |
| 817 } | 769 } |
| 818 } else { | 770 } else { |
| 819 // Write to the properties array. | 771 // Write to the properties array. |
| 820 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 772 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
| 821 // Get the properties array (optimistically). | 773 // Get the properties array (optimistically). |
| 822 __ mov(scratch1, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); | 774 __ mov(scratch1, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); |
| 823 __ mov(FieldOperand(scratch1, offset), value_reg); | 775 __ mov(FieldOperand(scratch1, offset), value_reg); |
| 824 | 776 |
| 825 if (!FLAG_track_fields || !representation.IsSmi()) { | 777 if (!representation.IsSmi()) { |
| 826 // Update the write barrier for the array address. | 778 // Update the write barrier for the array address. |
| 827 // Pass the value being stored in the now unused name_reg. | 779 // Pass the value being stored in the now unused name_reg. |
| 828 __ mov(name_reg, value_reg); | 780 __ mov(name_reg, value_reg); |
| 829 __ RecordWriteField(scratch1, | 781 __ RecordWriteField(scratch1, |
| 830 offset, | 782 offset, |
| 831 name_reg, | 783 name_reg, |
| 832 receiver_reg, | 784 receiver_reg, |
| 833 kDontSaveFPRegs, | 785 kDontSaveFPRegs, |
| 834 EMIT_REMEMBERED_SET, | 786 EMIT_REMEMBERED_SET, |
| 835 smi_check); | 787 smi_check); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 } | 1204 } |
| 1253 | 1205 |
| 1254 | 1206 |
| 1255 #undef __ | 1207 #undef __ |
| 1256 #define __ ACCESS_MASM(masm) | 1208 #define __ ACCESS_MASM(masm) |
| 1257 | 1209 |
| 1258 | 1210 |
| 1259 void StoreStubCompiler::GenerateStoreViaSetter( | 1211 void StoreStubCompiler::GenerateStoreViaSetter( |
| 1260 MacroAssembler* masm, | 1212 MacroAssembler* masm, |
| 1261 Handle<HeapType> type, | 1213 Handle<HeapType> type, |
| 1214 Register receiver, |
| 1262 Handle<JSFunction> setter) { | 1215 Handle<JSFunction> setter) { |
| 1263 // ----------- S t a t e ------------- | 1216 // ----------- S t a t e ------------- |
| 1264 // -- eax : value | |
| 1265 // -- ecx : name | |
| 1266 // -- edx : receiver | |
| 1267 // -- esp[0] : return address | 1217 // -- esp[0] : return address |
| 1268 // ----------------------------------- | 1218 // ----------------------------------- |
| 1269 { | 1219 { |
| 1270 FrameScope scope(masm, StackFrame::INTERNAL); | 1220 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1271 Register receiver = edx; | |
| 1272 Register value = eax; | |
| 1273 | 1221 |
| 1274 // Save value register, so we can restore it later. | 1222 // Save value register, so we can restore it later. |
| 1275 __ push(value); | 1223 __ push(value()); |
| 1276 | 1224 |
| 1277 if (!setter.is_null()) { | 1225 if (!setter.is_null()) { |
| 1278 // Call the JavaScript setter with receiver and value on the stack. | 1226 // Call the JavaScript setter with receiver and value on the stack. |
| 1279 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1227 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
| 1280 // Swap in the global receiver. | 1228 // Swap in the global receiver. |
| 1281 __ mov(receiver, | 1229 __ mov(receiver, |
| 1282 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1230 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); |
| 1283 } | 1231 } |
| 1284 __ push(receiver); | 1232 __ push(receiver); |
| 1285 __ push(value); | 1233 __ push(value()); |
| 1286 ParameterCount actual(1); | 1234 ParameterCount actual(1); |
| 1287 ParameterCount expected(setter); | 1235 ParameterCount expected(setter); |
| 1288 __ InvokeFunction(setter, expected, actual, | 1236 __ InvokeFunction(setter, expected, actual, |
| 1289 CALL_FUNCTION, NullCallWrapper()); | 1237 CALL_FUNCTION, NullCallWrapper()); |
| 1290 } else { | 1238 } else { |
| 1291 // If we generate a global code snippet for deoptimization only, remember | 1239 // If we generate a global code snippet for deoptimization only, remember |
| 1292 // the place to continue after deoptimization. | 1240 // the place to continue after deoptimization. |
| 1293 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 1241 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
| 1294 } | 1242 } |
| 1295 | 1243 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 } | 1324 } |
| 1377 | 1325 |
| 1378 | 1326 |
| 1379 Register* KeyedLoadStubCompiler::registers() { | 1327 Register* KeyedLoadStubCompiler::registers() { |
| 1380 // receiver, name, scratch1, scratch2, scratch3, scratch4. | 1328 // receiver, name, scratch1, scratch2, scratch3, scratch4. |
| 1381 static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg }; | 1329 static Register registers[] = { edx, ecx, ebx, eax, edi, no_reg }; |
| 1382 return registers; | 1330 return registers; |
| 1383 } | 1331 } |
| 1384 | 1332 |
| 1385 | 1333 |
| 1334 Register StoreStubCompiler::value() { |
| 1335 return eax; |
| 1336 } |
| 1337 |
| 1338 |
| 1386 Register* StoreStubCompiler::registers() { | 1339 Register* StoreStubCompiler::registers() { |
| 1387 // receiver, name, value, scratch1, scratch2, scratch3. | 1340 // receiver, name, scratch1, scratch2, scratch3. |
| 1388 static Register registers[] = { edx, ecx, eax, ebx, edi, no_reg }; | 1341 static Register registers[] = { edx, ecx, ebx, edi, no_reg }; |
| 1389 return registers; | 1342 return registers; |
| 1390 } | 1343 } |
| 1391 | 1344 |
| 1392 | 1345 |
| 1393 Register* KeyedStoreStubCompiler::registers() { | 1346 Register* KeyedStoreStubCompiler::registers() { |
| 1394 // receiver, name, value, scratch1, scratch2, scratch3. | 1347 // receiver, name, scratch1, scratch2, scratch3. |
| 1395 static Register registers[] = { edx, ecx, eax, ebx, edi, no_reg }; | 1348 static Register registers[] = { edx, ecx, ebx, edi, no_reg }; |
| 1396 return registers; | 1349 return registers; |
| 1397 } | 1350 } |
| 1398 | 1351 |
| 1399 | 1352 |
| 1400 #undef __ | 1353 #undef __ |
| 1401 #define __ ACCESS_MASM(masm) | 1354 #define __ ACCESS_MASM(masm) |
| 1402 | 1355 |
| 1403 | 1356 |
| 1404 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, | 1357 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, |
| 1405 Handle<HeapType> type, | 1358 Handle<HeapType> type, |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1568 // ----------------------------------- | 1521 // ----------------------------------- |
| 1569 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1522 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1570 } | 1523 } |
| 1571 | 1524 |
| 1572 | 1525 |
| 1573 #undef __ | 1526 #undef __ |
| 1574 | 1527 |
| 1575 } } // namespace v8::internal | 1528 } } // namespace v8::internal |
| 1576 | 1529 |
| 1577 #endif // V8_TARGET_ARCH_IA32 | 1530 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |