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

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

Issue 19662003: Refactor resolution code in the vm to properly handle ambiguity errors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/code_descriptors.h" 10 #include "vm/code_descriptors.h"
(...skipping 3392 matching lines...) Expand 10 before | Expand all | Expand 10 after
3403 Value* argument_names_value = 3403 Value* argument_names_value =
3404 Bind(new ConstantInstr(Array::ZoneHandle())); 3404 Bind(new ConstantInstr(Array::ZoneHandle()));
3405 arguments->Add(PushArgument(argument_names_value)); 3405 arguments->Add(PushArgument(argument_names_value));
3406 // List existingArgumentNames. 3406 // List existingArgumentNames.
3407 Value* existing_argument_names_value = 3407 Value* existing_argument_names_value =
3408 Bind(new ConstantInstr(Array::ZoneHandle())); 3408 Bind(new ConstantInstr(Array::ZoneHandle()));
3409 arguments->Add(PushArgument(existing_argument_names_value)); 3409 arguments->Add(PushArgument(existing_argument_names_value));
3410 // Resolve and call NoSuchMethodError._throwNew. 3410 // Resolve and call NoSuchMethodError._throwNew.
3411 const Library& core_lib = Library::Handle(Library::CoreLibrary()); 3411 const Library& core_lib = Library::Handle(Library::CoreLibrary());
3412 const Class& cls = Class::Handle( 3412 const Class& cls = Class::Handle(
3413 core_lib.LookupClass(Symbols::NoSuchMethodError())); 3413 core_lib.LookupClass(Symbols::NoSuchMethodError(), NULL));
3414 ASSERT(!cls.IsNull()); 3414 ASSERT(!cls.IsNull());
3415 const Function& func = Function::ZoneHandle( 3415 const Function& func = Function::ZoneHandle(
3416 Resolver::ResolveStatic(cls, 3416 Resolver::ResolveStatic(cls,
3417 PrivateCoreLibName(Symbols::ThrowNew()), 3417 PrivateCoreLibName(Symbols::ThrowNew()),
3418 arguments->length(), 3418 arguments->length(),
3419 Object::null_array(), 3419 Object::null_array(),
3420 Resolver::kIsQualified)); 3420 Resolver::kIsQualified));
3421 ASSERT(!func.IsNull()); 3421 ASSERT(!func.IsNull());
3422 return new StaticCallInstr(token_pos, 3422 return new StaticCallInstr(token_pos,
3423 func, 3423 func,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
3546 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3546 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3547 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3547 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3548 OS::SNPrint(chars, len, kFormat, function_name, reason); 3548 OS::SNPrint(chars, len, kFormat, function_name, reason);
3549 const Error& error = Error::Handle( 3549 const Error& error = Error::Handle(
3550 LanguageError::New(String::Handle(String::New(chars)))); 3550 LanguageError::New(String::Handle(String::New(chars))));
3551 Isolate::Current()->long_jump_base()->Jump(1, error); 3551 Isolate::Current()->long_jump_base()->Jump(1, error);
3552 } 3552 }
3553 3553
3554 3554
3555 } // namespace dart 3555 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698