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

Unified Diff: runtime/vm/constants_dbc.h

Issue 2098573004: DBC: CheckClassInstr (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments 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 02d86888895143cace97b15c664afd4670ed97a6..597dd8cfa27fff5936da4aaf133e35d21a580c58 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
//
@@ -222,6 +223,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].
@@ -371,8 +377,21 @@ namespace dart {
//
// - CheckClassId rA, D
//
-// If the object at FP[rA]'s class id matches hthe class id in PP[D], then
-// skip the following instruction.
+// If the object at FP[rA]'s class id matches the class id 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.
+//
+// - CheckCids rA, rB, rC
+//
+// Skips rC + 1 instructions if the object at FP[rA] is a Smi and
+// rB == 1, or if FP[rA]'s cid is found in the array of cids encoded by the
+// following rC Nop instructions. Otherwise skips only rC instructions.
//
// - CheckStack
//
@@ -436,7 +455,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, ___, ___) \
@@ -495,6 +514,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, ___, ___, ___) \
@@ -521,7 +542,9 @@ namespace dart {
V(AssertAssignable, D, num, lit, ___) \
V(AssertBoolean, A, num, ___, ___) \
V(CheckSmi, A, reg, ___, ___) \
- V(CheckClassId, A_D, reg, lit, ___) \
+ V(CheckClassId, A_D, reg, num, ___) \
+ V(CheckDenseSwitch, A_D, reg, num, ___) \
+ V(CheckCids, A_B_C, reg, num, ___) \
V(CheckStack, 0, ___, ___, ___) \
V(DebugStep, 0, ___, ___, ___) \
V(DebugBreak, A, num, ___, ___) \

Powered by Google App Engine
This is Rietveld 408576698