Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/x64/lithium-x64.h

Issue 6538080: Add template parameter for hydrogen input operands. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: added other platforms Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 24 matching lines...) Expand all
35 35
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 // Forward declarations. 39 // Forward declarations.
40 class LCodeGen; 40 class LCodeGen;
41 41
42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ 42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
43 V(ControlInstruction) \ 43 V(ControlInstruction) \
44 V(Call) \ 44 V(Call) \
45 V(StoreKeyed) \
46 V(StoreNamed) \
47 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) 45 LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
48 46
49 47
50 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ 48 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
51 V(AccessArgumentsAt) \ 49 V(AccessArgumentsAt) \
52 V(AddI) \ 50 V(AddI) \
53 V(ApplyArguments) \ 51 V(ApplyArguments) \
54 V(ArgumentsElements) \ 52 V(ArgumentsElements) \
55 V(ArgumentsLength) \ 53 V(ArgumentsLength) \
56 V(ArithmeticD) \ 54 V(ArithmeticD) \
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 1460
1463 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") 1461 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
1464 1462
1465 bool needs_check() const { return needs_check_; } 1463 bool needs_check() const { return needs_check_; }
1466 1464
1467 private: 1465 private:
1468 bool needs_check_; 1466 bool needs_check_;
1469 }; 1467 };
1470 1468
1471 1469
1472 class LStoreNamed: public LTemplateInstruction<0, 2, 1> { 1470 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> {
1473 public: 1471 public:
1474 LStoreNamed(LOperand* object, LOperand* value) { 1472 LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) {
1475 inputs_[0] = object; 1473 inputs_[0] = object;
1476 inputs_[1] = value; 1474 inputs_[1] = value;
1477 }
1478
1479 DECLARE_INSTRUCTION(StoreNamed)
1480 DECLARE_HYDROGEN_ACCESSOR(StoreNamed)
1481
1482 virtual void PrintDataTo(StringStream* stream);
1483
1484 LOperand* object() { return inputs_[0]; }
1485 LOperand* value() { return inputs_[1]; }
1486 Handle<Object> name() const { return hydrogen()->name(); }
1487 };
1488
1489
1490 class LStoreNamedField: public LStoreNamed {
1491 public:
1492 LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp)
1493 : LStoreNamed(object, value) {
1494 temps_[0] = temp; 1475 temps_[0] = temp;
1495 } 1476 }
1496 1477
1497 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 1478 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
1498 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 1479 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
1499 1480
1481 virtual void PrintDataTo(StringStream* stream);
1482
1483 LOperand* object() { return inputs_[0]; }
1484 LOperand* value() { return inputs_[1]; }
1485
1486 Handle<Object> name() const { return hydrogen()->name(); }
1500 bool is_in_object() { return hydrogen()->is_in_object(); } 1487 bool is_in_object() { return hydrogen()->is_in_object(); }
1501 int offset() { return hydrogen()->offset(); } 1488 int offset() { return hydrogen()->offset(); }
1502 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } 1489 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1503 Handle<Map> transition() const { return hydrogen()->transition(); } 1490 Handle<Map> transition() const { return hydrogen()->transition(); }
1504 }; 1491 };
1505 1492
1506 1493
1507 class LStoreNamedGeneric: public LStoreNamed { 1494 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> {
1508 public: 1495 public:
1509 LStoreNamedGeneric(LOperand* object, LOperand* value) 1496 LStoreNamedGeneric(LOperand* object, LOperand* value) {
1510 : LStoreNamed(object, value) { } 1497 inputs_[0] = object;
1498 inputs_[1] = value;
1499 }
1511 1500
1512 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1501 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1513 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1502 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1503
1504 virtual void PrintDataTo(StringStream* stream);
1505
1506 LOperand* object() { return inputs_[0]; }
1507 LOperand* value() { return inputs_[1]; }
1508 Handle<Object> name() const { return hydrogen()->name(); }
1514 }; 1509 };
1515 1510
1516 1511
1517 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { 1512 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1518 public: 1513 public:
1519 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { 1514 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) {
1520 inputs_[0] = obj; 1515 inputs_[0] = obj;
1521 inputs_[1] = key; 1516 inputs_[1] = key;
1522 inputs_[2] = val; 1517 inputs_[2] = val;
1523 } 1518 }
1524 1519
1525 DECLARE_INSTRUCTION(StoreKeyed) 1520 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1521 "store-keyed-fast-element")
1522 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1526 1523
1527 virtual void PrintDataTo(StringStream* stream); 1524 virtual void PrintDataTo(StringStream* stream);
1528 1525
1529 LOperand* object() { return inputs_[0]; } 1526 LOperand* object() { return inputs_[0]; }
1530 LOperand* key() { return inputs_[1]; } 1527 LOperand* key() { return inputs_[1]; }
1531 LOperand* value() { return inputs_[2]; } 1528 LOperand* value() { return inputs_[2]; }
1532 }; 1529 };
1533 1530
1534 1531
1535 class LStoreKeyedFastElement: public LStoreKeyed {
1536 public:
1537 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val)
1538 : LStoreKeyed(obj, key, val) {}
1539
1540 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1541 "store-keyed-fast-element")
1542 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1543 };
1544
1545
1546 class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 0> { 1532 class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 0> {
1547 public: 1533 public:
1548 LStorePixelArrayElement(LOperand* external_pointer, 1534 LStorePixelArrayElement(LOperand* external_pointer,
1549 LOperand* key, 1535 LOperand* key,
1550 LOperand* val) { 1536 LOperand* val) {
1551 inputs_[0] = external_pointer; 1537 inputs_[0] = external_pointer;
1552 inputs_[1] = key; 1538 inputs_[1] = key;
1553 inputs_[2] = val; 1539 inputs_[2] = val;
1554 } 1540 }
1555 1541
1556 DECLARE_CONCRETE_INSTRUCTION(StorePixelArrayElement, 1542 DECLARE_CONCRETE_INSTRUCTION(StorePixelArrayElement,
1557 "store-pixel-array-element") 1543 "store-pixel-array-element")
1558 DECLARE_HYDROGEN_ACCESSOR(StorePixelArrayElement) 1544 DECLARE_HYDROGEN_ACCESSOR(StorePixelArrayElement)
1559 1545
1560 LOperand* external_pointer() { return inputs_[0]; } 1546 LOperand* external_pointer() { return inputs_[0]; }
1561 LOperand* key() { return inputs_[1]; } 1547 LOperand* key() { return inputs_[1]; }
1562 LOperand* value() { return inputs_[2]; } 1548 LOperand* value() { return inputs_[2]; }
1563 }; 1549 };
1564 1550
1565 1551
1566 class LStoreKeyedGeneric: public LStoreKeyed { 1552 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
1567 public: 1553 public:
1568 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) 1554 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) {
1569 : LStoreKeyed(object, key, value) { } 1555 inputs_[0] = object;
1556 inputs_[1] = key;
1557 inputs_[2] = value;
1558 }
1570 1559
1571 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 1560 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
1561
1562 virtual void PrintDataTo(StringStream* stream);
1563
1564 LOperand* object() { return inputs_[0]; }
1565 LOperand* key() { return inputs_[1]; }
1566 LOperand* value() { return inputs_[2]; }
1572 }; 1567 };
1573 1568
1574 1569
1575 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { 1570 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> {
1576 public: 1571 public:
1577 LStringCharCodeAt(LOperand* string, LOperand* index) { 1572 LStringCharCodeAt(LOperand* string, LOperand* index) {
1578 inputs_[0] = string; 1573 inputs_[0] = string;
1579 inputs_[1] = index; 1574 inputs_[1] = index;
1580 } 1575 }
1581 1576
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2008 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2014 }; 2009 };
2015 2010
2016 #undef DECLARE_HYDROGEN_ACCESSOR 2011 #undef DECLARE_HYDROGEN_ACCESSOR
2017 #undef DECLARE_INSTRUCTION 2012 #undef DECLARE_INSTRUCTION
2018 #undef DECLARE_CONCRETE_INSTRUCTION 2013 #undef DECLARE_CONCRETE_INSTRUCTION
2019 2014
2020 } } // namespace v8::int 2015 } } // namespace v8::int
2021 2016
2022 #endif // V8_X64_LITHIUM_X64_H_ 2017 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698