| 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(Goto) \ | 98 V(Goto) \ |
| 100 V(HasCachedArrayIndexAndBranch) \ | 99 V(HasCachedArrayIndexAndBranch) \ |
| 101 V(HasInstanceTypeAndBranch) \ | 100 V(HasInstanceTypeAndBranch) \ |
| 102 V(InnerAllocatedObject) \ | 101 V(InnerAllocatedObject) \ |
| 103 V(InstanceOf) \ | 102 V(InstanceOf) \ |
| 104 V(InstanceOfKnownGlobal) \ | 103 V(InstanceOfKnownGlobal) \ |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 V(StoreKeyedGeneric) \ | 157 V(StoreKeyedGeneric) \ |
| 159 V(StoreNamedField) \ | 158 V(StoreNamedField) \ |
| 160 V(StoreNamedGeneric) \ | 159 V(StoreNamedGeneric) \ |
| 161 V(StringAdd) \ | 160 V(StringAdd) \ |
| 162 V(StringCharCodeAt) \ | 161 V(StringCharCodeAt) \ |
| 163 V(StringCharFromCode) \ | 162 V(StringCharFromCode) \ |
| 164 V(StringCompareAndBranch) \ | 163 V(StringCompareAndBranch) \ |
| 165 V(SubI) \ | 164 V(SubI) \ |
| 166 V(TaggedToI) \ | 165 V(TaggedToI) \ |
| 167 V(ThisFunction) \ | 166 V(ThisFunction) \ |
| 168 V(Throw) \ | |
| 169 V(ToFastProperties) \ | 167 V(ToFastProperties) \ |
| 170 V(TransitionElementsKind) \ | 168 V(TransitionElementsKind) \ |
| 171 V(TrapAllocationMemento) \ | 169 V(TrapAllocationMemento) \ |
| 172 V(Typeof) \ | 170 V(Typeof) \ |
| 173 V(TypeofIsAndBranch) \ | 171 V(TypeofIsAndBranch) \ |
| 174 V(Uint32ToDouble) \ | 172 V(Uint32ToDouble) \ |
| 175 V(Uint32ToSmi) \ | 173 V(Uint32ToSmi) \ |
| 176 V(UnknownOSRValue) \ | 174 V(UnknownOSRValue) \ |
| 177 V(ValueOf) \ | |
| 178 V(WrapReceiver) | 175 V(WrapReceiver) |
| 179 | 176 |
| 180 | 177 |
| 181 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 178 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 182 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 179 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
| 183 return LInstruction::k##type; \ | 180 return LInstruction::k##type; \ |
| 184 } \ | 181 } \ |
| 185 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 182 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
| 186 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 183 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
| 187 return mnemonic; \ | 184 return mnemonic; \ |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 public: | 545 public: |
| 549 LWrapReceiver(LOperand* receiver, LOperand* function) { | 546 LWrapReceiver(LOperand* receiver, LOperand* function) { |
| 550 inputs_[0] = receiver; | 547 inputs_[0] = receiver; |
| 551 inputs_[1] = function; | 548 inputs_[1] = function; |
| 552 } | 549 } |
| 553 | 550 |
| 554 LOperand* receiver() { return inputs_[0]; } | 551 LOperand* receiver() { return inputs_[0]; } |
| 555 LOperand* function() { return inputs_[1]; } | 552 LOperand* function() { return inputs_[1]; } |
| 556 | 553 |
| 557 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") | 554 DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver") |
| 555 DECLARE_HYDROGEN_ACCESSOR(WrapReceiver) |
| 558 }; | 556 }; |
| 559 | 557 |
| 560 | 558 |
| 561 class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { | 559 class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { |
| 562 public: | 560 public: |
| 563 LApplyArguments(LOperand* function, | 561 LApplyArguments(LOperand* function, |
| 564 LOperand* receiver, | 562 LOperand* receiver, |
| 565 LOperand* length, | 563 LOperand* length, |
| 566 LOperand* elements) { | 564 LOperand* elements) { |
| 567 inputs_[0] = function; | 565 inputs_[0] = function; |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 explicit LMapEnumLength(LOperand* value) { | 1227 explicit LMapEnumLength(LOperand* value) { |
| 1230 inputs_[0] = value; | 1228 inputs_[0] = value; |
| 1231 } | 1229 } |
| 1232 | 1230 |
| 1233 LOperand* value() { return inputs_[0]; } | 1231 LOperand* value() { return inputs_[0]; } |
| 1234 | 1232 |
| 1235 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") | 1233 DECLARE_CONCRETE_INSTRUCTION(MapEnumLength, "map-enum-length") |
| 1236 }; | 1234 }; |
| 1237 | 1235 |
| 1238 | 1236 |
| 1239 class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1240 public: | |
| 1241 explicit LElementsKind(LOperand* value) { | |
| 1242 inputs_[0] = value; | |
| 1243 } | |
| 1244 | |
| 1245 LOperand* value() { return inputs_[0]; } | |
| 1246 | |
| 1247 DECLARE_CONCRETE_INSTRUCTION(ElementsKind, "elements-kind") | |
| 1248 DECLARE_HYDROGEN_ACCESSOR(ElementsKind) | |
| 1249 }; | |
| 1250 | |
| 1251 | |
| 1252 class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 0> { | |
| 1253 public: | |
| 1254 explicit LValueOf(LOperand* value) { | |
| 1255 inputs_[0] = value; | |
| 1256 } | |
| 1257 | |
| 1258 LOperand* value() { return inputs_[0]; } | |
| 1259 | |
| 1260 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | |
| 1261 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | |
| 1262 }; | |
| 1263 | |
| 1264 | |
| 1265 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1237 class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| 1266 public: | 1238 public: |
| 1267 LDateField(LOperand* date, Smi* index) : index_(index) { | 1239 LDateField(LOperand* date, Smi* index) : index_(index) { |
| 1268 inputs_[0] = date; | 1240 inputs_[0] = date; |
| 1269 } | 1241 } |
| 1270 | 1242 |
| 1271 LOperand* date() { return inputs_[0]; } | 1243 LOperand* date() { return inputs_[0]; } |
| 1272 Smi* index() const { return index_; } | 1244 Smi* index() const { return index_; } |
| 1273 | 1245 |
| 1274 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") | 1246 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 | 1280 |
| 1309 LOperand* string() { return inputs_[1]; } | 1281 LOperand* string() { return inputs_[1]; } |
| 1310 LOperand* index() { return inputs_[2]; } | 1282 LOperand* index() { return inputs_[2]; } |
| 1311 LOperand* value() { return inputs_[3]; } | 1283 LOperand* value() { return inputs_[3]; } |
| 1312 | 1284 |
| 1313 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") | 1285 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") |
| 1314 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) | 1286 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) |
| 1315 }; | 1287 }; |
| 1316 | 1288 |
| 1317 | 1289 |
| 1318 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { | |
| 1319 public: | |
| 1320 explicit LThrow(LOperand* context, LOperand* value) { | |
| 1321 inputs_[0] = context; | |
| 1322 inputs_[1] = value; | |
| 1323 } | |
| 1324 | |
| 1325 LOperand* context() { return inputs_[0]; } | |
| 1326 LOperand* value() { return inputs_[1]; } | |
| 1327 | |
| 1328 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | |
| 1329 }; | |
| 1330 | |
| 1331 | |
| 1332 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { | 1290 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { |
| 1333 public: | 1291 public: |
| 1334 LAddI(LOperand* left, LOperand* right) { | 1292 LAddI(LOperand* left, LOperand* right) { |
| 1335 inputs_[0] = left; | 1293 inputs_[0] = left; |
| 1336 inputs_[1] = right; | 1294 inputs_[1] = right; |
| 1337 } | 1295 } |
| 1338 | 1296 |
| 1339 LOperand* left() { return inputs_[0]; } | 1297 LOperand* left() { return inputs_[0]; } |
| 1340 LOperand* right() { return inputs_[1]; } | 1298 LOperand* right() { return inputs_[1]; } |
| 1341 | 1299 |
| (...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2693 | 2651 |
| 2694 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2652 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2695 }; | 2653 }; |
| 2696 | 2654 |
| 2697 #undef DECLARE_HYDROGEN_ACCESSOR | 2655 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2698 #undef DECLARE_CONCRETE_INSTRUCTION | 2656 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2699 | 2657 |
| 2700 } } // namespace v8::int | 2658 } } // namespace v8::int |
| 2701 | 2659 |
| 2702 #endif // V8_X64_LITHIUM_X64_H_ | 2660 #endif // V8_X64_LITHIUM_X64_H_ |
| OLD | NEW |