Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: src/compiler/opcodes.h

Issue 863513002: [turbofan] Rename IrOpcode predicate IsLeafOpcode to IsConstantOpcode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/opcodes-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Opcodes for control operators. 8 // Opcodes for control operators.
9 #define INNER_CONTROL_OP_LIST(V) \ 9 #define INNER_CONTROL_OP_LIST(V) \
10 V(Dead) \ 10 V(Dead) \
11 V(Loop) \ 11 V(Loop) \
12 V(Branch) \ 12 V(Branch) \
13 V(IfTrue) \ 13 V(IfTrue) \
14 V(IfFalse) \ 14 V(IfFalse) \
15 V(Merge) \ 15 V(Merge) \
16 V(Return) \ 16 V(Return) \
17 V(Terminate) \ 17 V(Terminate) \
18 V(OsrNormalEntry) \ 18 V(OsrNormalEntry) \
19 V(OsrLoopEntry) \ 19 V(OsrLoopEntry) \
20 V(Throw) 20 V(Throw)
21 21
22 #define CONTROL_OP_LIST(V) \ 22 #define CONTROL_OP_LIST(V) \
23 INNER_CONTROL_OP_LIST(V) \ 23 INNER_CONTROL_OP_LIST(V) \
24 V(Start) \ 24 V(Start) \
25 V(End) 25 V(End)
26 26
27 // Opcodes for common operators. 27 // Opcodes for constant operators.
28 #define LEAF_OP_LIST(V) \ 28 #define CONSTANT_OP_LIST(V) \
29 V(Int32Constant) \ 29 V(Int32Constant) \
30 V(Int64Constant) \ 30 V(Int64Constant) \
31 V(Float32Constant) \ 31 V(Float32Constant) \
32 V(Float64Constant) \ 32 V(Float64Constant) \
33 V(ExternalConstant) \ 33 V(ExternalConstant) \
34 V(NumberConstant) \ 34 V(NumberConstant) \
35 V(HeapConstant) 35 V(HeapConstant)
36 36
37 #define INNER_OP_LIST(V) \ 37 #define INNER_OP_LIST(V) \
38 V(Select) \ 38 V(Select) \
39 V(Phi) \ 39 V(Phi) \
40 V(EffectPhi) \ 40 V(EffectPhi) \
41 V(ValueEffect) \ 41 V(ValueEffect) \
42 V(Finish) \ 42 V(Finish) \
43 V(FrameState) \ 43 V(FrameState) \
44 V(StateValues) \ 44 V(StateValues) \
45 V(Call) \ 45 V(Call) \
46 V(Parameter) \ 46 V(Parameter) \
47 V(OsrValue) \ 47 V(OsrValue) \
48 V(Projection) 48 V(Projection)
49 49
50 #define COMMON_OP_LIST(V) \ 50 #define COMMON_OP_LIST(V) \
51 LEAF_OP_LIST(V) \ 51 CONSTANT_OP_LIST(V) \
52 INNER_OP_LIST(V) 52 INNER_OP_LIST(V)
53 53
54 // Opcodes for JavaScript operators. 54 // Opcodes for JavaScript operators.
55 #define JS_COMPARE_BINOP_LIST(V) \ 55 #define JS_COMPARE_BINOP_LIST(V) \
56 V(JSEqual) \ 56 V(JSEqual) \
57 V(JSNotEqual) \ 57 V(JSNotEqual) \
58 V(JSStrictEqual) \ 58 V(JSStrictEqual) \
59 V(JSStrictNotEqual) \ 59 V(JSStrictNotEqual) \
60 V(JSLessThan) \ 60 V(JSLessThan) \
61 V(JSGreaterThan) \ 61 V(JSGreaterThan) \
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // Returns true if opcode for control operator. 283 // Returns true if opcode for control operator.
284 static bool IsControlOpcode(Value value) { 284 static bool IsControlOpcode(Value value) {
285 return kDead <= value && value <= kEnd; 285 return kDead <= value && value <= kEnd;
286 } 286 }
287 287
288 // Returns true if opcode for JavaScript operator. 288 // Returns true if opcode for JavaScript operator.
289 static bool IsJsOpcode(Value value) { 289 static bool IsJsOpcode(Value value) {
290 return kJSEqual <= value && value <= kJSDebugger; 290 return kJSEqual <= value && value <= kJSDebugger;
291 } 291 }
292 292
293 // Returns true if opcode for leaf operator. 293 // Returns true if opcode for constant operator.
294 static bool IsLeafOpcode(Value value) { 294 static bool IsConstantOpcode(Value value) {
295 return kInt32Constant <= value && value <= kHeapConstant; 295 return kInt32Constant <= value && value <= kHeapConstant;
296 } 296 }
297 }; 297 };
298 298
299 } // namespace compiler 299 } // namespace compiler
300 } // namespace internal 300 } // namespace internal
301 } // namespace v8 301 } // namespace v8
302 302
303 #endif // V8_COMPILER_OPCODES_H_ 303 #endif // V8_COMPILER_OPCODES_H_
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/opcodes-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698