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

Unified Diff: runtime/vm/constants_dbc.h

Issue 2113523002: DBC: Implement TestSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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..90e96dcfa291b45a058ab071470800902b6d9a3f 100644
--- a/runtime/vm/constants_dbc.h
+++ b/runtime/vm/constants_dbc.h
@@ -365,6 +365,11 @@ namespace dart {
//
// Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0).
//
+// - TestSmi rA, rD
+//
+// If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD]
+// must be Smis.
+//
// - CheckSmi rA
//
// If FP[rA] is a Smi, then skip the next instruction.
@@ -520,6 +525,7 @@ namespace dart {
V(InstanceOf, A, num, ___, ___) \
V(AssertAssignable, D, num, lit, ___) \
V(AssertBoolean, A, num, ___, ___) \
+ V(TestSmi, A_D, reg, reg, ___) \
V(CheckSmi, A, reg, ___, ___) \
V(CheckClassId, A_D, reg, lit, ___) \
V(CheckStack, 0, ___, ___, ___) \
@@ -639,7 +645,7 @@ enum FpuRegister {
const FpuRegister FpuTMP = kFakeFpuRegister;
const intptr_t kNumberOfFpuRegisters = 1;
-enum Condition { EQ, NE };
+enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE };
zra 2016/06/29 22:57:01 Add some comments here about what these mean.
rmacnak 2016/06/29 23:53:51 Done.
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698