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

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

Issue 1123213002: [turbofan] Connect non-terminating loops via Terminate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 CONTROL_OP_LIST(V) \ 9 #define CONTROL_OP_LIST(V) \
10 V(Start) \ 10 V(Start) \
11 V(Dead) \ 11 V(Dead) \
12 V(Loop) \ 12 V(Loop) \
13 V(Branch) \ 13 V(Branch) \
14 V(Switch) \ 14 V(Switch) \
15 V(IfTrue) \ 15 V(IfTrue) \
16 V(IfFalse) \ 16 V(IfFalse) \
17 V(IfSuccess) \ 17 V(IfSuccess) \
18 V(IfException) \ 18 V(IfException) \
19 V(IfValue) \ 19 V(IfValue) \
20 V(IfDefault) \ 20 V(IfDefault) \
21 V(Merge) \ 21 V(Merge) \
22 V(Deoptimize) \ 22 V(Deoptimize) \
23 V(Return) \ 23 V(Return) \
24 V(TailCall) \ 24 V(TailCall) \
25 V(Terminate) \
25 V(OsrNormalEntry) \ 26 V(OsrNormalEntry) \
26 V(OsrLoopEntry) \ 27 V(OsrLoopEntry) \
27 V(Throw) \ 28 V(Throw) \
28 V(End) 29 V(End)
29 30
30 // Opcodes for constant operators. 31 // Opcodes for constant operators.
31 #define CONSTANT_OP_LIST(V) \ 32 #define CONSTANT_OP_LIST(V) \
32 V(Int32Constant) \ 33 V(Int32Constant) \
33 V(Int64Constant) \ 34 V(Int64Constant) \
34 V(Float32Constant) \ 35 V(Float32Constant) \
(...skipping 12 matching lines...) Expand all
47 V(FrameState) \ 48 V(FrameState) \
48 V(StateValues) \ 49 V(StateValues) \
49 V(TypedStateValues) \ 50 V(TypedStateValues) \
50 V(Call) \ 51 V(Call) \
51 V(Parameter) \ 52 V(Parameter) \
52 V(OsrValue) \ 53 V(OsrValue) \
53 V(Projection) 54 V(Projection)
54 55
55 #define COMMON_OP_LIST(V) \ 56 #define COMMON_OP_LIST(V) \
56 CONSTANT_OP_LIST(V) \ 57 CONSTANT_OP_LIST(V) \
57 INNER_OP_LIST(V) \ 58 INNER_OP_LIST(V)
58 V(Always)
59 59
60 // Opcodes for JavaScript operators. 60 // Opcodes for JavaScript operators.
61 #define JS_COMPARE_BINOP_LIST(V) \ 61 #define JS_COMPARE_BINOP_LIST(V) \
62 V(JSEqual) \ 62 V(JSEqual) \
63 V(JSNotEqual) \ 63 V(JSNotEqual) \
64 V(JSStrictEqual) \ 64 V(JSStrictEqual) \
65 V(JSStrictNotEqual) \ 65 V(JSStrictNotEqual) \
66 V(JSLessThan) \ 66 V(JSLessThan) \
67 V(JSGreaterThan) \ 67 V(JSGreaterThan) \
68 V(JSLessThanOrEqual) \ 68 V(JSLessThanOrEqual) \
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 #define COUNT_OPCODE(x) +1 303 #define COUNT_OPCODE(x) +1
304 ALL_OP_LIST(COUNT_OPCODE) 304 ALL_OP_LIST(COUNT_OPCODE)
305 #undef COUNT_OPCODE 305 #undef COUNT_OPCODE
306 }; 306 };
307 307
308 // Returns the mnemonic name of an opcode. 308 // Returns the mnemonic name of an opcode.
309 static char const* Mnemonic(Value value); 309 static char const* Mnemonic(Value value);
310 310
311 // Returns true if opcode for common operator. 311 // Returns true if opcode for common operator.
312 static bool IsCommonOpcode(Value value) { 312 static bool IsCommonOpcode(Value value) {
313 return kStart <= value && value <= kAlways; 313 return kStart <= value && value <= kProjection;
314 } 314 }
315 315
316 // Returns true if opcode for control operator. 316 // Returns true if opcode for control operator.
317 static bool IsControlOpcode(Value value) { 317 static bool IsControlOpcode(Value value) {
318 return kStart <= value && value <= kEnd; 318 return kStart <= value && value <= kEnd;
319 } 319 }
320 320
321 // Returns true if opcode for JavaScript operator. 321 // Returns true if opcode for JavaScript operator.
322 static bool IsJsOpcode(Value value) { 322 static bool IsJsOpcode(Value value) {
323 return kJSEqual <= value && value <= kJSStackCheck; 323 return kJSEqual <= value && value <= kJSStackCheck;
(...skipping 22 matching lines...) Expand all
346 (kNumberEqual <= value && value <= kStringLessThanOrEqual) || 346 (kNumberEqual <= value && value <= kStringLessThanOrEqual) ||
347 (kWord32Equal <= value && value <= kFloat64LessThanOrEqual); 347 (kWord32Equal <= value && value <= kFloat64LessThanOrEqual);
348 } 348 }
349 }; 349 };
350 350
351 } // namespace compiler 351 } // namespace compiler
352 } // namespace internal 352 } // namespace internal
353 } // namespace v8 353 } // namespace v8
354 354
355 #endif // V8_COMPILER_OPCODES_H_ 355 #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