| 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 "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 | 98 |
| 99 | 99 |
| 100 Dart_Handle TestCase::library_handler(Dart_LibraryTag tag, | 100 Dart_Handle TestCase::library_handler(Dart_LibraryTag tag, |
| 101 Dart_Handle library, | 101 Dart_Handle library, |
| 102 Dart_Handle url, | 102 Dart_Handle url, |
| 103 Dart_Handle import_map) { | 103 Dart_Handle import_map) { |
| 104 if (tag == kCanonicalizeUrl) { | 104 if (tag == kCanonicalizeUrl) { |
| 105 return url; | 105 return url; |
| 106 } | 106 } |
| 107 return Api::Success(); | 107 return Api::Success(Isolate::Current()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 | 110 |
| 111 uword AssemblerTest::Assemble() { | 111 uword AssemblerTest::Assemble() { |
| 112 const Code& code = Code::Handle(Code::FinalizeCode(name_, assembler_)); | 112 const Code& code = Code::Handle(Code::FinalizeCode(name_, assembler_)); |
| 113 if (FLAG_disassemble) { | 113 if (FLAG_disassemble) { |
| 114 OS::Print("Code for test '%s' {\n", name_); | 114 OS::Print("Code for test '%s' {\n", name_); |
| 115 const Instructions& instructions = | 115 const Instructions& instructions = |
| 116 Instructions::Handle(code.instructions()); | 116 Instructions::Handle(code.instructions()); |
| 117 uword start = instructions.EntryPoint(); | 117 uword start = instructions.EntryPoint(); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 | 197 |
| 198 bool CompilerTest::TestCompileFunction(const Function& function) { | 198 bool CompilerTest::TestCompileFunction(const Function& function) { |
| 199 Isolate* isolate = Isolate::Current(); | 199 Isolate* isolate = Isolate::Current(); |
| 200 ASSERT(isolate != NULL); | 200 ASSERT(isolate != NULL); |
| 201 const Error& error = Error::Handle(Compiler::CompileFunction(function)); | 201 const Error& error = Error::Handle(Compiler::CompileFunction(function)); |
| 202 return error.IsNull(); | 202 return error.IsNull(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace dart | 205 } // namespace dart |
| OLD | NEW |