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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 return FUNCTION_CAST<OS::MemCopyFunction>(buffer); | 381 return FUNCTION_CAST<OS::MemCopyFunction>(buffer); |
382 } | 382 } |
383 | 383 |
384 #undef __ | 384 #undef __ |
385 | 385 |
386 // ------------------------------------------------------------------------- | 386 // ------------------------------------------------------------------------- |
387 // Code generators | 387 // Code generators |
388 | 388 |
389 #define __ ACCESS_MASM(masm) | 389 #define __ ACCESS_MASM(masm) |
390 | 390 |
391 | |
391 void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( | 392 void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( |
392 MacroAssembler* masm) { | 393 MacroAssembler* masm) { |
393 // ----------- S t a t e ------------- | 394 // ----------- S t a t e ------------- |
394 // -- eax : value | 395 // -- eax : value |
395 // -- ebx : target map | 396 // -- ebx : target map |
396 // -- ecx : key | 397 // -- ecx : key |
397 // -- edx : receiver | 398 // -- edx : receiver |
398 // -- esp[0] : return address | 399 // -- esp[0] : return address |
399 // ----------------------------------- | 400 // ----------------------------------- |
400 // Set transitioned map. | 401 // Set transitioned map. |
(...skipping 12 matching lines...) Expand all Loading... | |
413 MacroAssembler* masm, Label* fail) { | 414 MacroAssembler* masm, Label* fail) { |
414 // ----------- S t a t e ------------- | 415 // ----------- S t a t e ------------- |
415 // -- eax : value | 416 // -- eax : value |
416 // -- ebx : target map | 417 // -- ebx : target map |
417 // -- ecx : key | 418 // -- ecx : key |
418 // -- edx : receiver | 419 // -- edx : receiver |
419 // -- esp[0] : return address | 420 // -- esp[0] : return address |
420 // ----------------------------------- | 421 // ----------------------------------- |
421 Label loop, entry, convert_hole, gc_required, only_change_map; | 422 Label loop, entry, convert_hole, gc_required, only_change_map; |
422 | 423 |
424 if (FLAG_use_allocation_site_info) { | |
425 masm->PerformAllocationSiteInfoCheck(fail); | |
426 } | |
427 | |
423 // Check for empty arrays, which only require a map transition and no changes | 428 // Check for empty arrays, which only require a map transition and no changes |
424 // to the backing store. | 429 // to the backing store. |
425 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); | 430 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |
426 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); | 431 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); |
427 __ j(equal, &only_change_map); | 432 __ j(equal, &only_change_map); |
428 | 433 |
429 __ push(eax); | 434 __ push(eax); |
430 __ push(ebx); | 435 __ push(ebx); |
431 | 436 |
432 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); | 437 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
548 MacroAssembler* masm, Label* fail) { | 553 MacroAssembler* masm, Label* fail) { |
549 // ----------- S t a t e ------------- | 554 // ----------- S t a t e ------------- |
550 // -- eax : value | 555 // -- eax : value |
551 // -- ebx : target map | 556 // -- ebx : target map |
552 // -- ecx : key | 557 // -- ecx : key |
553 // -- edx : receiver | 558 // -- edx : receiver |
554 // -- esp[0] : return address | 559 // -- esp[0] : return address |
555 // ----------------------------------- | 560 // ----------------------------------- |
556 Label loop, entry, convert_hole, gc_required, only_change_map, success; | 561 Label loop, entry, convert_hole, gc_required, only_change_map, success; |
557 | 562 |
563 // TODO(mvstanton): let's not pre-transition for the double->object case. | |
564 // if (FLAG_use_allocation_site_info) { | |
565 // masm->PerformAllocationSiteInfoCheck(fail); | |
566 // } | |
danno
2013/01/04 08:50:55
Just remove this altogether rather than leave it u
mvstanton
2013/01/04 12:07:52
Done.
| |
567 | |
558 // Check for empty arrays, which only require a map transition and no changes | 568 // Check for empty arrays, which only require a map transition and no changes |
559 // to the backing store. | 569 // to the backing store. |
560 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); | 570 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |
561 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); | 571 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); |
562 __ j(equal, &only_change_map); | 572 __ j(equal, &only_change_map); |
563 | 573 |
564 __ push(eax); | 574 __ push(eax); |
565 __ push(edx); | 575 __ push(edx); |
566 __ push(ebx); | 576 __ push(ebx); |
567 | 577 |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
939 Code* stub = GetCodeAgeStub(age, parity); | 949 Code* stub = GetCodeAgeStub(age, parity); |
940 CodePatcher patcher(sequence, young_length); | 950 CodePatcher patcher(sequence, young_length); |
941 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE); | 951 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE); |
942 } | 952 } |
943 } | 953 } |
944 | 954 |
945 | 955 |
946 } } // namespace v8::internal | 956 } } // namespace v8::internal |
947 | 957 |
948 #endif // V8_TARGET_ARCH_IA32 | 958 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |