| 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(Dummy) \ | 92 V(Dummy) \ |
| 93 V(DummyUse) \ | 93 V(DummyUse) \ |
| 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(MultiplyAddD) \ | 138 V(MultiplyAddD) \ |
| 142 V(MultiplySubD) \ | 139 V(MultiplySubD) \ |
| 143 V(NumberTagD) \ | 140 V(NumberTagD) \ |
| 144 V(NumberTagI) \ | 141 V(NumberTagI) \ |
| 145 V(NumberTagU) \ | 142 V(NumberTagU) \ |
| 146 V(NumberUntagD) \ | 143 V(NumberUntagD) \ |
| 147 V(OsrEntry) \ | 144 V(OsrEntry) \ |
| 148 V(OuterContext) \ | |
| 149 V(Parameter) \ | 145 V(Parameter) \ |
| 150 V(Power) \ | 146 V(Power) \ |
| 151 V(PushArgument) \ | 147 V(PushArgument) \ |
| 152 V(RegExpLiteral) \ | 148 V(RegExpLiteral) \ |
| 153 V(Return) \ | 149 V(Return) \ |
| 154 V(SeqStringGetChar) \ | 150 V(SeqStringGetChar) \ |
| 155 V(SeqStringSetChar) \ | 151 V(SeqStringSetChar) \ |
| 156 V(ShiftI) \ | 152 V(ShiftI) \ |
| 157 V(SmiTag) \ | 153 V(SmiTag) \ |
| 158 V(SmiUntag) \ | 154 V(SmiUntag) \ |
| 159 V(StackCheck) \ | 155 V(StackCheck) \ |
| 160 V(StoreCodeEntry) \ | 156 V(StoreCodeEntry) \ |
| 161 V(StoreContextSlot) \ | 157 V(StoreContextSlot) \ |
| 162 V(StoreGlobalCell) \ | 158 V(StoreGlobalCell) \ |
| 163 V(StoreKeyed) \ | 159 V(StoreKeyed) \ |
| 164 V(StoreKeyedGeneric) \ | 160 V(StoreKeyedGeneric) \ |
| 165 V(StoreNamedField) \ | 161 V(StoreNamedField) \ |
| 166 V(StoreNamedGeneric) \ | 162 V(StoreNamedGeneric) \ |
| 167 V(StringAdd) \ | 163 V(StringAdd) \ |
| 168 V(StringCharCodeAt) \ | 164 V(StringCharCodeAt) \ |
| 169 V(StringCharFromCode) \ | 165 V(StringCharFromCode) \ |
| 170 V(StringCompareAndBranch) \ | 166 V(StringCompareAndBranch) \ |
| 171 V(SubI) \ | 167 V(SubI) \ |
| 172 V(RSubI) \ | 168 V(RSubI) \ |
| 173 V(TaggedToI) \ | 169 V(TaggedToI) \ |
| 174 V(ThisFunction) \ | 170 V(ThisFunction) \ |
| 175 V(Throw) \ | |
| 176 V(ToFastProperties) \ | 171 V(ToFastProperties) \ |
| 177 V(TransitionElementsKind) \ | 172 V(TransitionElementsKind) \ |
| 178 V(TrapAllocationMemento) \ | 173 V(TrapAllocationMemento) \ |
| 179 V(Typeof) \ | 174 V(Typeof) \ |
| 180 V(TypeofIsAndBranch) \ | 175 V(TypeofIsAndBranch) \ |
| 181 V(Uint32ToDouble) \ | 176 V(Uint32ToDouble) \ |
| 182 V(Uint32ToSmi) \ | 177 V(Uint32ToSmi) \ |
| 183 V(UnknownOSRValue) \ | 178 V(UnknownOSRValue) \ |
| 184 V(ValueOf) \ | |
| 185 V(WrapReceiver) | 179 V(WrapReceiver) |
| 186 | 180 |
| 187 | 181 |
| 188 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 182 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 189 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 183 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
| 190 return LInstruction::k##type; \ | 184 return LInstruction::k##type; \ |
| 191 } \ | 185 } \ |
| 192 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 186 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
| 193 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 187 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
| 194 return mnemonic; \ | 188 return mnemonic; \ |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 | 543 |
| 550 | 544 |
| 551 class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 545 class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 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 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") | 552 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 553 DECLARE_HYDROGEN_ACCESSOR(WrapReceiver) |
| 559 | 554 |
| 560 LOperand* receiver() { return inputs_[0]; } | 555 LOperand* receiver() { return inputs_[0]; } |
| 561 LOperand* function() { return inputs_[1]; } | 556 LOperand* function() { return inputs_[1]; } |
| 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, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 LDivI(LOperand* left, LOperand* right, LOperand* temp) { | 642 LDivI(LOperand* left, LOperand* right, LOperand* temp) { |
| 648 inputs_[0] = left; | 643 inputs_[0] = left; |
| 649 inputs_[1] = right; | 644 inputs_[1] = right; |
| 650 temps_[0] = temp; | 645 temps_[0] = temp; |
| 651 } | 646 } |
| 652 | 647 |
| 653 LOperand* left() { return inputs_[0]; } | 648 LOperand* left() { return inputs_[0]; } |
| 654 LOperand* right() { return inputs_[1]; } | 649 LOperand* right() { return inputs_[1]; } |
| 655 LOperand* temp() { return temps_[0]; } | 650 LOperand* temp() { return temps_[0]; } |
| 656 | 651 |
| 652 bool is_flooring() { return hydrogen_value()->IsMathFloorOfDiv(); } |
| 653 |
| 657 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 654 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
| 658 DECLARE_HYDROGEN_ACCESSOR(Div) | 655 DECLARE_HYDROGEN_ACCESSOR(Div) |
| 659 }; | 656 }; |
| 660 | 657 |
| 661 | 658 |
| 662 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { | 659 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { |
| 663 public: | 660 public: |
| 664 LMathFloorOfDiv(LOperand* left, | 661 LMathFloorOfDiv(LOperand* left, |
| 665 LOperand* right, | 662 LOperand* right, |
| 666 LOperand* temp = NULL) { | 663 LOperand* temp = NULL) { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 explicit LMathLog(LOperand* value) { | 803 explicit LMathLog(LOperand* value) { |
| 807 inputs_[0] = value; | 804 inputs_[0] = value; |
| 808 } | 805 } |
| 809 | 806 |
| 810 LOperand* value() { return inputs_[0]; } | 807 LOperand* value() { return inputs_[0]; } |
| 811 | 808 |
| 812 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") | 809 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") |
| 813 }; | 810 }; |
| 814 | 811 |
| 815 | 812 |
| 813 class LMathClz32 V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 814 public: |
| 815 explicit LMathClz32(LOperand* value) { |
| 816 inputs_[0] = value; |
| 817 } |
| 818 |
| 819 LOperand* value() { return inputs_[0]; } |
| 820 |
| 821 DECLARE_CONCRETE_INSTRUCTION(MathClz32, "math-clz32") |
| 822 }; |
| 823 |
| 824 |
| 816 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 3> { | 825 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 3> { |
| 817 public: | 826 public: |
| 818 LMathExp(LOperand* value, | 827 LMathExp(LOperand* value, |
| 819 LOperand* double_temp, | 828 LOperand* double_temp, |
| 820 LOperand* temp1, | 829 LOperand* temp1, |
| 821 LOperand* temp2) { | 830 LOperand* temp2) { |
| 822 inputs_[0] = value; | 831 inputs_[0] = value; |
| 823 temps_[0] = temp1; | 832 temps_[0] = temp1; |
| 824 temps_[1] = temp2; | 833 temps_[1] = temp2; |
| 825 temps_[2] = double_temp; | 834 temps_[2] = double_temp; |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 explicit LMapEnumLength(LOperand* value) { | 1299 explicit LMapEnumLength(LOperand* value) { |
| 1291 inputs_[0] = value; | 1300 inputs_[0] = value; |
| 1292 } | 1301 } |
| 1293 | 1302 |
| 1294 LOperand* value() { return inputs_[0]; } | 1303 LOperand* value() { return inputs_[0]; } |
| 1295 | 1304 |
| 1296 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") | 1305 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") |
| 1297 }; | 1306 }; |
| 1298 | 1307 |
| 1299 | 1308 |
| 1300 class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1301 public: | |
| 1302 explicit LElementsKind(LOperand* value) { | |
| 1303 inputs_[0] = value; | |
| 1304 } | |
| 1305 | |
| 1306 LOperand* value() { return inputs_[0]; } | |
| 1307 | |
| 1308 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") | |
| 1309 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) | |
| 1310 }; | |
| 1311 | |
| 1312 | |
| 1313 class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 1> { | |
| 1314 public: | |
| 1315 LValueOf(LOperand* value, LOperand* temp) { | |
| 1316 inputs_[0] = value; | |
| 1317 temps_[0] = temp; | |
| 1318 } | |
| 1319 | |
| 1320 LOperand* value() { return inputs_[0]; } | |
| 1321 LOperand* temp() { return temps_[0]; } | |
| 1322 | |
| 1323 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | |
| 1324 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | |
| 1325 }; | |
| 1326 | |
| 1327 | |
| 1328 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 1309 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
| 1329 public: | 1310 public: |
| 1330 LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) { | 1311 LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) { |
| 1331 inputs_[0] = date; | 1312 inputs_[0] = date; |
| 1332 temps_[0] = temp; | 1313 temps_[0] = temp; |
| 1333 } | 1314 } |
| 1334 | 1315 |
| 1335 LOperand* date() { return inputs_[0]; } | 1316 LOperand* date() { return inputs_[0]; } |
| 1336 LOperand* temp() { return temps_[0]; } | 1317 LOperand* temp() { return temps_[0]; } |
| 1337 Smi* index() const { return index_; } | 1318 Smi* index() const { return index_; } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 | 1354 |
| 1374 LOperand* string() { return inputs_[1]; } | 1355 LOperand* string() { return inputs_[1]; } |
| 1375 LOperand* index() { return inputs_[2]; } | 1356 LOperand* index() { return inputs_[2]; } |
| 1376 LOperand* value() { return inputs_[3]; } | 1357 LOperand* value() { return inputs_[3]; } |
| 1377 | 1358 |
| 1378 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") | 1359 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") |
| 1379 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) | 1360 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) |
| 1380 }; | 1361 }; |
| 1381 | 1362 |
| 1382 | 1363 |
| 1383 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { | |
| 1384 public: | |
| 1385 LThrow(LOperand* context, LOperand* value) { | |
| 1386 inputs_[0] = context; | |
| 1387 inputs_[1] = value; | |
| 1388 } | |
| 1389 | |
| 1390 LOperand* context() { return inputs_[0]; } | |
| 1391 LOperand* value() { return inputs_[1]; } | |
| 1392 | |
| 1393 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | |
| 1394 }; | |
| 1395 | |
| 1396 | |
| 1397 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1364 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1398 public: | 1365 public: |
| 1399 LAddI(LOperand* left, LOperand* right) { | 1366 LAddI(LOperand* left, LOperand* right) { |
| 1400 inputs_[0] = left; | 1367 inputs_[0] = left; |
| 1401 inputs_[1] = right; | 1368 inputs_[1] = right; |
| 1402 } | 1369 } |
| 1403 | 1370 |
| 1404 LOperand* left() { return inputs_[0]; } | 1371 LOperand* left() { return inputs_[0]; } |
| 1405 LOperand* right() { return inputs_[1]; } | 1372 LOperand* right() { return inputs_[1]; } |
| 1406 | 1373 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 | 1525 |
| 1559 class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1526 class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1560 public: | 1527 public: |
| 1561 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") | 1528 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") |
| 1562 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) | 1529 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) |
| 1563 | 1530 |
| 1564 Heap::RootListIndex index() const { return hydrogen()->index(); } | 1531 Heap::RootListIndex index() const { return hydrogen()->index(); } |
| 1565 }; | 1532 }; |
| 1566 | 1533 |
| 1567 | 1534 |
| 1568 class LLoadExternalArrayPointer V8_FINAL | |
| 1569 : public LTemplateInstruction<1, 1, 0> { | |
| 1570 public: | |
| 1571 explicit LLoadExternalArrayPointer(LOperand* object) { | |
| 1572 inputs_[0] = object; | |
| 1573 } | |
| 1574 | |
| 1575 LOperand* object() { return inputs_[0]; } | |
| 1576 | |
| 1577 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, | |
| 1578 "load-external-array-pointer") | |
| 1579 }; | |
| 1580 | |
| 1581 | |
| 1582 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1535 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1583 public: | 1536 public: |
| 1584 LLoadKeyed(LOperand* elements, LOperand* key) { | 1537 LLoadKeyed(LOperand* elements, LOperand* key) { |
| 1585 inputs_[0] = elements; | 1538 inputs_[0] = elements; |
| 1586 inputs_[1] = key; | 1539 inputs_[1] = key; |
| 1587 } | 1540 } |
| 1588 | 1541 |
| 1589 LOperand* elements() { return inputs_[0]; } | 1542 LOperand* elements() { return inputs_[0]; } |
| 1590 LOperand* key() { return inputs_[1]; } | 1543 LOperand* key() { return inputs_[1]; } |
| 1591 ElementsKind elements_kind() const { | 1544 ElementsKind elements_kind() const { |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1766 }; | 1719 }; |
| 1767 | 1720 |
| 1768 | 1721 |
| 1769 class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1722 class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1770 public: | 1723 public: |
| 1771 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1724 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
| 1772 DECLARE_HYDROGEN_ACCESSOR(Context) | 1725 DECLARE_HYDROGEN_ACCESSOR(Context) |
| 1773 }; | 1726 }; |
| 1774 | 1727 |
| 1775 | 1728 |
| 1776 class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1777 public: | |
| 1778 explicit LOuterContext(LOperand* context) { | |
| 1779 inputs_[0] = context; | |
| 1780 } | |
| 1781 | |
| 1782 LOperand* context() { return inputs_[0]; } | |
| 1783 | |
| 1784 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") | |
| 1785 }; | |
| 1786 | |
| 1787 | |
| 1788 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 1729 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
| 1789 public: | 1730 public: |
| 1790 explicit LDeclareGlobals(LOperand* context) { | 1731 explicit LDeclareGlobals(LOperand* context) { |
| 1791 inputs_[0] = context; | 1732 inputs_[0] = context; |
| 1792 } | 1733 } |
| 1793 | 1734 |
| 1794 LOperand* context() { return inputs_[0]; } | 1735 LOperand* context() { return inputs_[0]; } |
| 1795 | 1736 |
| 1796 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") | 1737 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") |
| 1797 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) | 1738 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) |
| 1798 }; | 1739 }; |
| 1799 | 1740 |
| 1800 | 1741 |
| 1801 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1802 public: | |
| 1803 explicit LGlobalObject(LOperand* context) { | |
| 1804 inputs_[0] = context; | |
| 1805 } | |
| 1806 | |
| 1807 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") | |
| 1808 | |
| 1809 LOperand* context() { return inputs_[0]; } | |
| 1810 }; | |
| 1811 | |
| 1812 | |
| 1813 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1814 public: | |
| 1815 explicit LGlobalReceiver(LOperand* global_object) { | |
| 1816 inputs_[0] = global_object; | |
| 1817 } | |
| 1818 | |
| 1819 LOperand* global_object() { return inputs_[0]; } | |
| 1820 | |
| 1821 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") | |
| 1822 }; | |
| 1823 | |
| 1824 | |
| 1825 class LCallJSFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1742 class LCallJSFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1826 public: | 1743 public: |
| 1827 explicit LCallJSFunction(LOperand* function) { | 1744 explicit LCallJSFunction(LOperand* function) { |
| 1828 inputs_[0] = function; | 1745 inputs_[0] = function; |
| 1829 } | 1746 } |
| 1830 | 1747 |
| 1831 LOperand* function() { return inputs_[0]; } | 1748 LOperand* function() { return inputs_[0]; } |
| 1832 | 1749 |
| 1833 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") | 1750 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") |
| 1834 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) | 1751 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2669 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2586 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2670 : LChunkBuilderBase(graph->zone()), | 2587 : LChunkBuilderBase(graph->zone()), |
| 2671 chunk_(NULL), | 2588 chunk_(NULL), |
| 2672 info_(info), | 2589 info_(info), |
| 2673 graph_(graph), | 2590 graph_(graph), |
| 2674 status_(UNUSED), | 2591 status_(UNUSED), |
| 2675 current_instruction_(NULL), | 2592 current_instruction_(NULL), |
| 2676 current_block_(NULL), | 2593 current_block_(NULL), |
| 2677 next_block_(NULL), | 2594 next_block_(NULL), |
| 2678 allocator_(allocator), | 2595 allocator_(allocator), |
| 2679 position_(RelocInfo::kNoPosition), | |
| 2680 instruction_pending_deoptimization_environment_(NULL), | 2596 instruction_pending_deoptimization_environment_(NULL), |
| 2681 pending_deoptimization_ast_id_(BailoutId::None()) { } | 2597 pending_deoptimization_ast_id_(BailoutId::None()) { } |
| 2682 | 2598 |
| 2683 // Build the sequence for the graph. | 2599 // Build the sequence for the graph. |
| 2684 LPlatformChunk* Build(); | 2600 LPlatformChunk* Build(); |
| 2685 | 2601 |
| 2686 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); | 2602 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
| 2687 | 2603 |
| 2688 // Declare methods that deal with the individual node types. | 2604 // Declare methods that deal with the individual node types. |
| 2689 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2605 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2690 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2606 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2691 #undef DECLARE_DO | 2607 #undef DECLARE_DO |
| 2692 | 2608 |
| 2693 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); | 2609 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); |
| 2694 LInstruction* DoMultiplySub(HValue* minuend, HMul* mul); | 2610 LInstruction* DoMultiplySub(HValue* minuend, HMul* mul); |
| 2695 LInstruction* DoRSub(HSub* instr); | 2611 LInstruction* DoRSub(HSub* instr); |
| 2696 | 2612 |
| 2697 static bool HasMagicNumberForDivisor(int32_t divisor); | 2613 static bool HasMagicNumberForDivisor(int32_t divisor); |
| 2698 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); | |
| 2699 | 2614 |
| 2700 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2615 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
| 2701 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2616 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
| 2702 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2617 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
| 2703 LInstruction* DoMathLog(HUnaryMathOperation* instr); | 2618 LInstruction* DoMathLog(HUnaryMathOperation* instr); |
| 2704 LInstruction* DoMathExp(HUnaryMathOperation* instr); | 2619 LInstruction* DoMathExp(HUnaryMathOperation* instr); |
| 2705 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); | 2620 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); |
| 2706 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); | 2621 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); |
| 2622 LInstruction* DoMathClz32(HUnaryMathOperation* instr); |
| 2707 | 2623 |
| 2708 private: | 2624 private: |
| 2709 enum Status { | 2625 enum Status { |
| 2710 UNUSED, | 2626 UNUSED, |
| 2711 BUILDING, | 2627 BUILDING, |
| 2712 DONE, | 2628 DONE, |
| 2713 ABORTED | 2629 ABORTED |
| 2714 }; | 2630 }; |
| 2715 | 2631 |
| 2716 LPlatformChunk* chunk() const { return chunk_; } | 2632 LPlatformChunk* chunk() const { return chunk_; } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2807 HBinaryOperation* instr); | 2723 HBinaryOperation* instr); |
| 2808 | 2724 |
| 2809 LPlatformChunk* chunk_; | 2725 LPlatformChunk* chunk_; |
| 2810 CompilationInfo* info_; | 2726 CompilationInfo* info_; |
| 2811 HGraph* const graph_; | 2727 HGraph* const graph_; |
| 2812 Status status_; | 2728 Status status_; |
| 2813 HInstruction* current_instruction_; | 2729 HInstruction* current_instruction_; |
| 2814 HBasicBlock* current_block_; | 2730 HBasicBlock* current_block_; |
| 2815 HBasicBlock* next_block_; | 2731 HBasicBlock* next_block_; |
| 2816 LAllocator* allocator_; | 2732 LAllocator* allocator_; |
| 2817 int position_; | |
| 2818 LInstruction* instruction_pending_deoptimization_environment_; | 2733 LInstruction* instruction_pending_deoptimization_environment_; |
| 2819 BailoutId pending_deoptimization_ast_id_; | 2734 BailoutId pending_deoptimization_ast_id_; |
| 2820 | 2735 |
| 2821 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2736 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2822 }; | 2737 }; |
| 2823 | 2738 |
| 2824 #undef DECLARE_HYDROGEN_ACCESSOR | 2739 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2825 #undef DECLARE_CONCRETE_INSTRUCTION | 2740 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2826 | 2741 |
| 2827 } } // namespace v8::internal | 2742 } } // namespace v8::internal |
| 2828 | 2743 |
| 2829 #endif // V8_ARM_LITHIUM_ARM_H_ | 2744 #endif // V8_ARM_LITHIUM_ARM_H_ |
| OLD | NEW |