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

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

Issue 1966833002: Dart Timeline improvements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/symbols.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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 5022 matching lines...) Expand 10 before | Expand all | Expand 10 after
5033 if (result.IsNull()) { 5033 if (result.IsNull()) {
5034 // Every 'dart:X' library introduces an environment variable 5034 // Every 'dart:X' library introduces an environment variable
5035 // 'dart.library.X' that is set to 'true'. 5035 // 'dart.library.X' that is set to 'true'.
5036 // We just need to make sure to hide private libraries (starting with 5036 // We just need to make sure to hide private libraries (starting with
5037 // "_", and the mirrors library, if it is not supported. 5037 // "_", and the mirrors library, if it is not supported.
5038 5038
5039 if (!FLAG_enable_mirrors && name.Equals(Symbols::DartLibraryMirrors())) { 5039 if (!FLAG_enable_mirrors && name.Equals(Symbols::DartLibraryMirrors())) {
5040 return Symbols::False().raw(); 5040 return Symbols::False().raw();
5041 } 5041 }
5042 5042
5043 if (name.Equals(Symbols::DartVMProduct())) {
5044 #ifdef PRODUCT
5045 return Symbols::True().raw();
5046 #else
5047 return Symbols::False().raw();
5048 #endif
5049 }
5050
5043 const String& prefix = Symbols::DartLibrary(); 5051 const String& prefix = Symbols::DartLibrary();
5044 if (name.StartsWith(prefix)) { 5052 if (name.StartsWith(prefix)) {
5045 const String& library_name = 5053 const String& library_name =
5046 String::Handle(String::SubString(name, prefix.Length())); 5054 String::Handle(String::SubString(name, prefix.Length()));
5047 5055
5048 // Private libraries (starting with "_") are not exposed to the user. 5056 // Private libraries (starting with "_") are not exposed to the user.
5049 if (!library_name.IsNull() && library_name.CharAt(0) != '_') { 5057 if (!library_name.IsNull() && library_name.CharAt(0) != '_') {
5050 const String& dart_library_name = 5058 const String& dart_library_name =
5051 String::Handle(String::Concat(Symbols::DartScheme(), library_name)); 5059 String::Handle(String::Concat(Symbols::DartScheme(), library_name));
5052 const Library& library = 5060 const Library& library =
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
6356 6364
6357 DART_EXPORT bool Dart_IsPrecompiledRuntime() { 6365 DART_EXPORT bool Dart_IsPrecompiledRuntime() {
6358 #if defined(DART_PRECOMPILED_RUNTIME) 6366 #if defined(DART_PRECOMPILED_RUNTIME)
6359 return true; 6367 return true;
6360 #else 6368 #else
6361 return false; 6369 return false;
6362 #endif 6370 #endif
6363 } 6371 }
6364 6372
6365 } // namespace dart 6373 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698