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

Side by Side Diff: runtime/vm/parser.cc

Issue 1534033003: VM: Fix crash parsing metadata with a closure as a const constructor argument. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/parser.h" 5 #include "vm/parser.h"
6 #include "vm/flags.h" 6 #include "vm/flags.h"
7 7
8 #ifndef DART_PRECOMPILED 8 #ifndef DART_PRECOMPILED
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 false, // is_abstract 1058 false, // is_abstract
1059 false, // is_external 1059 false, // is_external
1060 false, // is_native 1060 false, // is_native
1061 Object::Handle(zone, meta_data.RawOwner()), 1061 Object::Handle(zone, meta_data.RawOwner()),
1062 token_pos)); 1062 token_pos));
1063 fake_function.set_is_debuggable(false); 1063 fake_function.set_is_debuggable(false);
1064 ParsedFunction* parsed_function = 1064 ParsedFunction* parsed_function =
1065 new ParsedFunction(thread, fake_function); 1065 new ParsedFunction(thread, fake_function);
1066 Parser parser(script, parsed_function, token_pos); 1066 Parser parser(script, parsed_function, token_pos);
1067 parser.set_current_class(owner_class); 1067 parser.set_current_class(owner_class);
1068 parser.OpenFunctionBlock(fake_function);
1068 1069
1069 RawObject* metadata = parser.EvaluateMetadata(); 1070 RawObject* metadata = parser.EvaluateMetadata();
1070 return metadata; 1071 return metadata;
1071 } else { 1072 } else {
1072 Thread* thread = Thread::Current(); 1073 Thread* thread = Thread::Current();
1073 Isolate* isolate = thread->isolate(); 1074 Isolate* isolate = thread->isolate();
1074 StackZone stack_zone(thread); 1075 StackZone stack_zone(thread);
1075 Zone* zone = stack_zone.GetZone(); 1076 Zone* zone = stack_zone.GetZone();
1076 Error& error = Error::Handle(zone); 1077 Error& error = Error::Handle(zone);
1077 error = isolate->object_store()->sticky_error(); 1078 error = isolate->object_store()->sticky_error();
(...skipping 13401 matching lines...) Expand 10 before | Expand all | Expand 10 after
14479 const ArgumentListNode& function_args, 14480 const ArgumentListNode& function_args,
14480 const LocalVariable* temp_for_last_arg, 14481 const LocalVariable* temp_for_last_arg,
14481 bool is_super_invocation) { 14482 bool is_super_invocation) {
14482 UNREACHABLE(); 14483 UNREACHABLE();
14483 return NULL; 14484 return NULL;
14484 } 14485 }
14485 14486
14486 } // namespace dart 14487 } // namespace dart
14487 14488
14488 #endif // DART_PRECOMPILED 14489 #endif // DART_PRECOMPILED
OLDNEW
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698