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 4236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4247 __ IncrementCounter(isolate()->counters()->keyed_load_full(), 1); | 4247 __ IncrementCounter(isolate()->counters()->keyed_load_full(), 1); |
4248 break; | 4248 break; |
4249 case Code::STORE_IC: | 4249 case Code::STORE_IC: |
4250 __ IncrementCounter(isolate()->counters()->named_store_full(), 1); | 4250 __ IncrementCounter(isolate()->counters()->named_store_full(), 1); |
4251 break; | 4251 break; |
4252 case Code::KEYED_STORE_IC: | 4252 case Code::KEYED_STORE_IC: |
4253 __ IncrementCounter(isolate()->counters()->keyed_store_full(), 1); | 4253 __ IncrementCounter(isolate()->counters()->keyed_store_full(), 1); |
4254 default: | 4254 default: |
4255 break; | 4255 break; |
4256 } | 4256 } |
4257 | |
4258 __ call(ic, mode); | 4257 __ call(ic, mode); |
4259 | |
4260 // Crankshaft doesn't need patching of inlined loads and stores. | |
4261 // When compiling the snapshot we need to produce code that works | |
4262 // with and without Crankshaft. | |
4263 if (V8::UseCrankshaft() && !Serializer::enabled()) { | |
4264 return; | |
4265 } | |
4266 | |
4267 // If we're calling a (keyed) load or store stub, we have to mark | |
4268 // the call as containing no inlined code so we will not attempt to | |
4269 // patch it. | |
4270 switch (ic->kind()) { | |
4271 case Code::LOAD_IC: | |
4272 case Code::KEYED_LOAD_IC: | |
4273 case Code::STORE_IC: | |
4274 case Code::KEYED_STORE_IC: | |
4275 __ nop(); // Signals no inlined code. | |
4276 break; | |
4277 default: | |
4278 // Do nothing. | |
4279 break; | |
4280 } | |
4281 } | 4258 } |
4282 | 4259 |
4283 | 4260 |
4284 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site) { | 4261 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site) { |
4285 Counters* counters = isolate()->counters(); | 4262 Counters* counters = isolate()->counters(); |
4286 switch (ic->kind()) { | 4263 switch (ic->kind()) { |
4287 case Code::LOAD_IC: | 4264 case Code::LOAD_IC: |
4288 __ IncrementCounter(counters->named_load_full(), 1); | 4265 __ IncrementCounter(counters->named_load_full(), 1); |
4289 break; | 4266 break; |
4290 case Code::KEYED_LOAD_IC: | 4267 case Code::KEYED_LOAD_IC: |
4291 __ IncrementCounter(counters->keyed_load_full(), 1); | 4268 __ IncrementCounter(counters->keyed_load_full(), 1); |
4292 break; | 4269 break; |
4293 case Code::STORE_IC: | 4270 case Code::STORE_IC: |
4294 __ IncrementCounter(counters->named_store_full(), 1); | 4271 __ IncrementCounter(counters->named_store_full(), 1); |
4295 break; | 4272 break; |
4296 case Code::KEYED_STORE_IC: | 4273 case Code::KEYED_STORE_IC: |
4297 __ IncrementCounter(counters->keyed_store_full(), 1); | 4274 __ IncrementCounter(counters->keyed_store_full(), 1); |
4298 default: | 4275 default: |
4299 break; | 4276 break; |
4300 } | 4277 } |
4301 | |
4302 __ call(ic, RelocInfo::CODE_TARGET); | 4278 __ call(ic, RelocInfo::CODE_TARGET); |
4303 if (patch_site != NULL && patch_site->is_bound()) { | 4279 if (patch_site != NULL && patch_site->is_bound()) { |
4304 patch_site->EmitPatchInfo(); | 4280 patch_site->EmitPatchInfo(); |
4305 } else { | 4281 } else { |
4306 __ nop(); // Signals no inlined code. | 4282 __ nop(); // Signals no inlined code. |
4307 } | 4283 } |
4308 } | 4284 } |
4309 | 4285 |
4310 | 4286 |
4311 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { | 4287 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4348 // And return. | 4324 // And return. |
4349 __ ret(0); | 4325 __ ret(0); |
4350 } | 4326 } |
4351 | 4327 |
4352 | 4328 |
4353 #undef __ | 4329 #undef __ |
4354 | 4330 |
4355 } } // namespace v8::internal | 4331 } } // namespace v8::internal |
4356 | 4332 |
4357 #endif // V8_TARGET_ARCH_IA32 | 4333 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |