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

Side by Side Diff: runtime/vm/unit_test.cc

Issue 9956133: Remove many calls to Isolate::Current() in the dart embedding api by (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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
« runtime/vm/object.h ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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
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
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
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698