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

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

Issue 10871092: Added option --script-snapshot in gen_snapshot to generate the snapshot of a scipt into the file. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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') | runtime/bin/main.cc » ('J')
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/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/utils.h" 9 #include "bin/utils.h"
10 #include "include/dart_api.h" 10 #include "include/dart_api.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 static bool IsDartCryptoLibURL(const char* url_name); 83 static bool IsDartCryptoLibURL(const char* url_name);
84 static bool IsDartIOLibURL(const char* url_name); 84 static bool IsDartIOLibURL(const char* url_name);
85 static bool IsDartJsonLibURL(const char* url_name); 85 static bool IsDartJsonLibURL(const char* url_name);
86 static bool IsDartUriLibURL(const char* url_name); 86 static bool IsDartUriLibURL(const char* url_name);
87 static bool IsDartUtfLibURL(const char* url_name); 87 static bool IsDartUtfLibURL(const char* url_name);
88 static bool IsDartWebLibURL(const char* url_name); 88 static bool IsDartWebLibURL(const char* url_name);
89 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, 89 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping,
90 Dart_Handle library, 90 Dart_Handle library,
91 const char* url_str); 91 const char* url_str);
92 static Dart_Handle ReadStringFromFile(const char* filename); 92 static Dart_Handle ReadStringFromFile(const char* filename);
93 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
94 Dart_Handle library,
95 Dart_Handle url);
96 static Dart_Handle LoadScript(const char* script_uri,
97 bool resolve_script,
98 Dart_Handle builtin_lib);
93 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, 99 static Dart_Handle LoadSource(CommandLineOptions* url_mapping,
94 Dart_Handle library, 100 Dart_Handle library,
95 Dart_Handle url, 101 Dart_Handle url,
96 Dart_LibraryTag tag, 102 Dart_LibraryTag tag,
97 const char* filename); 103 const char* filename);
98 static bool PostNull(Dart_Port port_id); 104 static bool PostNull(Dart_Port port_id);
99 static bool PostInt32(Dart_Port port_id, int32_t value); 105 static bool PostInt32(Dart_Port port_id, int32_t value);
100 106
101 // Create a new Dart OSError object with the current OS error. 107 // Create a new Dart OSError object with the current OS error.
102 static Dart_Handle NewDartOSError(); 108 static Dart_Handle NewDartOSError();
103 // Create a new Dart OSError object with the provided OS error. 109 // Create a new Dart OSError object with the provided OS error.
104 static Dart_Handle NewDartOSError(OSError* os_error); 110 static Dart_Handle NewDartOSError(OSError* os_error);
105 111
112 static void SetOriginalWorkingDirectory();
113
114 // Global state that stores the original working directory..
115 static const char* original_working_directory;
116
106 static const char* kDartScheme; 117 static const char* kDartScheme;
107 static const char* kDartExtensionScheme; 118 static const char* kDartExtensionScheme;
108 static const char* kBuiltinLibURL; 119 static const char* kBuiltinLibURL;
109 static const char* kCoreLibURL; 120 static const char* kCoreLibURL;
110 static const char* kCoreImplLibURL; 121 static const char* kCoreImplLibURL;
111 static const char* kCryptoLibURL; 122 static const char* kCryptoLibURL;
112 static const char* kIOLibURL; 123 static const char* kIOLibURL;
113 static const char* kJsonLibURL; 124 static const char* kJsonLibURL;
114 static const char* kUriLibURL; 125 static const char* kUriLibURL;
115 static const char* kUtfLibURL; 126 static const char* kUtfLibURL;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } 360 void* Peer() const { return cobject_->value.as_external_byte_array.peer; }
350 Dart_PeerFinalizer Callback() const { 361 Dart_PeerFinalizer Callback() const {
351 return cobject_->value.as_external_byte_array.callback; 362 return cobject_->value.as_external_byte_array.callback;
352 } 363 }
353 364
354 private: 365 private:
355 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); 366 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array);
356 }; 367 };
357 368
358 #endif // BIN_DARTUTILS_H_ 369 #endif // BIN_DARTUTILS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/dartutils.cc » ('j') | runtime/bin/main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698