aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/opcodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/opcodes.h')
-rw-r--r--deps/v8/src/compiler/opcodes.h91
1 files changed, 35 insertions, 56 deletions
diff --git a/deps/v8/src/compiler/opcodes.h b/deps/v8/src/compiler/opcodes.h
index d229b6da99..a4f8d3ec16 100644
--- a/deps/v8/src/compiler/opcodes.h
+++ b/deps/v8/src/compiler/opcodes.h
@@ -12,9 +12,13 @@
V(Branch) \
V(IfTrue) \
V(IfFalse) \
+ V(Switch) \
+ V(IfValue) \
+ V(IfDefault) \
V(Merge) \
V(Return) \
- V(Terminate) \
+ V(OsrNormalEntry) \
+ V(OsrLoopEntry) \
V(Throw)
#define CONTROL_OP_LIST(V) \
@@ -22,19 +26,20 @@
V(Start) \
V(End)
-// Opcodes for common operators.
-#define LEAF_OP_LIST(V) \
- V(Int32Constant) \
- V(Int64Constant) \
- V(Float32Constant) \
- V(Float64Constant) \
- V(ExternalConstant) \
- V(NumberConstant) \
+// Opcodes for constant operators.
+#define CONSTANT_OP_LIST(V) \
+ V(Int32Constant) \
+ V(Int64Constant) \
+ V(Float32Constant) \
+ V(Float64Constant) \
+ V(ExternalConstant) \
+ V(NumberConstant) \
V(HeapConstant)
#define INNER_OP_LIST(V) \
V(Select) \
V(Phi) \
+ V(EffectSet) \
V(EffectPhi) \
V(ValueEffect) \
V(Finish) \
@@ -42,11 +47,13 @@
V(StateValues) \
V(Call) \
V(Parameter) \
+ V(OsrValue) \
V(Projection)
#define COMMON_OP_LIST(V) \
- LEAF_OP_LIST(V) \
- INNER_OP_LIST(V)
+ CONSTANT_OP_LIST(V) \
+ INNER_OP_LIST(V) \
+ V(Always)
// Opcodes for JavaScript operators.
#define JS_COMPARE_BINOP_LIST(V) \
@@ -145,6 +152,7 @@
V(NumberModulus) \
V(NumberToInt32) \
V(NumberToUint32) \
+ V(PlainPrimitiveToNumber) \
V(ReferenceEqual) \
V(StringEqual) \
V(StringLessThan) \
@@ -271,57 +279,28 @@ class IrOpcode {
// Returns the mnemonic name of an opcode.
static char const* Mnemonic(Value value);
- static bool IsJsOpcode(Value val) {
- switch (val) {
-// TODO(turbofan): make this a range check.
-#define RETURN_NAME(x) \
- case k##x: \
- return true;
- JS_OP_LIST(RETURN_NAME)
-#undef RETURN_NAME
- default:
- return false;
- }
+ // Returns true if opcode for common operator.
+ static bool IsCommonOpcode(Value value) {
+ return kDead <= value && value <= kAlways;
}
- static bool IsControlOpcode(Value val) {
- switch (val) {
-// TODO(turbofan): make this a range check.
-#define RETURN_NAME(x) \
- case k##x: \
- return true;
- CONTROL_OP_LIST(RETURN_NAME)
-#undef RETURN_NAME
- default:
- return false;
- }
+ // Returns true if opcode for control operator.
+ static bool IsControlOpcode(Value value) {
+ return kDead <= value && value <= kEnd;
}
- static bool IsLeafOpcode(Value val) {
- switch (val) {
-// TODO(turbofan): make this a table lookup.
-#define RETURN_NAME(x) \
- case k##x: \
- return true;
- LEAF_OP_LIST(RETURN_NAME)
-#undef RETURN_NAME
- default:
- return false;
- }
+ // Returns true if opcode for JavaScript operator.
+ static bool IsJsOpcode(Value value) {
+ return kJSEqual <= value && value <= kJSDebugger;
}
- static bool IsCommonOpcode(Value val) {
- switch (val) {
-// TODO(turbofan): make this a table lookup or a range check.
-#define RETURN_NAME(x) \
- case k##x: \
- return true;
- CONTROL_OP_LIST(RETURN_NAME)
- COMMON_OP_LIST(RETURN_NAME)
-#undef RETURN_NAME
- default:
- return false;
- }
+ // Returns true if opcode for constant operator.
+ static bool IsConstantOpcode(Value value) {
+ return kInt32Constant <= value && value <= kHeapConstant;
+ }
+
+ static bool IsPhiOpcode(Value val) {
+ return val == kPhi || val == kEffectPhi;
}
};