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

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

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

Powered by Google App Engine
This is Rietveld 408576698