OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3568 | 3568 |
3569 | 3569 |
3570 Register FullCodeGenerator::context_register() { | 3570 Register FullCodeGenerator::context_register() { |
3571 return rsi; | 3571 return rsi; |
3572 } | 3572 } |
3573 | 3573 |
3574 | 3574 |
3575 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode) { | 3575 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode) { |
3576 ASSERT(mode == RelocInfo::CODE_TARGET || | 3576 ASSERT(mode == RelocInfo::CODE_TARGET || |
3577 mode == RelocInfo::CODE_TARGET_CONTEXT); | 3577 mode == RelocInfo::CODE_TARGET_CONTEXT); |
| 3578 switch (ic->kind()) { |
| 3579 case Code::LOAD_IC: |
| 3580 __ IncrementCounter(&Counters::named_load_full, 1); |
| 3581 break; |
| 3582 case Code::KEYED_LOAD_IC: |
| 3583 __ IncrementCounter(&Counters::keyed_load_full, 1); |
| 3584 break; |
| 3585 case Code::STORE_IC: |
| 3586 __ IncrementCounter(&Counters::named_store_full, 1); |
| 3587 break; |
| 3588 case Code::KEYED_STORE_IC: |
| 3589 __ IncrementCounter(&Counters::keyed_store_full, 1); |
| 3590 default: |
| 3591 break; |
| 3592 } |
| 3593 |
3578 __ call(ic, mode); | 3594 __ call(ic, mode); |
3579 | 3595 |
3580 // Crankshaft doesn't need patching of inlined loads and stores. | 3596 // Crankshaft doesn't need patching of inlined loads and stores. |
3581 if (V8::UseCrankshaft()) return; | 3597 // When compiling the snapshot we need to produce code that works |
| 3598 // with and without Crankshaft. |
| 3599 if (V8::UseCrankshaft() && !Serializer::enabled()) { |
| 3600 return; |
| 3601 } |
3582 | 3602 |
3583 // If we're calling a (keyed) load or store stub, we have to mark | 3603 // If we're calling a (keyed) load or store stub, we have to mark |
3584 // the call as containing no inlined code so we will not attempt to | 3604 // the call as containing no inlined code so we will not attempt to |
3585 // patch it. | 3605 // patch it. |
3586 switch (ic->kind()) { | 3606 switch (ic->kind()) { |
3587 case Code::LOAD_IC: | 3607 case Code::LOAD_IC: |
3588 case Code::KEYED_LOAD_IC: | 3608 case Code::KEYED_LOAD_IC: |
3589 case Code::STORE_IC: | 3609 case Code::STORE_IC: |
3590 case Code::KEYED_STORE_IC: | 3610 case Code::KEYED_STORE_IC: |
3591 __ nop(); // Signals no inlined code. | 3611 __ nop(); // Signals no inlined code. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3641 __ ret(0); | 3661 __ ret(0); |
3642 } | 3662 } |
3643 | 3663 |
3644 | 3664 |
3645 #undef __ | 3665 #undef __ |
3646 | 3666 |
3647 | 3667 |
3648 } } // namespace v8::internal | 3668 } } // namespace v8::internal |
3649 | 3669 |
3650 #endif // V8_TARGET_ARCH_X64 | 3670 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |