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

Side by Side Diff: runtime/vm/bootstrap_natives.cc

Issue 1712843002: Remove mirrors in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/vm/bootstrap_natives.h ('k') | runtime/vm/dart_api_impl.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 "vm/bootstrap.h" 5 #include "vm/bootstrap.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/bootstrap_natives.h" 9 #include "vm/bootstrap_natives.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // List all native functions implemented in the vm or core bootstrap dart 22 // List all native functions implemented in the vm or core bootstrap dart
23 // libraries so that we can resolve the native function to it's entry 23 // libraries so that we can resolve the native function to it's entry
24 // point. 24 // point.
25 static struct NativeEntries { 25 static struct NativeEntries {
26 const char* name_; 26 const char* name_;
27 Dart_NativeFunction function_; 27 Dart_NativeFunction function_;
28 int argument_count_; 28 int argument_count_;
29 } BootStrapEntries[] = { 29 } BootStrapEntries[] = {
30 BOOTSTRAP_NATIVE_LIST(REGISTER_NATIVE_ENTRY) 30 BOOTSTRAP_NATIVE_LIST(REGISTER_NATIVE_ENTRY)
31 #ifndef PRODUCT
rmacnak 2016/02/19 01:10:58 We don't also prevent the mirrors library from bei
Cutch 2016/02/22 17:43:01 I now don't register the mirrors library in produc
32 MIRRORS_BOOTSTRAP_NATIVE_LIST(REGISTER_NATIVE_ENTRY)
33 #endif // !PRODUCT
31 }; 34 };
32 35
33 36
34 Dart_NativeFunction BootstrapNatives::Lookup(Dart_Handle name, 37 Dart_NativeFunction BootstrapNatives::Lookup(Dart_Handle name,
35 int argument_count, 38 int argument_count,
36 bool* auto_setup_scope) { 39 bool* auto_setup_scope) {
37 const Object& obj = Object::Handle(Api::UnwrapHandle(name)); 40 const Object& obj = Object::Handle(Api::UnwrapHandle(name));
38 if (!obj.IsString()) { 41 if (!obj.IsString()) {
39 return NULL; 42 return NULL;
40 } 43 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 library.set_native_entry_symbol_resolver(symbol_resolver); 140 library.set_native_entry_symbol_resolver(symbol_resolver);
138 } 141 }
139 142
140 143
141 bool Bootstrap::IsBootstapResolver(Dart_NativeEntryResolver resolver) { 144 bool Bootstrap::IsBootstapResolver(Dart_NativeEntryResolver resolver) {
142 return (resolver == 145 return (resolver ==
143 reinterpret_cast<Dart_NativeEntryResolver>(BootstrapNatives::Lookup)); 146 reinterpret_cast<Dart_NativeEntryResolver>(BootstrapNatives::Lookup));
144 } 147 }
145 148
146 } // namespace dart 149 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698