| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   155   V(StoreNamedGeneric)                          \ |   155   V(StoreNamedGeneric)                          \ | 
|   156   V(StringAdd)                                  \ |   156   V(StringAdd)                                  \ | 
|   157   V(StringCharCodeAt)                           \ |   157   V(StringCharCodeAt)                           \ | 
|   158   V(StringCharFromCode)                         \ |   158   V(StringCharFromCode)                         \ | 
|   159   V(StringLength)                               \ |   159   V(StringLength)                               \ | 
|   160   V(SubI)                                       \ |   160   V(SubI)                                       \ | 
|   161   V(TaggedToI)                                  \ |   161   V(TaggedToI)                                  \ | 
|   162   V(ThisFunction)                               \ |   162   V(ThisFunction)                               \ | 
|   163   V(Throw)                                      \ |   163   V(Throw)                                      \ | 
|   164   V(ToFastProperties)                           \ |   164   V(ToFastProperties)                           \ | 
 |   165   V(TransitionElementsKind)                     \ | 
|   165   V(Typeof)                                     \ |   166   V(Typeof)                                     \ | 
|   166   V(TypeofIsAndBranch)                          \ |   167   V(TypeofIsAndBranch)                          \ | 
|   167   V(UnaryMathOperation)                         \ |   168   V(UnaryMathOperation)                         \ | 
|   168   V(UnknownOSRValue)                            \ |   169   V(UnknownOSRValue)                            \ | 
|   169   V(ValueOf) |   170   V(ValueOf) | 
|   170  |   171  | 
|   171  |   172  | 
|   172 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic)              \ |   173 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic)              \ | 
|   173   virtual Opcode opcode() const { return LInstruction::k##type; } \ |   174   virtual Opcode opcode() const { return LInstruction::k##type; } \ | 
|   174   virtual void CompileToNative(LCodeGen* generator);              \ |   175   virtual void CompileToNative(LCodeGen* generator);              \ | 
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1253     inputs_[0] = context; |  1254     inputs_[0] = context; | 
|  1254     inputs_[1] = value; |  1255     inputs_[1] = value; | 
|  1255   } |  1256   } | 
|  1256  |  1257  | 
|  1257   DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") |  1258   DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") | 
|  1258   DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) |  1259   DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) | 
|  1259  |  1260  | 
|  1260   LOperand* context() { return InputAt(0); } |  1261   LOperand* context() { return InputAt(0); } | 
|  1261   LOperand* value() { return InputAt(1); } |  1262   LOperand* value() { return InputAt(1); } | 
|  1262   int slot_index() { return hydrogen()->slot_index(); } |  1263   int slot_index() { return hydrogen()->slot_index(); } | 
|  1263   int needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } |  | 
|  1264  |  1264  | 
|  1265   virtual void PrintDataTo(StringStream* stream); |  1265   virtual void PrintDataTo(StringStream* stream); | 
|  1266 }; |  1266 }; | 
|  1267  |  1267  | 
|  1268  |  1268  | 
|  1269 class LPushArgument: public LTemplateInstruction<0, 1, 0> { |  1269 class LPushArgument: public LTemplateInstruction<0, 1, 0> { | 
|  1270  public: |  1270  public: | 
|  1271   explicit LPushArgument(LOperand* value) { |  1271   explicit LPushArgument(LOperand* value) { | 
|  1272     inputs_[0] = value; |  1272     inputs_[0] = value; | 
|  1273   } |  1273   } | 
|  1274  |  1274  | 
|  1275   DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") |  1275   DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") | 
|  1276 }; |  1276 }; | 
|  1277  |  1277  | 
|  1278  |  1278  | 
|  1279 class LThisFunction: public LTemplateInstruction<1, 0, 0> { |  1279 class LThisFunction: public LTemplateInstruction<1, 0, 0> { | 
 |  1280  public: | 
|  1280   DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") |  1281   DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") | 
 |  1282   DECLARE_HYDROGEN_ACCESSOR(ThisFunction) | 
|  1281 }; |  1283 }; | 
|  1282  |  1284  | 
|  1283  |  1285  | 
|  1284 class LContext: public LTemplateInstruction<1, 0, 0> { |  1286 class LContext: public LTemplateInstruction<1, 0, 0> { | 
|  1285  public: |  1287  public: | 
|  1286   DECLARE_CONCRETE_INSTRUCTION(Context, "context") |  1288   DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 
|  1287 }; |  1289 }; | 
|  1288  |  1290  | 
|  1289  |  1291  | 
|  1290 class LOuterContext: public LTemplateInstruction<1, 1, 0> { |  1292 class LOuterContext: public LTemplateInstruction<1, 1, 0> { | 
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1554   DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) |  1556   DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) | 
|  1555  |  1557  | 
|  1556   virtual void PrintDataTo(StringStream* stream); |  1558   virtual void PrintDataTo(StringStream* stream); | 
|  1557  |  1559  | 
|  1558   LOperand* object() { return inputs_[0]; } |  1560   LOperand* object() { return inputs_[0]; } | 
|  1559   LOperand* value() { return inputs_[1]; } |  1561   LOperand* value() { return inputs_[1]; } | 
|  1560  |  1562  | 
|  1561   Handle<Object> name() const { return hydrogen()->name(); } |  1563   Handle<Object> name() const { return hydrogen()->name(); } | 
|  1562   bool is_in_object() { return hydrogen()->is_in_object(); } |  1564   bool is_in_object() { return hydrogen()->is_in_object(); } | 
|  1563   int offset() { return hydrogen()->offset(); } |  1565   int offset() { return hydrogen()->offset(); } | 
|  1564   bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } |  | 
|  1565   Handle<Map> transition() const { return hydrogen()->transition(); } |  1566   Handle<Map> transition() const { return hydrogen()->transition(); } | 
|  1566 }; |  1567 }; | 
|  1567  |  1568  | 
|  1568  |  1569  | 
|  1569 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { |  1570 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { | 
|  1570  public: |  1571  public: | 
|  1571   LStoreNamedGeneric(LOperand* obj, LOperand* val) { |  1572   LStoreNamedGeneric(LOperand* obj, LOperand* val) { | 
|  1572     inputs_[0] = obj; |  1573     inputs_[0] = obj; | 
|  1573     inputs_[1] = val; |  1574     inputs_[1] = val; | 
|  1574   } |  1575   } | 
|  1575  |  1576  | 
|  1576   DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |  1577   DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 
|  1577   DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |  1578   DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 
|  1578  |  1579  | 
|  1579   virtual void PrintDataTo(StringStream* stream); |  1580   virtual void PrintDataTo(StringStream* stream); | 
|  1580  |  1581  | 
|  1581   LOperand* object() { return inputs_[0]; } |  1582   LOperand* object() { return inputs_[0]; } | 
|  1582   LOperand* value() { return inputs_[1]; } |  1583   LOperand* value() { return inputs_[1]; } | 
|  1583   Handle<Object> name() const { return hydrogen()->name(); } |  1584   Handle<Object> name() const { return hydrogen()->name(); } | 
|  1584   bool strict_mode() { return hydrogen()->strict_mode(); } |  1585   StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 
 |  1586   bool strict_mode() { return strict_mode_flag() == kStrictMode; } | 
|  1585 }; |  1587 }; | 
|  1586  |  1588  | 
|  1587  |  1589  | 
|  1588 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { |  1590 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { | 
|  1589  public: |  1591  public: | 
|  1590   LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { |  1592   LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { | 
|  1591     inputs_[0] = obj; |  1593     inputs_[0] = obj; | 
|  1592     inputs_[1] = key; |  1594     inputs_[1] = key; | 
|  1593     inputs_[2] = val; |  1595     inputs_[2] = val; | 
|  1594   } |  1596   } | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1662  |  1664  | 
|  1663   LOperand* external_pointer() { return inputs_[0]; } |  1665   LOperand* external_pointer() { return inputs_[0]; } | 
|  1664   LOperand* key() { return inputs_[1]; } |  1666   LOperand* key() { return inputs_[1]; } | 
|  1665   LOperand* value() { return inputs_[2]; } |  1667   LOperand* value() { return inputs_[2]; } | 
|  1666   ElementsKind elements_kind() const { |  1668   ElementsKind elements_kind() const { | 
|  1667     return hydrogen()->elements_kind(); |  1669     return hydrogen()->elements_kind(); | 
|  1668   } |  1670   } | 
|  1669 }; |  1671 }; | 
|  1670  |  1672  | 
|  1671  |  1673  | 
 |  1674 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { | 
 |  1675  public: | 
 |  1676   LTransitionElementsKind(LOperand* object, | 
 |  1677                           LOperand* new_map_temp, | 
 |  1678                           LOperand* temp_reg) { | 
 |  1679     inputs_[0] = object; | 
 |  1680     temps_[0] = new_map_temp; | 
 |  1681     temps_[1] = temp_reg; | 
 |  1682   } | 
 |  1683  | 
 |  1684   DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 
 |  1685                                "transition-elements-kind") | 
 |  1686   DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 
 |  1687  | 
 |  1688   virtual void PrintDataTo(StringStream* stream); | 
 |  1689  | 
 |  1690   LOperand* object() { return inputs_[0]; } | 
 |  1691   LOperand* new_map_reg() { return temps_[0]; } | 
 |  1692   LOperand* temp_reg() { return temps_[1]; } | 
 |  1693   Handle<Map> original_map() { return hydrogen()->original_map(); } | 
 |  1694   Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } | 
 |  1695 }; | 
 |  1696  | 
 |  1697  | 
|  1672 class LStringAdd: public LTemplateInstruction<1, 2, 0> { |  1698 class LStringAdd: public LTemplateInstruction<1, 2, 0> { | 
|  1673  public: |  1699  public: | 
|  1674   LStringAdd(LOperand* left, LOperand* right) { |  1700   LStringAdd(LOperand* left, LOperand* right) { | 
|  1675     inputs_[0] = left; |  1701     inputs_[0] = left; | 
|  1676     inputs_[1] = right; |  1702     inputs_[1] = right; | 
|  1677   } |  1703   } | 
|  1678  |  1704  | 
|  1679   DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") |  1705   DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") | 
|  1680   DECLARE_HYDROGEN_ACCESSOR(StringAdd) |  1706   DECLARE_HYDROGEN_ACCESSOR(StringAdd) | 
|  1681  |  1707  | 
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2188  |  2214  | 
|  2189   DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |  2215   DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 
|  2190 }; |  2216 }; | 
|  2191  |  2217  | 
|  2192 #undef DECLARE_HYDROGEN_ACCESSOR |  2218 #undef DECLARE_HYDROGEN_ACCESSOR | 
|  2193 #undef DECLARE_CONCRETE_INSTRUCTION |  2219 #undef DECLARE_CONCRETE_INSTRUCTION | 
|  2194  |  2220  | 
|  2195 } }  // namespace v8::internal |  2221 } }  // namespace v8::internal | 
|  2196  |  2222  | 
|  2197 #endif  // V8_ARM_LITHIUM_ARM_H_ |  2223 #endif  // V8_ARM_LITHIUM_ARM_H_ | 
| OLD | NEW |