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

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

Issue 1152833002: Add a runtime flag to control availability of dart:mirrors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 ASSERT(!library.IsNull()); 109 ASSERT(!library.IsNull());
110 library.set_native_entry_resolver(resolver); 110 library.set_native_entry_resolver(resolver);
111 library.set_native_entry_symbol_resolver(symbol_resolver); 111 library.set_native_entry_symbol_resolver(symbol_resolver);
112 112
113 library = Library::MathLibrary(); 113 library = Library::MathLibrary();
114 ASSERT(!library.IsNull()); 114 ASSERT(!library.IsNull());
115 library.set_native_entry_resolver(resolver); 115 library.set_native_entry_resolver(resolver);
116 library.set_native_entry_symbol_resolver(symbol_resolver); 116 library.set_native_entry_symbol_resolver(symbol_resolver);
117 117
118 library = Library::MirrorsLibrary(); 118 library = Library::MirrorsLibrary();
119 ASSERT(!library.IsNull()); 119 if (!library.IsNull()) {
120 library.set_native_entry_resolver(resolver); 120 library.set_native_entry_resolver(resolver);
121 library.set_native_entry_symbol_resolver(symbol_resolver); 121 library.set_native_entry_symbol_resolver(symbol_resolver);
122 }
122 123
123 library = Library::ProfilerLibrary(); 124 library = Library::ProfilerLibrary();
124 ASSERT(!library.IsNull()); 125 ASSERT(!library.IsNull());
125 library.set_native_entry_resolver(resolver); 126 library.set_native_entry_resolver(resolver);
126 library.set_native_entry_symbol_resolver(symbol_resolver); 127 library.set_native_entry_symbol_resolver(symbol_resolver);
127 128
128 library = Library::TypedDataLibrary(); 129 library = Library::TypedDataLibrary();
129 ASSERT(!library.IsNull()); 130 ASSERT(!library.IsNull());
130 library.set_native_entry_resolver(resolver); 131 library.set_native_entry_resolver(resolver);
131 library.set_native_entry_symbol_resolver(symbol_resolver); 132 library.set_native_entry_symbol_resolver(symbol_resolver);
132 } 133 }
133 134
134 135
135 bool Bootstrap::IsBootstapResolver(Dart_NativeEntryResolver resolver) { 136 bool Bootstrap::IsBootstapResolver(Dart_NativeEntryResolver resolver) {
136 return (resolver == 137 return (resolver ==
137 reinterpret_cast<Dart_NativeEntryResolver>(BootstrapNatives::Lookup)); 138 reinterpret_cast<Dart_NativeEntryResolver>(BootstrapNatives::Lookup));
138 } 139 }
139 140
140 } // namespace dart 141 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | runtime/vm/dart.cc » ('j') | runtime/vm/dart.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698