 Chromium Code Reviews
 Chromium Code Reviews Issue 6158004:
  Remove duplicate members from some LIR instruction by using the HIR accessors...  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
    
  
    Issue 6158004:
  Remove duplicate members from some LIR instruction by using the HIR accessors...  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/| 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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1236 public: | 1236 public: | 
| 1237 explicit LLoadElements(LOperand* obj) : LUnaryOperation(obj) { } | 1237 explicit LLoadElements(LOperand* obj) : LUnaryOperation(obj) { } | 
| 1238 | 1238 | 
| 1239 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") | 1239 DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") | 
| 1240 }; | 1240 }; | 
| 1241 | 1241 | 
| 1242 | 1242 | 
| 1243 class LLoadKeyedFastElement: public LBinaryOperation { | 1243 class LLoadKeyedFastElement: public LBinaryOperation { | 
| 1244 public: | 1244 public: | 
| 1245 LLoadKeyedFastElement(LOperand* elements, | 1245 LLoadKeyedFastElement(LOperand* elements, | 
| 1246 LOperand* key, | 1246 LOperand* key) | 
| 
Kevin Millikin (Chromium)
2011/01/11 11:31:56
The line break between the arguments is no longer
 
fschneider
2011/01/11 11:41:49
Done.
 | |
| 1247 LOperand* load_result) | 1247 : LBinaryOperation(elements, key) { } | 
| 1248 : LBinaryOperation(elements, key), | |
| 1249 load_result_(load_result) { } | |
| 1250 | 1248 | 
| 1251 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") | 1249 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") | 
| 1252 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) | 1250 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) | 
| 1253 | 1251 | 
| 1254 LOperand* elements() const { return left(); } | 1252 LOperand* elements() const { return left(); } | 
| 1255 LOperand* key() const { return right(); } | 1253 LOperand* key() const { return right(); } | 
| 1256 LOperand* load_result() const { return load_result_; } | |
| 1257 | |
| 1258 private: | |
| 1259 LOperand* load_result_; | |
| 1260 }; | 1254 }; | 
| 1261 | 1255 | 
| 1262 | 1256 | 
| 1263 class LLoadKeyedGeneric: public LBinaryOperation { | 1257 class LLoadKeyedGeneric: public LBinaryOperation { | 
| 1264 public: | 1258 public: | 
| 1265 LLoadKeyedGeneric(LOperand* obj, LOperand* key) | 1259 LLoadKeyedGeneric(LOperand* obj, LOperand* key) | 
| 1266 : LBinaryOperation(obj, key) { } | 1260 : LBinaryOperation(obj, key) { } | 
| 1267 | 1261 | 
| 1268 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | 1262 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | 
| 1269 | 1263 | 
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1485 | 1479 | 
| 1486 bool needs_check() const { return needs_check_; } | 1480 bool needs_check() const { return needs_check_; } | 
| 1487 | 1481 | 
| 1488 private: | 1482 private: | 
| 1489 bool needs_check_; | 1483 bool needs_check_; | 
| 1490 }; | 1484 }; | 
| 1491 | 1485 | 
| 1492 | 1486 | 
| 1493 class LStoreNamed: public LInstruction { | 1487 class LStoreNamed: public LInstruction { | 
| 1494 public: | 1488 public: | 
| 1495 LStoreNamed(LOperand* obj, Handle<Object> name, LOperand* val) | 1489 LStoreNamed(LOperand* obj, LOperand* val) | 
| 1496 : object_(obj), name_(name), value_(val) { } | 1490 : object_(obj), value_(val) { } | 
| 1497 | 1491 | 
| 1498 DECLARE_INSTRUCTION(StoreNamed) | 1492 DECLARE_INSTRUCTION(StoreNamed) | 
| 1493 DECLARE_HYDROGEN_ACCESSOR(StoreNamed) | |
| 1499 | 1494 | 
| 1500 virtual void PrintDataTo(StringStream* stream) const; | 1495 virtual void PrintDataTo(StringStream* stream) const; | 
| 1501 | 1496 | 
| 1502 LOperand* object() const { return object_; } | 1497 LOperand* object() const { return object_; } | 
| 1503 Handle<Object> name() const { return name_; } | 1498 Handle<Object> name() const { return hydrogen()->name(); } | 
| 1504 LOperand* value() const { return value_; } | 1499 LOperand* value() const { return value_; } | 
| 1505 | 1500 | 
| 1506 private: | 1501 private: | 
| 1507 LOperand* object_; | 1502 LOperand* object_; | 
| 1508 Handle<Object> name_; | |
| 1509 LOperand* value_; | 1503 LOperand* value_; | 
| 1510 }; | 1504 }; | 
| 1511 | 1505 | 
| 1512 | 1506 | 
| 1513 class LStoreNamedField: public LStoreNamed { | 1507 class LStoreNamedField: public LStoreNamed { | 
| 1514 public: | 1508 public: | 
| 1515 LStoreNamedField(LOperand* obj, | 1509 LStoreNamedField(LOperand* obj, LOperand* val) | 
| 1516 Handle<Object> name, | 1510 : LStoreNamed(obj, val) { } | 
| 1517 LOperand* val, | |
| 1518 bool in_object, | |
| 1519 int offset, | |
| 1520 bool needs_write_barrier, | |
| 1521 Handle<Map> transition) | |
| 1522 : LStoreNamed(obj, name, val), | |
| 1523 is_in_object_(in_object), | |
| 1524 offset_(offset), | |
| 1525 needs_write_barrier_(needs_write_barrier), | |
| 1526 transition_(transition) { } | |
| 1527 | 1511 | 
| 1528 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") | 1512 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") | 
| 1513 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) | |
| 1529 | 1514 | 
| 1530 bool is_in_object() { return is_in_object_; } | 1515 bool is_in_object() { return hydrogen()->is_in_object(); } | 
| 1531 int offset() { return offset_; } | 1516 int offset() { return hydrogen()->offset(); } | 
| 1532 bool needs_write_barrier() { return needs_write_barrier_; } | 1517 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } | 
| 1533 Handle<Map> transition() const { return transition_; } | 1518 Handle<Map> transition() { return hydrogen()->transition(); } | 
| 1534 void set_transition(Handle<Map> map) { transition_ = map; } | |
| 1535 | |
| 1536 private: | |
| 1537 bool is_in_object_; | |
| 1538 int offset_; | |
| 1539 bool needs_write_barrier_; | |
| 1540 Handle<Map> transition_; | |
| 1541 }; | 1519 }; | 
| 1542 | 1520 | 
| 1543 | 1521 | 
| 1544 class LStoreNamedGeneric: public LStoreNamed { | 1522 class LStoreNamedGeneric: public LStoreNamed { | 
| 1545 public: | 1523 public: | 
| 1546 LStoreNamedGeneric(LOperand* obj, | 1524 LStoreNamedGeneric(LOperand* obj, LOperand* val) | 
| 1547 Handle<Object> name, | 1525 : LStoreNamed(obj, val) { } | 
| 1548 LOperand* val) | |
| 1549 : LStoreNamed(obj, name, val) { } | |
| 1550 | 1526 | 
| 1551 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 1527 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 
| 1528 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | |
| 1552 }; | 1529 }; | 
| 1553 | 1530 | 
| 1554 | 1531 | 
| 1555 class LStoreKeyed: public LInstruction { | 1532 class LStoreKeyed: public LInstruction { | 
| 1556 public: | 1533 public: | 
| 1557 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) | 1534 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) | 
| 1558 : object_(obj), key_(key), value_(val) { } | 1535 : object_(obj), key_(key), value_(val) { } | 
| 1559 | 1536 | 
| 1560 DECLARE_INSTRUCTION(StoreKeyed) | 1537 DECLARE_INSTRUCTION(StoreKeyed) | 
| 1561 | 1538 | 
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2080 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2057 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 
| 2081 }; | 2058 }; | 
| 2082 | 2059 | 
| 2083 #undef DECLARE_HYDROGEN_ACCESSOR | 2060 #undef DECLARE_HYDROGEN_ACCESSOR | 
| 2084 #undef DECLARE_INSTRUCTION | 2061 #undef DECLARE_INSTRUCTION | 
| 2085 #undef DECLARE_CONCRETE_INSTRUCTION | 2062 #undef DECLARE_CONCRETE_INSTRUCTION | 
| 2086 | 2063 | 
| 2087 } } // namespace v8::internal | 2064 } } // namespace v8::internal | 
| 2088 | 2065 | 
| 2089 #endif // V8_ARM_LITHIUM_ARM_H_ | 2066 #endif // V8_ARM_LITHIUM_ARM_H_ | 
| OLD | NEW |