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

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

Issue 1275353005: VM thread shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merge Created 5 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
« no previous file with comments | « runtime/bin/builtin_common.cc ('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 "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // value out parameter and true is returned. Otherwise, false is 95 // value out parameter and true is returned. Otherwise, false is
96 // returned. 96 // returned.
97 static bool GetInt64Value(Dart_Handle value_obj, int64_t* value); 97 static bool GetInt64Value(Dart_Handle value_obj, int64_t* value);
98 // Returns the string value of a Dart object. If the object is not 98 // Returns the string value of a Dart object. If the object is not
99 // a string value an API error is propagated. 99 // a string value an API error is propagated.
100 static const char* GetStringValue(Dart_Handle str_obj); 100 static const char* GetStringValue(Dart_Handle str_obj);
101 // Returns the boolean value of a Dart object. If the object is not 101 // Returns the boolean value of a Dart object. If the object is not
102 // a boolean value an API error is propagated. 102 // a boolean value an API error is propagated.
103 static bool GetBooleanValue(Dart_Handle bool_obj); 103 static bool GetBooleanValue(Dart_Handle bool_obj);
104 104
105 static void SetIntegerField(Dart_Handle handle, 105 static Dart_Handle SetIntegerField(Dart_Handle handle,
106 const char* name, 106 const char* name,
107 int64_t val); 107 int64_t val);
108 static void SetStringField(Dart_Handle handle, 108 static Dart_Handle SetStringField(Dart_Handle handle,
109 const char* name, 109 const char* name,
110 const char* val); 110 const char* val);
111 static bool IsDartSchemeURL(const char* url_name); 111 static bool IsDartSchemeURL(const char* url_name);
112 static bool IsDartExtensionSchemeURL(const char* url_name); 112 static bool IsDartExtensionSchemeURL(const char* url_name);
113 static bool IsDartIOLibURL(const char* url_name); 113 static bool IsDartIOLibURL(const char* url_name);
114 static bool IsDartBuiltinLibURL(const char* url_name); 114 static bool IsDartBuiltinLibURL(const char* url_name);
115 static bool IsHttpSchemeURL(const char* url_name); 115 static bool IsHttpSchemeURL(const char* url_name);
116 static void* OpenFile(const char* name, bool write); 116 static void* OpenFile(const char* name, bool write);
117 static void ReadFile(const uint8_t** data, intptr_t* file_len, void* stream); 117 static void ReadFile(const uint8_t** data, intptr_t* file_len, void* stream);
118 static void WriteFile(const void* buffer, intptr_t num_bytes, void* stream); 118 static void WriteFile(const void* buffer, intptr_t num_bytes, void* stream);
119 static void CloseFile(void* stream); 119 static void CloseFile(void* stream);
120 static bool EntropySource(uint8_t* buffer, intptr_t length); 120 static bool EntropySource(uint8_t* buffer, intptr_t length);
121 static Dart_Handle ReadStringFromFile(const char* filename); 121 static Dart_Handle ReadStringFromFile(const char* filename);
122 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, 122 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
123 Dart_Handle library, 123 Dart_Handle library,
124 Dart_Handle url); 124 Dart_Handle url);
125 static Dart_Handle LoadScript(const char* script_uri, 125 static Dart_Handle LoadScript(const char* script_uri,
126 Dart_Handle builtin_lib); 126 Dart_Handle builtin_lib);
127 static Dart_Handle PrepareBuiltinLibrary(Dart_Handle builtin_lib, 127 static Dart_Handle PrepareBuiltinLibrary(Dart_Handle builtin_lib,
128 Dart_Handle internal_lib, 128 Dart_Handle internal_lib,
129 bool is_service_isolate, 129 bool is_service_isolate,
130 bool trace_loading, 130 bool trace_loading,
131 const char* package_root, 131 const char* package_root,
132 const char* packages_file); 132 const char* packages_file);
133 static void PrepareCoreLibrary(Dart_Handle core_lib, 133 static Dart_Handle PrepareCoreLibrary(Dart_Handle core_lib,
134 Dart_Handle builtin_lib, 134 Dart_Handle builtin_lib,
135 bool is_service_isolate); 135 bool is_service_isolate);
136 static void PrepareAsyncLibrary(Dart_Handle async_lib, 136 static Dart_Handle PrepareAsyncLibrary(Dart_Handle async_lib,
137 Dart_Handle isolate_lib); 137 Dart_Handle isolate_lib);
138 static void PrepareIOLibrary(Dart_Handle io_lib); 138 static Dart_Handle PrepareIOLibrary(Dart_Handle io_lib);
139 static void PrepareIsolateLibrary(Dart_Handle isolate_lib); 139 static Dart_Handle PrepareIsolateLibrary(Dart_Handle isolate_lib);
140 static Dart_Handle PrepareForScriptLoading(const char* package_root, 140 static Dart_Handle PrepareForScriptLoading(const char* package_root,
141 const char* packages_file, 141 const char* packages_file,
142 bool is_service_isolate, 142 bool is_service_isolate,
143 bool trace_loading, 143 bool trace_loading,
144 Dart_Handle builtin_lib); 144 Dart_Handle builtin_lib);
145 static void SetupIOLibrary(const char* script_uri); 145 static Dart_Handle SetupIOLibrary(const char* script_uri);
146 146
147 static bool PostNull(Dart_Port port_id); 147 static bool PostNull(Dart_Port port_id);
148 static bool PostInt32(Dart_Port port_id, int32_t value); 148 static bool PostInt32(Dart_Port port_id, int32_t value);
149 static bool PostInt64(Dart_Port port_id, int64_t value); 149 static bool PostInt64(Dart_Port port_id, int64_t value);
150 150
151 static Dart_Handle GetDartType(const char* library_url, 151 static Dart_Handle GetDartType(const char* library_url,
152 const char* class_name); 152 const char* class_name);
153 // Create a new Dart OSError object with the current OS error. 153 // Create a new Dart OSError object with the current OS error.
154 static Dart_Handle NewDartOSError(); 154 static Dart_Handle NewDartOSError();
155 // Create a new Dart OSError object with the provided OS error. 155 // Create a new Dart OSError object with the provided OS error.
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 ~ScopedBlockingCall() { 584 ~ScopedBlockingCall() {
585 Dart_IsolateUnblocked(); 585 Dart_IsolateUnblocked();
586 } 586 }
587 }; 587 };
588 588
589 } // namespace bin 589 } // namespace bin
590 } // namespace dart 590 } // namespace dart
591 591
592 #endif // BIN_DARTUTILS_H_ 592 #endif // BIN_DARTUTILS_H_
OLDNEW
« no previous file with comments | « runtime/bin/builtin_common.cc ('k') | runtime/bin/dartutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698