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

Side by Side Diff: runtime/bin/builtin.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 | « no previous file | runtime/bin/dartutils.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) 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 "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return DartUtils::ReadStringFromFile(source_path); 80 return DartUtils::ReadStringFromFile(source_path);
81 } 81 }
82 82
83 83
84 void Builtin::SetNativeResolver(BuiltinLibraryId id) { 84 void Builtin::SetNativeResolver(BuiltinLibraryId id) {
85 UNREACHABLE(); 85 UNREACHABLE();
86 } 86 }
87 87
88 88
89 Dart_Handle Builtin::LoadLibrary(Dart_Handle url, BuiltinLibraryId id) { 89 Dart_Handle Builtin::LoadLibrary(Dart_Handle url, BuiltinLibraryId id) {
90 Dart_Handle library = Dart_LoadLibrary(url, Source(id)); 90 Dart_Handle library = Dart_LoadLibrary(url, Source(id), 0, 0);
91 if (!Dart_IsError(library) && (builtin_libraries_[id].has_natives_)) { 91 if (!Dart_IsError(library) && (builtin_libraries_[id].has_natives_)) {
92 // Setup the native resolver for built in library functions. 92 // Setup the native resolver for built in library functions.
93 DART_CHECK_VALID( 93 DART_CHECK_VALID(
94 Dart_SetNativeResolver(library, NativeLookup, NativeSymbol)); 94 Dart_SetNativeResolver(library, NativeLookup, NativeSymbol));
95 } 95 }
96 if (builtin_libraries_[id].patch_url_ != NULL) { 96 if (builtin_libraries_[id].patch_url_ != NULL) {
97 ASSERT(builtin_libraries_[id].patch_paths_ != NULL); 97 ASSERT(builtin_libraries_[id].patch_paths_ != NULL);
98 LoadPatchFiles(library, 98 LoadPatchFiles(library,
99 builtin_libraries_[id].patch_url_, 99 builtin_libraries_[id].patch_url_,
100 builtin_libraries_[id].patch_paths_); 100 builtin_libraries_[id].patch_paths_);
(...skipping 10 matching lines...) Expand all
111 Dart_Handle library = Dart_LookupLibrary(url); 111 Dart_Handle library = Dart_LookupLibrary(url);
112 if (Dart_IsError(library)) { 112 if (Dart_IsError(library)) {
113 library = LoadLibrary(url, id); 113 library = LoadLibrary(url, id);
114 } 114 }
115 DART_CHECK_VALID(library); 115 DART_CHECK_VALID(library);
116 return library; 116 return library;
117 } 117 }
118 118
119 } // namespace bin 119 } // namespace bin
120 } // namespace dart 120 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/dartutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698