Chromium Code Reviews| Index: runtime/vm/parser.cc |
| =================================================================== |
| --- runtime/vm/parser.cc (revision 29364) |
| +++ runtime/vm/parser.cc (working copy) |
| @@ -968,13 +968,13 @@ |
| ident_pos, |
| field, |
| new LiteralNode(ident_pos, Instance::ZoneHandle()))); |
| - // TODO(regis, 5802): Exception to throw is not specified by spec. |
| - const String& circular_error = String::ZoneHandle( |
| - Symbols::New("circular dependency in field initialization")); |
| + // call CyclicInitializationError._throwNew(field_name). |
|
srdjan
2013/10/28 21:32:02
s/call/Call/
hausner
2013/10/28 21:35:39
Done.
|
| + ArgumentListNode* error_arguments = new ArgumentListNode(ident_pos); |
| + error_arguments->Add(new LiteralNode(ident_pos, field_name)); |
| report_circular->Add( |
| - new ThrowNode(ident_pos, |
| - new LiteralNode(ident_pos, circular_error), |
| - NULL)); |
| + MakeStaticCall(Symbols::CyclicInitializationError(), |
| + Library::PrivateCoreLibName(Symbols::ThrowNew()), |
| + error_arguments)); |
| AstNode* circular_check = |
| new IfNode(ident_pos, compare_circular, report_circular, NULL); |
| current_block_->statements->Add(circular_check); |