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

Side by Side Diff: runtime/bin/dartutils.h

Issue 1998963003: Rework standalone to use a synchronous loader that does not invoke Dart code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « runtime/bin/builtin_impl_sources.gypi ('k') | 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 #ifndef BIN_DARTUTILS_H_ 5 #ifndef BIN_DARTUTILS_H_
6 #define BIN_DARTUTILS_H_ 6 #define BIN_DARTUTILS_H_
7 7
8 #include "bin/isolate_data.h" 8 #include "bin/isolate_data.h"
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_native_api.h" 10 #include "include/dart_native_api.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 static bool SetOriginalWorkingDirectory(); 195 static bool SetOriginalWorkingDirectory();
196 196
197 static const char* MapLibraryUrl(CommandLineOptions* url_mapping, 197 static const char* MapLibraryUrl(CommandLineOptions* url_mapping,
198 const char* url_string); 198 const char* url_string);
199 199
200 static Dart_Handle ResolveUriInWorkingDirectory(Dart_Handle script_uri); 200 static Dart_Handle ResolveUriInWorkingDirectory(Dart_Handle script_uri);
201 static Dart_Handle FilePathFromUri(Dart_Handle script_uri); 201 static Dart_Handle FilePathFromUri(Dart_Handle script_uri);
202 static Dart_Handle ResolveUri(Dart_Handle library_url, Dart_Handle url); 202 static Dart_Handle ResolveUri(Dart_Handle library_url, Dart_Handle url);
203 static Dart_Handle ResolveScript(Dart_Handle url);
203 204
204 // Sniffs the specified text_buffer to see if it contains the magic number 205 // Sniffs the specified text_buffer to see if it contains the magic number
205 // representing a script snapshot. If the text_buffer is a script snapshot 206 // representing a script snapshot. If the text_buffer is a script snapshot
206 // the return value is an updated pointer to the text_buffer pointing past 207 // the return value is an updated pointer to the text_buffer pointing past
207 // the magic number value. The 'buffer_len' parameter is also appropriately 208 // the magic number value. The 'buffer_len' parameter is also appropriately
208 // adjusted. 209 // adjusted.
209 static const uint8_t* SniffForMagicNumber(const uint8_t* text_buffer, 210 static const uint8_t* SniffForMagicNumber(const uint8_t* text_buffer,
210 intptr_t* buffer_len, 211 intptr_t* buffer_len,
211 bool* is_snapshot); 212 bool* is_snapshot);
212 213
(...skipping 11 matching lines...) Expand all
224 static const char* const kInternalLibURL; 225 static const char* const kInternalLibURL;
225 static const char* const kIsolateLibURL; 226 static const char* const kIsolateLibURL;
226 static const char* const kIOLibURL; 227 static const char* const kIOLibURL;
227 static const char* const kIOLibPatchURL; 228 static const char* const kIOLibPatchURL;
228 static const char* const kUriLibURL; 229 static const char* const kUriLibURL;
229 static const char* const kHttpScheme; 230 static const char* const kHttpScheme;
230 static const char* const kVMServiceLibURL; 231 static const char* const kVMServiceLibURL;
231 232
232 static const uint8_t magic_number[]; 233 static const uint8_t magic_number[];
233 234
235 static Dart_Handle LibraryFilePath(Dart_Handle library_uri);
236
234 private: 237 private:
235 static Dart_Handle SetWorkingDirectory(); 238 static Dart_Handle SetWorkingDirectory();
236 static Dart_Handle LibraryFilePath(Dart_Handle library_uri);
237 static Dart_Handle PrepareBuiltinLibrary(Dart_Handle builtin_lib, 239 static Dart_Handle PrepareBuiltinLibrary(Dart_Handle builtin_lib,
238 Dart_Handle internal_lib, 240 Dart_Handle internal_lib,
239 bool is_service_isolate, 241 bool is_service_isolate,
240 bool trace_loading); 242 bool trace_loading);
241 static Dart_Handle PrepareCoreLibrary(Dart_Handle core_lib, 243 static Dart_Handle PrepareCoreLibrary(Dart_Handle core_lib,
242 Dart_Handle builtin_lib, 244 Dart_Handle builtin_lib,
243 bool is_service_isolate); 245 bool is_service_isolate);
244 static Dart_Handle PrepareAsyncLibrary(Dart_Handle async_lib, 246 static Dart_Handle PrepareAsyncLibrary(Dart_Handle async_lib,
245 Dart_Handle isolate_lib); 247 Dart_Handle isolate_lib);
246 static Dart_Handle PrepareIOLibrary(Dart_Handle io_lib); 248 static Dart_Handle PrepareIOLibrary(Dart_Handle io_lib);
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 bool is_typed_data_; 665 bool is_typed_data_;
664 666
665 DISALLOW_ALLOCATION(); 667 DISALLOW_ALLOCATION();
666 DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer); 668 DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer);
667 }; 669 };
668 670
669 } // namespace bin 671 } // namespace bin
670 } // namespace dart 672 } // namespace dart
671 673
672 #endif // BIN_DARTUTILS_H_ 674 #endif // BIN_DARTUTILS_H_
OLDNEW
« no previous file with comments | « runtime/bin/builtin_impl_sources.gypi ('k') | runtime/bin/dartutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698