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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 V(LoadContextSlot) \ | 136 V(LoadContextSlot) \ |
137 V(LoadExternalArrayPointer) \ | 137 V(LoadExternalArrayPointer) \ |
138 V(LoadFieldByIndex) \ | 138 V(LoadFieldByIndex) \ |
139 V(LoadFunctionPrototype) \ | 139 V(LoadFunctionPrototype) \ |
140 V(LoadGlobalCell) \ | 140 V(LoadGlobalCell) \ |
141 V(LoadGlobalGeneric) \ | 141 V(LoadGlobalGeneric) \ |
142 V(LoadKeyed) \ | 142 V(LoadKeyed) \ |
143 V(LoadKeyedGeneric) \ | 143 V(LoadKeyedGeneric) \ |
144 V(LoadNamedField) \ | 144 V(LoadNamedField) \ |
145 V(LoadNamedGeneric) \ | 145 V(LoadNamedGeneric) \ |
| 146 V(LoadRoot) \ |
146 V(MapEnumLength) \ | 147 V(MapEnumLength) \ |
147 V(MathFloorOfDiv) \ | 148 V(MathFloorOfDiv) \ |
148 V(MathMinMax) \ | 149 V(MathMinMax) \ |
149 V(Mod) \ | 150 V(Mod) \ |
150 V(Mul) \ | 151 V(Mul) \ |
151 V(OsrEntry) \ | 152 V(OsrEntry) \ |
152 V(OuterContext) \ | 153 V(OuterContext) \ |
153 V(Parameter) \ | 154 V(Parameter) \ |
154 V(Power) \ | 155 V(Power) \ |
155 V(PushArgument) \ | 156 V(PushArgument) \ |
(...skipping 2352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2508 SetFlag(kUseGVN); | 2509 SetFlag(kUseGVN); |
2509 SetFlag(kAllowUndefinedAsNaN); | 2510 SetFlag(kAllowUndefinedAsNaN); |
2510 } | 2511 } |
2511 | 2512 |
2512 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 2513 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
2513 | 2514 |
2514 BuiltinFunctionId op_; | 2515 BuiltinFunctionId op_; |
2515 }; | 2516 }; |
2516 | 2517 |
2517 | 2518 |
| 2519 class HLoadRoot V8_FINAL : public HTemplateInstruction<0> { |
| 2520 public: |
| 2521 DECLARE_INSTRUCTION_FACTORY_P1(HLoadRoot, Heap::RootListIndex); |
| 2522 DECLARE_INSTRUCTION_FACTORY_P2(HLoadRoot, Heap::RootListIndex, HType); |
| 2523 |
| 2524 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| 2525 return Representation::None(); |
| 2526 } |
| 2527 |
| 2528 Heap::RootListIndex index() const { return index_; } |
| 2529 |
| 2530 DECLARE_CONCRETE_INSTRUCTION(LoadRoot) |
| 2531 |
| 2532 protected: |
| 2533 virtual bool DataEquals(HValue* other) V8_OVERRIDE { |
| 2534 HLoadRoot* b = HLoadRoot::cast(other); |
| 2535 return index_ == b->index_; |
| 2536 } |
| 2537 |
| 2538 private: |
| 2539 HLoadRoot(Heap::RootListIndex index, HType type = HType::Tagged()) |
| 2540 : HTemplateInstruction<0>(type), index_(index) { |
| 2541 SetFlag(kUseGVN); |
| 2542 // TODO(bmeurer): We'll need kDependsOnRoots once we add the |
| 2543 // corresponding HStoreRoot instruction. |
| 2544 SetGVNFlag(kDependsOnCalls); |
| 2545 } |
| 2546 |
| 2547 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 2548 |
| 2549 const Heap::RootListIndex index_; |
| 2550 }; |
| 2551 |
| 2552 |
2518 class HLoadExternalArrayPointer V8_FINAL : public HUnaryOperation { | 2553 class HLoadExternalArrayPointer V8_FINAL : public HUnaryOperation { |
2519 public: | 2554 public: |
2520 DECLARE_INSTRUCTION_FACTORY_P1(HLoadExternalArrayPointer, HValue*); | 2555 DECLARE_INSTRUCTION_FACTORY_P1(HLoadExternalArrayPointer, HValue*); |
2521 | 2556 |
2522 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 2557 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
2523 return Representation::Tagged(); | 2558 return Representation::Tagged(); |
2524 } | 2559 } |
2525 | 2560 |
2526 virtual HType CalculateInferredType() V8_OVERRIDE { | 2561 virtual HType CalculateInferredType() V8_OVERRIDE { |
2527 return HType::None(); | 2562 return HType::None(); |
(...skipping 4447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6975 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7010 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
6976 }; | 7011 }; |
6977 | 7012 |
6978 | 7013 |
6979 #undef DECLARE_INSTRUCTION | 7014 #undef DECLARE_INSTRUCTION |
6980 #undef DECLARE_CONCRETE_INSTRUCTION | 7015 #undef DECLARE_CONCRETE_INSTRUCTION |
6981 | 7016 |
6982 } } // namespace v8::internal | 7017 } } // namespace v8::internal |
6983 | 7018 |
6984 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7019 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |