| 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 #ifndef V8_CODE_STUBS_H_ |     5 #ifndef V8_CODE_STUBS_H_ | 
|     6 #define V8_CODE_STUBS_H_ |     6 #define V8_CODE_STUBS_H_ | 
|     7  |     7  | 
|     8 #include "src/allocation.h" |     8 #include "src/allocation.h" | 
|     9 #include "src/assembler.h" |     9 #include "src/assembler.h" | 
|    10 #include "src/codegen.h" |    10 #include "src/codegen.h" | 
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1237     DCHECK(FLAG_vector_stores); |  1237     DCHECK(FLAG_vector_stores); | 
|  1238     return VectorStoreTransitionDescriptor::SlotRegister(); |  1238     return VectorStoreTransitionDescriptor::SlotRegister(); | 
|  1239   } |  1239   } | 
|  1240  |  1240  | 
|  1241   static Register VectorRegister() { |  1241   static Register VectorRegister() { | 
|  1242     DCHECK(FLAG_vector_stores); |  1242     DCHECK(FLAG_vector_stores); | 
|  1243     return VectorStoreTransitionDescriptor::VectorRegister(); |  1243     return VectorStoreTransitionDescriptor::VectorRegister(); | 
|  1244   } |  1244   } | 
|  1245  |  1245  | 
|  1246   static Register MapRegister() { |  1246   static Register MapRegister() { | 
|  1247     return FLAG_vector_stores ? VectorStoreTransitionDescriptor::MapRegister() |  1247     if (FLAG_vector_stores) { | 
|  1248                               : StoreTransitionDescriptor::MapRegister(); |  1248       return VectorStoreTransitionDescriptor::MapRegister(); | 
 |  1249     } | 
 |  1250     return StoreTransitionDescriptor::MapRegister(); | 
|  1249   } |  1251   } | 
|  1250  |  1252  | 
|  1251   static int ReceiverIndex() { |  1253   static int ReceiverIndex() { | 
|  1252     return StoreTransitionDescriptor::kReceiverIndex; |  1254     return StoreTransitionDescriptor::kReceiverIndex; | 
|  1253   } |  1255   } | 
|  1254  |  1256  | 
|  1255   static int NameIndex() { return StoreTransitionDescriptor::kReceiverIndex; } |  1257   static int NameIndex() { return StoreTransitionDescriptor::kReceiverIndex; } | 
|  1256  |  1258  | 
|  1257   static int ValueIndex() { return StoreTransitionDescriptor::kValueIndex; } |  1259   static int ValueIndex() { return StoreTransitionDescriptor::kValueIndex; } | 
|  1258  |  1260  | 
|  1259   static int SlotIndex() { |  1261   static int MapIndex() { | 
|  1260     DCHECK(FLAG_vector_stores); |  1262     DCHECK(static_cast<int>(VectorStoreTransitionDescriptor::kMapIndex) == | 
|  1261     return VectorStoreTransitionDescriptor::kSlotIndex; |  1263            static_cast<int>(StoreTransitionDescriptor::kMapIndex)); | 
 |  1264     return StoreTransitionDescriptor::kMapIndex; | 
|  1262   } |  1265   } | 
|  1263  |  1266  | 
|  1264   static int VectorIndex() { |  1267   static int VectorIndex() { | 
|  1265     DCHECK(FLAG_vector_stores); |  1268     DCHECK(FLAG_vector_stores); | 
 |  1269     if (HasVirtualSlotArg()) { | 
 |  1270       return VectorStoreTransitionDescriptor::kVirtualSlotVectorIndex; | 
 |  1271     } | 
|  1266     return VectorStoreTransitionDescriptor::kVectorIndex; |  1272     return VectorStoreTransitionDescriptor::kVectorIndex; | 
|  1267   } |  1273   } | 
|  1268  |  1274  | 
|  1269   static int MapIndex() { |  1275   // Some platforms don't have a slot arg. | 
|  1270     if (FLAG_vector_stores) { |  1276   static bool HasVirtualSlotArg() { | 
|  1271       return VectorStoreTransitionDescriptor::kMapIndex; |  1277     if (!FLAG_vector_stores) return false; | 
|  1272     } |  1278     return SlotRegister().is(no_reg); | 
|  1273     return StoreTransitionDescriptor::kMapIndex; |  | 
|  1274   } |  1279   } | 
|  1275  |  | 
|  1276   // Some platforms push Slot, Vector, Map on the stack instead of in |  | 
|  1277   // registers. |  | 
|  1278   static bool UsesStackArgs() { return MapRegister().is(no_reg); } |  | 
|  1279 }; |  1280 }; | 
|  1280  |  1281  | 
|  1281  |  1282  | 
|  1282 class StoreTransitionStub : public HandlerStub { |  1283 class StoreTransitionStub : public HandlerStub { | 
|  1283  public: |  1284  public: | 
|  1284   enum StoreMode { |  1285   enum StoreMode { | 
|  1285     StoreMapOnly, |  1286     StoreMapOnly, | 
|  1286     StoreMapAndValue, |  1287     StoreMapAndValue, | 
|  1287     ExtendStorageAndStoreMapAndValue |  1288     ExtendStorageAndStoreMapAndValue | 
|  1288   }; |  1289   }; | 
| (...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3096 #undef DEFINE_HYDROGEN_CODE_STUB |  3097 #undef DEFINE_HYDROGEN_CODE_STUB | 
|  3097 #undef DEFINE_CODE_STUB |  3098 #undef DEFINE_CODE_STUB | 
|  3098 #undef DEFINE_CODE_STUB_BASE |  3099 #undef DEFINE_CODE_STUB_BASE | 
|  3099  |  3100  | 
|  3100 extern Representation RepresentationFromType(Type* type); |  3101 extern Representation RepresentationFromType(Type* type); | 
|  3101  |  3102  | 
|  3102 }  // namespace internal |  3103 }  // namespace internal | 
|  3103 }  // namespace v8 |  3104 }  // namespace v8 | 
|  3104  |  3105  | 
|  3105 #endif  // V8_CODE_STUBS_H_ |  3106 #endif  // V8_CODE_STUBS_H_ | 
| OLD | NEW |