| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 | 5 |
| 6 #include "vm/ast_printer.h" | 6 #include "vm/ast_printer.h" |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/longjump.h" | 8 #include "vm/longjump.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/parser.h" | 10 #include "vm/parser.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 String& url = String::Handle(String::New("dart-test:Parser_TopLevel")); | 116 String& url = String::Handle(String::New("dart-test:Parser_TopLevel")); |
| 117 String& source = String::Handle(String::New(script_chars)); | 117 String& source = String::Handle(String::New(script_chars)); |
| 118 Script& script = Script::Handle(Script::New(url, | 118 Script& script = Script::Handle(Script::New(url, |
| 119 source, | 119 source, |
| 120 RawScript::kScriptTag)); | 120 RawScript::kScriptTag)); |
| 121 Library& lib = Library::ZoneHandle(Library::CoreLibrary()); | 121 Library& lib = Library::ZoneHandle(Library::CoreLibrary()); |
| 122 | 122 |
| 123 script.Tokenize(String::Handle(String::New(""))); | 123 script.Tokenize(String::Handle(String::New(""))); |
| 124 | 124 |
| 125 Parser::ParseCompilationUnit(lib, script); | 125 Parser::ParseCompilationUnit(lib, script); |
| 126 EXPECT(ClassFinalizer::FinalizePendingClasses()); | 126 EXPECT(ClassFinalizer::FinalizeTypeHierarchy()); |
| 127 CheckField(lib, "A", "f1", false, false); | 127 CheckField(lib, "A", "f1", false, false); |
| 128 CheckField(lib, "A", "f2", false, true); | 128 CheckField(lib, "A", "f2", false, true); |
| 129 CheckField(lib, "A", "f3", false, true); | 129 CheckField(lib, "A", "f3", false, true); |
| 130 CheckField(lib, "A", "f4", false, true); | 130 CheckField(lib, "A", "f4", false, true); |
| 131 CheckField(lib, "A", "s1", true, false); | 131 CheckField(lib, "A", "s1", true, false); |
| 132 CheckField(lib, "A", "s2", true, false); | 132 CheckField(lib, "A", "s2", true, false); |
| 133 CheckField(lib, "A", "s3", true, true); | 133 CheckField(lib, "A", "s3", true, true); |
| 134 CheckFunction(lib, "A", "bar", true); | 134 CheckFunction(lib, "A", "bar", true); |
| 135 CheckFunction(lib, "A", "foo", true); | 135 CheckFunction(lib, "A", "foo", true); |
| 136 } | 136 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 151 String& url = String::Handle(String::New("dart-test:Parser_TopLevel")); | 151 String& url = String::Handle(String::New("dart-test:Parser_TopLevel")); |
| 152 String& source = String::Handle(String::New(script_chars)); | 152 String& source = String::Handle(String::New(script_chars)); |
| 153 Script& script = Script::Handle(Script::New(url, | 153 Script& script = Script::Handle(Script::New(url, |
| 154 source, | 154 source, |
| 155 RawScript::kScriptTag)); | 155 RawScript::kScriptTag)); |
| 156 Library& lib = Library::ZoneHandle(Library::CoreLibrary()); | 156 Library& lib = Library::ZoneHandle(Library::CoreLibrary()); |
| 157 | 157 |
| 158 script.Tokenize(String::Handle(String::New(""))); | 158 script.Tokenize(String::Handle(String::New(""))); |
| 159 | 159 |
| 160 Parser::ParseCompilationUnit(lib, script); | 160 Parser::ParseCompilationUnit(lib, script); |
| 161 EXPECT(ClassFinalizer::FinalizePendingClasses()); | 161 EXPECT(ClassFinalizer::FinalizeTypeHierarchy()); |
| 162 | 162 |
| 163 DumpFunction(lib, "A", "foo"); | 163 DumpFunction(lib, "A", "foo"); |
| 164 DumpFunction(lib, "A", "bar"); | 164 DumpFunction(lib, "A", "bar"); |
| 165 DumpFunction(lib, "A", "baz"); | 165 DumpFunction(lib, "A", "baz"); |
| 166 DumpFunction(lib, "B", "bam"); | 166 DumpFunction(lib, "B", "bam"); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace dart | 169 } // namespace dart |
| OLD | NEW |