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 "vm/unit_test.h" | 5 #include "vm/unit_test.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 const Error& error = Error::Handle(Compiler::Compile(library, script)); | 268 const Error& error = Error::Handle(Compiler::Compile(library, script)); |
269 if (!error.IsNull()) { | 269 if (!error.IsNull()) { |
270 OS::Print("Error compiling test script:\n%s\n", | 270 OS::Print("Error compiling test script:\n%s\n", |
271 error.ToErrorCString()); | 271 error.ToErrorCString()); |
272 } | 272 } |
273 return error.IsNull(); | 273 return error.IsNull(); |
274 } | 274 } |
275 | 275 |
276 | 276 |
277 bool CompilerTest::TestCompileFunction(const Function& function) { | 277 bool CompilerTest::TestCompileFunction(const Function& function) { |
278 Isolate* isolate = Isolate::Current(); | 278 Thread* thread = Thread::Current(); |
279 ASSERT(isolate != NULL); | 279 ASSERT(thread != NULL); |
280 ASSERT(ClassFinalizer::AllClassesFinalized()); | 280 ASSERT(ClassFinalizer::AllClassesFinalized()); |
281 const Error& error = Error::Handle(Compiler::CompileFunction(isolate, | 281 const Error& error = Error::Handle(Compiler::CompileFunction(thread, |
282 function)); | 282 function)); |
283 return error.IsNull(); | 283 return error.IsNull(); |
284 } | 284 } |
285 | 285 |
286 | 286 |
287 } // namespace dart | 287 } // namespace dart |
OLD | NEW |