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

Side by Side Diff: runtime/bin/io_natives.cc

Issue 2480793002: clang-format runtime/bin (Closed)
Patch Set: Created 4 years, 1 month 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/io_buffer.cc ('k') | runtime/bin/io_service.h » ('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 #include "bin/io_natives.h" 5 #include "bin/io_natives.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "bin/builtin.h" 10 #include "bin/builtin.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 V(X509_Issuer, 1) \ 150 V(X509_Issuer, 1) \
151 V(X509_StartValidity, 1) \ 151 V(X509_StartValidity, 1) \
152 V(X509_EndValidity, 1) 152 V(X509_EndValidity, 1)
153 153
154 IO_NATIVE_LIST(DECLARE_FUNCTION); 154 IO_NATIVE_LIST(DECLARE_FUNCTION);
155 155
156 static struct NativeEntries { 156 static struct NativeEntries {
157 const char* name_; 157 const char* name_;
158 Dart_NativeFunction function_; 158 Dart_NativeFunction function_;
159 int argument_count_; 159 int argument_count_;
160 } IOEntries[] = { 160 } IOEntries[] = {IO_NATIVE_LIST(REGISTER_FUNCTION)};
161 IO_NATIVE_LIST(REGISTER_FUNCTION)
162 };
163 161
164 162
165 Dart_NativeFunction IONativeLookup(Dart_Handle name, 163 Dart_NativeFunction IONativeLookup(Dart_Handle name,
166 int argument_count, 164 int argument_count,
167 bool* auto_setup_scope) { 165 bool* auto_setup_scope) {
168 const char* function_name = NULL; 166 const char* function_name = NULL;
169 Dart_Handle result = Dart_StringToCString(name, &function_name); 167 Dart_Handle result = Dart_StringToCString(name, &function_name);
170 DART_CHECK_VALID(result); 168 DART_CHECK_VALID(result);
171 ASSERT(function_name != NULL); 169 ASSERT(function_name != NULL);
172 ASSERT(auto_setup_scope != NULL); 170 ASSERT(auto_setup_scope != NULL);
(...skipping 16 matching lines...) Expand all
189 struct NativeEntries* entry = &(IOEntries[i]); 187 struct NativeEntries* entry = &(IOEntries[i]);
190 if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) { 188 if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) {
191 return reinterpret_cast<const uint8_t*>(entry->name_); 189 return reinterpret_cast<const uint8_t*>(entry->name_);
192 } 190 }
193 } 191 }
194 return NULL; 192 return NULL;
195 } 193 }
196 194
197 } // namespace bin 195 } // namespace bin
198 } // namespace dart 196 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/io_buffer.cc ('k') | runtime/bin/io_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698