Chromium Code Reviews| 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(); |
| } |