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

Unified Diff: runtime/vm/constants_dbc.h

Issue 2122363002: DBC: Implement TestCids instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 5d901b8c8febf157af6b199296f1ee3a0fd1b735..412c02e7e34d182482bb2514dd8e79428dd24748 100644
--- a/runtime/vm/constants_dbc.h
+++ b/runtime/vm/constants_dbc.h
@@ -376,6 +376,13 @@ namespace dart {
// If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD]
// must be Smis.
//
+// - TestCids rA, D
+//
+// The next D instructions must be Nops whose D field encodes a class id. If
+// the class id of FP[rA] matches, jump to PC + 4*N + 4 if the matching Nop's
Vyacheslav Egorov (Google) 2016/07/07 17:08:28 I suggest using non scaled offsets. PC + N + 1 PC
rmacnak 2016/07/08 00:54:21 Done.
+// A != 0 or PC + 4*N + 8 if the matching Nop's A = 0. If no match is found,
+// jump to PC + 4*N.
+//
// - CheckSmi rA
//
// If FP[rA] is a Smi, then skip the next instruction.
@@ -460,7 +467,7 @@ namespace dart {
//
#define BYTECODES_LIST(V) \
V(Trap, 0, ___, ___, ___) \
- V(Nop, D, lit, ___, ___) \
+ V(Nop, A_D, num, lit, ___) \
V(Compile, 0, ___, ___, ___) \
V(HotCheck, A_D, num, num, ___) \
V(Intrinsic, A, num, ___, ___) \
@@ -547,6 +554,7 @@ namespace dart {
V(AssertAssignable, D, num, lit, ___) \
V(AssertBoolean, A, num, ___, ___) \
V(TestSmi, A_D, reg, reg, ___) \
+ V(TestCids, A_D, reg, num, ___) \
V(CheckSmi, A, reg, ___, ___) \
V(CheckClassId, A_D, reg, num, ___) \
V(CheckDenseSwitch, A_D, reg, num, ___) \

Powered by Google App Engine
This is Rietveld 408576698