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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10873036: Add convenience static members of Type: Smi and Mint. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 11249)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -925,7 +925,13 @@
RawAbstractType* LoadVMFieldComp::CompileType() const {
// Type may be null if the field is a VM field, e.g. context parent.
- return type().raw();
+ if (type().IsNull()) {
+ return AbstractType::null();
srdjan 2012/08/23 19:12:59 Please add comment why is that necessary, why we c
regis 2012/08/23 21:03:34 In production mode, the type of the local is not g
+ }
+ if (FLAG_enable_type_checks) {
+ return type().raw();
+ }
+ return Type::DynamicType();
}
@@ -975,10 +981,7 @@
RawAbstractType* BinarySmiOpComp::CompileType() const {
- ObjectStore* object_store = Isolate::Current()->object_store();
- return (op_kind() == Token::kSHL)
- ? Type::IntInterface()
- : object_store->smi_type();
+ return (op_kind() == Token::kSHL) ? Type::IntInterface() : Type::SmiType();
}
@@ -1000,8 +1003,7 @@
RawAbstractType* BinaryMintOpComp::CompileType() const {
- ObjectStore* object_store = Isolate::Current()->object_store();
- return object_store->mint_type();
+ return Type::MintType();
}
@@ -1021,7 +1023,7 @@
RawAbstractType* UnarySmiOpComp::CompileType() const {
- return Type::IntInterface();
+ return Type::SmiType();
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698