| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 Label* allocation_site_info_found) { | 394 Label* allocation_site_info_found) { |
| 395 // ----------- S t a t e ------------- | 395 // ----------- S t a t e ------------- |
| 396 // -- eax : value | 396 // -- eax : value |
| 397 // -- ebx : target map | 397 // -- ebx : target map |
| 398 // -- ecx : key | 398 // -- ecx : key |
| 399 // -- edx : receiver | 399 // -- edx : receiver |
| 400 // -- esp[0] : return address | 400 // -- esp[0] : return address |
| 401 // ----------------------------------- | 401 // ----------------------------------- |
| 402 if (mode == TRACK_ALLOCATION_SITE) { | 402 if (mode == TRACK_ALLOCATION_SITE) { |
| 403 ASSERT(allocation_site_info_found != NULL); | 403 ASSERT(allocation_site_info_found != NULL); |
| 404 masm->TestJSArrayForAllocationSiteInfo(edx, edi, | 404 __ TestJSArrayForAllocationSiteInfo(edx, edi); |
| 405 allocation_site_info_found); | 405 __ j(equal, allocation_site_info_found); |
| 406 } | 406 } |
| 407 | 407 |
| 408 // Set transitioned map. | 408 // Set transitioned map. |
| 409 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); | 409 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); |
| 410 __ RecordWriteField(edx, | 410 __ RecordWriteField(edx, |
| 411 HeapObject::kMapOffset, | 411 HeapObject::kMapOffset, |
| 412 ebx, | 412 ebx, |
| 413 edi, | 413 edi, |
| 414 kDontSaveFPRegs, | 414 kDontSaveFPRegs, |
| 415 EMIT_REMEMBERED_SET, | 415 EMIT_REMEMBERED_SET, |
| 416 OMIT_SMI_CHECK); | 416 OMIT_SMI_CHECK); |
| 417 } | 417 } |
| 418 | 418 |
| 419 | 419 |
| 420 void ElementsTransitionGenerator::GenerateSmiToDouble( | 420 void ElementsTransitionGenerator::GenerateSmiToDouble( |
| 421 MacroAssembler* masm, AllocationSiteMode mode, Label* fail) { | 421 MacroAssembler* masm, AllocationSiteMode mode, Label* fail) { |
| 422 // ----------- S t a t e ------------- | 422 // ----------- S t a t e ------------- |
| 423 // -- eax : value | 423 // -- eax : value |
| 424 // -- ebx : target map | 424 // -- ebx : target map |
| 425 // -- ecx : key | 425 // -- ecx : key |
| 426 // -- edx : receiver | 426 // -- edx : receiver |
| 427 // -- esp[0] : return address | 427 // -- esp[0] : return address |
| 428 // ----------------------------------- | 428 // ----------------------------------- |
| 429 Label loop, entry, convert_hole, gc_required, only_change_map; | 429 Label loop, entry, convert_hole, gc_required, only_change_map; |
| 430 | 430 |
| 431 if (mode == TRACK_ALLOCATION_SITE) { | 431 if (mode == TRACK_ALLOCATION_SITE) { |
| 432 masm->TestJSArrayForAllocationSiteInfo(edx, edi, fail); | 432 __ TestJSArrayForAllocationSiteInfo(edx, edi); |
| 433 __ j(equal, fail); |
| 433 } | 434 } |
| 434 | 435 |
| 435 // Check for empty arrays, which only require a map transition and no changes | 436 // Check for empty arrays, which only require a map transition and no changes |
| 436 // to the backing store. | 437 // to the backing store. |
| 437 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); | 438 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |
| 438 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); | 439 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); |
| 439 __ j(equal, &only_change_map); | 440 __ j(equal, &only_change_map); |
| 440 | 441 |
| 441 __ push(eax); | 442 __ push(eax); |
| 442 __ push(ebx); | 443 __ push(ebx); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 // ----------- S t a t e ------------- | 562 // ----------- S t a t e ------------- |
| 562 // -- eax : value | 563 // -- eax : value |
| 563 // -- ebx : target map | 564 // -- ebx : target map |
| 564 // -- ecx : key | 565 // -- ecx : key |
| 565 // -- edx : receiver | 566 // -- edx : receiver |
| 566 // -- esp[0] : return address | 567 // -- esp[0] : return address |
| 567 // ----------------------------------- | 568 // ----------------------------------- |
| 568 Label loop, entry, convert_hole, gc_required, only_change_map, success; | 569 Label loop, entry, convert_hole, gc_required, only_change_map, success; |
| 569 | 570 |
| 570 if (mode == TRACK_ALLOCATION_SITE) { | 571 if (mode == TRACK_ALLOCATION_SITE) { |
| 571 masm->TestJSArrayForAllocationSiteInfo(edx, edi, fail); | 572 __ TestJSArrayForAllocationSiteInfo(edx, edi); |
| 573 __ j(equal, fail); |
| 572 } | 574 } |
| 573 | 575 |
| 574 // Check for empty arrays, which only require a map transition and no changes | 576 // Check for empty arrays, which only require a map transition and no changes |
| 575 // to the backing store. | 577 // to the backing store. |
| 576 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); | 578 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |
| 577 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); | 579 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); |
| 578 __ j(equal, &only_change_map); | 580 __ j(equal, &only_change_map); |
| 579 | 581 |
| 580 __ push(eax); | 582 __ push(eax); |
| 581 __ push(edx); | 583 __ push(edx); |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 Code* stub = GetCodeAgeStub(age, parity); | 957 Code* stub = GetCodeAgeStub(age, parity); |
| 956 CodePatcher patcher(sequence, young_length); | 958 CodePatcher patcher(sequence, young_length); |
| 957 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 959 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
| 958 } | 960 } |
| 959 } | 961 } |
| 960 | 962 |
| 961 | 963 |
| 962 } } // namespace v8::internal | 964 } } // namespace v8::internal |
| 963 | 965 |
| 964 #endif // V8_TARGET_ARCH_IA32 | 966 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |