| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_OPCODES_H_ | 5 #ifndef V8_COMPILER_OPCODES_H_ |
| 6 #define V8_COMPILER_OPCODES_H_ | 6 #define V8_COMPILER_OPCODES_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 V(JSCreateFunctionContext) \ | 155 V(JSCreateFunctionContext) \ |
| 156 V(JSCreateCatchContext) \ | 156 V(JSCreateCatchContext) \ |
| 157 V(JSCreateWithContext) \ | 157 V(JSCreateWithContext) \ |
| 158 V(JSCreateBlockContext) \ | 158 V(JSCreateBlockContext) \ |
| 159 V(JSCreateScriptContext) | 159 V(JSCreateScriptContext) |
| 160 | 160 |
| 161 #define JS_OTHER_OP_LIST(V) \ | 161 #define JS_OTHER_OP_LIST(V) \ |
| 162 V(JSConstruct) \ | 162 V(JSConstruct) \ |
| 163 V(JSConstructWithSpread) \ | 163 V(JSConstructWithSpread) \ |
| 164 V(JSCallForwardVarargs) \ | 164 V(JSCallForwardVarargs) \ |
| 165 V(JSCallFunction) \ | 165 V(JSCall) \ |
| 166 V(JSCallFunctionWithSpread) \ | 166 V(JSCallWithSpread) \ |
| 167 V(JSCallRuntime) \ | 167 V(JSCallRuntime) \ |
| 168 V(JSConvertReceiver) \ | 168 V(JSConvertReceiver) \ |
| 169 V(JSForInNext) \ | 169 V(JSForInNext) \ |
| 170 V(JSForInPrepare) \ | 170 V(JSForInPrepare) \ |
| 171 V(JSLoadMessage) \ | 171 V(JSLoadMessage) \ |
| 172 V(JSStoreMessage) \ | 172 V(JSStoreMessage) \ |
| 173 V(JSLoadModule) \ | 173 V(JSLoadModule) \ |
| 174 V(JSStoreModule) \ | 174 V(JSStoreModule) \ |
| 175 V(JSGeneratorStore) \ | 175 V(JSGeneratorStore) \ |
| 176 V(JSGeneratorRestoreContinuation) \ | 176 V(JSGeneratorRestoreContinuation) \ |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 static bool IsMergeOpcode(Value value) { | 793 static bool IsMergeOpcode(Value value) { |
| 794 return value == kMerge || value == kLoop; | 794 return value == kMerge || value == kLoop; |
| 795 } | 795 } |
| 796 | 796 |
| 797 static bool IsIfProjectionOpcode(Value value) { | 797 static bool IsIfProjectionOpcode(Value value) { |
| 798 return kIfTrue <= value && value <= kIfDefault; | 798 return kIfTrue <= value && value <= kIfDefault; |
| 799 } | 799 } |
| 800 | 800 |
| 801 // Returns true if opcode can be inlined. | 801 // Returns true if opcode can be inlined. |
| 802 static bool IsInlineeOpcode(Value value) { | 802 static bool IsInlineeOpcode(Value value) { |
| 803 return value == kJSConstruct || value == kJSCallFunction; | 803 return value == kJSConstruct || value == kJSCall; |
| 804 } | 804 } |
| 805 | 805 |
| 806 // Returns true if opcode for comparison operator. | 806 // Returns true if opcode for comparison operator. |
| 807 static bool IsComparisonOpcode(Value value) { | 807 static bool IsComparisonOpcode(Value value) { |
| 808 return (kJSEqual <= value && value <= kJSGreaterThanOrEqual) || | 808 return (kJSEqual <= value && value <= kJSGreaterThanOrEqual) || |
| 809 (kNumberEqual <= value && value <= kStringLessThanOrEqual) || | 809 (kNumberEqual <= value && value <= kStringLessThanOrEqual) || |
| 810 (kWord32Equal <= value && value <= kFloat64LessThanOrEqual); | 810 (kWord32Equal <= value && value <= kFloat64LessThanOrEqual); |
| 811 } | 811 } |
| 812 | 812 |
| 813 static bool IsContextChainExtendingOpcode(Value value) { | 813 static bool IsContextChainExtendingOpcode(Value value) { |
| 814 return kJSCreateFunctionContext <= value && value <= kJSCreateScriptContext; | 814 return kJSCreateFunctionContext <= value && value <= kJSCreateScriptContext; |
| 815 } | 815 } |
| 816 }; | 816 }; |
| 817 | 817 |
| 818 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, IrOpcode::Value); | 818 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, IrOpcode::Value); |
| 819 | 819 |
| 820 } // namespace compiler | 820 } // namespace compiler |
| 821 } // namespace internal | 821 } // namespace internal |
| 822 } // namespace v8 | 822 } // namespace v8 |
| 823 | 823 |
| 824 #endif // V8_COMPILER_OPCODES_H_ | 824 #endif // V8_COMPILER_OPCODES_H_ |
| OLD | NEW |