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

Side by Side Diff: runtime/bin/gen_snapshot.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/bin/dartutils.cc ('k') | runtime/bin/vmservice_impl.cc » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 if (tag == Dart_kImportTag) { 321 if (tag == Dart_kImportTag) {
322 return Builtin::LoadAndCheckLibrary(builtinId); 322 return Builtin::LoadAndCheckLibrary(builtinId);
323 } 323 }
324 ASSERT(tag == Dart_kSourceTag); 324 ASSERT(tag == Dart_kSourceTag);
325 return DartUtils::NewError("Unable to part '%s' ", url_string); 325 return DartUtils::NewError("Unable to part '%s' ", url_string);
326 } 326 }
327 327
328 if (libraryBuiltinId != Builtin::kInvalidLibrary) { 328 if (libraryBuiltinId != Builtin::kInvalidLibrary) {
329 // Special case for parting sources of a builtin library. 329 // Special case for parting sources of a builtin library.
330 if (tag == Dart_kSourceTag) { 330 if (tag == Dart_kSourceTag) {
331 return Dart_LoadSource( 331 return Dart_LoadSource(library, url,
332 library, url, Builtin::PartSource(libraryBuiltinId, url_string)); 332 Builtin::PartSource(libraryBuiltinId, url_string), 0, 0);
333 } 333 }
334 ASSERT(tag == Dart_kImportTag); 334 ASSERT(tag == Dart_kImportTag);
335 return DartUtils::NewError("Unable to import '%s' ", url_string); 335 return DartUtils::NewError("Unable to import '%s' ", url_string);
336 } 336 }
337 337
338 Dart_Handle resolved_url = url; 338 Dart_Handle resolved_url = url;
339 if (mapped_url_string != NULL) { 339 if (mapped_url_string != NULL) {
340 // Mapped urls are relative to working directory. 340 // Mapped urls are relative to working directory.
341 resolved_url = ResolveScriptUri(mapped_url_string); 341 resolved_url = ResolveScriptUri(mapped_url_string);
342 if (Dart_IsError(resolved_url)) { 342 if (Dart_IsError(resolved_url)) {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 } 581 }
582 return 0; 582 return 0;
583 } 583 }
584 584
585 } // namespace bin 585 } // namespace bin
586 } // namespace dart 586 } // namespace dart
587 587
588 int main(int argc, char** argv) { 588 int main(int argc, char** argv) {
589 return dart::bin::main(argc, argv); 589 return dart::bin::main(argc, argv);
590 } 590 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/vmservice_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698