OLD | NEW |
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 <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "vm/unit_test.h" | 7 #include "vm/unit_test.h" |
8 | 8 |
9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 temp->set_is_final(); | 208 temp->set_is_final(); |
209 node_sequence_->scope()->AddVariable(temp); | 209 node_sequence_->scope()->AddVariable(temp); |
210 return temp; | 210 return temp; |
211 } | 211 } |
212 | 212 |
213 | 213 |
214 bool CompilerTest::TestCompileScript(const Library& library, | 214 bool CompilerTest::TestCompileScript(const Library& library, |
215 const Script& script) { | 215 const Script& script) { |
216 Isolate* isolate = Isolate::Current(); | 216 Isolate* isolate = Isolate::Current(); |
217 ASSERT(isolate != NULL); | 217 ASSERT(isolate != NULL); |
218 const Error& error = Error::Handle(Compiler::Compile(library, script)); | 218 const Error& error = Error::Handle(Compiler::Compile( |
| 219 library, script, ClassFinalizer::kNotGeneratingSnapshot)); |
219 return error.IsNull(); | 220 return error.IsNull(); |
220 } | 221 } |
221 | 222 |
222 | 223 |
223 bool CompilerTest::TestCompileFunction(const Function& function) { | 224 bool CompilerTest::TestCompileFunction(const Function& function) { |
224 Isolate* isolate = Isolate::Current(); | 225 Isolate* isolate = Isolate::Current(); |
225 ASSERT(isolate != NULL); | 226 ASSERT(isolate != NULL); |
226 ASSERT(ClassFinalizer::AllClassesFinalized()); | 227 ASSERT(ClassFinalizer::AllClassesFinalized()); |
227 const Error& error = Error::Handle(Compiler::CompileFunction(function)); | 228 const Error& error = Error::Handle(Compiler::CompileFunction(function)); |
228 return error.IsNull(); | 229 return error.IsNull(); |
229 } | 230 } |
230 | 231 |
231 } // namespace dart | 232 } // namespace dart |
OLD | NEW |