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

Unified Diff: runtime/vm/constants_dbc.h

Issue 2098573004: DBC: CheckClassInstr (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Clean up comment Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/constants_dbc.h
diff --git a/runtime/vm/constants_dbc.h b/runtime/vm/constants_dbc.h
index 4f8aab93ec22373f9d82a148e12da85e519ef39f..07cf46f32faee20e5729369f6ed3103ff06a41b9 100644
--- a/runtime/vm/constants_dbc.h
+++ b/runtime/vm/constants_dbc.h
@@ -83,9 +83,10 @@ namespace dart {
//
// Unreachable instruction.
//
-// - Nop
+// - Nop D
//
-// This instuction does nothing.
+// This instuction does nothing. It may refer to an object in the constant
+// pool that may be decoded by other instructions.
//
// - Compile
//
@@ -212,6 +213,11 @@ namespace dart {
// IfNeStrictTOS
// Jump T ;; jump if not equal
//
+// - If<Cond>Null rA
+//
+// Cond is Eq or Ne. Skips the next instruction unless the given condition
+// holds.
+//
// - CreateArrayTOS
//
// Allocate array of length SP[0] with type arguments SP[-1].
@@ -358,6 +364,25 @@ namespace dart {
// If the object at FP[rA]'s class id matches hthe class id in PP[D], then
// skip the following instruction.
//
+// - CheckDenseSwitch rA, D
+//
+// Skips the next 3 instructions if the object at FP[rA] is a valid class for
+// a dense switch with low cid encoded in the following Nop instruction, and
+// the cid mask encoded in the Nop instruction after that, or if D == 1 and
+// FP[rA] is a Smi. Skips 2 instructions otherwise.
+//
+// - CheckCid rA, D
Vyacheslav Egorov (Google) 2016/06/29 17:11:06 32bit build allocates only 16bits for a CID. I thi
zra 2016/06/29 22:19:17 Done.
+//
+// Skips the next two instructions if the object at FP[rA] is a Smi and
+// D == 1, or if FP[rA] has cid equal to the cid encoded by the following
+// Nop instruction. Otherwise skips 1 instruction.
+//
+// - CheckCids rA, D
+//
+// Skips the next two instructions if the object at FP[rA] is a Smi and
+// D == 1, or if FP[rA]'s cid is found in the array of cids encoded by the
+// following Nop instruction. Otherwise skips 1 instruction.
+//
// - CheckStack
//
// Compare SP against isolate stack limit and call StackOverflow handler if
@@ -420,7 +445,7 @@ namespace dart {
//
#define BYTECODES_LIST(V) \
V(Trap, 0, ___, ___, ___) \
- V(Nop, 0, ___, ___, ___) \
+ V(Nop, D, lit, ___, ___) \
V(Compile, 0, ___, ___, ___) \
V(HotCheck, A_D, num, num, ___) \
V(Intrinsic, A, num, ___, ___) \
@@ -477,6 +502,8 @@ namespace dart {
V(IfEqStrict, A_D, reg, reg, ___) \
V(IfNeStrictNum, A_D, reg, reg, ___) \
V(IfEqStrictNum, A_D, reg, reg, ___) \
+ V(IfEqNull, A, reg, ___, ___) \
+ V(IfNeNull, A, reg, ___, ___) \
V(CreateArrayTOS, 0, ___, ___, ___) \
V(Allocate, D, lit, ___, ___) \
V(AllocateT, 0, ___, ___, ___) \
@@ -503,6 +530,9 @@ namespace dart {
V(AssertBoolean, A, num, ___, ___) \
V(CheckSmi, A, reg, ___, ___) \
V(CheckClassId, A_D, reg, lit, ___) \
+ V(CheckDenseSwitch, A_D, reg, num, ___) \
+ V(CheckCid, A_D, reg, num, ___) \
+ V(CheckCids, A_D, reg, num, ___) \
V(CheckStack, 0, ___, ___, ___) \
V(DebugStep, 0, ___, ___, ___) \
V(DebugBreak, A, num, ___, ___) \

Powered by Google App Engine
This is Rietveld 408576698