| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|     2 // Use of this source code is governed by a BSD-style license that can be |     2 // Use of this source code is governed by a BSD-style license that can be | 
|     3 // found in the LICENSE file. |     3 // found in the LICENSE file. | 
|     4  |     4  | 
|     5 #include "src/v8.h" |     5 #include "src/v8.h" | 
|     6  |     6  | 
|     7 #include "src/accessors.h" |     7 #include "src/accessors.h" | 
|     8 #include "src/api.h" |     8 #include "src/api.h" | 
|     9 #include "src/arguments.h" |     9 #include "src/arguments.h" | 
|    10 #include "src/base/bits.h" |    10 #include "src/base/bits.h" | 
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1343 Handle<Code> StoreIC::initialize_stub(Isolate* isolate, |  1343 Handle<Code> StoreIC::initialize_stub(Isolate* isolate, | 
|  1344                                       StrictMode strict_mode) { |  1344                                       StrictMode strict_mode) { | 
|  1345   ExtraICState extra_state = ComputeExtraICState(strict_mode); |  1345   ExtraICState extra_state = ComputeExtraICState(strict_mode); | 
|  1346   Handle<Code> ic = |  1346   Handle<Code> ic = | 
|  1347       PropertyICCompiler::ComputeStore(isolate, UNINITIALIZED, extra_state); |  1347       PropertyICCompiler::ComputeStore(isolate, UNINITIALIZED, extra_state); | 
|  1348   return ic; |  1348   return ic; | 
|  1349 } |  1349 } | 
|  1350  |  1350  | 
|  1351  |  1351  | 
|  1352 Handle<Code> StoreIC::megamorphic_stub() { |  1352 Handle<Code> StoreIC::megamorphic_stub() { | 
|  1353   return PropertyICCompiler::ComputeStore(isolate(), MEGAMORPHIC, |  1353   if (kind() == Code::STORE_IC) { | 
|  1354                                           extra_ic_state()); |  1354     return PropertyICCompiler::ComputeStore(isolate(), MEGAMORPHIC, | 
 |  1355                                             extra_ic_state()); | 
 |  1356   } else { | 
 |  1357     DCHECK(kind() == Code::KEYED_STORE_IC); | 
 |  1358     if (strict_mode() == STRICT) { | 
 |  1359       return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); | 
 |  1360     } else { | 
 |  1361       return isolate()->builtins()->KeyedStoreIC_Generic(); | 
 |  1362     } | 
 |  1363   } | 
|  1355 } |  1364 } | 
|  1356  |  1365  | 
|  1357  |  1366  | 
|  1358 Handle<Code> StoreIC::generic_stub() const { |  1367 Handle<Code> StoreIC::generic_stub() const { | 
|  1359   return PropertyICCompiler::ComputeStore(isolate(), GENERIC, extra_ic_state()); |  1368   if (kind() == Code::STORE_IC) { | 
 |  1369     return PropertyICCompiler::ComputeStore(isolate(), GENERIC, | 
 |  1370                                             extra_ic_state()); | 
 |  1371   } else { | 
 |  1372     DCHECK(kind() == Code::KEYED_STORE_IC); | 
 |  1373     if (strict_mode() == STRICT) { | 
 |  1374       return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); | 
 |  1375     } else { | 
 |  1376       return isolate()->builtins()->KeyedStoreIC_Generic(); | 
 |  1377     } | 
 |  1378   } | 
|  1360 } |  1379 } | 
|  1361  |  1380  | 
|  1362  |  1381  | 
 |  1382 Handle<Code> StoreIC::slow_stub() const { | 
 |  1383   if (kind() == Code::STORE_IC) { | 
 |  1384     return isolate()->builtins()->StoreIC_Slow(); | 
 |  1385   } else { | 
 |  1386     DCHECK(kind() == Code::KEYED_STORE_IC); | 
 |  1387     return isolate()->builtins()->KeyedStoreIC_Slow(); | 
 |  1388   } | 
 |  1389 } | 
 |  1390  | 
 |  1391  | 
|  1363 Handle<Code> StoreIC::pre_monomorphic_stub(Isolate* isolate, |  1392 Handle<Code> StoreIC::pre_monomorphic_stub(Isolate* isolate, | 
|  1364                                            StrictMode strict_mode) { |  1393                                            StrictMode strict_mode) { | 
|  1365   ExtraICState state = ComputeExtraICState(strict_mode); |  1394   ExtraICState state = ComputeExtraICState(strict_mode); | 
|  1366   return PropertyICCompiler::ComputeStore(isolate, PREMONOMORPHIC, state); |  1395   return PropertyICCompiler::ComputeStore(isolate, PREMONOMORPHIC, state); | 
|  1367 } |  1396 } | 
|  1368  |  1397  | 
|  1369  |  1398  | 
|  1370 void StoreIC::UpdateCaches(LookupIterator* lookup, Handle<Object> value, |  1399 void StoreIC::UpdateCaches(LookupIterator* lookup, Handle<Object> value, | 
|  1371                            JSReceiver::StoreFromKeyed store_mode) { |  1400                            JSReceiver::StoreFromKeyed store_mode) { | 
|  1372   if (state() == UNINITIALIZED) { |  1401   if (state() == UNINITIALIZED) { | 
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2648 static const Address IC_utilities[] = { |  2677 static const Address IC_utilities[] = { | 
|  2649 #define ADDR(name) FUNCTION_ADDR(name), |  2678 #define ADDR(name) FUNCTION_ADDR(name), | 
|  2650     IC_UTIL_LIST(ADDR) NULL |  2679     IC_UTIL_LIST(ADDR) NULL | 
|  2651 #undef ADDR |  2680 #undef ADDR | 
|  2652 }; |  2681 }; | 
|  2653  |  2682  | 
|  2654  |  2683  | 
|  2655 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |  2684 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 
|  2656 } |  2685 } | 
|  2657 }  // namespace v8::internal |  2686 }  // namespace v8::internal | 
| OLD | NEW |