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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 | 475 |
476 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 476 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
477 public: | 477 public: |
478 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { | 478 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { |
479 return false; | 479 return false; |
480 } | 480 } |
481 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") | 481 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") |
482 }; | 482 }; |
483 | 483 |
484 | 484 |
485 class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 485 class LCallStub V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
486 public: | 486 public: |
| 487 explicit LCallStub(LOperand* context) { |
| 488 inputs_[0] = context; |
| 489 } |
| 490 |
| 491 LOperand* context() { return inputs_[0]; } |
| 492 |
487 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") | 493 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") |
488 DECLARE_HYDROGEN_ACCESSOR(CallStub) | 494 DECLARE_HYDROGEN_ACCESSOR(CallStub) |
489 | 495 |
490 TranscendentalCache::Type transcendental_type() { | 496 TranscendentalCache::Type transcendental_type() { |
491 return hydrogen()->transcendental_type(); | 497 return hydrogen()->transcendental_type(); |
492 } | 498 } |
493 }; | 499 }; |
494 | 500 |
495 | 501 |
496 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 502 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 } | 779 } |
774 | 780 |
775 LOperand* value() { return inputs_[0]; } | 781 LOperand* value() { return inputs_[0]; } |
776 LOperand* temp() { return temps_[0]; } | 782 LOperand* temp() { return temps_[0]; } |
777 | 783 |
778 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") | 784 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") |
779 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 785 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
780 }; | 786 }; |
781 | 787 |
782 | 788 |
783 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 789 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
784 public: | 790 public: |
785 explicit LMathAbs(LOperand* value) { | 791 LMathAbs(LOperand* context, LOperand* value) { |
| 792 inputs_[1] = context; |
786 inputs_[0] = value; | 793 inputs_[0] = value; |
787 } | 794 } |
788 | 795 |
| 796 LOperand* context() { return inputs_[1]; } |
789 LOperand* value() { return inputs_[0]; } | 797 LOperand* value() { return inputs_[0]; } |
790 | 798 |
791 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") | 799 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") |
792 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) | 800 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) |
793 }; | 801 }; |
794 | 802 |
795 | 803 |
796 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 804 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
797 public: | 805 public: |
798 explicit LMathLog(LOperand* value) { | 806 explicit LMathLog(LOperand* value) { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 LOperand* temp() { return temps_[0]; } | 985 LOperand* temp() { return temps_[0]; } |
978 | 986 |
979 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, | 987 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, |
980 "is-undetectable-and-branch") | 988 "is-undetectable-and-branch") |
981 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) | 989 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) |
982 | 990 |
983 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 991 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
984 }; | 992 }; |
985 | 993 |
986 | 994 |
987 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> { | 995 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<3, 0> { |
988 public: | 996 public: |
989 LStringCompareAndBranch(LOperand* left, LOperand* right) { | 997 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { |
990 inputs_[0] = left; | 998 inputs_[0] = context; |
991 inputs_[1] = right; | 999 inputs_[1] = left; |
| 1000 inputs_[2] = right; |
992 } | 1001 } |
993 | 1002 |
994 LOperand* left() { return inputs_[0]; } | 1003 LOperand* context() { return inputs_[0]; } |
995 LOperand* right() { return inputs_[1]; } | 1004 LOperand* left() { return inputs_[1]; } |
| 1005 LOperand* right() { return inputs_[2]; } |
996 | 1006 |
997 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, | 1007 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, |
998 "string-compare-and-branch") | 1008 "string-compare-and-branch") |
999 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) | 1009 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) |
1000 | 1010 |
1001 Token::Value op() const { return hydrogen()->token(); } | 1011 Token::Value op() const { return hydrogen()->token(); } |
1002 | 1012 |
1003 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1013 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1004 }; | 1014 }; |
1005 | 1015 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 LOperand* temp() { return temps_[0]; } | 1071 LOperand* temp() { return temps_[0]; } |
1062 | 1072 |
1063 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, | 1073 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, |
1064 "class-of-test-and-branch") | 1074 "class-of-test-and-branch") |
1065 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) | 1075 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) |
1066 | 1076 |
1067 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1077 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1068 }; | 1078 }; |
1069 | 1079 |
1070 | 1080 |
1071 class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1081 class LCmpT V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
1072 public: | 1082 public: |
1073 LCmpT(LOperand* left, LOperand* right) { | 1083 LCmpT(LOperand* context, LOperand* left, LOperand* right) { |
1074 inputs_[0] = left; | 1084 inputs_[0] = context; |
1075 inputs_[1] = right; | 1085 inputs_[1] = left; |
| 1086 inputs_[2] = right; |
1076 } | 1087 } |
1077 | 1088 |
1078 LOperand* left() { return inputs_[0]; } | 1089 LOperand* context() { return inputs_[0]; } |
1079 LOperand* right() { return inputs_[1]; } | 1090 LOperand* left() { return inputs_[1]; } |
| 1091 LOperand* right() { return inputs_[2]; } |
1080 | 1092 |
1081 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") | 1093 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") |
1082 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) | 1094 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) |
1083 | 1095 |
1084 Token::Value op() const { return hydrogen()->token(); } | 1096 Token::Value op() const { return hydrogen()->token(); } |
1085 }; | 1097 }; |
1086 | 1098 |
1087 | 1099 |
1088 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1100 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
1089 public: | 1101 public: |
1090 LInstanceOf(LOperand* left, LOperand* right) { | 1102 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { |
1091 inputs_[0] = left; | 1103 inputs_[0] = context; |
1092 inputs_[1] = right; | 1104 inputs_[1] = left; |
| 1105 inputs_[2] = right; |
1093 } | 1106 } |
1094 | 1107 |
1095 LOperand* left() { return inputs_[0]; } | 1108 LOperand* context() { return inputs_[0]; } |
1096 LOperand* right() { return inputs_[1]; } | 1109 LOperand* left() { return inputs_[1]; } |
| 1110 LOperand* right() { return inputs_[2]; } |
1097 | 1111 |
1098 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") | 1112 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") |
1099 }; | 1113 }; |
1100 | 1114 |
1101 | 1115 |
1102 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 1116 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
1103 public: | 1117 public: |
1104 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { | 1118 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { |
1105 inputs_[0] = value; | 1119 inputs_[0] = context; |
| 1120 inputs_[1] = value; |
1106 temps_[0] = temp; | 1121 temps_[0] = temp; |
1107 } | 1122 } |
1108 | 1123 |
1109 LOperand* value() { return inputs_[0]; } | 1124 LOperand* context() { return inputs_[0]; } |
| 1125 LOperand* value() { return inputs_[1]; } |
1110 LOperand* temp() { return temps_[0]; } | 1126 LOperand* temp() { return temps_[0]; } |
1111 | 1127 |
1112 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, | 1128 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, |
1113 "instance-of-known-global") | 1129 "instance-of-known-global") |
1114 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) | 1130 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) |
1115 | 1131 |
1116 Handle<JSFunction> function() const { return hydrogen()->function(); } | 1132 Handle<JSFunction> function() const { return hydrogen()->function(); } |
1117 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { | 1133 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { |
1118 return lazy_deopt_env_; | 1134 return lazy_deopt_env_; |
1119 } | 1135 } |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 LOperand* value() { return inputs_[2]; } | 1381 LOperand* value() { return inputs_[2]; } |
1366 | 1382 |
1367 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") | 1383 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") |
1368 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) | 1384 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) |
1369 | 1385 |
1370 private: | 1386 private: |
1371 String::Encoding encoding_; | 1387 String::Encoding encoding_; |
1372 }; | 1388 }; |
1373 | 1389 |
1374 | 1390 |
1375 class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 1391 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { |
1376 public: | 1392 public: |
1377 explicit LThrow(LOperand* value) { | 1393 LThrow(LOperand* context, LOperand* value) { |
1378 inputs_[0] = value; | 1394 inputs_[0] = context; |
| 1395 inputs_[1] = value; |
1379 } | 1396 } |
1380 | 1397 |
1381 LOperand* value() { return inputs_[0]; } | 1398 LOperand* context() { return inputs_[0]; } |
| 1399 LOperand* value() { return inputs_[1]; } |
1382 | 1400 |
1383 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1401 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
1384 }; | 1402 }; |
1385 | 1403 |
1386 | 1404 |
1387 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1405 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1388 public: | 1406 public: |
1389 LAddI(LOperand* left, LOperand* right) { | 1407 LAddI(LOperand* left, LOperand* right) { |
1390 inputs_[0] = left; | 1408 inputs_[0] = left; |
1391 inputs_[1] = right; | 1409 inputs_[1] = right; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 return LInstruction::kArithmeticD; | 1485 return LInstruction::kArithmeticD; |
1468 } | 1486 } |
1469 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; | 1487 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; |
1470 virtual const char* Mnemonic() const V8_OVERRIDE; | 1488 virtual const char* Mnemonic() const V8_OVERRIDE; |
1471 | 1489 |
1472 private: | 1490 private: |
1473 Token::Value op_; | 1491 Token::Value op_; |
1474 }; | 1492 }; |
1475 | 1493 |
1476 | 1494 |
1477 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1495 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
1478 public: | 1496 public: |
1479 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) | 1497 LArithmeticT(Token::Value op, |
| 1498 LOperand* context, |
| 1499 LOperand* left, |
| 1500 LOperand* right) |
1480 : op_(op) { | 1501 : op_(op) { |
1481 inputs_[0] = left; | 1502 inputs_[0] = context; |
1482 inputs_[1] = right; | 1503 inputs_[1] = left; |
| 1504 inputs_[2] = right; |
1483 } | 1505 } |
1484 | 1506 |
1485 LOperand* left() { return inputs_[0]; } | 1507 LOperand* context() { return inputs_[0]; } |
1486 LOperand* right() { return inputs_[1]; } | 1508 LOperand* left() { return inputs_[1]; } |
| 1509 LOperand* right() { return inputs_[2]; } |
1487 Token::Value op() const { return op_; } | 1510 Token::Value op() const { return op_; } |
1488 | 1511 |
1489 virtual Opcode opcode() const V8_FINAL { return LInstruction::kArithmeticT; } | 1512 virtual Opcode opcode() const V8_FINAL { return LInstruction::kArithmeticT; } |
1490 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; | 1513 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; |
1491 virtual const char* Mnemonic() const V8_OVERRIDE; | 1514 virtual const char* Mnemonic() const V8_OVERRIDE; |
1492 | 1515 |
1493 private: | 1516 private: |
1494 Token::Value op_; | 1517 Token::Value op_; |
1495 }; | 1518 }; |
1496 | 1519 |
1497 | 1520 |
1498 class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 1521 class LReturn V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
1499 public: | 1522 public: |
1500 explicit LReturn(LOperand* value, LOperand* parameter_count) { | 1523 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { |
1501 inputs_[0] = value; | 1524 inputs_[0] = value; |
1502 inputs_[1] = parameter_count; | 1525 inputs_[1] = context; |
| 1526 inputs_[2] = parameter_count; |
1503 } | 1527 } |
1504 | 1528 |
1505 LOperand* value() { return inputs_[0]; } | 1529 LOperand* value() { return inputs_[0]; } |
1506 | 1530 |
1507 bool has_constant_parameter_count() { | 1531 bool has_constant_parameter_count() { |
1508 return parameter_count()->IsConstantOperand(); | 1532 return parameter_count()->IsConstantOperand(); |
1509 } | 1533 } |
1510 LConstantOperand* constant_parameter_count() { | 1534 LConstantOperand* constant_parameter_count() { |
1511 ASSERT(has_constant_parameter_count()); | 1535 ASSERT(has_constant_parameter_count()); |
1512 return LConstantOperand::cast(parameter_count()); | 1536 return LConstantOperand::cast(parameter_count()); |
1513 } | 1537 } |
1514 LOperand* parameter_count() { return inputs_[1]; } | 1538 LOperand* parameter_count() { return inputs_[2]; } |
1515 | 1539 |
1516 DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 1540 DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
1517 }; | 1541 }; |
1518 | 1542 |
1519 | 1543 |
1520 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1544 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1521 public: | 1545 public: |
1522 explicit LLoadNamedField(LOperand* object) { | 1546 explicit LLoadNamedField(LOperand* object) { |
1523 inputs_[0] = object; | 1547 inputs_[0] = object; |
1524 } | 1548 } |
1525 | 1549 |
1526 LOperand* object() { return inputs_[0]; } | 1550 LOperand* object() { return inputs_[0]; } |
1527 | 1551 |
1528 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") | 1552 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") |
1529 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) | 1553 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) |
1530 }; | 1554 }; |
1531 | 1555 |
1532 | 1556 |
1533 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1557 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1534 public: | 1558 public: |
1535 explicit LLoadNamedGeneric(LOperand* object) { | 1559 LLoadNamedGeneric(LOperand* context, LOperand* object) { |
1536 inputs_[0] = object; | 1560 inputs_[0] = context; |
| 1561 inputs_[1] = object; |
1537 } | 1562 } |
1538 | 1563 |
1539 LOperand* object() { return inputs_[0]; } | 1564 LOperand* context() { return inputs_[0]; } |
| 1565 LOperand* object() { return inputs_[1]; } |
1540 | 1566 |
1541 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") | 1567 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") |
1542 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) | 1568 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) |
1543 | 1569 |
1544 Handle<Object> name() const { return hydrogen()->name(); } | 1570 Handle<Object> name() const { return hydrogen()->name(); } |
1545 }; | 1571 }; |
1546 | 1572 |
1547 | 1573 |
1548 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1574 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1549 public: | 1575 public: |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1598 } | 1624 } |
1599 | 1625 |
1600 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1626 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1601 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1627 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1602 | 1628 |
1603 virtual void PrintDataTo(StringStream* stream); | 1629 virtual void PrintDataTo(StringStream* stream); |
1604 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1630 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1605 }; | 1631 }; |
1606 | 1632 |
1607 | 1633 |
1608 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1634 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
1609 public: | 1635 public: |
1610 LLoadKeyedGeneric(LOperand* object, LOperand* key) { | 1636 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key) { |
1611 inputs_[0] = object; | 1637 inputs_[0] = context; |
1612 inputs_[1] = key; | 1638 inputs_[1] = object; |
| 1639 inputs_[2] = key; |
1613 } | 1640 } |
1614 | 1641 |
1615 LOperand* object() { return inputs_[0]; } | 1642 LOperand* context() { return inputs_[0]; } |
1616 LOperand* key() { return inputs_[1]; } | 1643 LOperand* object() { return inputs_[1]; } |
| 1644 LOperand* key() { return inputs_[2]; } |
1617 | 1645 |
1618 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | 1646 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") |
1619 }; | 1647 }; |
1620 | 1648 |
1621 | 1649 |
1622 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1650 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
1623 public: | 1651 public: |
1624 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") | 1652 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") |
1625 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) | 1653 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) |
1626 }; | 1654 }; |
1627 | 1655 |
1628 | 1656 |
1629 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1657 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1630 public: | 1658 public: |
1631 explicit LLoadGlobalGeneric(LOperand* global_object) { | 1659 LLoadGlobalGeneric(LOperand* context, LOperand* global_object) { |
1632 inputs_[0] = global_object; | 1660 inputs_[0] = context; |
| 1661 inputs_[1] = global_object; |
1633 } | 1662 } |
1634 | 1663 |
1635 LOperand* global_object() { return inputs_[0]; } | 1664 LOperand* context() { return inputs_[0]; } |
| 1665 LOperand* global_object() { return inputs_[1]; } |
1636 | 1666 |
1637 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") | 1667 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") |
1638 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) | 1668 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) |
1639 | 1669 |
1640 Handle<Object> name() const { return hydrogen()->name(); } | 1670 Handle<Object> name() const { return hydrogen()->name(); } |
1641 bool for_typeof() const { return hydrogen()->for_typeof(); } | 1671 bool for_typeof() const { return hydrogen()->for_typeof(); } |
1642 }; | 1672 }; |
1643 | 1673 |
1644 | 1674 |
1645 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { | 1675 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { |
1646 public: | 1676 public: |
1647 LStoreGlobalCell(LOperand* value, LOperand* temp) { | 1677 LStoreGlobalCell(LOperand* value, LOperand* temp) { |
1648 inputs_[0] = value; | 1678 inputs_[0] = value; |
1649 temps_[0] = temp; | 1679 temps_[0] = temp; |
1650 } | 1680 } |
1651 | 1681 |
1652 LOperand* value() { return inputs_[0]; } | 1682 LOperand* value() { return inputs_[0]; } |
1653 LOperand* temp() { return temps_[0]; } | 1683 LOperand* temp() { return temps_[0]; } |
1654 | 1684 |
1655 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") | 1685 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") |
1656 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) | 1686 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) |
1657 }; | 1687 }; |
1658 | 1688 |
1659 | 1689 |
1660 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 1690 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
1661 public: | 1691 public: |
1662 explicit LStoreGlobalGeneric(LOperand* global_object, | 1692 LStoreGlobalGeneric(LOperand* context, |
1663 LOperand* value) { | 1693 LOperand* global_object, |
1664 inputs_[0] = global_object; | 1694 LOperand* value) { |
1665 inputs_[1] = value; | 1695 inputs_[0] = context; |
| 1696 inputs_[1] = global_object; |
| 1697 inputs_[2] = value; |
1666 } | 1698 } |
1667 | 1699 |
1668 LOperand* global_object() { return inputs_[0]; } | 1700 LOperand* context() { return inputs_[0]; } |
1669 LOperand* value() { return inputs_[1]; } | 1701 LOperand* global_object() { return inputs_[1]; } |
| 1702 LOperand* value() { return inputs_[2]; } |
1670 | 1703 |
1671 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") | 1704 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") |
1672 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) | 1705 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) |
1673 | 1706 |
1674 Handle<Object> name() const { return hydrogen()->name(); } | 1707 Handle<Object> name() const { return hydrogen()->name(); } |
1675 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 1708 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
1676 }; | 1709 }; |
1677 | 1710 |
1678 | 1711 |
1679 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1712 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1789 explicit LOuterContext(LOperand* context) { | 1822 explicit LOuterContext(LOperand* context) { |
1790 inputs_[0] = context; | 1823 inputs_[0] = context; |
1791 } | 1824 } |
1792 | 1825 |
1793 LOperand* context() { return inputs_[0]; } | 1826 LOperand* context() { return inputs_[0]; } |
1794 | 1827 |
1795 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") | 1828 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") |
1796 }; | 1829 }; |
1797 | 1830 |
1798 | 1831 |
1799 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> { | 1832 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
1800 public: | 1833 public: |
| 1834 explicit LDeclareGlobals(LOperand* context) { |
| 1835 inputs_[0] = context; |
| 1836 } |
| 1837 |
| 1838 LOperand* context() { return inputs_[0]; } |
| 1839 |
1801 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") | 1840 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") |
1802 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) | 1841 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) |
1803 }; | 1842 }; |
1804 | 1843 |
1805 | 1844 |
1806 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1845 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1807 public: | 1846 public: |
1808 explicit LGlobalObject(LOperand* context) { | 1847 explicit LGlobalObject(LOperand* context) { |
1809 inputs_[0] = context; | 1848 inputs_[0] = context; |
1810 } | 1849 } |
(...skipping 21 matching lines...) Expand all Loading... |
1832 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") | 1871 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") |
1833 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) | 1872 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) |
1834 | 1873 |
1835 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1874 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1836 | 1875 |
1837 Handle<JSFunction> function() { return hydrogen()->function(); } | 1876 Handle<JSFunction> function() { return hydrogen()->function(); } |
1838 int arity() const { return hydrogen()->argument_count() - 1; } | 1877 int arity() const { return hydrogen()->argument_count() - 1; } |
1839 }; | 1878 }; |
1840 | 1879 |
1841 | 1880 |
1842 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1881 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1843 public: | 1882 public: |
1844 explicit LInvokeFunction(LOperand* function) { | 1883 LInvokeFunction(LOperand* context, LOperand* function) { |
1845 inputs_[0] = function; | 1884 inputs_[0] = context; |
| 1885 inputs_[1] = function; |
1846 } | 1886 } |
1847 | 1887 |
1848 LOperand* function() { return inputs_[0]; } | 1888 LOperand* context() { return inputs_[0]; } |
| 1889 LOperand* function() { return inputs_[1]; } |
1849 | 1890 |
1850 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") | 1891 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") |
1851 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) | 1892 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) |
1852 | 1893 |
1853 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1894 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1854 | 1895 |
1855 int arity() const { return hydrogen()->argument_count() - 1; } | 1896 int arity() const { return hydrogen()->argument_count() - 1; } |
1856 }; | 1897 }; |
1857 | 1898 |
1858 | 1899 |
1859 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1900 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1860 public: | 1901 public: |
1861 explicit LCallKeyed(LOperand* key) { | 1902 LCallKeyed(LOperand* context, LOperand* key) { |
1862 inputs_[0] = key; | 1903 inputs_[0] = context; |
| 1904 inputs_[1] = key; |
1863 } | 1905 } |
1864 | 1906 |
1865 LOperand* key() { return inputs_[0]; } | 1907 LOperand* context() { return inputs_[0]; } |
| 1908 LOperand* key() { return inputs_[1]; } |
1866 | 1909 |
1867 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") | 1910 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") |
1868 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) | 1911 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) |
1869 | 1912 |
1870 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1913 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1871 | 1914 |
1872 int arity() const { return hydrogen()->argument_count() - 1; } | 1915 int arity() const { return hydrogen()->argument_count() - 1; } |
1873 }; | 1916 }; |
1874 | 1917 |
1875 | 1918 |
1876 | 1919 |
1877 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1920 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1878 public: | 1921 public: |
| 1922 explicit LCallNamed(LOperand* context) { |
| 1923 inputs_[0] = context; |
| 1924 } |
| 1925 |
| 1926 LOperand* context() { return inputs_[0]; } |
| 1927 |
1879 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") | 1928 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") |
1880 DECLARE_HYDROGEN_ACCESSOR(CallNamed) | 1929 DECLARE_HYDROGEN_ACCESSOR(CallNamed) |
1881 | 1930 |
1882 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1931 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1883 | 1932 |
1884 Handle<String> name() const { return hydrogen()->name(); } | 1933 Handle<String> name() const { return hydrogen()->name(); } |
1885 int arity() const { return hydrogen()->argument_count() - 1; } | 1934 int arity() const { return hydrogen()->argument_count() - 1; } |
1886 }; | 1935 }; |
1887 | 1936 |
1888 | 1937 |
1889 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1938 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1890 public: | 1939 public: |
1891 explicit LCallFunction(LOperand* function) { | 1940 LCallFunction(LOperand* context, LOperand* function) { |
1892 inputs_[0] = function; | 1941 inputs_[0] = context; |
| 1942 inputs_[1] = function; |
1893 } | 1943 } |
1894 | 1944 |
1895 LOperand* function() { return inputs_[0]; } | 1945 LOperand* context() { return inputs_[0]; } |
| 1946 LOperand* function() { return inputs_[1]; } |
1896 | 1947 |
1897 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") | 1948 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") |
1898 DECLARE_HYDROGEN_ACCESSOR(CallFunction) | 1949 DECLARE_HYDROGEN_ACCESSOR(CallFunction) |
1899 | 1950 |
1900 int arity() const { return hydrogen()->argument_count() - 1; } | 1951 int arity() const { return hydrogen()->argument_count() - 1; } |
1901 }; | 1952 }; |
1902 | 1953 |
1903 | 1954 |
1904 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1955 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1905 public: | 1956 public: |
| 1957 explicit LCallGlobal(LOperand* context) { |
| 1958 inputs_[0] = context; |
| 1959 } |
| 1960 |
| 1961 LOperand* context() { return inputs_[0]; } |
| 1962 |
1906 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") | 1963 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") |
1907 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) | 1964 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) |
1908 | 1965 |
1909 virtual void PrintDataTo(StringStream* stream); | 1966 virtual void PrintDataTo(StringStream* stream); |
1910 | 1967 |
1911 Handle<String> name() const {return hydrogen()->name(); } | 1968 Handle<String> name() const {return hydrogen()->name(); } |
1912 int arity() const { return hydrogen()->argument_count() - 1; } | 1969 int arity() const { return hydrogen()->argument_count() - 1; } |
1913 }; | 1970 }; |
1914 | 1971 |
1915 | 1972 |
1916 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1973 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
1917 public: | 1974 public: |
1918 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") | 1975 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") |
1919 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) | 1976 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) |
1920 | 1977 |
1921 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1978 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1922 | 1979 |
1923 int arity() const { return hydrogen()->argument_count() - 1; } | 1980 int arity() const { return hydrogen()->argument_count() - 1; } |
1924 }; | 1981 }; |
1925 | 1982 |
1926 | 1983 |
1927 class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1984 class LCallNew V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1928 public: | 1985 public: |
1929 explicit LCallNew(LOperand* constructor) { | 1986 LCallNew(LOperand* context, LOperand* constructor) { |
1930 inputs_[0] = constructor; | 1987 inputs_[0] = context; |
| 1988 inputs_[1] = constructor; |
1931 } | 1989 } |
1932 | 1990 |
1933 LOperand* constructor() { return inputs_[0]; } | 1991 LOperand* context() { return inputs_[0]; } |
| 1992 LOperand* constructor() { return inputs_[1]; } |
1934 | 1993 |
1935 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") | 1994 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") |
1936 DECLARE_HYDROGEN_ACCESSOR(CallNew) | 1995 DECLARE_HYDROGEN_ACCESSOR(CallNew) |
1937 | 1996 |
1938 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1997 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1939 | 1998 |
1940 int arity() const { return hydrogen()->argument_count() - 1; } | 1999 int arity() const { return hydrogen()->argument_count() - 1; } |
1941 }; | 2000 }; |
1942 | 2001 |
1943 | 2002 |
1944 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2003 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
1945 public: | 2004 public: |
1946 explicit LCallNewArray(LOperand* constructor) { | 2005 LCallNewArray(LOperand* context, LOperand* constructor) { |
1947 inputs_[0] = constructor; | 2006 inputs_[0] = context; |
| 2007 inputs_[1] = constructor; |
1948 } | 2008 } |
1949 | 2009 |
1950 LOperand* constructor() { return inputs_[0]; } | 2010 LOperand* context() { return inputs_[0]; } |
| 2011 LOperand* constructor() { return inputs_[1]; } |
1951 | 2012 |
1952 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") | 2013 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") |
1953 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) | 2014 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) |
1954 | 2015 |
1955 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2016 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
1956 | 2017 |
1957 int arity() const { return hydrogen()->argument_count() - 1; } | 2018 int arity() const { return hydrogen()->argument_count() - 1; } |
1958 }; | 2019 }; |
1959 | 2020 |
1960 | 2021 |
1961 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2022 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1962 public: | 2023 public: |
| 2024 explicit LCallRuntime(LOperand* context) { |
| 2025 inputs_[0] = context; |
| 2026 } |
| 2027 |
| 2028 LOperand* context() { return inputs_[0]; } |
| 2029 |
1963 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") | 2030 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
1964 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) | 2031 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
1965 | 2032 |
1966 const Runtime::Function* function() const { return hydrogen()->function(); } | 2033 const Runtime::Function* function() const { return hydrogen()->function(); } |
1967 int arity() const { return hydrogen()->argument_count(); } | 2034 int arity() const { return hydrogen()->argument_count(); } |
1968 }; | 2035 }; |
1969 | 2036 |
1970 | 2037 |
1971 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2038 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1972 public: | 2039 public: |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 | 2225 |
2159 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2226 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2160 | 2227 |
2161 Handle<Map> transition() const { return hydrogen()->transition_map(); } | 2228 Handle<Map> transition() const { return hydrogen()->transition_map(); } |
2162 Representation representation() const { | 2229 Representation representation() const { |
2163 return hydrogen()->field_representation(); | 2230 return hydrogen()->field_representation(); |
2164 } | 2231 } |
2165 }; | 2232 }; |
2166 | 2233 |
2167 | 2234 |
2168 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { | 2235 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { |
2169 public: | 2236 public: |
2170 LStoreNamedGeneric(LOperand* object, LOperand* value) { | 2237 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { |
2171 inputs_[0] = object; | 2238 inputs_[0] = context; |
2172 inputs_[1] = value; | 2239 inputs_[1] = object; |
| 2240 inputs_[2] = value; |
2173 } | 2241 } |
2174 | 2242 |
2175 LOperand* object() { return inputs_[0]; } | 2243 LOperand* context() { return inputs_[0]; } |
2176 LOperand* value() { return inputs_[1]; } | 2244 LOperand* object() { return inputs_[1]; } |
| 2245 LOperand* value() { return inputs_[2]; } |
2177 | 2246 |
2178 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 2247 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
2179 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 2248 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
2180 | 2249 |
2181 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2250 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2182 | 2251 |
2183 Handle<Object> name() const { return hydrogen()->name(); } | 2252 Handle<Object> name() const { return hydrogen()->name(); } |
2184 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2253 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
2185 }; | 2254 }; |
2186 | 2255 |
(...skipping 16 matching lines...) Expand all Loading... |
2203 | 2272 |
2204 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") | 2273 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
2205 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) | 2274 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
2206 | 2275 |
2207 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2276 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2208 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } | 2277 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } |
2209 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 2278 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
2210 }; | 2279 }; |
2211 | 2280 |
2212 | 2281 |
2213 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { | 2282 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 4, 0> { |
2214 public: | 2283 public: |
2215 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { | 2284 LStoreKeyedGeneric(LOperand* context, |
2216 inputs_[0] = obj; | 2285 LOperand* obj, |
2217 inputs_[1] = key; | 2286 LOperand* key, |
2218 inputs_[2] = value; | 2287 LOperand* value) { |
| 2288 inputs_[0] = context; |
| 2289 inputs_[1] = obj; |
| 2290 inputs_[2] = key; |
| 2291 inputs_[3] = value; |
2219 } | 2292 } |
2220 | 2293 |
2221 LOperand* object() { return inputs_[0]; } | 2294 LOperand* context() { return inputs_[0]; } |
2222 LOperand* key() { return inputs_[1]; } | 2295 LOperand* object() { return inputs_[1]; } |
2223 LOperand* value() { return inputs_[2]; } | 2296 LOperand* key() { return inputs_[2]; } |
| 2297 LOperand* value() { return inputs_[3]; } |
2224 | 2298 |
2225 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 2299 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
2226 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 2300 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
2227 | 2301 |
2228 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2302 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2229 | 2303 |
2230 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 2304 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
2231 }; | 2305 }; |
2232 | 2306 |
2233 | 2307 |
2234 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 1> { | 2308 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 1> { |
2235 public: | 2309 public: |
2236 LTransitionElementsKind(LOperand* object, | 2310 LTransitionElementsKind(LOperand* object, |
| 2311 LOperand* context, |
2237 LOperand* new_map_temp) { | 2312 LOperand* new_map_temp) { |
2238 inputs_[0] = object; | 2313 inputs_[0] = object; |
| 2314 inputs_[1] = context; |
2239 temps_[0] = new_map_temp; | 2315 temps_[0] = new_map_temp; |
2240 } | 2316 } |
2241 | 2317 |
| 2318 LOperand* context() { return inputs_[1]; } |
2242 LOperand* object() { return inputs_[0]; } | 2319 LOperand* object() { return inputs_[0]; } |
2243 LOperand* new_map_temp() { return temps_[0]; } | 2320 LOperand* new_map_temp() { return temps_[0]; } |
2244 | 2321 |
2245 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, | 2322 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
2246 "transition-elements-kind") | 2323 "transition-elements-kind") |
2247 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) | 2324 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
2248 | 2325 |
2249 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2326 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2250 | 2327 |
2251 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } | 2328 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } |
(...skipping 14 matching lines...) Expand all Loading... |
2266 } | 2343 } |
2267 | 2344 |
2268 LOperand* object() { return inputs_[0]; } | 2345 LOperand* object() { return inputs_[0]; } |
2269 LOperand* temp() { return temps_[0]; } | 2346 LOperand* temp() { return temps_[0]; } |
2270 | 2347 |
2271 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, | 2348 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, |
2272 "trap-allocation-memento") | 2349 "trap-allocation-memento") |
2273 }; | 2350 }; |
2274 | 2351 |
2275 | 2352 |
2276 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 2353 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
2277 public: | 2354 public: |
2278 LStringAdd(LOperand* left, LOperand* right) { | 2355 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { |
2279 inputs_[0] = left; | 2356 inputs_[0] = context; |
2280 inputs_[1] = right; | 2357 inputs_[1] = left; |
| 2358 inputs_[2] = right; |
2281 } | 2359 } |
2282 | 2360 |
2283 LOperand* left() { return inputs_[0]; } | 2361 LOperand* context() { return inputs_[0]; } |
2284 LOperand* right() { return inputs_[1]; } | 2362 LOperand* left() { return inputs_[1]; } |
| 2363 LOperand* right() { return inputs_[2]; } |
2285 | 2364 |
2286 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") | 2365 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") |
2287 DECLARE_HYDROGEN_ACCESSOR(StringAdd) | 2366 DECLARE_HYDROGEN_ACCESSOR(StringAdd) |
2288 }; | 2367 }; |
2289 | 2368 |
2290 | 2369 |
2291 | 2370 |
2292 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 2371 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
2293 public: | 2372 public: |
2294 LStringCharCodeAt(LOperand* string, LOperand* index) { | 2373 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { |
2295 inputs_[0] = string; | 2374 inputs_[0] = context; |
2296 inputs_[1] = index; | 2375 inputs_[1] = string; |
| 2376 inputs_[2] = index; |
2297 } | 2377 } |
2298 | 2378 |
2299 LOperand* string() { return inputs_[0]; } | 2379 LOperand* context() { return inputs_[0]; } |
2300 LOperand* index() { return inputs_[1]; } | 2380 LOperand* string() { return inputs_[1]; } |
| 2381 LOperand* index() { return inputs_[2]; } |
2301 | 2382 |
2302 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") | 2383 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") |
2303 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) | 2384 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) |
2304 }; | 2385 }; |
2305 | 2386 |
2306 | 2387 |
2307 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2388 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
2308 public: | 2389 public: |
2309 explicit LStringCharFromCode(LOperand* char_code) { | 2390 explicit LStringCharFromCode(LOperand* context, LOperand* char_code) { |
2310 inputs_[0] = char_code; | 2391 inputs_[0] = context; |
| 2392 inputs_[1] = char_code; |
2311 } | 2393 } |
2312 | 2394 |
2313 LOperand* char_code() { return inputs_[0]; } | 2395 LOperand* context() { return inputs_[0]; } |
| 2396 LOperand* char_code() { return inputs_[1]; } |
2314 | 2397 |
2315 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") | 2398 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") |
2316 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) | 2399 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) |
2317 }; | 2400 }; |
2318 | 2401 |
2319 | 2402 |
2320 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 2403 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
2321 public: | 2404 public: |
2322 explicit LCheckValue(LOperand* value) { | 2405 explicit LCheckValue(LOperand* value) { |
2323 inputs_[0] = value; | 2406 inputs_[0] = value; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2416 | 2499 |
2417 LOperand* unclamped() { return inputs_[0]; } | 2500 LOperand* unclamped() { return inputs_[0]; } |
2418 LOperand* temp() { return temps_[0]; } | 2501 LOperand* temp() { return temps_[0]; } |
2419 | 2502 |
2420 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") | 2503 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") |
2421 }; | 2504 }; |
2422 | 2505 |
2423 | 2506 |
2424 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { | 2507 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { |
2425 public: | 2508 public: |
2426 LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { | 2509 LAllocate(LOperand* context, |
| 2510 LOperand* size, |
| 2511 LOperand* temp1, |
| 2512 LOperand* temp2) { |
| 2513 inputs_[0] = context; |
2427 inputs_[1] = size; | 2514 inputs_[1] = size; |
2428 temps_[0] = temp1; | 2515 temps_[0] = temp1; |
2429 temps_[1] = temp2; | 2516 temps_[1] = temp2; |
2430 } | 2517 } |
2431 | 2518 |
| 2519 LOperand* context() { return inputs_[0]; } |
2432 LOperand* size() { return inputs_[1]; } | 2520 LOperand* size() { return inputs_[1]; } |
2433 LOperand* temp1() { return temps_[0]; } | 2521 LOperand* temp1() { return temps_[0]; } |
2434 LOperand* temp2() { return temps_[1]; } | 2522 LOperand* temp2() { return temps_[1]; } |
2435 | 2523 |
2436 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") | 2524 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") |
2437 DECLARE_HYDROGEN_ACCESSOR(Allocate) | 2525 DECLARE_HYDROGEN_ACCESSOR(Allocate) |
2438 }; | 2526 }; |
2439 | 2527 |
2440 | 2528 |
2441 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2529 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2442 public: | 2530 public: |
| 2531 explicit LRegExpLiteral(LOperand* context) { |
| 2532 inputs_[0] = context; |
| 2533 } |
| 2534 |
| 2535 LOperand* context() { return inputs_[0]; } |
| 2536 |
2443 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") | 2537 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") |
2444 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) | 2538 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) |
2445 }; | 2539 }; |
2446 | 2540 |
2447 | 2541 |
2448 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 2542 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2449 public: | 2543 public: |
| 2544 explicit LFunctionLiteral(LOperand* context) { |
| 2545 inputs_[0] = context; |
| 2546 } |
| 2547 |
| 2548 LOperand* context() { return inputs_[0]; } |
| 2549 |
2450 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") | 2550 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") |
2451 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) | 2551 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) |
2452 }; | 2552 }; |
2453 | 2553 |
2454 | 2554 |
2455 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2555 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2456 public: | 2556 public: |
2457 explicit LToFastProperties(LOperand* value) { | 2557 explicit LToFastProperties(LOperand* value) { |
2458 inputs_[0] = value; | 2558 inputs_[0] = value; |
2459 } | 2559 } |
2460 | 2560 |
2461 LOperand* value() { return inputs_[0]; } | 2561 LOperand* value() { return inputs_[0]; } |
2462 | 2562 |
2463 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") | 2563 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") |
2464 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) | 2564 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) |
2465 }; | 2565 }; |
2466 | 2566 |
2467 | 2567 |
2468 class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2568 class LTypeof V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
2469 public: | 2569 public: |
2470 explicit LTypeof(LOperand* value) { | 2570 LTypeof(LOperand* context, LOperand* value) { |
2471 inputs_[0] = value; | 2571 inputs_[0] = context; |
| 2572 inputs_[1] = value; |
2472 } | 2573 } |
2473 | 2574 |
2474 LOperand* value() { return inputs_[0]; } | 2575 LOperand* context() { return inputs_[0]; } |
| 2576 LOperand* value() { return inputs_[1]; } |
2475 | 2577 |
2476 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") | 2578 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
2477 }; | 2579 }; |
2478 | 2580 |
2479 | 2581 |
2480 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { | 2582 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { |
2481 public: | 2583 public: |
2482 explicit LTypeofIsAndBranch(LOperand* value) { | 2584 explicit LTypeofIsAndBranch(LOperand* value) { |
2483 inputs_[0] = value; | 2585 inputs_[0] = value; |
2484 } | 2586 } |
(...skipping 26 matching lines...) Expand all Loading... |
2511 public: | 2613 public: |
2512 LOsrEntry() {} | 2614 LOsrEntry() {} |
2513 | 2615 |
2514 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { | 2616 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { |
2515 return false; | 2617 return false; |
2516 } | 2618 } |
2517 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") | 2619 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") |
2518 }; | 2620 }; |
2519 | 2621 |
2520 | 2622 |
2521 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> { | 2623 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
2522 public: | 2624 public: |
| 2625 explicit LStackCheck(LOperand* context) { |
| 2626 inputs_[0] = context; |
| 2627 } |
| 2628 |
| 2629 LOperand* context() { return inputs_[0]; } |
| 2630 |
2523 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") | 2631 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") |
2524 DECLARE_HYDROGEN_ACCESSOR(StackCheck) | 2632 DECLARE_HYDROGEN_ACCESSOR(StackCheck) |
2525 | 2633 |
2526 Label* done_label() { return &done_label_; } | 2634 Label* done_label() { return &done_label_; } |
2527 | 2635 |
2528 private: | 2636 private: |
2529 Label done_label_; | 2637 Label done_label_; |
2530 }; | 2638 }; |
2531 | 2639 |
2532 | 2640 |
2533 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2641 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
2534 public: | 2642 public: |
2535 explicit LForInPrepareMap(LOperand* object) { | 2643 LForInPrepareMap(LOperand* context, LOperand* object) { |
2536 inputs_[0] = object; | 2644 inputs_[0] = context; |
| 2645 inputs_[1] = object; |
2537 } | 2646 } |
2538 | 2647 |
2539 LOperand* object() { return inputs_[0]; } | 2648 LOperand* context() { return inputs_[0]; } |
| 2649 LOperand* object() { return inputs_[1]; } |
2540 | 2650 |
2541 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") | 2651 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") |
2542 }; | 2652 }; |
2543 | 2653 |
2544 | 2654 |
2545 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2655 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2546 public: | 2656 public: |
2547 explicit LForInCacheArray(LOperand* map) { | 2657 explicit LForInCacheArray(LOperand* map) { |
2548 inputs_[0] = map; | 2658 inputs_[0] = map; |
2549 } | 2659 } |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2767 | 2877 |
2768 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2878 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2769 }; | 2879 }; |
2770 | 2880 |
2771 #undef DECLARE_HYDROGEN_ACCESSOR | 2881 #undef DECLARE_HYDROGEN_ACCESSOR |
2772 #undef DECLARE_CONCRETE_INSTRUCTION | 2882 #undef DECLARE_CONCRETE_INSTRUCTION |
2773 | 2883 |
2774 } } // namespace v8::internal | 2884 } } // namespace v8::internal |
2775 | 2885 |
2776 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2886 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |