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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class HBasicBlock; | 46 class HBasicBlock; |
47 class HEnvironment; | 47 class HEnvironment; |
48 class HInstruction; | 48 class HInstruction; |
49 class HLoopInformation; | 49 class HLoopInformation; |
50 class HValue; | 50 class HValue; |
51 class LInstruction; | 51 class LInstruction; |
52 class LChunkBuilder; | 52 class LChunkBuilder; |
53 | 53 |
54 | 54 |
55 #define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \ | 55 #define HYDROGEN_ABSTRACT_INSTRUCTION_LIST(V) \ |
| 56 V(BinaryOperation) \ |
56 V(BitwiseBinaryOperation) \ | 57 V(BitwiseBinaryOperation) \ |
57 V(ControlInstruction) \ | 58 V(ControlInstruction) \ |
58 V(Instruction) \ | 59 V(Instruction) \ |
59 | 60 |
60 | 61 |
61 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ | 62 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ |
62 V(AbnormalExit) \ | 63 V(AbnormalExit) \ |
63 V(AccessArgumentsAt) \ | 64 V(AccessArgumentsAt) \ |
64 V(Add) \ | 65 V(Add) \ |
65 V(AllocateObject) \ | 66 V(AllocateObject) \ |
(...skipping 2604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2670 } | 2671 } |
2671 | 2672 |
2672 HValue* MostConstantOperand() { | 2673 HValue* MostConstantOperand() { |
2673 if (IsCommutative() && left()->IsConstant()) return left(); | 2674 if (IsCommutative() && left()->IsConstant()) return left(); |
2674 return right(); | 2675 return right(); |
2675 } | 2676 } |
2676 | 2677 |
2677 virtual bool IsCommutative() const { return false; } | 2678 virtual bool IsCommutative() const { return false; } |
2678 | 2679 |
2679 virtual void PrintDataTo(StringStream* stream); | 2680 virtual void PrintDataTo(StringStream* stream); |
| 2681 |
| 2682 DECLARE_ABSTRACT_INSTRUCTION(BinaryOperation) |
2680 }; | 2683 }; |
2681 | 2684 |
2682 | 2685 |
2683 class HWrapReceiver: public HTemplateInstruction<2> { | 2686 class HWrapReceiver: public HTemplateInstruction<2> { |
2684 public: | 2687 public: |
2685 HWrapReceiver(HValue* receiver, HValue* function) { | 2688 HWrapReceiver(HValue* receiver, HValue* function) { |
2686 set_representation(Representation::Tagged()); | 2689 set_representation(Representation::Tagged()); |
2687 SetOperandAt(0, receiver); | 2690 SetOperandAt(0, receiver); |
2688 SetOperandAt(1, function); | 2691 SetOperandAt(1, function); |
2689 } | 2692 } |
(...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5278 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5281 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
5279 }; | 5282 }; |
5280 | 5283 |
5281 | 5284 |
5282 #undef DECLARE_INSTRUCTION | 5285 #undef DECLARE_INSTRUCTION |
5283 #undef DECLARE_CONCRETE_INSTRUCTION | 5286 #undef DECLARE_CONCRETE_INSTRUCTION |
5284 | 5287 |
5285 } } // namespace v8::internal | 5288 } } // namespace v8::internal |
5286 | 5289 |
5287 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5290 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |