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

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

Issue 429013002: Make Dart_LoadLibrary and Dart_LoadSource take line and column offsets like Dart_LoadScript. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 4 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
« no previous file with comments | « runtime/vm/snapshot_test.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 "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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); 97 return Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
98 } else { 98 } else {
99 return DartUtils::NewError("Do not know how to load '%s'", url_chars); 99 return DartUtils::NewError("Do not know how to load '%s'", url_chars);
100 } 100 }
101 } 101 }
102 if (is_io_library) { 102 if (is_io_library) {
103 ASSERT(tag == Dart_kSourceTag); 103 ASSERT(tag == Dart_kSourceTag);
104 return Dart_LoadSource(library, 104 return Dart_LoadSource(library,
105 url, 105 url,
106 Builtin::PartSource(Builtin::kIOLibrary, 106 Builtin::PartSource(Builtin::kIOLibrary,
107 url_chars)); 107 url_chars),
108 0, 0);
108 } 109 }
109 return DartUtils::LoadSource(library, url, tag, url_chars); 110 return DartUtils::LoadSource(library, url, tag, url_chars);
110 } 111 }
111 112
112 113
113 Dart_Handle TestCase::LoadTestScript(const char* script, 114 Dart_Handle TestCase::LoadTestScript(const char* script,
114 Dart_NativeEntryResolver resolver, 115 Dart_NativeEntryResolver resolver,
115 const char* lib_url, 116 const char* lib_url,
116 bool finalize_classes) { 117 bool finalize_classes) {
117 Dart_Handle url = NewString(lib_url); 118 Dart_Handle url = NewString(lib_url);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 Isolate* isolate = Isolate::Current(); 247 Isolate* isolate = Isolate::Current();
247 ASSERT(isolate != NULL); 248 ASSERT(isolate != NULL);
248 ASSERT(ClassFinalizer::AllClassesFinalized()); 249 ASSERT(ClassFinalizer::AllClassesFinalized());
249 const Error& error = Error::Handle(Compiler::CompileFunction(isolate, 250 const Error& error = Error::Handle(Compiler::CompileFunction(isolate,
250 function)); 251 function));
251 return error.IsNull(); 252 return error.IsNull();
252 } 253 }
253 254
254 255
255 } // namespace dart 256 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698