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

Unified Diff: runtime/lib/internal_patch.dart

Issue 2314133003: AOT: Use a cid range check when possible to implement type tests. (Closed)
Patch Set: symbols Created 4 years, 3 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
« no previous file with comments | « no previous file | runtime/vm/aot_optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/internal_patch.dart
diff --git a/runtime/lib/internal_patch.dart b/runtime/lib/internal_patch.dart
index d19430feade0b2fddd3dae8b2e611cb303a7c7e9..88bff92c4803143f6e19e35290a1ab2ac5c05604 100644
--- a/runtime/lib/internal_patch.dart
+++ b/runtime/lib/internal_patch.dart
@@ -35,3 +35,11 @@ class VMLibraryHooks {
final bool is64Bit = _inquireIs64Bit();
bool _inquireIs64Bit() native "Internal_inquireIs64Bit";
+
+bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) {
+ return cid >= lowerLimit && cid <= upperLimit;
+}
+
+bool _classRangeCheckNegative(int cid, int lowerLimit, int upperLimit) {
+ return cid < lowerLimit || cid > upperLimit;
+}
« no previous file with comments | « no previous file | runtime/vm/aot_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698