| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 V(DateField) \ | 86 V(DateField) \ |
| 87 V(DebugBreak) \ | 87 V(DebugBreak) \ |
| 88 V(DeclareGlobals) \ | 88 V(DeclareGlobals) \ |
| 89 V(Deoptimize) \ | 89 V(Deoptimize) \ |
| 90 V(DivI) \ | 90 V(DivI) \ |
| 91 V(DoubleToI) \ | 91 V(DoubleToI) \ |
| 92 V(DoubleToSmi) \ | 92 V(DoubleToSmi) \ |
| 93 V(Drop) \ | 93 V(Drop) \ |
| 94 V(Dummy) \ | 94 V(Dummy) \ |
| 95 V(DummyUse) \ | 95 V(DummyUse) \ |
| 96 V(ElementsKind) \ | |
| 97 V(ForInCacheArray) \ | 96 V(ForInCacheArray) \ |
| 98 V(ForInPrepareMap) \ | 97 V(ForInPrepareMap) \ |
| 99 V(FunctionLiteral) \ | 98 V(FunctionLiteral) \ |
| 100 V(GetCachedArrayIndex) \ | 99 V(GetCachedArrayIndex) \ |
| 101 V(GlobalObject) \ | |
| 102 V(GlobalReceiver) \ | |
| 103 V(Goto) \ | 100 V(Goto) \ |
| 104 V(HasCachedArrayIndexAndBranch) \ | 101 V(HasCachedArrayIndexAndBranch) \ |
| 105 V(HasInstanceTypeAndBranch) \ | 102 V(HasInstanceTypeAndBranch) \ |
| 106 V(InnerAllocatedObject) \ | 103 V(InnerAllocatedObject) \ |
| 107 V(InstanceOf) \ | 104 V(InstanceOf) \ |
| 108 V(InstanceOfKnownGlobal) \ | 105 V(InstanceOfKnownGlobal) \ |
| 109 V(InstructionGap) \ | 106 V(InstructionGap) \ |
| 110 V(Integer32ToDouble) \ | 107 V(Integer32ToDouble) \ |
| 111 V(Integer32ToSmi) \ | 108 V(Integer32ToSmi) \ |
| 112 V(InvokeFunction) \ | 109 V(InvokeFunction) \ |
| 113 V(IsConstructCallAndBranch) \ | 110 V(IsConstructCallAndBranch) \ |
| 114 V(IsObjectAndBranch) \ | 111 V(IsObjectAndBranch) \ |
| 115 V(IsStringAndBranch) \ | 112 V(IsStringAndBranch) \ |
| 116 V(IsSmiAndBranch) \ | 113 V(IsSmiAndBranch) \ |
| 117 V(IsUndetectableAndBranch) \ | 114 V(IsUndetectableAndBranch) \ |
| 118 V(Label) \ | 115 V(Label) \ |
| 119 V(LazyBailout) \ | 116 V(LazyBailout) \ |
| 120 V(LoadContextSlot) \ | 117 V(LoadContextSlot) \ |
| 121 V(LoadExternalArrayPointer) \ | |
| 122 V(LoadFieldByIndex) \ | 118 V(LoadFieldByIndex) \ |
| 123 V(LoadFunctionPrototype) \ | 119 V(LoadFunctionPrototype) \ |
| 124 V(LoadGlobalCell) \ | 120 V(LoadGlobalCell) \ |
| 125 V(LoadGlobalGeneric) \ | 121 V(LoadGlobalGeneric) \ |
| 126 V(LoadKeyed) \ | 122 V(LoadKeyed) \ |
| 127 V(LoadKeyedGeneric) \ | 123 V(LoadKeyedGeneric) \ |
| 128 V(LoadNamedField) \ | 124 V(LoadNamedField) \ |
| 129 V(LoadNamedGeneric) \ | 125 V(LoadNamedGeneric) \ |
| 130 V(LoadRoot) \ | 126 V(LoadRoot) \ |
| 131 V(MapEnumLength) \ | 127 V(MapEnumLength) \ |
| 132 V(MathAbs) \ | 128 V(MathAbs) \ |
| 129 V(MathClz32) \ |
| 133 V(MathExp) \ | 130 V(MathExp) \ |
| 134 V(MathFloor) \ | 131 V(MathFloor) \ |
| 135 V(MathFloorOfDiv) \ | 132 V(MathFloorOfDiv) \ |
| 136 V(MathLog) \ | 133 V(MathLog) \ |
| 137 V(MathMinMax) \ | 134 V(MathMinMax) \ |
| 138 V(MathPowHalf) \ | 135 V(MathPowHalf) \ |
| 139 V(MathRound) \ | 136 V(MathRound) \ |
| 140 V(MathSqrt) \ | 137 V(MathSqrt) \ |
| 141 V(ModI) \ | 138 V(ModI) \ |
| 142 V(MulI) \ | 139 V(MulI) \ |
| 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(TaggedToI) \ | 168 V(TaggedToI) \ |
| 173 V(ThisFunction) \ | 169 V(ThisFunction) \ |
| 174 V(Throw) \ | |
| 175 V(ToFastProperties) \ | 170 V(ToFastProperties) \ |
| 176 V(TransitionElementsKind) \ | 171 V(TransitionElementsKind) \ |
| 177 V(TrapAllocationMemento) \ | 172 V(TrapAllocationMemento) \ |
| 178 V(Typeof) \ | 173 V(Typeof) \ |
| 179 V(TypeofIsAndBranch) \ | 174 V(TypeofIsAndBranch) \ |
| 180 V(Uint32ToDouble) \ | 175 V(Uint32ToDouble) \ |
| 181 V(Uint32ToSmi) \ | 176 V(Uint32ToSmi) \ |
| 182 V(UnknownOSRValue) \ | 177 V(UnknownOSRValue) \ |
| 183 V(ValueOf) \ | |
| 184 V(WrapReceiver) | 178 V(WrapReceiver) |
| 185 | 179 |
| 186 | 180 |
| 187 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 181 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 188 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 182 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
| 189 return LInstruction::k##type; \ | 183 return LInstruction::k##type; \ |
| 190 } \ | 184 } \ |
| 191 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 185 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
| 192 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 186 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
| 193 return mnemonic; \ | 187 return mnemonic; \ |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 inputs_[0] = receiver; | 559 inputs_[0] = receiver; |
| 566 inputs_[1] = function; | 560 inputs_[1] = function; |
| 567 temps_[0] = temp; | 561 temps_[0] = temp; |
| 568 } | 562 } |
| 569 | 563 |
| 570 LOperand* receiver() { return inputs_[0]; } | 564 LOperand* receiver() { return inputs_[0]; } |
| 571 LOperand* function() { return inputs_[1]; } | 565 LOperand* function() { return inputs_[1]; } |
| 572 LOperand* temp() { return temps_[0]; } | 566 LOperand* temp() { return temps_[0]; } |
| 573 | 567 |
| 574 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") | 568 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 569 DECLARE_HYDROGEN_ACCESSOR(WrapReceiver) |
| 575 }; | 570 }; |
| 576 | 571 |
| 577 | 572 |
| 578 class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { | 573 class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { |
| 579 public: | 574 public: |
| 580 LApplyArguments(LOperand* function, | 575 LApplyArguments(LOperand* function, |
| 581 LOperand* receiver, | 576 LOperand* receiver, |
| 582 LOperand* length, | 577 LOperand* length, |
| 583 LOperand* elements) { | 578 LOperand* elements) { |
| 584 inputs_[0] = function; | 579 inputs_[0] = function; |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 explicit LMathLog(LOperand* value) { | 776 explicit LMathLog(LOperand* value) { |
| 782 inputs_[0] = value; | 777 inputs_[0] = value; |
| 783 } | 778 } |
| 784 | 779 |
| 785 LOperand* value() { return inputs_[0]; } | 780 LOperand* value() { return inputs_[0]; } |
| 786 | 781 |
| 787 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") | 782 DECLARE_CONCRETE_INSTRUCTION(MathLog, "math-log") |
| 788 }; | 783 }; |
| 789 | 784 |
| 790 | 785 |
| 786 class LMathClz32 V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 787 public: |
| 788 explicit LMathClz32(LOperand* value) { |
| 789 inputs_[0] = value; |
| 790 } |
| 791 |
| 792 LOperand* value() { return inputs_[0]; } |
| 793 |
| 794 DECLARE_CONCRETE_INSTRUCTION(MathClz32, "math-clz32") |
| 795 }; |
| 796 |
| 797 |
| 791 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> { | 798 class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
| 792 public: | 799 public: |
| 793 LMathExp(LOperand* value, | 800 LMathExp(LOperand* value, |
| 794 LOperand* temp1, | 801 LOperand* temp1, |
| 795 LOperand* temp2) { | 802 LOperand* temp2) { |
| 796 inputs_[0] = value; | 803 inputs_[0] = value; |
| 797 temps_[0] = temp1; | 804 temps_[0] = temp1; |
| 798 temps_[1] = temp2; | 805 temps_[1] = temp2; |
| 799 ExternalReference::InitializeMathExpData(); | 806 ExternalReference::InitializeMathExpData(); |
| 800 } | 807 } |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 explicit LMapEnumLength(LOperand* value) { | 1272 explicit LMapEnumLength(LOperand* value) { |
| 1266 inputs_[0] = value; | 1273 inputs_[0] = value; |
| 1267 } | 1274 } |
| 1268 | 1275 |
| 1269 LOperand* value() { return inputs_[0]; } | 1276 LOperand* value() { return inputs_[0]; } |
| 1270 | 1277 |
| 1271 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") | 1278 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") |
| 1272 }; | 1279 }; |
| 1273 | 1280 |
| 1274 | 1281 |
| 1275 class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1276 public: | |
| 1277 explicit LElementsKind(LOperand* value) { | |
| 1278 inputs_[0] = value; | |
| 1279 } | |
| 1280 | |
| 1281 LOperand* value() { return inputs_[0]; } | |
| 1282 | |
| 1283 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") | |
| 1284 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) | |
| 1285 }; | |
| 1286 | |
| 1287 | |
| 1288 class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 1> { | |
| 1289 public: | |
| 1290 LValueOf(LOperand* value, LOperand* temp) { | |
| 1291 inputs_[0] = value; | |
| 1292 temps_[0] = temp; | |
| 1293 } | |
| 1294 | |
| 1295 LOperand* value() { return inputs_[0]; } | |
| 1296 LOperand* temp() { return temps_[0]; } | |
| 1297 | |
| 1298 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | |
| 1299 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | |
| 1300 }; | |
| 1301 | |
| 1302 | |
| 1303 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 1> { | 1282 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
| 1304 public: | 1283 public: |
| 1305 LDateField(LOperand* date, LOperand* temp, Smi* index) | 1284 LDateField(LOperand* date, LOperand* temp, Smi* index) |
| 1306 : index_(index) { | 1285 : index_(index) { |
| 1307 inputs_[0] = date; | 1286 inputs_[0] = date; |
| 1308 temps_[0] = temp; | 1287 temps_[0] = temp; |
| 1309 } | 1288 } |
| 1310 | 1289 |
| 1311 LOperand* date() { return inputs_[0]; } | 1290 LOperand* date() { return inputs_[0]; } |
| 1312 LOperand* temp() { return temps_[0]; } | 1291 LOperand* temp() { return temps_[0]; } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 | 1329 |
| 1351 LOperand* string() { return inputs_[1]; } | 1330 LOperand* string() { return inputs_[1]; } |
| 1352 LOperand* index() { return inputs_[2]; } | 1331 LOperand* index() { return inputs_[2]; } |
| 1353 LOperand* value() { return inputs_[3]; } | 1332 LOperand* value() { return inputs_[3]; } |
| 1354 | 1333 |
| 1355 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") | 1334 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") |
| 1356 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) | 1335 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) |
| 1357 }; | 1336 }; |
| 1358 | 1337 |
| 1359 | 1338 |
| 1360 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { | |
| 1361 public: | |
| 1362 LThrow(LOperand* context, LOperand* value) { | |
| 1363 inputs_[0] = context; | |
| 1364 inputs_[1] = value; | |
| 1365 } | |
| 1366 | |
| 1367 LOperand* context() { return inputs_[0]; } | |
| 1368 LOperand* value() { return inputs_[1]; } | |
| 1369 | |
| 1370 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | |
| 1371 }; | |
| 1372 | |
| 1373 | |
| 1374 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1339 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1375 public: | 1340 public: |
| 1376 LAddI(LOperand* left, LOperand* right) { | 1341 LAddI(LOperand* left, LOperand* right) { |
| 1377 inputs_[0] = left; | 1342 inputs_[0] = left; |
| 1378 inputs_[1] = right; | 1343 inputs_[1] = right; |
| 1379 } | 1344 } |
| 1380 | 1345 |
| 1381 LOperand* left() { return inputs_[0]; } | 1346 LOperand* left() { return inputs_[0]; } |
| 1382 LOperand* right() { return inputs_[1]; } | 1347 LOperand* right() { return inputs_[1]; } |
| 1383 | 1348 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1545 | 1510 |
| 1546 class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1511 class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1547 public: | 1512 public: |
| 1548 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") | 1513 DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") |
| 1549 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) | 1514 DECLARE_HYDROGEN_ACCESSOR(LoadRoot) |
| 1550 | 1515 |
| 1551 Heap::RootListIndex index() const { return hydrogen()->index(); } | 1516 Heap::RootListIndex index() const { return hydrogen()->index(); } |
| 1552 }; | 1517 }; |
| 1553 | 1518 |
| 1554 | 1519 |
| 1555 class LLoadExternalArrayPointer V8_FINAL | |
| 1556 : public LTemplateInstruction<1, 1, 0> { | |
| 1557 public: | |
| 1558 explicit LLoadExternalArrayPointer(LOperand* object) { | |
| 1559 inputs_[0] = object; | |
| 1560 } | |
| 1561 | |
| 1562 LOperand* object() { return inputs_[0]; } | |
| 1563 | |
| 1564 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, | |
| 1565 "load-external-array-pointer") | |
| 1566 }; | |
| 1567 | |
| 1568 | |
| 1569 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1520 class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1570 public: | 1521 public: |
| 1571 LLoadKeyed(LOperand* elements, LOperand* key) { | 1522 LLoadKeyed(LOperand* elements, LOperand* key) { |
| 1572 inputs_[0] = elements; | 1523 inputs_[0] = elements; |
| 1573 inputs_[1] = key; | 1524 inputs_[1] = key; |
| 1574 } | 1525 } |
| 1575 LOperand* elements() { return inputs_[0]; } | 1526 LOperand* elements() { return inputs_[0]; } |
| 1576 LOperand* key() { return inputs_[1]; } | 1527 LOperand* key() { return inputs_[1]; } |
| 1577 ElementsKind elements_kind() const { | 1528 ElementsKind elements_kind() const { |
| 1578 return hydrogen()->elements_kind(); | 1529 return hydrogen()->elements_kind(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1598 }; | 1549 }; |
| 1599 | 1550 |
| 1600 | 1551 |
| 1601 inline static bool ExternalArrayOpRequiresTemp( | 1552 inline static bool ExternalArrayOpRequiresTemp( |
| 1602 Representation key_representation, | 1553 Representation key_representation, |
| 1603 ElementsKind elements_kind) { | 1554 ElementsKind elements_kind) { |
| 1604 // Operations that require the key to be divided by two to be converted into | 1555 // Operations that require the key to be divided by two to be converted into |
| 1605 // an index cannot fold the scale operation into a load and need an extra | 1556 // an index cannot fold the scale operation into a load and need an extra |
| 1606 // temp register to do the work. | 1557 // temp register to do the work. |
| 1607 return key_representation.IsSmi() && | 1558 return key_representation.IsSmi() && |
| 1608 (elements_kind == EXTERNAL_BYTE_ELEMENTS || | 1559 (elements_kind == EXTERNAL_INT8_ELEMENTS || |
| 1609 elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS || | 1560 elements_kind == EXTERNAL_UINT8_ELEMENTS || |
| 1610 elements_kind == EXTERNAL_PIXEL_ELEMENTS || | 1561 elements_kind == EXTERNAL_UINT8_CLAMPED_ELEMENTS || |
| 1611 elements_kind == UINT8_ELEMENTS || | 1562 elements_kind == UINT8_ELEMENTS || |
| 1612 elements_kind == INT8_ELEMENTS || | 1563 elements_kind == INT8_ELEMENTS || |
| 1613 elements_kind == UINT8_CLAMPED_ELEMENTS); | 1564 elements_kind == UINT8_CLAMPED_ELEMENTS); |
| 1614 } | 1565 } |
| 1615 | 1566 |
| 1616 | 1567 |
| 1617 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> { | 1568 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> { |
| 1618 public: | 1569 public: |
| 1619 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) { | 1570 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) { |
| 1620 inputs_[0] = context; | 1571 inputs_[0] = context; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 }; | 1722 }; |
| 1772 | 1723 |
| 1773 | 1724 |
| 1774 class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { | 1725 class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
| 1775 public: | 1726 public: |
| 1776 DECLARE_CONCRETE_INSTRUCTION(Context, "context") | 1727 DECLARE_CONCRETE_INSTRUCTION(Context, "context") |
| 1777 DECLARE_HYDROGEN_ACCESSOR(Context) | 1728 DECLARE_HYDROGEN_ACCESSOR(Context) |
| 1778 }; | 1729 }; |
| 1779 | 1730 |
| 1780 | 1731 |
| 1781 class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1782 public: | |
| 1783 explicit LOuterContext(LOperand* context) { | |
| 1784 inputs_[0] = context; | |
| 1785 } | |
| 1786 | |
| 1787 LOperand* context() { return inputs_[0]; } | |
| 1788 | |
| 1789 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") | |
| 1790 }; | |
| 1791 | |
| 1792 | |
| 1793 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { | 1732 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { |
| 1794 public: | 1733 public: |
| 1795 explicit LDeclareGlobals(LOperand* context) { | 1734 explicit LDeclareGlobals(LOperand* context) { |
| 1796 inputs_[0] = context; | 1735 inputs_[0] = context; |
| 1797 } | 1736 } |
| 1798 | 1737 |
| 1799 LOperand* context() { return inputs_[0]; } | 1738 LOperand* context() { return inputs_[0]; } |
| 1800 | 1739 |
| 1801 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") | 1740 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") |
| 1802 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) | 1741 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) |
| 1803 }; | 1742 }; |
| 1804 | 1743 |
| 1805 | 1744 |
| 1806 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1807 public: | |
| 1808 explicit LGlobalObject(LOperand* context) { | |
| 1809 inputs_[0] = context; | |
| 1810 } | |
| 1811 | |
| 1812 LOperand* context() { return inputs_[0]; } | |
| 1813 | |
| 1814 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") | |
| 1815 }; | |
| 1816 | |
| 1817 | |
| 1818 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1819 public: | |
| 1820 explicit LGlobalReceiver(LOperand* global_object) { | |
| 1821 inputs_[0] = global_object; | |
| 1822 } | |
| 1823 | |
| 1824 LOperand* global() { return inputs_[0]; } | |
| 1825 | |
| 1826 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") | |
| 1827 }; | |
| 1828 | |
| 1829 | |
| 1830 class LCallJSFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1745 class LCallJSFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1831 public: | 1746 public: |
| 1832 explicit LCallJSFunction(LOperand* function) { | 1747 explicit LCallJSFunction(LOperand* function) { |
| 1833 inputs_[0] = function; | 1748 inputs_[0] = function; |
| 1834 } | 1749 } |
| 1835 | 1750 |
| 1836 LOperand* function() { return inputs_[0]; } | 1751 LOperand* function() { return inputs_[0]; } |
| 1837 | 1752 |
| 1838 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") | 1753 DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function") |
| 1839 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) | 1754 DECLARE_HYDROGEN_ACCESSOR(CallJSFunction) |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2696 // Build the sequence for the graph. | 2611 // Build the sequence for the graph. |
| 2697 LPlatformChunk* Build(); | 2612 LPlatformChunk* Build(); |
| 2698 | 2613 |
| 2699 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); | 2614 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
| 2700 | 2615 |
| 2701 // Declare methods that deal with the individual node types. | 2616 // Declare methods that deal with the individual node types. |
| 2702 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2617 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
| 2703 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2618 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 2704 #undef DECLARE_DO | 2619 #undef DECLARE_DO |
| 2705 | 2620 |
| 2706 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); | |
| 2707 | |
| 2708 LInstruction* DoMathFloor(HUnaryMathOperation* instr); | 2621 LInstruction* DoMathFloor(HUnaryMathOperation* instr); |
| 2709 LInstruction* DoMathRound(HUnaryMathOperation* instr); | 2622 LInstruction* DoMathRound(HUnaryMathOperation* instr); |
| 2710 LInstruction* DoMathAbs(HUnaryMathOperation* instr); | 2623 LInstruction* DoMathAbs(HUnaryMathOperation* instr); |
| 2711 LInstruction* DoMathLog(HUnaryMathOperation* instr); | 2624 LInstruction* DoMathLog(HUnaryMathOperation* instr); |
| 2712 LInstruction* DoMathExp(HUnaryMathOperation* instr); | 2625 LInstruction* DoMathExp(HUnaryMathOperation* instr); |
| 2713 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); | 2626 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); |
| 2714 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); | 2627 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); |
| 2628 LInstruction* DoMathClz32(HUnaryMathOperation* instr); |
| 2715 | 2629 |
| 2716 private: | 2630 private: |
| 2717 enum Status { | 2631 enum Status { |
| 2718 UNUSED, | 2632 UNUSED, |
| 2719 BUILDING, | 2633 BUILDING, |
| 2720 DONE, | 2634 DONE, |
| 2721 ABORTED | 2635 ABORTED |
| 2722 }; | 2636 }; |
| 2723 | 2637 |
| 2724 LPlatformChunk* chunk() const { return chunk_; } | 2638 LPlatformChunk* chunk() const { return chunk_; } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2841 | 2755 |
| 2842 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2756 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2843 }; | 2757 }; |
| 2844 | 2758 |
| 2845 #undef DECLARE_HYDROGEN_ACCESSOR | 2759 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2846 #undef DECLARE_CONCRETE_INSTRUCTION | 2760 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2847 | 2761 |
| 2848 } } // namespace v8::internal | 2762 } } // namespace v8::internal |
| 2849 | 2763 |
| 2850 #endif // V8_IA32_LITHIUM_IA32_H_ | 2764 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |