OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 }; | 476 }; |
477 | 477 |
478 | 478 |
479 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 479 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
480 public: | 480 public: |
481 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } | 481 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } |
482 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") | 482 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") |
483 }; | 483 }; |
484 | 484 |
485 | 485 |
486 class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 486 class LCallStub V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
487 public: | 487 public: |
| 488 explicit LCallStub(LOperand* context) { |
| 489 inputs_[0] = context; |
| 490 } |
| 491 |
| 492 LOperand* context() { return inputs_[0]; } |
| 493 |
488 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") | 494 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") |
489 DECLARE_HYDROGEN_ACCESSOR(CallStub) | 495 DECLARE_HYDROGEN_ACCESSOR(CallStub) |
490 | 496 |
491 TranscendentalCache::Type transcendental_type() { | 497 TranscendentalCache::Type transcendental_type() { |
492 return hydrogen()->transcendental_type(); | 498 return hydrogen()->transcendental_type(); |
493 } | 499 } |
494 }; | 500 }; |
495 | 501 |
496 | 502 |
497 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 503 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 } | 784 } |
779 | 785 |
780 LOperand* value() { return inputs_[0]; } | 786 LOperand* value() { return inputs_[0]; } |
781 LOperand* temp() { return temps_[0]; } | 787 LOperand* temp() { return temps_[0]; } |
782 | 788 |
783 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") | 789 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") |
784 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 790 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
785 }; | 791 }; |
786 | 792 |
787 | 793 |
788 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 794 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
789 public: | 795 public: |
790 explicit LMathAbs(LOperand* value) { | 796 LMathAbs(LOperand* context, LOperand* value) { |
| 797 inputs_[1] = context; |
791 inputs_[0] = value; | 798 inputs_[0] = value; |
792 } | 799 } |
793 | 800 |
| 801 LOperand* context() { return inputs_[1]; } |
794 LOperand* value() { return inputs_[0]; } | 802 LOperand* value() { return inputs_[0]; } |
795 | 803 |
796 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") | 804 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") |
797 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 805 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
798 }; | 806 }; |
799 | 807 |
800 | 808 |
801 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 809 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
802 public: | 810 public: |
803 explicit LMathLog(LOperand* value) { | 811 explicit LMathLog(LOperand* value) { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 LOperand* temp() { return temps_[0]; } | 990 LOperand* temp() { return temps_[0]; } |
983 | 991 |
984 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, | 992 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, |
985 "is-undetectable-and-branch") | 993 "is-undetectable-and-branch") |
986 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) | 994 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) |
987 | 995 |
988 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 996 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
989 }; | 997 }; |
990 | 998 |
991 | 999 |
992 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> { | 1000 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<3, 0> { |
993 public: | 1001 public: |
994 LStringCompareAndBranch(LOperand* left, LOperand* right) { | 1002 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { |
995 inputs_[0] = left; | 1003 inputs_[0] = context; |
996 inputs_[1] = right; | 1004 inputs_[1] = left; |
| 1005 inputs_[2] = right; |
997 } | 1006 } |
998 | 1007 |
999 LOperand* left() { return inputs_[0]; } | 1008 LOperand* context() { return inputs_[0]; } |
1000 LOperand* right() { return inputs_[1]; } | 1009 LOperand* left() { return inputs_[1]; } |
| 1010 LOperand* right() { return inputs_[2]; } |
1001 | 1011 |
1002 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, | 1012 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, |
1003 "string-compare-and-branch") | 1013 "string-compare-and-branch") |
1004 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) | 1014 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) |
1005 | 1015 |
1006 Token::Value op() const { return hydrogen()->token(); } | 1016 Token::Value op() const { return hydrogen()->token(); } |
1007 | 1017 |
1008 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1018 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1009 }; | 1019 }; |
1010 | 1020 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 LOperand* temp() { return temps_[0]; } | 1076 LOperand* temp() { return temps_[0]; } |
1067 | 1077 |
1068 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, | 1078 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, |
1069 "class-of-test-and-branch") | 1079 "class-of-test-and-branch") |
1070 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) | 1080 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) |
1071 | 1081 |
1072 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1082 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1073 }; | 1083 }; |
1074 | 1084 |
1075 | 1085 |
1076 class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1086 class LCmpT V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
1077 public: | 1087 public: |
1078 LCmpT(LOperand* left, LOperand* right) { | 1088 LCmpT(LOperand* context, LOperand* left, LOperand* right) { |
1079 inputs_[0] = left; | 1089 inputs_[0] = context; |
1080 inputs_[1] = right; | 1090 inputs_[1] = left; |
| 1091 inputs_[2] = right; |
1081 } | 1092 } |
1082 | 1093 |
1083 LOperand* left() { return inputs_[0]; } | 1094 LOperand* context() { return inputs_[0]; } |
1084 LOperand* right() { return inputs_[1]; } | 1095 LOperand* left() { return inputs_[1]; } |
| 1096 LOperand* right() { return inputs_[2]; } |
1085 | 1097 |
1086 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") | 1098 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") |
1087 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) | 1099 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) |
1088 | 1100 |
1089 Token::Value op() const { return hydrogen()->token(); } | 1101 Token::Value op() const { return hydrogen()->token(); } |
1090 }; | 1102 }; |
1091 | 1103 |
1092 | 1104 |
1093 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1105 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
1094 public: | 1106 public: |
1095 LInstanceOf(LOperand* left, LOperand* right) { | 1107 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
1096 inputs_[0] = left; | 1108 inputs_[0] = context; |
1097 inputs_[1] = right; | 1109 inputs_[1] = left; |
| 1110 inputs_[2] = right; |
1098 } | 1111 } |
1099 | 1112 |
1100 LOperand* left() { return inputs_[0]; } | 1113 LOperand* context() { return inputs_[0]; } |
1101 LOperand* right() { return inputs_[1]; } | 1114 LOperand* left() { return inputs_[1]; } |
| 1115 LOperand* right() { return inputs_[2]; } |
1102 | 1116 |
1103 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | 1117 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
1104 }; | 1118 }; |
1105 | 1119 |
1106 | 1120 |
1107 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 1121 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
1108 public: | 1122 public: |
1109 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { | 1123 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { |
1110 inputs_[0] = value; | 1124 inputs_[0] = context; |
| 1125 inputs_[1] = value; |
1111 temps_[0] = temp; | 1126 temps_[0] = temp; |
1112 } | 1127 } |
1113 | 1128 |
1114 LOperand* value() { return inputs_[0]; } | 1129 LOperand* context() { return inputs_[0]; } |
| 1130 LOperand* value() { return inputs_[1]; } |
1115 LOperand* temp() { return temps_[0]; } | 1131 LOperand* temp() { return temps_[0]; } |
1116 | 1132 |
1117 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, | 1133 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, |
1118 "instance-of-known-global") | 1134 "instance-of-known-global") |
1119 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) | 1135 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) |
1120 | 1136 |
1121 Handle<JSFunction> function() const { return hydrogen()->function(); } | 1137 Handle<JSFunction> function() const { return hydrogen()->function(); } |
1122 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { | 1138 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { |
1123 return lazy_deopt_env_; | 1139 return lazy_deopt_env_; |
1124 } | 1140 } |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 LOperand* value() { return inputs_[2]; } | 1401 LOperand* value() { return inputs_[2]; } |
1386 | 1402 |
1387 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") | 1403 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") |
1388 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) | 1404 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) |
1389 | 1405 |
1390 private: | 1406 private: |
1391 String::Encoding encoding_; | 1407 String::Encoding encoding_; |
1392 }; | 1408 }; |
1393 | 1409 |
1394 | 1410 |
1395 class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 1411 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { |
1396 public: | 1412 public: |
1397 explicit LThrow(LOperand* value) { | 1413 LThrow(LOperand* context, LOperand* value) { |
1398 inputs_[0] = value; | 1414 inputs_[0] = context; |
| 1415 inputs_[1] = value; |
1399 } | 1416 } |
1400 | 1417 |
1401 LOperand* value() { return inputs_[0]; } | 1418 LOperand* context() { return inputs_[0]; } |
| 1419 LOperand* value() { return inputs_[1]; } |
1402 | 1420 |
1403 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1421 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
1404 }; | 1422 }; |
1405 | 1423 |
1406 | 1424 |
1407 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1425 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1408 public: | 1426 public: |
1409 LAddI(LOperand* left, LOperand* right) { | 1427 LAddI(LOperand* left, LOperand* right) { |
1410 inputs_[0] = left; | 1428 inputs_[0] = left; |
1411 inputs_[1] = right; | 1429 inputs_[1] = right; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1487 return LInstruction::kArithmeticD; | 1505 return LInstruction::kArithmeticD; |
1488 } | 1506 } |
1489 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; | 1507 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; |
1490 virtual const char* Mnemonic() const V8_OVERRIDE; | 1508 virtual const char* Mnemonic() const V8_OVERRIDE; |
1491 | 1509 |
1492 private: | 1510 private: |
1493 Token::Value op_; | 1511 Token::Value op_; |
1494 }; | 1512 }; |
1495 | 1513 |
1496 | 1514 |
1497 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1515 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
1498 public: | 1516 public: |
1499 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) | 1517 LArithmeticT(Token::Value op, |
| 1518 LOperand* context, |
| 1519 LOperand* left, |
| 1520 LOperand* right) |
1500 : op_(op) { | 1521 : op_(op) { |
1501 inputs_[0] = left; | 1522 inputs_[0] = context; |
1502 inputs_[1] = right; | 1523 inputs_[1] = left; |
| 1524 inputs_[2] = right; |
1503 } | 1525 } |
1504 | 1526 |
1505 LOperand* left() { return inputs_[0]; } | 1527 LOperand* context() { return inputs_[0]; } |
1506 LOperand* right() { return inputs_[1]; } | 1528 LOperand* left() { return inputs_[1]; } |
| 1529 LOperand* right() { return inputs_[2]; } |
1507 Token::Value op() const { return op_; } | 1530 Token::Value op() const { return op_; } |
1508 | 1531 |
1509 virtual Opcode opcode() const V8_OVERRIDE { | 1532 virtual Opcode opcode() const V8_OVERRIDE { |
1510 return LInstruction::kArithmeticT; | 1533 return LInstruction::kArithmeticT; |
1511 } | 1534 } |
1512 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; | 1535 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; |
1513 virtual const char* Mnemonic() const V8_OVERRIDE; | 1536 virtual const char* Mnemonic() const V8_OVERRIDE; |
1514 | 1537 |
1515 private: | 1538 private: |
1516 Token::Value op_; | 1539 Token::Value op_; |
1517 }; | 1540 }; |
1518 | 1541 |
1519 | 1542 |
1520 class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 1543 class LReturn V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
1521 public: | 1544 public: |
1522 explicit LReturn(LOperand* value, LOperand* parameter_count) { | 1545 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { |
1523 inputs_[0] = value; | 1546 inputs_[0] = value; |
1524 inputs_[1] = parameter_count; | 1547 inputs_[1] = context; |
| 1548 inputs_[2] = parameter_count; |
1525 } | 1549 } |
1526 | 1550 |
1527 LOperand* value() { return inputs_[0]; } | 1551 LOperand* value() { return inputs_[0]; } |
1528 | 1552 |
1529 bool has_constant_parameter_count() { | 1553 bool has_constant_parameter_count() { |
1530 return parameter_count()->IsConstantOperand(); | 1554 return parameter_count()->IsConstantOperand(); |
1531 } | 1555 } |
1532 LConstantOperand* constant_parameter_count() { | 1556 LConstantOperand* constant_parameter_count() { |
1533 ASSERT(has_constant_parameter_count()); | 1557 ASSERT(has_constant_parameter_count()); |
1534 return LConstantOperand::cast(parameter_count()); | 1558 return LConstantOperand::cast(parameter_count()); |
1535 } | 1559 } |
1536 LOperand* parameter_count() { return inputs_[1]; } | 1560 LOperand* parameter_count() { return inputs_[2]; } |
1537 | 1561 |
1538 DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 1562 DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
1539 }; | 1563 }; |
1540 | 1564 |
1541 | 1565 |
1542 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1566 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1543 public: | 1567 public: |
1544 explicit LLoadNamedField(LOperand* object) { | 1568 explicit LLoadNamedField(LOperand* object) { |
1545 inputs_[0] = object; | 1569 inputs_[0] = object; |
1546 } | 1570 } |
1547 | 1571 |
1548 LOperand* object() { return inputs_[0]; } | 1572 LOperand* object() { return inputs_[0]; } |
1549 | 1573 |
1550 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") | 1574 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") |
1551 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) | 1575 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) |
1552 }; | 1576 }; |
1553 | 1577 |
1554 | 1578 |
1555 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1579 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1556 public: | 1580 public: |
1557 explicit LLoadNamedGeneric(LOperand* object) { | 1581 LLoadNamedGeneric(LOperand* context, LOperand* object) { |
1558 inputs_[0] = object; | 1582 inputs_[0] = context; |
| 1583 inputs_[1] = object; |
1559 } | 1584 } |
1560 | 1585 |
1561 LOperand* object() { return inputs_[0]; } | 1586 LOperand* context() { return inputs_[0]; } |
| 1587 LOperand* object() { return inputs_[1]; } |
1562 | 1588 |
1563 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") | 1589 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") |
1564 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) | 1590 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) |
1565 | 1591 |
1566 Handle<Object> name() const { return hydrogen()->name(); } | 1592 Handle<Object> name() const { return hydrogen()->name(); } |
1567 }; | 1593 }; |
1568 | 1594 |
1569 | 1595 |
1570 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1596 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1571 public: | 1597 public: |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1620 } | 1646 } |
1621 | 1647 |
1622 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1648 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1623 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1649 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1624 | 1650 |
1625 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1651 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1626 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1652 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1627 }; | 1653 }; |
1628 | 1654 |
1629 | 1655 |
1630 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1656 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
1631 public: | 1657 public: |
1632 LLoadKeyedGeneric(LOperand* object, LOperand* key) { | 1658 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key) { |
1633 inputs_[0] = object; | 1659 inputs_[0] = context; |
1634 inputs_[1] = key; | 1660 inputs_[1] = object; |
| 1661 inputs_[2] = key; |
1635 } | 1662 } |
1636 | 1663 |
1637 LOperand* object() { return inputs_[0]; } | 1664 LOperand* context() { return inputs_[0]; } |
1638 LOperand* key() { return inputs_[1]; } | 1665 LOperand* object() { return inputs_[1]; } |
| 1666 LOperand* key() { return inputs_[2]; } |
1639 | 1667 |
1640 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | 1668 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") |
1641 }; | 1669 }; |
1642 | 1670 |
1643 | 1671 |
1644 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1672 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
1645 public: | 1673 public: |
1646 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") | 1674 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") |
1647 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) | 1675 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) |
1648 }; | 1676 }; |
1649 | 1677 |
1650 | 1678 |
1651 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1679 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1652 public: | 1680 public: |
1653 explicit LLoadGlobalGeneric(LOperand* global_object) { | 1681 LLoadGlobalGeneric(LOperand* context, LOperand* global_object) { |
1654 inputs_[0] = global_object; | 1682 inputs_[0] = context; |
| 1683 inputs_[1] = global_object; |
1655 } | 1684 } |
1656 | 1685 |
1657 LOperand* global_object() { return inputs_[0]; } | 1686 LOperand* context() { return inputs_[0]; } |
| 1687 LOperand* global_object() { return inputs_[1]; } |
1658 | 1688 |
1659 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") | 1689 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") |
1660 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) | 1690 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) |
1661 | 1691 |
1662 Handle<Object> name() const { return hydrogen()->name(); } | 1692 Handle<Object> name() const { return hydrogen()->name(); } |
1663 bool for_typeof() const { return hydrogen()->for_typeof(); } | 1693 bool for_typeof() const { return hydrogen()->for_typeof(); } |
1664 }; | 1694 }; |
1665 | 1695 |
1666 | 1696 |
1667 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { | 1697 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { |
1668 public: | 1698 public: |
1669 LStoreGlobalCell(LOperand* value, LOperand* temp) { | 1699 LStoreGlobalCell(LOperand* value, LOperand* temp) { |
1670 inputs_[0] = value; | 1700 inputs_[0] = value; |
1671 temps_[0] = temp; | 1701 temps_[0] = temp; |
1672 } | 1702 } |
1673 | 1703 |
1674 LOperand* value() { return inputs_[0]; } | 1704 LOperand* value() { return inputs_[0]; } |
1675 LOperand* temp() { return temps_[0]; } | 1705 LOperand* temp() { return temps_[0]; } |
1676 | 1706 |
1677 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") | 1707 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") |
1678 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) | 1708 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) |
1679 }; | 1709 }; |
1680 | 1710 |
1681 | 1711 |
1682 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 1712 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
1683 public: | 1713 public: |
1684 explicit LStoreGlobalGeneric(LOperand* global_object, | 1714 LStoreGlobalGeneric(LOperand* context, |
1685 LOperand* value) { | 1715 LOperand* global_object, |
1686 inputs_[0] = global_object; | 1716 LOperand* value) { |
1687 inputs_[1] = value; | 1717 inputs_[0] = context; |
| 1718 inputs_[1] = global_object; |
| 1719 inputs_[2] = value; |
1688 } | 1720 } |
1689 | 1721 |
1690 LOperand* global_object() { return inputs_[0]; } | 1722 LOperand* context() { return inputs_[0]; } |
1691 LOperand* value() { return inputs_[1]; } | 1723 LOperand* global_object() { return inputs_[1]; } |
| 1724 LOperand* value() { return inputs_[2]; } |
1692 | 1725 |
1693 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") | 1726 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") |
1694 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) | 1727 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) |
1695 | 1728 |
1696 Handle<Object> name() const { return hydrogen()->name(); } | 1729 Handle<Object> name() const { return hydrogen()->name(); } |
1697 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 1730 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
1698 }; | 1731 }; |
1699 | 1732 |
1700 | 1733 |
1701 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1734 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1811 explicit LOuterContext(LOperand* context) { | 1844 explicit LOuterContext(LOperand* context) { |
1812 inputs_[0] = context; | 1845 inputs_[0] = context; |
1813 } | 1846 } |
1814 | 1847 |
1815 LOperand* context() { return inputs_[0]; } | 1848 LOperand* context() { return inputs_[0]; } |
1816 | 1849 |
1817 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") | 1850 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") |
1818 }; | 1851 }; |
1819 | 1852 |
1820 | 1853 |
1821 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> { | 1854 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
1822 public: | 1855 public: |
| 1856 explicit LDeclareGlobals(LOperand* context) { |
| 1857 inputs_[0] = context; |
| 1858 } |
| 1859 |
| 1860 LOperand* context() { return inputs_[0]; } |
| 1861 |
1823 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") | 1862 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") |
1824 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) | 1863 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) |
1825 }; | 1864 }; |
1826 | 1865 |
1827 | 1866 |
1828 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1867 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1829 public: | 1868 public: |
1830 explicit LGlobalObject(LOperand* context) { | 1869 explicit LGlobalObject(LOperand* context) { |
1831 inputs_[0] = context; | 1870 inputs_[0] = context; |
1832 } | 1871 } |
(...skipping 21 matching lines...) Expand all Loading... |
1854 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") | 1893 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") |
1855 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) | 1894 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) |
1856 | 1895 |
1857 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1896 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1858 | 1897 |
1859 Handle<JSFunction> function() { return hydrogen()->function(); } | 1898 Handle<JSFunction> function() { return hydrogen()->function(); } |
1860 int arity() const { return hydrogen()->argument_count() - 1; } | 1899 int arity() const { return hydrogen()->argument_count() - 1; } |
1861 }; | 1900 }; |
1862 | 1901 |
1863 | 1902 |
1864 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1903 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1865 public: | 1904 public: |
1866 explicit LInvokeFunction(LOperand* function) { | 1905 LInvokeFunction(LOperand* context, LOperand* function) { |
1867 inputs_[0] = function; | 1906 inputs_[0] = context; |
| 1907 inputs_[1] = function; |
1868 } | 1908 } |
1869 | 1909 |
1870 LOperand* function() { return inputs_[0]; } | 1910 LOperand* context() { return inputs_[0]; } |
| 1911 LOperand* function() { return inputs_[1]; } |
1871 | 1912 |
1872 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") | 1913 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") |
1873 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) | 1914 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) |
1874 | 1915 |
1875 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1916 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1876 | 1917 |
1877 int arity() const { return hydrogen()->argument_count() - 1; } | 1918 int arity() const { return hydrogen()->argument_count() - 1; } |
1878 }; | 1919 }; |
1879 | 1920 |
1880 | 1921 |
1881 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1922 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1882 public: | 1923 public: |
1883 explicit LCallKeyed(LOperand* key) { | 1924 LCallKeyed(LOperand* context, LOperand* key) { |
1884 inputs_[0] = key; | 1925 inputs_[0] = context; |
| 1926 inputs_[1] = key; |
1885 } | 1927 } |
1886 | 1928 |
1887 LOperand* key() { return inputs_[0]; } | 1929 LOperand* context() { return inputs_[0]; } |
| 1930 LOperand* key() { return inputs_[1]; } |
1888 | 1931 |
1889 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") | 1932 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") |
1890 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) | 1933 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) |
1891 | 1934 |
1892 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1935 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1893 | 1936 |
1894 int arity() const { return hydrogen()->argument_count() - 1; } | 1937 int arity() const { return hydrogen()->argument_count() - 1; } |
1895 }; | 1938 }; |
1896 | 1939 |
1897 | 1940 |
1898 | 1941 |
1899 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1942 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1900 public: | 1943 public: |
| 1944 explicit LCallNamed(LOperand* context) { |
| 1945 inputs_[0] = context; |
| 1946 } |
| 1947 |
| 1948 LOperand* context() { return inputs_[0]; } |
| 1949 |
1901 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") | 1950 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") |
1902 DECLARE_HYDROGEN_ACCESSOR(CallNamed) | 1951 DECLARE_HYDROGEN_ACCESSOR(CallNamed) |
1903 | 1952 |
1904 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1953 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1905 | 1954 |
1906 Handle<String> name() const { return hydrogen()->name(); } | 1955 Handle<String> name() const { return hydrogen()->name(); } |
1907 int arity() const { return hydrogen()->argument_count() - 1; } | 1956 int arity() const { return hydrogen()->argument_count() - 1; } |
1908 }; | 1957 }; |
1909 | 1958 |
1910 | 1959 |
1911 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1960 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1912 public: | 1961 public: |
1913 explicit LCallFunction(LOperand* function) { | 1962 LCallFunction(LOperand* context, LOperand* function) { |
1914 inputs_[0] = function; | 1963 inputs_[0] = context; |
| 1964 inputs_[1] = function; |
1915 } | 1965 } |
1916 | 1966 |
1917 LOperand* function() { return inputs_[0]; } | 1967 LOperand* context() { return inputs_[0]; } |
| 1968 LOperand* function() { return inputs_[1]; } |
1918 | 1969 |
1919 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") | 1970 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") |
1920 DECLARE_HYDROGEN_ACCESSOR(CallFunction) | 1971 DECLARE_HYDROGEN_ACCESSOR(CallFunction) |
1921 | 1972 |
1922 int arity() const { return hydrogen()->argument_count() - 1; } | 1973 int arity() const { return hydrogen()->argument_count() - 1; } |
1923 }; | 1974 }; |
1924 | 1975 |
1925 | 1976 |
1926 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1977 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1927 public: | 1978 public: |
| 1979 explicit LCallGlobal(LOperand* context) { |
| 1980 inputs_[0] = context; |
| 1981 } |
| 1982 |
| 1983 LOperand* context() { return inputs_[0]; } |
| 1984 |
1928 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") | 1985 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") |
1929 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) | 1986 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) |
1930 | 1987 |
1931 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1988 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1932 | 1989 |
1933 Handle<String> name() const {return hydrogen()->name(); } | 1990 Handle<String> name() const {return hydrogen()->name(); } |
1934 int arity() const { return hydrogen()->argument_count() - 1; } | 1991 int arity() const { return hydrogen()->argument_count() - 1; } |
1935 }; | 1992 }; |
1936 | 1993 |
1937 | 1994 |
1938 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1995 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
1939 public: | 1996 public: |
1940 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") | 1997 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") |
1941 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) | 1998 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) |
1942 | 1999 |
1943 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2000 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1944 | 2001 |
1945 int arity() const { return hydrogen()->argument_count() - 1; } | 2002 int arity() const { return hydrogen()->argument_count() - 1; } |
1946 }; | 2003 }; |
1947 | 2004 |
1948 | 2005 |
1949 class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2006 class LCallNew V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1950 public: | 2007 public: |
1951 explicit LCallNew(LOperand* constructor) { | 2008 LCallNew(LOperand* context, LOperand* constructor) { |
1952 inputs_[0] = constructor; | 2009 inputs_[0] = context; |
| 2010 inputs_[1] = constructor; |
1953 } | 2011 } |
1954 | 2012 |
1955 LOperand* constructor() { return inputs_[0]; } | 2013 LOperand* context() { return inputs_[0]; } |
| 2014 LOperand* constructor() { return inputs_[1]; } |
1956 | 2015 |
1957 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") | 2016 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") |
1958 DECLARE_HYDROGEN_ACCESSOR(CallNew) | 2017 DECLARE_HYDROGEN_ACCESSOR(CallNew) |
1959 | 2018 |
1960 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2019 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1961 | 2020 |
1962 int arity() const { return hydrogen()->argument_count() - 1; } | 2021 int arity() const { return hydrogen()->argument_count() - 1; } |
1963 }; | 2022 }; |
1964 | 2023 |
1965 | 2024 |
1966 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2025 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1967 public: | 2026 public: |
1968 explicit LCallNewArray(LOperand* constructor) { | 2027 LCallNewArray(LOperand* context, LOperand* constructor) { |
1969 inputs_[0] = constructor; | 2028 inputs_[0] = context; |
| 2029 inputs_[1] = constructor; |
1970 } | 2030 } |
1971 | 2031 |
1972 LOperand* constructor() { return inputs_[0]; } | 2032 LOperand* context() { return inputs_[0]; } |
| 2033 LOperand* constructor() { return inputs_[1]; } |
1973 | 2034 |
1974 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") | 2035 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") |
1975 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) | 2036 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) |
1976 | 2037 |
1977 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2038 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1978 | 2039 |
1979 int arity() const { return hydrogen()->argument_count() - 1; } | 2040 int arity() const { return hydrogen()->argument_count() - 1; } |
1980 }; | 2041 }; |
1981 | 2042 |
1982 | 2043 |
1983 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2044 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1984 public: | 2045 public: |
| 2046 explicit LCallRuntime(LOperand* context) { |
| 2047 inputs_[0] = context; |
| 2048 } |
| 2049 |
| 2050 LOperand* context() { return inputs_[0]; } |
| 2051 |
1985 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 2052 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
1986 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 2053 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
1987 | 2054 |
1988 const Runtime::Function* function() const { return hydrogen()->function(); } | 2055 const Runtime::Function* function() const { return hydrogen()->function(); } |
1989 int arity() const { return hydrogen()->argument_count(); } | 2056 int arity() const { return hydrogen()->argument_count(); } |
1990 }; | 2057 }; |
1991 | 2058 |
1992 | 2059 |
1993 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2060 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1994 public: | 2061 public: |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2180 | 2247 |
2181 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2248 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2182 | 2249 |
2183 Handle<Map> transition() const { return hydrogen()->transition_map(); } | 2250 Handle<Map> transition() const { return hydrogen()->transition_map(); } |
2184 Representation representation() const { | 2251 Representation representation() const { |
2185 return hydrogen()->field_representation(); | 2252 return hydrogen()->field_representation(); |
2186 } | 2253 } |
2187 }; | 2254 }; |
2188 | 2255 |
2189 | 2256 |
2190 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 2257 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
2191 public: | 2258 public: |
2192 LStoreNamedGeneric(LOperand* object, LOperand* value) { | 2259 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { |
2193 inputs_[0] = object; | 2260 inputs_[0] = context; |
2194 inputs_[1] = value; | 2261 inputs_[1] = object; |
| 2262 inputs_[2] = value; |
2195 } | 2263 } |
2196 | 2264 |
2197 LOperand* object() { return inputs_[0]; } | 2265 LOperand* context() { return inputs_[0]; } |
2198 LOperand* value() { return inputs_[1]; } | 2266 LOperand* object() { return inputs_[1]; } |
| 2267 LOperand* value() { return inputs_[2]; } |
2199 | 2268 |
2200 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2269 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
2201 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2270 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
2202 | 2271 |
2203 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2272 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2204 | 2273 |
2205 Handle<Object> name() const { return hydrogen()->name(); } | 2274 Handle<Object> name() const { return hydrogen()->name(); } |
2206 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2275 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
2207 }; | 2276 }; |
2208 | 2277 |
(...skipping 22 matching lines...) Expand all Loading... |
2231 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || | 2300 if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || |
2232 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { | 2301 hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { |
2233 return false; | 2302 return false; |
2234 } | 2303 } |
2235 return hydrogen()->NeedsCanonicalization(); | 2304 return hydrogen()->NeedsCanonicalization(); |
2236 } | 2305 } |
2237 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 2306 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
2238 }; | 2307 }; |
2239 | 2308 |
2240 | 2309 |
2241 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { | 2310 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 4, 0> { |
2242 public: | 2311 public: |
2243 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { | 2312 LStoreKeyedGeneric(LOperand* context, |
2244 inputs_[0] = obj; | 2313 LOperand* obj, |
2245 inputs_[1] = key; | 2314 LOperand* key, |
2246 inputs_[2] = value; | 2315 LOperand* value) { |
| 2316 inputs_[0] = context; |
| 2317 inputs_[1] = obj; |
| 2318 inputs_[2] = key; |
| 2319 inputs_[3] = value; |
2247 } | 2320 } |
2248 | 2321 |
2249 LOperand* object() { return inputs_[0]; } | 2322 LOperand* context() { return inputs_[0]; } |
2250 LOperand* key() { return inputs_[1]; } | 2323 LOperand* object() { return inputs_[1]; } |
2251 LOperand* value() { return inputs_[2]; } | 2324 LOperand* key() { return inputs_[2]; } |
| 2325 LOperand* value() { return inputs_[3]; } |
2252 | 2326 |
2253 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 2327 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
2254 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 2328 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
2255 | 2329 |
2256 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2330 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2257 | 2331 |
2258 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2332 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
2259 }; | 2333 }; |
2260 | 2334 |
2261 | 2335 |
2262 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 1> { | 2336 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 1> { |
2263 public: | 2337 public: |
2264 LTransitionElementsKind(LOperand* object, | 2338 LTransitionElementsKind(LOperand* object, |
| 2339 LOperand* context, |
2265 LOperand* new_map_temp) { | 2340 LOperand* new_map_temp) { |
2266 inputs_[0] = object; | 2341 inputs_[0] = object; |
| 2342 inputs_[1] = context; |
2267 temps_[0] = new_map_temp; | 2343 temps_[0] = new_map_temp; |
2268 } | 2344 } |
2269 | 2345 |
| 2346 LOperand* context() { return inputs_[1]; } |
2270 LOperand* object() { return inputs_[0]; } | 2347 LOperand* object() { return inputs_[0]; } |
2271 LOperand* new_map_temp() { return temps_[0]; } | 2348 LOperand* new_map_temp() { return temps_[0]; } |
2272 | 2349 |
2273 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 2350 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
2274 "transition-elements-kind") | 2351 "transition-elements-kind") |
2275 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 2352 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
2276 | 2353 |
2277 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2354 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2278 | 2355 |
2279 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } | 2356 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } |
(...skipping 14 matching lines...) Expand all Loading... |
2294 } | 2371 } |
2295 | 2372 |
2296 LOperand* object() { return inputs_[0]; } | 2373 LOperand* object() { return inputs_[0]; } |
2297 LOperand* temp() { return temps_[0]; } | 2374 LOperand* temp() { return temps_[0]; } |
2298 | 2375 |
2299 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, | 2376 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, |
2300 "trap-allocation-memento") | 2377 "trap-allocation-memento") |
2301 }; | 2378 }; |
2302 | 2379 |
2303 | 2380 |
2304 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 2381 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
2305 public: | 2382 public: |
2306 LStringAdd(LOperand* left, LOperand* right) { | 2383 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { |
2307 inputs_[0] = left; | 2384 inputs_[0] = context; |
2308 inputs_[1] = right; | 2385 inputs_[1] = left; |
| 2386 inputs_[2] = right; |
2309 } | 2387 } |
2310 | 2388 |
2311 LOperand* left() { return inputs_[0]; } | 2389 LOperand* context() { return inputs_[0]; } |
2312 LOperand* right() { return inputs_[1]; } | 2390 LOperand* left() { return inputs_[1]; } |
| 2391 LOperand* right() { return inputs_[2]; } |
2313 | 2392 |
2314 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") | 2393 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") |
2315 DECLARE_HYDROGEN_ACCESSOR(StringAdd) | 2394 DECLARE_HYDROGEN_ACCESSOR(StringAdd) |
2316 }; | 2395 }; |
2317 | 2396 |
2318 | 2397 |
2319 | 2398 |
2320 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 2399 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
2321 public: | 2400 public: |
2322 LStringCharCodeAt(LOperand* string, LOperand* index) { | 2401 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { |
2323 inputs_[0] = string; | 2402 inputs_[0] = context; |
2324 inputs_[1] = index; | 2403 inputs_[1] = string; |
| 2404 inputs_[2] = index; |
2325 } | 2405 } |
2326 | 2406 |
2327 LOperand* string() { return inputs_[0]; } | 2407 LOperand* context() { return inputs_[0]; } |
2328 LOperand* index() { return inputs_[1]; } | 2408 LOperand* string() { return inputs_[1]; } |
| 2409 LOperand* index() { return inputs_[2]; } |
2329 | 2410 |
2330 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") | 2411 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") |
2331 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) | 2412 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) |
2332 }; | 2413 }; |
2333 | 2414 |
2334 | 2415 |
2335 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2416 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
2336 public: | 2417 public: |
2337 explicit LStringCharFromCode(LOperand* char_code) { | 2418 explicit LStringCharFromCode(LOperand* context, LOperand* char_code) { |
2338 inputs_[0] = char_code; | 2419 inputs_[0] = context; |
| 2420 inputs_[1] = char_code; |
2339 } | 2421 } |
2340 | 2422 |
2341 LOperand* char_code() { return inputs_[0]; } | 2423 LOperand* context() { return inputs_[0]; } |
| 2424 LOperand* char_code() { return inputs_[1]; } |
2342 | 2425 |
2343 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") | 2426 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") |
2344 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) | 2427 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) |
2345 }; | 2428 }; |
2346 | 2429 |
2347 | 2430 |
2348 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 2431 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
2349 public: | 2432 public: |
2350 explicit LCheckValue(LOperand* value) { | 2433 explicit LCheckValue(LOperand* value) { |
2351 inputs_[0] = value; | 2434 inputs_[0] = value; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2442 | 2525 |
2443 LOperand* unclamped() { return inputs_[0]; } | 2526 LOperand* unclamped() { return inputs_[0]; } |
2444 LOperand* temp() { return temps_[0]; } | 2527 LOperand* temp() { return temps_[0]; } |
2445 | 2528 |
2446 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") | 2529 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") |
2447 }; | 2530 }; |
2448 | 2531 |
2449 | 2532 |
2450 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { | 2533 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { |
2451 public: | 2534 public: |
2452 LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { | 2535 LAllocate(LOperand* context, |
| 2536 LOperand* size, |
| 2537 LOperand* temp1, |
| 2538 LOperand* temp2) { |
| 2539 inputs_[0] = context; |
2453 inputs_[1] = size; | 2540 inputs_[1] = size; |
2454 temps_[0] = temp1; | 2541 temps_[0] = temp1; |
2455 temps_[1] = temp2; | 2542 temps_[1] = temp2; |
2456 } | 2543 } |
2457 | 2544 |
| 2545 LOperand* context() { return inputs_[0]; } |
2458 LOperand* size() { return inputs_[1]; } | 2546 LOperand* size() { return inputs_[1]; } |
2459 LOperand* temp1() { return temps_[0]; } | 2547 LOperand* temp1() { return temps_[0]; } |
2460 LOperand* temp2() { return temps_[1]; } | 2548 LOperand* temp2() { return temps_[1]; } |
2461 | 2549 |
2462 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") | 2550 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") |
2463 DECLARE_HYDROGEN_ACCESSOR(Allocate) | 2551 DECLARE_HYDROGEN_ACCESSOR(Allocate) |
2464 }; | 2552 }; |
2465 | 2553 |
2466 | 2554 |
2467 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2555 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2468 public: | 2556 public: |
| 2557 explicit LRegExpLiteral(LOperand* context) { |
| 2558 inputs_[0] = context; |
| 2559 } |
| 2560 |
| 2561 LOperand* context() { return inputs_[0]; } |
| 2562 |
2469 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") | 2563 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") |
2470 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) | 2564 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) |
2471 }; | 2565 }; |
2472 | 2566 |
2473 | 2567 |
2474 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2568 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2475 public: | 2569 public: |
| 2570 explicit LFunctionLiteral(LOperand* context) { |
| 2571 inputs_[0] = context; |
| 2572 } |
| 2573 |
| 2574 LOperand* context() { return inputs_[0]; } |
| 2575 |
2476 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") | 2576 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") |
2477 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) | 2577 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) |
2478 }; | 2578 }; |
2479 | 2579 |
2480 | 2580 |
2481 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2581 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2482 public: | 2582 public: |
2483 explicit LToFastProperties(LOperand* value) { | 2583 explicit LToFastProperties(LOperand* value) { |
2484 inputs_[0] = value; | 2584 inputs_[0] = value; |
2485 } | 2585 } |
2486 | 2586 |
2487 LOperand* value() { return inputs_[0]; } | 2587 LOperand* value() { return inputs_[0]; } |
2488 | 2588 |
2489 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") | 2589 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") |
2490 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) | 2590 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) |
2491 }; | 2591 }; |
2492 | 2592 |
2493 | 2593 |
2494 class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2594 class LTypeof V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
2495 public: | 2595 public: |
2496 explicit LTypeof(LOperand* value) { | 2596 LTypeof(LOperand* context, LOperand* value) { |
2497 inputs_[0] = value; | 2597 inputs_[0] = context; |
| 2598 inputs_[1] = value; |
2498 } | 2599 } |
2499 | 2600 |
2500 LOperand* value() { return inputs_[0]; } | 2601 LOperand* context() { return inputs_[0]; } |
| 2602 LOperand* value() { return inputs_[1]; } |
2501 | 2603 |
2502 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") | 2604 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
2503 }; | 2605 }; |
2504 | 2606 |
2505 | 2607 |
2506 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { | 2608 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { |
2507 public: | 2609 public: |
2508 explicit LTypeofIsAndBranch(LOperand* value) { | 2610 explicit LTypeofIsAndBranch(LOperand* value) { |
2509 inputs_[0] = value; | 2611 inputs_[0] = value; |
2510 } | 2612 } |
(...skipping 26 matching lines...) Expand all Loading... |
2537 public: | 2639 public: |
2538 LOsrEntry() {} | 2640 LOsrEntry() {} |
2539 | 2641 |
2540 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { | 2642 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { |
2541 return false; | 2643 return false; |
2542 } | 2644 } |
2543 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") | 2645 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") |
2544 }; | 2646 }; |
2545 | 2647 |
2546 | 2648 |
2547 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> { | 2649 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
2548 public: | 2650 public: |
| 2651 explicit LStackCheck(LOperand* context) { |
| 2652 inputs_[0] = context; |
| 2653 } |
| 2654 |
| 2655 LOperand* context() { return inputs_[0]; } |
| 2656 |
2549 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") | 2657 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") |
2550 DECLARE_HYDROGEN_ACCESSOR(StackCheck) | 2658 DECLARE_HYDROGEN_ACCESSOR(StackCheck) |
2551 | 2659 |
2552 Label* done_label() { return &done_label_; } | 2660 Label* done_label() { return &done_label_; } |
2553 | 2661 |
2554 private: | 2662 private: |
2555 Label done_label_; | 2663 Label done_label_; |
2556 }; | 2664 }; |
2557 | 2665 |
2558 | 2666 |
2559 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2667 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
2560 public: | 2668 public: |
2561 explicit LForInPrepareMap(LOperand* object) { | 2669 LForInPrepareMap(LOperand* context, LOperand* object) { |
2562 inputs_[0] = object; | 2670 inputs_[0] = context; |
| 2671 inputs_[1] = object; |
2563 } | 2672 } |
2564 | 2673 |
2565 LOperand* object() { return inputs_[0]; } | 2674 LOperand* context() { return inputs_[0]; } |
| 2675 LOperand* object() { return inputs_[1]; } |
2566 | 2676 |
2567 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") | 2677 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") |
2568 }; | 2678 }; |
2569 | 2679 |
2570 | 2680 |
2571 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2681 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2572 public: | 2682 public: |
2573 explicit LForInCacheArray(LOperand* map) { | 2683 explicit LForInCacheArray(LOperand* map) { |
2574 inputs_[0] = map; | 2684 inputs_[0] = map; |
2575 } | 2685 } |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2794 | 2904 |
2795 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2905 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2796 }; | 2906 }; |
2797 | 2907 |
2798 #undef DECLARE_HYDROGEN_ACCESSOR | 2908 #undef DECLARE_HYDROGEN_ACCESSOR |
2799 #undef DECLARE_CONCRETE_INSTRUCTION | 2909 #undef DECLARE_CONCRETE_INSTRUCTION |
2800 | 2910 |
2801 } } // namespace v8::internal | 2911 } } // namespace v8::internal |
2802 | 2912 |
2803 #endif // V8_ARM_LITHIUM_ARM_H_ | 2913 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |