Chromium Code Reviews| Index: runtime/vm/code_generator_ia32.cc |
| =================================================================== |
| --- runtime/vm/code_generator_ia32.cc (revision 5658) |
| +++ runtime/vm/code_generator_ia32.cc (working copy) |
| @@ -2080,6 +2080,8 @@ |
| interpolate_arg, |
| kNoArgumentNames); |
| if (concatenated.IsUnhandledException()) { |
| + // TODO(hausner): Shouldn't we generate a throw? |
| + // Then remove unused CodeGenerator::ErrorMsg(). |
| ErrorMsg(node->token_index(), |
| "Exception thrown in CodeGenerator::VisitStringConcatNode"); |
| } |
| @@ -2444,10 +2446,7 @@ |
| const String& getter_name = String::Handle(Field::GetterName(field_name)); |
| const Function& function = |
| Function::ZoneHandle(field_class.LookupStaticFunction(getter_name)); |
| - if (function.IsNull()) { |
| - ErrorMsg(token_index, "Static getter does not exist: %s", |
| - getter_name.ToCString()); |
| - } |
| + ASSERT(!function.IsNull()); |
|
srdjan
2012/03/19 22:03:53
Why not a compile time error?
regis
2012/03/19 22:54:28
Giving an error from the code generator does not s
|
| __ LoadObject(ECX, function); |
| const int kNumberOfArguments = 0; |
| const Array& kNoArgumentNames = Array::Handle(); |
| @@ -2478,6 +2477,7 @@ |
| const String& setter_name = String::Handle(Field::SetterName(field_name)); |
| const Function& function = |
| Function::ZoneHandle(field_class.LookupStaticFunction(setter_name)); |
| + ASSERT(!function.IsNull()); |
|
srdjan
2012/03/19 22:03:53
Ditto.
regis
2012/03/19 22:54:28
This case is definitely checked by the parser and
|
| __ LoadObject(ECX, function); |
| const int kNumberOfArguments = 1; // value. |
| const Array& kNoArgumentNames = Array::Handle(); |