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

Side by Side Diff: runtime/vm/compiler_test.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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/class_finalizer.h" 6 #include "vm/class_finalizer.h"
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/symbols.h" 9 #include "vm/symbols.h"
10 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
(...skipping 25 matching lines...) Expand all
36 "}\n"; 36 "}\n";
37 String& url = String::Handle(String::New("dart-test:CompileFunction")); 37 String& url = String::Handle(String::New("dart-test:CompileFunction"));
38 String& source = String::Handle(String::New(kScriptChars)); 38 String& source = String::Handle(String::New(kScriptChars));
39 Script& script = Script::Handle(Script::New(url, 39 Script& script = Script::Handle(Script::New(url,
40 source, 40 source,
41 RawScript::kScriptTag)); 41 RawScript::kScriptTag));
42 Library& lib = Library::Handle(Library::CoreLibrary()); 42 Library& lib = Library::Handle(Library::CoreLibrary());
43 EXPECT(CompilerTest::TestCompileScript(lib, script)); 43 EXPECT(CompilerTest::TestCompileScript(lib, script));
44 EXPECT(ClassFinalizer::FinalizePendingClasses()); 44 EXPECT(ClassFinalizer::FinalizePendingClasses());
45 Class& cls = Class::Handle( 45 Class& cls = Class::Handle(
46 lib.LookupClass(String::Handle(Symbols::New("A")))); 46 lib.LookupClass(String::Handle(Symbols::New("A")), NULL));
47 EXPECT(!cls.IsNull()); 47 EXPECT(!cls.IsNull());
siva 2013/07/22 22:21:46 Ditto comment.
regis 2013/07/22 23:51:27 Done.
48 String& function_foo_name = String::Handle(String::New("foo")); 48 String& function_foo_name = String::Handle(String::New("foo"));
49 Function& function_foo = 49 Function& function_foo =
50 Function::Handle(cls.LookupStaticFunction(function_foo_name)); 50 Function::Handle(cls.LookupStaticFunction(function_foo_name));
51 EXPECT(!function_foo.IsNull()); 51 EXPECT(!function_foo.IsNull());
52 52
53 EXPECT(CompilerTest::TestCompileFunction(function_foo)); 53 EXPECT(CompilerTest::TestCompileFunction(function_foo));
54 EXPECT(function_foo.HasCode()); 54 EXPECT(function_foo.HasCode());
55 55
56 String& function_moo_name = String::Handle(String::New("moo")); 56 String& function_moo_name = String::Handle(String::New("moo"));
57 Function& function_moo = 57 Function& function_moo =
58 Function::Handle(cls.LookupStaticFunction(function_moo_name)); 58 Function::Handle(cls.LookupStaticFunction(function_moo_name));
59 EXPECT(!function_moo.IsNull()); 59 EXPECT(!function_moo.IsNull());
60 60
61 EXPECT(CompilerTest::TestCompileFunction(function_moo)); 61 EXPECT(CompilerTest::TestCompileFunction(function_moo));
62 EXPECT(function_moo.HasCode()); 62 EXPECT(function_moo.HasCode());
63 } 63 }
64 64
65 } // namespace dart 65 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698