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 3866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3877 | 3877 |
3878 | 3878 |
3879 Register FullCodeGenerator::context_register() { | 3879 Register FullCodeGenerator::context_register() { |
3880 return rsi; | 3880 return rsi; |
3881 } | 3881 } |
3882 | 3882 |
3883 | 3883 |
3884 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode) { | 3884 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode) { |
3885 ASSERT(mode == RelocInfo::CODE_TARGET || | 3885 ASSERT(mode == RelocInfo::CODE_TARGET || |
3886 mode == RelocInfo::CODE_TARGET_CONTEXT); | 3886 mode == RelocInfo::CODE_TARGET_CONTEXT); |
| 3887 Counters* counters = isolate()->counters(); |
3887 switch (ic->kind()) { | 3888 switch (ic->kind()) { |
3888 case Code::LOAD_IC: | 3889 case Code::LOAD_IC: |
3889 __ IncrementCounter(COUNTERS->named_load_full(), 1); | 3890 __ IncrementCounter(counters->named_load_full(), 1); |
3890 break; | 3891 break; |
3891 case Code::KEYED_LOAD_IC: | 3892 case Code::KEYED_LOAD_IC: |
3892 __ IncrementCounter(COUNTERS->keyed_load_full(), 1); | 3893 __ IncrementCounter(counters->keyed_load_full(), 1); |
3893 break; | 3894 break; |
3894 case Code::STORE_IC: | 3895 case Code::STORE_IC: |
3895 __ IncrementCounter(COUNTERS->named_store_full(), 1); | 3896 __ IncrementCounter(counters->named_store_full(), 1); |
3896 break; | 3897 break; |
3897 case Code::KEYED_STORE_IC: | 3898 case Code::KEYED_STORE_IC: |
3898 __ IncrementCounter(COUNTERS->keyed_store_full(), 1); | 3899 __ IncrementCounter(counters->keyed_store_full(), 1); |
3899 default: | 3900 default: |
3900 break; | 3901 break; |
3901 } | 3902 } |
3902 | 3903 |
3903 __ call(ic, mode); | 3904 __ call(ic, mode); |
3904 | 3905 |
3905 // Crankshaft doesn't need patching of inlined loads and stores. | 3906 // Crankshaft doesn't need patching of inlined loads and stores. |
3906 // When compiling the snapshot we need to produce code that works | 3907 // When compiling the snapshot we need to produce code that works |
3907 // with and without Crankshaft. | 3908 // with and without Crankshaft. |
3908 if (V8::UseCrankshaft() && !Serializer::enabled()) { | 3909 if (V8::UseCrankshaft() && !Serializer::enabled()) { |
(...skipping 11 matching lines...) Expand all Loading... |
3920 __ nop(); // Signals no inlined code. | 3921 __ nop(); // Signals no inlined code. |
3921 break; | 3922 break; |
3922 default: | 3923 default: |
3923 // Do nothing. | 3924 // Do nothing. |
3924 break; | 3925 break; |
3925 } | 3926 } |
3926 } | 3927 } |
3927 | 3928 |
3928 | 3929 |
3929 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site) { | 3930 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site) { |
| 3931 Counters* counters = isolate()->counters(); |
3930 switch (ic->kind()) { | 3932 switch (ic->kind()) { |
3931 case Code::LOAD_IC: | 3933 case Code::LOAD_IC: |
3932 __ IncrementCounter(COUNTERS->named_load_full(), 1); | 3934 __ IncrementCounter(counters->named_load_full(), 1); |
3933 break; | 3935 break; |
3934 case Code::KEYED_LOAD_IC: | 3936 case Code::KEYED_LOAD_IC: |
3935 __ IncrementCounter(COUNTERS->keyed_load_full(), 1); | 3937 __ IncrementCounter(counters->keyed_load_full(), 1); |
3936 break; | 3938 break; |
3937 case Code::STORE_IC: | 3939 case Code::STORE_IC: |
3938 __ IncrementCounter(COUNTERS->named_store_full(), 1); | 3940 __ IncrementCounter(counters->named_store_full(), 1); |
3939 break; | 3941 break; |
3940 case Code::KEYED_STORE_IC: | 3942 case Code::KEYED_STORE_IC: |
3941 __ IncrementCounter(COUNTERS->keyed_store_full(), 1); | 3943 __ IncrementCounter(counters->keyed_store_full(), 1); |
3942 default: | 3944 default: |
3943 break; | 3945 break; |
3944 } | 3946 } |
3945 | 3947 |
3946 __ call(ic, RelocInfo::CODE_TARGET); | 3948 __ call(ic, RelocInfo::CODE_TARGET); |
3947 if (patch_site != NULL && patch_site->is_bound()) { | 3949 if (patch_site != NULL && patch_site->is_bound()) { |
3948 patch_site->EmitPatchInfo(); | 3950 patch_site->EmitPatchInfo(); |
3949 } else { | 3951 } else { |
3950 __ nop(); // Signals no inlined code. | 3952 __ nop(); // Signals no inlined code. |
3951 } | 3953 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3996 __ ret(0); | 3998 __ ret(0); |
3997 } | 3999 } |
3998 | 4000 |
3999 | 4001 |
4000 #undef __ | 4002 #undef __ |
4001 | 4003 |
4002 | 4004 |
4003 } } // namespace v8::internal | 4005 } } // namespace v8::internal |
4004 | 4006 |
4005 #endif // V8_TARGET_ARCH_X64 | 4007 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |