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

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 2465793003: Reland "Recognize and optimize a.runtimeType == b.runtimeType pattern." (Closed)
Patch Set: Address Ryan's comment Created 4 years, 1 month 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 | « runtime/vm/precompiler.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index c3998aff11a6ba832c47f211676d9cb4c8b44108..70efa206247b46aa59cf6e6823f0a008d6919657 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -279,6 +279,18 @@ class SimulatorHelpers {
if (cid == kClosureCid) {
return false;
}
+ if (cid < kNumPredefinedCids) {
+ if (cid == kDoubleCid) {
+ *result = thread->isolate()->object_store()->double_type();
+ return true;
+ } else if (RawObject::IsStringClassId(cid)) {
+ *result = thread->isolate()->object_store()->string_type();
+ return true;
+ } else if (RawObject::IsIntegerClassId(cid)) {
+ *result = thread->isolate()->object_store()->int_type();
+ return true;
+ }
+ }
RawClass* cls = thread->isolate()->class_table()->At(cid);
if (cls->ptr()->num_type_arguments_ != 0) {
return false;
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698