| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 V(DateField) \ | 84 V(DateField) \ |
| 85 V(DebugBreak) \ | 85 V(DebugBreak) \ |
| 86 V(DeclareGlobals) \ | 86 V(DeclareGlobals) \ |
| 87 V(Deoptimize) \ | 87 V(Deoptimize) \ |
| 88 V(DivI) \ | 88 V(DivI) \ |
| 89 V(DoubleToI) \ | 89 V(DoubleToI) \ |
| 90 V(DoubleToSmi) \ | 90 V(DoubleToSmi) \ |
| 91 V(Drop) \ | 91 V(Drop) \ |
| 92 V(DummyUse) \ | 92 V(DummyUse) \ |
| 93 V(Dummy) \ | 93 V(Dummy) \ |
| 94 V(ElementsKind) \ | |
| 95 V(ForInCacheArray) \ | 94 V(ForInCacheArray) \ |
| 96 V(ForInPrepareMap) \ | 95 V(ForInPrepareMap) \ |
| 97 V(FunctionLiteral) \ | 96 V(FunctionLiteral) \ |
| 98 V(GetCachedArrayIndex) \ | 97 V(GetCachedArrayIndex) \ |
| 99 V(GlobalObject) \ | |
| 100 V(GlobalReceiver) \ | |
| 101 V(Goto) \ | 98 V(Goto) \ |
| 102 V(HasCachedArrayIndexAndBranch) \ | 99 V(HasCachedArrayIndexAndBranch) \ |
| 103 V(HasInstanceTypeAndBranch) \ | 100 V(HasInstanceTypeAndBranch) \ |
| 104 V(InnerAllocatedObject) \ | 101 V(InnerAllocatedObject) \ |
| 105 V(InstanceOf) \ | 102 V(InstanceOf) \ |
| 106 V(InstanceOfKnownGlobal) \ | 103 V(InstanceOfKnownGlobal) \ |
| 107 V(InstructionGap) \ | 104 V(InstructionGap) \ |
| 108 V(Integer32ToDouble) \ | 105 V(Integer32ToDouble) \ |
| 109 V(Integer32ToSmi) \ | 106 V(Integer32ToSmi) \ |
| 110 V(InvokeFunction) \ | 107 V(InvokeFunction) \ |
| 111 V(IsConstructCallAndBranch) \ | 108 V(IsConstructCallAndBranch) \ |
| 112 V(IsObjectAndBranch) \ | 109 V(IsObjectAndBranch) \ |
| 113 V(IsStringAndBranch) \ | 110 V(IsStringAndBranch) \ |
| 114 V(IsSmiAndBranch) \ | 111 V(IsSmiAndBranch) \ |
| 115 V(IsUndetectableAndBranch) \ | 112 V(IsUndetectableAndBranch) \ |
| 116 V(Label) \ | 113 V(Label) \ |
| 117 V(LazyBailout) \ | 114 V(LazyBailout) \ |
| 118 V(LoadContextSlot) \ | 115 V(LoadContextSlot) \ |
| 119 V(LoadExternalArrayPointer) \ | |
| 120 V(LoadRoot) \ | 116 V(LoadRoot) \ |
| 121 V(LoadFieldByIndex) \ | 117 V(LoadFieldByIndex) \ |
| 122 V(LoadFunctionPrototype) \ | 118 V(LoadFunctionPrototype) \ |
| 123 V(LoadGlobalCell) \ | 119 V(LoadGlobalCell) \ |
| 124 V(LoadGlobalGeneric) \ | 120 V(LoadGlobalGeneric) \ |
| 125 V(LoadKeyed) \ | 121 V(LoadKeyed) \ |
| 126 V(LoadKeyedGeneric) \ | 122 V(LoadKeyedGeneric) \ |
| 127 V(LoadNamedField) \ | 123 V(LoadNamedField) \ |
| 128 V(LoadNamedGeneric) \ | 124 V(LoadNamedGeneric) \ |
| 129 V(MapEnumLength) \ | 125 V(MapEnumLength) \ |
| 130 V(MathAbs) \ | 126 V(MathAbs) \ |
| 127 V(MathClz32) \ |
| 131 V(MathExp) \ | 128 V(MathExp) \ |
| 132 V(MathFloor) \ | 129 V(MathFloor) \ |
| 133 V(MathFloorOfDiv) \ | 130 V(MathFloorOfDiv) \ |
| 134 V(MathLog) \ | 131 V(MathLog) \ |
| 135 V(MathMinMax) \ | 132 V(MathMinMax) \ |
| 136 V(MathPowHalf) \ | 133 V(MathPowHalf) \ |
| 137 V(MathRound) \ | 134 V(MathRound) \ |
| 138 V(MathSqrt) \ | 135 V(MathSqrt) \ |
| 139 V(ModI) \ | 136 V(ModI) \ |
| 140 V(MulI) \ | 137 V(MulI) \ |
| 141 V(NumberTagD) \ | 138 V(NumberTagD) \ |
| 142 V(NumberTagI) \ | 139 V(NumberTagI) \ |
| 143 V(NumberTagU) \ | 140 V(NumberTagU) \ |
| 144 V(NumberUntagD) \ | 141 V(NumberUntagD) \ |
| 145 V(OsrEntry) \ | 142 V(OsrEntry) \ |
| 146 V(OuterContext) \ | |
| 147 V(Parameter) \ | 143 V(Parameter) \ |
| 148 V(Power) \ | 144 V(Power) \ |
| 149 V(PushArgument) \ | 145 V(PushArgument) \ |
| 150 V(RegExpLiteral) \ | 146 V(RegExpLiteral) \ |
| 151 V(Return) \ | 147 V(Return) \ |
| 152 V(SeqStringGetChar) \ | 148 V(SeqStringGetChar) \ |
| 153 V(SeqStringSetChar) \ | 149 V(SeqStringSetChar) \ |
| 154 V(ShiftI) \ | 150 V(ShiftI) \ |
| 155 V(SmiTag) \ | 151 V(SmiTag) \ |
| 156 V(SmiUntag) \ | 152 V(SmiUntag) \ |
| 157 V(StackCheck) \ | 153 V(StackCheck) \ |
| 158 V(StoreCodeEntry) \ | 154 V(StoreCodeEntry) \ |
| 159 V(StoreContextSlot) \ | 155 V(StoreContextSlot) \ |
| 160 V(StoreGlobalCell) \ | 156 V(StoreGlobalCell) \ |
| 161 V(StoreKeyed) \ | 157 V(StoreKeyed) \ |
| 162 V(StoreKeyedGeneric) \ | 158 V(StoreKeyedGeneric) \ |
| 163 V(StoreNamedField) \ | 159 V(StoreNamedField) \ |
| 164 V(StoreNamedGeneric) \ | 160 V(StoreNamedGeneric) \ |
| 165 V(StringAdd) \ | 161 V(StringAdd) \ |
| 166 V(StringCharCodeAt) \ | 162 V(StringCharCodeAt) \ |
| 167 V(StringCharFromCode) \ | 163 V(StringCharFromCode) \ |
| 168 V(StringCompareAndBranch) \ | 164 V(StringCompareAndBranch) \ |
| 169 V(SubI) \ | 165 V(SubI) \ |
| 170 V(TaggedToI) \ | 166 V(TaggedToI) \ |
| 171 V(ThisFunction) \ | 167 V(ThisFunction) \ |
| 172 V(Throw) \ | |
| 173 V(ToFastProperties) \ | 168 V(ToFastProperties) \ |
| 174 V(TransitionElementsKind) \ | 169 V(TransitionElementsKind) \ |
| 175 V(TrapAllocationMemento) \ | 170 V(TrapAllocationMemento) \ |
| 176 V(Typeof) \ | 171 V(Typeof) \ |
| 177 V(TypeofIsAndBranch) \ | 172 V(TypeofIsAndBranch) \ |
| 178 V(Uint32ToDouble) \ | 173 V(Uint32ToDouble) \ |
| 179 V(Uint32ToSmi) \ | 174 V(Uint32ToSmi) \ |
| 180 V(UnknownOSRValue) \ | 175 V(UnknownOSRValue) \ |
| 181 V(ValueOf) \ | |
| 182 V(WrapReceiver) | 176 V(WrapReceiver) |
| 183 | 177 |
| 184 | 178 |
| 185 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 179 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 186 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 180 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
| 187 return LInstruction::k##type; \ | 181 return LInstruction::k##type; \ |
| 188 } \ | 182 } \ |
| 189 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 183 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
| 190 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 184 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
| 191 return mnemonic; \ | 185 return mnemonic; \ |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 public: | 546 public: |
| 553 LWrapReceiver(LOperand* receiver, LOperand* function) { | 547 LWrapReceiver(LOperand* receiver, LOperand* function) { |
| 554 inputs_[0] = receiver; | 548 inputs_[0] = receiver; |
| 555 inputs_[1] = function; | 549 inputs_[1] = function; |
| 556 } | 550 } |
| 557 | 551 |
| 558 LOperand* receiver() { return inputs_[0]; } | 552 LOperand* receiver() { return inputs_[0]; } |
| 559 LOperand* function() { return inputs_[1]; } | 553 LOperand* function() { return inputs_[1]; } |
| 560 | 554 |
| 561 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") | 555 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 556 DECLARE_HYDROGEN_ACCESSOR(WrapReceiver) |
| 562 }; | 557 }; |
| 563 | 558 |
| 564 | 559 |
| 565 class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { | 560 class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { |
| 566 public: | 561 public: |
| 567 LApplyArguments(LOperand* function, | 562 LApplyArguments(LOperand* function, |
| 568 LOperand* receiver, | 563 LOperand* receiver, |
| 569 LOperand* length, | 564 LOperand* length, |
| 570 LOperand* elements) { | 565 LOperand* elements) { |
| 571 inputs_[0] = function; | 566 inputs_[0] = function; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 explicit LMathLog(LOperand* value) { | 754 explicit LMathLog(LOperand* value) { |
| 760 inputs_[0] = value; | 755 inputs_[0] = value; |
| 761 } | 756 } |
| 762 | 757 |
| 763 LOperand* value() { return inputs_[0]; } | 758 LOperand* value() { return inputs_[0]; } |
| 764 | 759 |
| 765 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") | 760 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") |
| 766 }; | 761 }; |
| 767 | 762 |
| 768 | 763 |
| 764 class LMathClz32 V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 765 public: |
| 766 explicit LMathClz32(LOperand* value) { |
| 767 inputs_[0] = value; |
| 768 } |
| 769 |
| 770 LOperand* value() { return inputs_[0]; } |
| 771 |
| 772 DECLARE_CONCRETE_INSTRUCTION(MathClz32, "math-clz32") |
| 773 }; |
| 774 |
| 775 |
| 769 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> { | 776 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 770 public: | 777 public: |
| 771 LMathExp(LOperand* value, LOperand* temp1, LOperand* temp2) { | 778 LMathExp(LOperand* value, LOperand* temp1, LOperand* temp2) { |
| 772 inputs_[0] = value; | 779 inputs_[0] = value; |
| 773 temps_[0] = temp1; | 780 temps_[0] = temp1; |
| 774 temps_[1] = temp2; | 781 temps_[1] = temp2; |
| 775 ExternalReference::InitializeMathExpData(); | 782 ExternalReference::InitializeMathExpData(); |
| 776 } | 783 } |
| 777 | 784 |
| 778 LOperand* value() { return inputs_[0]; } | 785 LOperand* value() { return inputs_[0]; } |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 explicit LMapEnumLength(LOperand* value) { | 1240 explicit LMapEnumLength(LOperand* value) { |
| 1234 inputs_[0] = value; | 1241 inputs_[0] = value; |
| 1235 } | 1242 } |
| 1236 | 1243 |
| 1237 LOperand* value() { return inputs_[0]; } | 1244 LOperand* value() { return inputs_[0]; } |
| 1238 | 1245 |
| 1239 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") | 1246 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") |
| 1240 }; | 1247 }; |
| 1241 | 1248 |
| 1242 | 1249 |
| 1243 class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1244 public: | |
| 1245 explicit LElementsKind(LOperand* value) { | |
| 1246 inputs_[0] = value; | |
| 1247 } | |
| 1248 | |
| 1249 LOperand* value() { return inputs_[0]; } | |
| 1250 | |
| 1251 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") | |
| 1252 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) | |
| 1253 }; | |
| 1254 | |
| 1255 | |
| 1256 class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1257 public: | |
| 1258 explicit LValueOf(LOperand* value) { | |
| 1259 inputs_[0] = value; | |
| 1260 } | |
| 1261 | |
| 1262 LOperand* value() { return inputs_[0]; } | |
| 1263 | |
| 1264 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | |
| 1265 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | |
| 1266 }; | |
| 1267 | |
| 1268 | |
| 1269 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1250 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1270 public: | 1251 public: |
| 1271 LDateField(LOperand* date, Smi* index) : index_(index) { | 1252 LDateField(LOperand* date, Smi* index) : index_(index) { |
| 1272 inputs_[0] = date; | 1253 inputs_[0] = date; |
| 1273 } | 1254 } |
| 1274 | 1255 |
| 1275 LOperand* date() { return inputs_[0]; } | 1256 LOperand* date() { return inputs_[0]; } |
| 1276 Smi* index() const { return index_; } | 1257 Smi* index() const { return index_; } |
| 1277 | 1258 |
| 1278 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") | 1259 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 | 1293 |
| 1313 LOperand* string() { return inputs_[1]; } | 1294 LOperand* string() { return inputs_[1]; } |
| 1314 LOperand* index() { return inputs_[2]; } | 1295 LOperand* index() { return inputs_[2]; } |
| 1315 LOperand* value() { return inputs_[3]; } | 1296 LOperand* value() { return inputs_[3]; } |
| 1316 | 1297 |
| 1317 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") | 1298 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") |
| 1318 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) | 1299 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) |
| 1319 }; | 1300 }; |
| 1320 | 1301 |
| 1321 | 1302 |
| 1322 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { | |
| 1323 public: | |
| 1324 explicit LThrow(LOperand* context, LOperand* value) { | |
| 1325 inputs_[0] = context; | |
| 1326 inputs_[1] = value; | |
| 1327 } | |
| 1328 | |
| 1329 LOperand* context() { return inputs_[0]; } | |
| 1330 LOperand* value() { return inputs_[1]; } | |
| 1331 | |
| 1332 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | |
| 1333 }; | |
| 1334 | |
| 1335 | |
| 1336 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1303 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1337 public: | 1304 public: |
| 1338 LAddI(LOperand* left, LOperand* right) { | 1305 LAddI(LOperand* left, LOperand* right) { |
| 1339 inputs_[0] = left; | 1306 inputs_[0] = left; |
| 1340 inputs_[1] = right; | 1307 inputs_[1] = right; |
| 1341 } | 1308 } |
| 1342 | 1309 |
| 1343 LOperand* left() { return inputs_[0]; } | 1310 LOperand* left() { return inputs_[0]; } |
| 1344 LOperand* right() { return inputs_[1]; } | 1311 LOperand* right() { return inputs_[1]; } |
| 1345 | 1312 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1505 | 1472 |
| 1506 class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1473 class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1507 public: | 1474 public: |
| 1508 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") | 1475 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") |
| 1509 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) | 1476 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) |
| 1510 | 1477 |
| 1511 Heap::RootListIndex index() const { return hydrogen()->index(); } | 1478 Heap::RootListIndex index() const { return hydrogen()->index(); } |
| 1512 }; | 1479 }; |
| 1513 | 1480 |
| 1514 | 1481 |
| 1515 class LLoadExternalArrayPointer V8_FINAL | |
| 1516 : public LTemplateInstruction<1, 1, 0> { | |
| 1517 public: | |
| 1518 explicit LLoadExternalArrayPointer(LOperand* object) { | |
| 1519 inputs_[0] = object; | |
| 1520 } | |
| 1521 | |
| 1522 LOperand* object() { return inputs_[0]; } | |
| 1523 | |
| 1524 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, | |
| 1525 "load-external-array-pointer") | |
| 1526 }; | |
| 1527 | |
| 1528 | |
| 1529 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1482 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1530 public: | 1483 public: |
| 1531 LLoadKeyed(LOperand* elements, LOperand* key) { | 1484 LLoadKeyed(LOperand* elements, LOperand* key) { |
| 1532 inputs_[0] = elements; | 1485 inputs_[0] = elements; |
| 1533 inputs_[1] = key; | 1486 inputs_[1] = key; |
| 1534 } | 1487 } |
| 1535 | 1488 |
| 1536 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") | 1489 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
| 1537 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) | 1490 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
| 1538 | 1491 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1713 }; | 1666 }; |
| 1714 | 1667 |
| 1715 | 1668 |
| 1716 class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1669 class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1717 public: | 1670 public: |
| 1718 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1671 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
| 1719 DECLARE_HYDROGEN_ACCESSOR(Context) | 1672 DECLARE_HYDROGEN_ACCESSOR(Context) |
| 1720 }; | 1673 }; |
| 1721 | 1674 |
| 1722 | 1675 |
| 1723 class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1724 public: | |
| 1725 explicit LOuterContext(LOperand* context) { | |
| 1726 inputs_[0] = context; | |
| 1727 } | |
| 1728 | |
| 1729 LOperand* context() { return inputs_[0]; } | |
| 1730 | |
| 1731 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") | |
| 1732 }; | |
| 1733 | |
| 1734 | |
| 1735 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 1676 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
| 1736 public: | 1677 public: |
| 1737 explicit LDeclareGlobals(LOperand* context) { | 1678 explicit LDeclareGlobals(LOperand* context) { |
| 1738 inputs_[0] = context; | 1679 inputs_[0] = context; |
| 1739 } | 1680 } |
| 1740 | 1681 |
| 1741 LOperand* context() { return inputs_[0]; } | 1682 LOperand* context() { return inputs_[0]; } |
| 1742 | 1683 |
| 1743 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") | 1684 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") |
| 1744 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) | 1685 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) |
| 1745 }; | 1686 }; |
| 1746 | 1687 |
| 1747 | 1688 |
| 1748 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1749 public: | |
| 1750 explicit LGlobalObject(LOperand* context) { | |
| 1751 inputs_[0] = context; | |
| 1752 } | |
| 1753 | |
| 1754 LOperand* context() { return inputs_[0]; } | |
| 1755 | |
| 1756 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") | |
| 1757 }; | |
| 1758 | |
| 1759 | |
| 1760 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1761 public: | |
| 1762 explicit LGlobalReceiver(LOperand* global_object) { | |
| 1763 inputs_[0] = global_object; | |
| 1764 } | |
| 1765 | |
| 1766 LOperand* global() { return inputs_[0]; } | |
| 1767 | |
| 1768 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") | |
| 1769 }; | |
| 1770 | |
| 1771 | |
| 1772 class LCallJSFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1689 class LCallJSFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1773 public: | 1690 public: |
| 1774 explicit LCallJSFunction(LOperand* function) { | 1691 explicit LCallJSFunction(LOperand* function) { |
| 1775 inputs_[0] = function; | 1692 inputs_[0] = function; |
| 1776 } | 1693 } |
| 1777 | 1694 |
| 1778 LOperand* function() { return inputs_[0]; } | 1695 LOperand* function() { return inputs_[0]; } |
| 1779 | 1696 |
| 1780 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") | 1697 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") |
| 1781 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) | 1698 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) |
| 1782 | 1699 |
| 1783 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1700 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1784 | 1701 |
| 1785 int arity() const { return hydrogen()->argument_count() - 1; } | 1702 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1786 }; | 1703 }; |
| 1787 | 1704 |
| 1788 | 1705 |
| 1789 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { | 1706 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { |
| 1790 public: | 1707 public: |
| 1791 LCallWithDescriptor(const CallInterfaceDescriptor* descriptor, | 1708 LCallWithDescriptor(const CallInterfaceDescriptor* descriptor, |
| 1792 ZoneList<LOperand*>& operands, | 1709 ZoneList<LOperand*>& operands, |
| 1793 Zone* zone) | 1710 Zone* zone) |
| 1794 : descriptor_(descriptor), | 1711 : inputs_(descriptor->environment_length() + 1, zone) { |
| 1795 inputs_(descriptor->environment_length() + 1, zone) { | |
| 1796 ASSERT(descriptor->environment_length() + 1 == operands.length()); | 1712 ASSERT(descriptor->environment_length() + 1 == operands.length()); |
| 1797 inputs_.AddAll(operands, zone); | 1713 inputs_.AddAll(operands, zone); |
| 1798 } | 1714 } |
| 1799 | 1715 |
| 1800 LOperand* target() const { return inputs_[0]; } | 1716 LOperand* target() const { return inputs_[0]; } |
| 1801 | 1717 |
| 1802 private: | 1718 private: |
| 1803 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1719 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
| 1804 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1720 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
| 1805 | 1721 |
| 1806 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1722 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 1807 | 1723 |
| 1808 int arity() const { return hydrogen()->argument_count() - 1; } | 1724 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1809 | 1725 |
| 1810 const CallInterfaceDescriptor* descriptor_; | |
| 1811 ZoneList<LOperand*> inputs_; | 1726 ZoneList<LOperand*> inputs_; |
| 1812 | 1727 |
| 1813 // Iterator support. | 1728 // Iterator support. |
| 1814 virtual int InputCount() V8_FINAL V8_OVERRIDE { return inputs_.length(); } | 1729 virtual int InputCount() V8_FINAL V8_OVERRIDE { return inputs_.length(); } |
| 1815 virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; } | 1730 virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; } |
| 1816 | 1731 |
| 1817 virtual int TempCount() V8_FINAL V8_OVERRIDE { return 0; } | 1732 virtual int TempCount() V8_FINAL V8_OVERRIDE { return 0; } |
| 1818 virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return NULL; } | 1733 virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return NULL; } |
| 1819 }; | 1734 }; |
| 1820 | 1735 |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2613 // Build the sequence for the graph. | 2528 // Build the sequence for the graph. |
| 2614 LPlatformChunk* Build(); | 2529 LPlatformChunk* Build(); |
| 2615 | 2530 |
| 2616 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); | 2531 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
| 2617 | 2532 |
| 2618 // Declare methods that deal with the individual node types. | 2533 // Declare methods that deal with the individual node types. |
| 2619 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2534 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2620 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2535 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2621 #undef DECLARE_DO | 2536 #undef DECLARE_DO |
| 2622 | 2537 |
| 2623 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); | |
| 2624 | |
| 2625 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2538 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
| 2626 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2539 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
| 2627 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2540 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
| 2628 LInstruction* DoMathLog(HUnaryMathOperation* instr); | 2541 LInstruction* DoMathLog(HUnaryMathOperation* instr); |
| 2629 LInstruction* DoMathExp(HUnaryMathOperation* instr); | 2542 LInstruction* DoMathExp(HUnaryMathOperation* instr); |
| 2630 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); | 2543 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); |
| 2631 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); | 2544 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); |
| 2545 LInstruction* DoMathClz32(HUnaryMathOperation* instr); |
| 2632 | 2546 |
| 2633 private: | 2547 private: |
| 2634 enum Status { | 2548 enum Status { |
| 2635 UNUSED, | 2549 UNUSED, |
| 2636 BUILDING, | 2550 BUILDING, |
| 2637 DONE, | 2551 DONE, |
| 2638 ABORTED | 2552 ABORTED |
| 2639 }; | 2553 }; |
| 2640 | 2554 |
| 2641 LPlatformChunk* chunk() const { return chunk_; } | 2555 LPlatformChunk* chunk() const { return chunk_; } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2751 | 2665 |
| 2752 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2666 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2753 }; | 2667 }; |
| 2754 | 2668 |
| 2755 #undef DECLARE_HYDROGEN_ACCESSOR | 2669 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2756 #undef DECLARE_CONCRETE_INSTRUCTION | 2670 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2757 | 2671 |
| 2758 } } // namespace v8::int | 2672 } } // namespace v8::int |
| 2759 | 2673 |
| 2760 #endif // V8_X64_LITHIUM_X64_H_ | 2674 #endif // V8_X64_LITHIUM_X64_H_ |
| OLD | NEW |