| 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 4214 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4225       __ IncrementCounter(counters->keyed_load_full(), 1); | 4225       __ IncrementCounter(counters->keyed_load_full(), 1); | 
| 4226       break; | 4226       break; | 
| 4227     case Code::STORE_IC: | 4227     case Code::STORE_IC: | 
| 4228       __ IncrementCounter(counters->named_store_full(), 1); | 4228       __ IncrementCounter(counters->named_store_full(), 1); | 
| 4229       break; | 4229       break; | 
| 4230     case Code::KEYED_STORE_IC: | 4230     case Code::KEYED_STORE_IC: | 
| 4231       __ IncrementCounter(counters->keyed_store_full(), 1); | 4231       __ IncrementCounter(counters->keyed_store_full(), 1); | 
| 4232     default: | 4232     default: | 
| 4233       break; | 4233       break; | 
| 4234   } | 4234   } | 
| 4235 |  | 
| 4236   __ call(ic, mode); | 4235   __ call(ic, mode); | 
| 4237 |  | 
| 4238   // Crankshaft doesn't need patching of inlined loads and stores. |  | 
| 4239   // When compiling the snapshot we need to produce code that works |  | 
| 4240   // with and without Crankshaft. |  | 
| 4241   if (V8::UseCrankshaft() && !Serializer::enabled()) { |  | 
| 4242     return; |  | 
| 4243   } |  | 
| 4244 |  | 
| 4245   // If we're calling a (keyed) load or store stub, we have to mark |  | 
| 4246   // the call as containing no inlined code so we will not attempt to |  | 
| 4247   // patch it. |  | 
| 4248   switch (ic->kind()) { |  | 
| 4249     case Code::LOAD_IC: |  | 
| 4250     case Code::KEYED_LOAD_IC: |  | 
| 4251     case Code::STORE_IC: |  | 
| 4252     case Code::KEYED_STORE_IC: |  | 
| 4253       __ nop();  // Signals no inlined code. |  | 
| 4254       break; |  | 
| 4255     default: |  | 
| 4256       // Do nothing. |  | 
| 4257       break; |  | 
| 4258   } |  | 
| 4259 } | 4236 } | 
| 4260 | 4237 | 
| 4261 | 4238 | 
| 4262 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site) { | 4239 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site) { | 
| 4263   Counters* counters = isolate()->counters(); | 4240   Counters* counters = isolate()->counters(); | 
| 4264   switch (ic->kind()) { | 4241   switch (ic->kind()) { | 
| 4265     case Code::LOAD_IC: | 4242     case Code::LOAD_IC: | 
| 4266       __ IncrementCounter(counters->named_load_full(), 1); | 4243       __ IncrementCounter(counters->named_load_full(), 1); | 
| 4267       break; | 4244       break; | 
| 4268     case Code::KEYED_LOAD_IC: | 4245     case Code::KEYED_LOAD_IC: | 
| 4269       __ IncrementCounter(counters->keyed_load_full(), 1); | 4246       __ IncrementCounter(counters->keyed_load_full(), 1); | 
| 4270       break; | 4247       break; | 
| 4271     case Code::STORE_IC: | 4248     case Code::STORE_IC: | 
| 4272       __ IncrementCounter(counters->named_store_full(), 1); | 4249       __ IncrementCounter(counters->named_store_full(), 1); | 
| 4273       break; | 4250       break; | 
| 4274     case Code::KEYED_STORE_IC: | 4251     case Code::KEYED_STORE_IC: | 
| 4275       __ IncrementCounter(counters->keyed_store_full(), 1); | 4252       __ IncrementCounter(counters->keyed_store_full(), 1); | 
| 4276     default: | 4253     default: | 
| 4277       break; | 4254       break; | 
| 4278   } | 4255   } | 
| 4279 |  | 
| 4280   __ call(ic, RelocInfo::CODE_TARGET); | 4256   __ call(ic, RelocInfo::CODE_TARGET); | 
| 4281   if (patch_site != NULL && patch_site->is_bound()) { | 4257   if (patch_site != NULL && patch_site->is_bound()) { | 
| 4282     patch_site->EmitPatchInfo(); | 4258     patch_site->EmitPatchInfo(); | 
| 4283   } else { | 4259   } else { | 
| 4284     __ nop();  // Signals no inlined code. | 4260     __ nop();  // Signals no inlined code. | 
| 4285   } | 4261   } | 
| 4286 } | 4262 } | 
| 4287 | 4263 | 
| 4288 | 4264 | 
| 4289 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { | 4265 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4330   __ ret(0); | 4306   __ ret(0); | 
| 4331 } | 4307 } | 
| 4332 | 4308 | 
| 4333 | 4309 | 
| 4334 #undef __ | 4310 #undef __ | 
| 4335 | 4311 | 
| 4336 | 4312 | 
| 4337 } }  // namespace v8::internal | 4313 } }  // namespace v8::internal | 
| 4338 | 4314 | 
| 4339 #endif  // V8_TARGET_ARCH_X64 | 4315 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|