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

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

Issue 875263004: [turbofan] Ensure that NTLs are always properly connected to the end. (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-generic-lowering.cc ('k') | src/compiler/scheduler.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) \
18 V(OsrNormalEntry) \ 17 V(OsrNormalEntry) \
19 V(OsrLoopEntry) \ 18 V(OsrLoopEntry) \
20 V(Throw) 19 V(Throw)
21 20
22 #define CONTROL_OP_LIST(V) \ 21 #define CONTROL_OP_LIST(V) \
23 INNER_CONTROL_OP_LIST(V) \ 22 INNER_CONTROL_OP_LIST(V) \
24 V(Start) \ 23 V(Start) \
25 V(End) 24 V(End)
26 25
27 // Opcodes for constant operators. 26 // Opcodes for constant operators.
28 #define CONSTANT_OP_LIST(V) \ 27 #define CONSTANT_OP_LIST(V) \
29 V(Int32Constant) \ 28 V(Int32Constant) \
30 V(Int64Constant) \ 29 V(Int64Constant) \
31 V(Float32Constant) \ 30 V(Float32Constant) \
32 V(Float64Constant) \ 31 V(Float64Constant) \
33 V(ExternalConstant) \ 32 V(ExternalConstant) \
34 V(NumberConstant) \ 33 V(NumberConstant) \
35 V(HeapConstant) 34 V(HeapConstant)
36 35
37 #define INNER_OP_LIST(V) \ 36 #define INNER_OP_LIST(V) \
38 V(Select) \ 37 V(Select) \
39 V(Phi) \ 38 V(Phi) \
39 V(EffectSet) \
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 CONSTANT_OP_LIST(V) \ 51 CONSTANT_OP_LIST(V) \
52 INNER_OP_LIST(V) 52 INNER_OP_LIST(V) \
53 V(Always)
53 54
54 // Opcodes for JavaScript operators. 55 // Opcodes for JavaScript operators.
55 #define JS_COMPARE_BINOP_LIST(V) \ 56 #define JS_COMPARE_BINOP_LIST(V) \
56 V(JSEqual) \ 57 V(JSEqual) \
57 V(JSNotEqual) \ 58 V(JSNotEqual) \
58 V(JSStrictEqual) \ 59 V(JSStrictEqual) \
59 V(JSStrictNotEqual) \ 60 V(JSStrictNotEqual) \
60 V(JSLessThan) \ 61 V(JSLessThan) \
61 V(JSGreaterThan) \ 62 V(JSGreaterThan) \
62 V(JSLessThanOrEqual) \ 63 V(JSLessThanOrEqual) \
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 #define COUNT_OPCODE(x) +1 271 #define COUNT_OPCODE(x) +1
271 ALL_OP_LIST(COUNT_OPCODE) 272 ALL_OP_LIST(COUNT_OPCODE)
272 #undef COUNT_OPCODE 273 #undef COUNT_OPCODE
273 }; 274 };
274 275
275 // Returns the mnemonic name of an opcode. 276 // Returns the mnemonic name of an opcode.
276 static char const* Mnemonic(Value value); 277 static char const* Mnemonic(Value value);
277 278
278 // Returns true if opcode for common operator. 279 // Returns true if opcode for common operator.
279 static bool IsCommonOpcode(Value value) { 280 static bool IsCommonOpcode(Value value) {
280 return kDead <= value && value <= kProjection; 281 return kDead <= value && value <= kAlways;
281 } 282 }
282 283
283 // Returns true if opcode for control operator. 284 // Returns true if opcode for control operator.
284 static bool IsControlOpcode(Value value) { 285 static bool IsControlOpcode(Value value) {
285 return kDead <= value && value <= kEnd; 286 return kDead <= value && value <= kEnd;
286 } 287 }
287 288
288 // Returns true if opcode for JavaScript operator. 289 // Returns true if opcode for JavaScript operator.
289 static bool IsJsOpcode(Value value) { 290 static bool IsJsOpcode(Value value) {
290 return kJSEqual <= value && value <= kJSDebugger; 291 return kJSEqual <= value && value <= kJSDebugger;
291 } 292 }
292 293
293 // Returns true if opcode for constant operator. 294 // Returns true if opcode for constant operator.
294 static bool IsConstantOpcode(Value value) { 295 static bool IsConstantOpcode(Value value) {
295 return kInt32Constant <= value && value <= kHeapConstant; 296 return kInt32Constant <= value && value <= kHeapConstant;
296 } 297 }
297 298
298 static bool IsPhiOpcode(Value val) { 299 static bool IsPhiOpcode(Value val) {
299 return val == kPhi || val == kEffectPhi; 300 return val == kPhi || val == kEffectPhi;
300 } 301 }
301 }; 302 };
302 303
303 } // namespace compiler 304 } // namespace compiler
304 } // namespace internal 305 } // namespace internal
305 } // namespace v8 306 } // namespace v8
306 307
307 #endif // V8_COMPILER_OPCODES_H_ 308 #endif // V8_COMPILER_OPCODES_H_
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698