From 0219bdb81a8537fa65dbccb3bbedb41a6352e2df Mon Sep 17 00:00:00 2001 From: "zra@google.com" Date: Tue, 4 Nov 2014 22:03:57 +0000 Subject: [PATCH] Regularize naming to make BUILD.gn files easier to write. Review URL: https://codereview.chromium.org//703693002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41510 260f80e4-7a28-3924-810f-c04153c831b5 --- runtime/bin/bin.gypi | 2 +- runtime/bin/builtin.cc | 2 +- runtime/bin/builtin.h | 2 +- ...corelib_sources.gypi => core_sources.gypi} | 0 runtime/vm/bootstrap.cc | 8 +-- runtime/vm/bootstrap.h | 8 +-- ...strap_nocorelib.cc => bootstrap_nocore.cc} | 0 runtime/vm/dart.cc | 2 +- runtime/vm/vm.gypi | 52 +++++++++---------- ...corelib_sources.gypi => core_sources.gypi} | 0 utils/apidoc/docgen.gyp | 2 +- 11 files changed, 39 insertions(+), 39 deletions(-) rename runtime/lib/{corelib_sources.gypi => core_sources.gypi} (100%) rename runtime/vm/{bootstrap_nocorelib.cc => bootstrap_nocore.cc} (100%) rename sdk/lib/core/{corelib_sources.gypi => core_sources.gypi} (100%) diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi index 92939b89a81..e0787285a32 100644 --- a/runtime/bin/bin.gypi +++ b/runtime/bin/bin.gypi @@ -40,7 +40,7 @@ '--output', '<(builtin_cc_file)', '--input_cc', '<(builtin_in_cc_file)', '--include', 'bin/builtin.h', - '--var_name', 'dart::bin::Builtin::builtin_source_paths_', + '--var_name', 'dart::bin::Builtin::_builtin_source_paths_', '--library_name', 'dart:_builtin', '<@(_sources)', ], diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc index d153b11fac2..723ad54b1fb 100644 --- a/runtime/bin/builtin.cc +++ b/runtime/bin/builtin.cc @@ -14,7 +14,7 @@ namespace bin { Builtin::builtin_lib_props Builtin::builtin_libraries_[] = { /* { url_, source_, patch_url_, patch_source_, has_natives_ } */ - { DartUtils::kBuiltinLibURL, builtin_source_paths_, NULL, NULL, true }, + { DartUtils::kBuiltinLibURL, _builtin_source_paths_, NULL, NULL, true }, { DartUtils::kIOLibURL, io_source_paths_, DartUtils::kIOLibPatchURL, io_patch_paths_, true }, }; diff --git a/runtime/bin/builtin.h b/runtime/bin/builtin.h index 58081262723..32fde815b61 100644 --- a/runtime/bin/builtin.h +++ b/runtime/bin/builtin.h @@ -61,7 +61,7 @@ class Builtin { static const uint8_t* NativeSymbol(Dart_NativeFunction nf); - static const char* builtin_source_paths_[]; + static const char* _builtin_source_paths_[]; static const char* io_source_paths_[]; static const char* io_patch_paths_[]; diff --git a/runtime/lib/corelib_sources.gypi b/runtime/lib/core_sources.gypi similarity index 100% rename from runtime/lib/corelib_sources.gypi rename to runtime/lib/core_sources.gypi diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc index 56b7ea2fd1a..b66e18c9a63 100644 --- a/runtime/vm/bootstrap.cc +++ b/runtime/vm/bootstrap.cc @@ -33,8 +33,8 @@ typedef struct { static bootstrap_lib_props bootstrap_libraries[] = { INIT_LIBRARY(ObjectStore::kCore, core, - Bootstrap::corelib_source_paths_, - Bootstrap::corelib_patch_paths_), + Bootstrap::core_source_paths_, + Bootstrap::core_patch_paths_), INIT_LIBRARY(ObjectStore::kAsync, async, Bootstrap::async_source_paths_, @@ -49,8 +49,8 @@ static bootstrap_lib_props bootstrap_libraries[] = { Bootstrap::collection_patch_paths_), INIT_LIBRARY(ObjectStore::kInternal, _internal, - Bootstrap::internal_source_paths_, - Bootstrap::internal_patch_paths_), + Bootstrap::_internal_source_paths_, + Bootstrap::_internal_patch_paths_), INIT_LIBRARY(ObjectStore::kIsolate, isolate, Bootstrap::isolate_source_paths_, diff --git a/runtime/vm/bootstrap.h b/runtime/vm/bootstrap.h index 9a3c09b9fff..3419828acf6 100644 --- a/runtime/vm/bootstrap.h +++ b/runtime/vm/bootstrap.h @@ -21,10 +21,10 @@ class Bootstrap : public AllStatic { // Source path mapping for library URI and 'parts'. static const char* async_source_paths_[]; - static const char* corelib_source_paths_[]; + static const char* core_source_paths_[]; static const char* collection_source_paths_[]; static const char* convert_source_paths_[]; - static const char* internal_source_paths_[]; + static const char* _internal_source_paths_[]; static const char* isolate_source_paths_[]; static const char* json_source_paths_[]; static const char* math_source_paths_[]; @@ -35,10 +35,10 @@ class Bootstrap : public AllStatic { // Source path mapping for patch URI and 'parts'. static const char* async_patch_paths_[]; - static const char* corelib_patch_paths_[]; + static const char* core_patch_paths_[]; static const char* collection_patch_paths_[]; static const char* convert_patch_paths_[]; - static const char* internal_patch_paths_[]; + static const char* _internal_patch_paths_[]; static const char* isolate_patch_paths_[]; static const char* math_patch_paths_[]; static const char* mirrors_patch_paths_[]; diff --git a/runtime/vm/bootstrap_nocorelib.cc b/runtime/vm/bootstrap_nocore.cc similarity index 100% rename from runtime/vm/bootstrap_nocorelib.cc rename to runtime/vm/bootstrap_nocore.cc diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc index b7dbc3f8b35..06625a6f9bc 100644 --- a/runtime/vm/dart.cc +++ b/runtime/vm/dart.cc @@ -80,7 +80,7 @@ const char* Dart::InitOnce(Dart_IsolateCreateCallback create, Dart_ServiceIsolateCreateCalback service_create) { // TODO(iposva): Fix race condition here. if (vm_isolate_ != NULL || !Flags::Initialized()) { - return "VM already initialized."; + return "VM already initialized or flags not initialized."; } Isolate::SetFileCallbacks(file_open, file_read, file_write, file_close); Isolate::SetEntropySourceCallback(entropy_source); diff --git a/runtime/vm/vm.gypi b/runtime/vm/vm.gypi index 84ce2357f9a..c38c55b8d05 100644 --- a/runtime/vm/vm.gypi +++ b/runtime/vm/vm.gypi @@ -9,8 +9,8 @@ 'builtin_in_cc_file': '../bin/builtin_in.cc', 'async_cc_file': '<(gen_source_dir)/async_gen.cc', 'async_patch_cc_file': '<(gen_source_dir)/async_patch_gen.cc', - 'corelib_cc_file': '<(gen_source_dir)/corelib_gen.cc', - 'corelib_patch_cc_file': '<(gen_source_dir)/corelib_patch_gen.cc', + 'core_cc_file': '<(gen_source_dir)/core_gen.cc', + 'core_patch_cc_file': '<(gen_source_dir)/core_patch_gen.cc', 'collection_cc_file': '<(gen_source_dir)/collection_gen.cc', 'collection_patch_cc_file': '<(gen_source_dir)/collection_patch_gen.cc', 'convert_cc_file': '<(gen_source_dir)/convert_gen.cc', @@ -107,8 +107,8 @@ 'dependencies': [ 'generate_async_cc_file#host', 'generate_async_patch_cc_file#host', - 'generate_corelib_cc_file#host', - 'generate_corelib_patch_cc_file#host', + 'generate_core_cc_file#host', + 'generate_core_patch_cc_file#host', 'generate_collection_cc_file#host', 'generate_collection_patch_cc_file#host', 'generate_convert_cc_file#host', @@ -129,7 +129,7 @@ 'includes': [ '../lib/async_sources.gypi', '../lib/collection_sources.gypi', - '../lib/corelib_sources.gypi', + '../lib/core_sources.gypi', '../lib/isolate_sources.gypi', '../lib/math_sources.gypi', '../lib/mirrors_sources.gypi', @@ -142,8 +142,8 @@ # Include generated source files. '<(async_cc_file)', '<(async_patch_cc_file)', - '<(corelib_cc_file)', - '<(corelib_patch_cc_file)', + '<(core_cc_file)', + '<(core_patch_cc_file)', '<(collection_cc_file)', '<(collection_patch_cc_file)', '<(convert_cc_file)', @@ -172,7 +172,7 @@ 'includes': [ '../lib/async_sources.gypi', '../lib/collection_sources.gypi', - '../lib/corelib_sources.gypi', + '../lib/core_sources.gypi', '../lib/isolate_sources.gypi', '../lib/math_sources.gypi', '../lib/mirrors_sources.gypi', @@ -181,7 +181,7 @@ '../lib/internal_sources.gypi', ], 'sources': [ - 'bootstrap_nocorelib.cc', + 'bootstrap_nocore.cc', ], 'include_dirs': [ '..', @@ -427,12 +427,12 @@ ] }, { - 'target_name': 'generate_corelib_cc_file', + 'target_name': 'generate_core_cc_file', 'type': 'none', 'toolsets':['host'], 'includes': [ # Load the shared core library sources. - '../../sdk/lib/core/corelib_sources.gypi', + '../../sdk/lib/core/core_sources.gypi', ], 'sources/': [ # Exclude all .[cc|h] files. @@ -443,36 +443,36 @@ ], 'actions': [ { - 'action_name': 'generate_corelib_cc', + 'action_name': 'generate_core_cc', 'inputs': [ '../tools/gen_library_src_paths.py', '<(libgen_in_cc_file)', '<@(_sources)', ], 'outputs': [ - '<(corelib_cc_file)', + '<(core_cc_file)', ], 'action': [ 'python', 'tools/gen_library_src_paths.py', - '--output', '<(corelib_cc_file)', + '--output', '<(core_cc_file)', '--input_cc', '<(libgen_in_cc_file)', '--include', 'vm/bootstrap.h', - '--var_name', 'dart::Bootstrap::corelib_source_paths_', + '--var_name', 'dart::Bootstrap::core_source_paths_', '--library_name', 'dart:core', '<@(_sources)', ], - 'message': 'Generating ''<(corelib_cc_file)'' file.' + 'message': 'Generating ''<(core_cc_file)'' file.' }, ] }, { - 'target_name': 'generate_corelib_patch_cc_file', + 'target_name': 'generate_core_patch_cc_file', 'type': 'none', 'toolsets':['host'], 'includes': [ # Load the runtime implementation sources. - '../lib/corelib_sources.gypi', + '../lib/core_sources.gypi', ], 'sources/': [ # Exclude all .[cc|h] files. @@ -483,26 +483,26 @@ ], 'actions': [ { - 'action_name': 'generate_corelib_patch_cc', + 'action_name': 'generate_core_patch_cc', 'inputs': [ '../tools/gen_library_src_paths.py', '<(libgen_in_cc_file)', '<@(_sources)', ], 'outputs': [ - '<(corelib_patch_cc_file)', + '<(core_patch_cc_file)', ], 'action': [ 'python', 'tools/gen_library_src_paths.py', - '--output', '<(corelib_patch_cc_file)', + '--output', '<(core_patch_cc_file)', '--input_cc', '<(libgen_in_cc_file)', '--include', 'vm/bootstrap.h', - '--var_name', 'dart::Bootstrap::corelib_patch_paths_', - '--library_name', 'dart:corelib', + '--var_name', 'dart::Bootstrap::core_patch_paths_', + '--library_name', 'dart:core', '<@(_sources)', ], - 'message': 'Generating ''<(corelib_patch_cc_file)'' file.' + 'message': 'Generating ''<(core_patch_cc_file)'' file.' }, ] }, @@ -538,7 +538,7 @@ '--output', '<(internal_patch_cc_file)', '--input_cc', '<(libgen_in_cc_file)', '--include', 'vm/bootstrap.h', - '--var_name', 'dart::Bootstrap::internal_patch_paths_', + '--var_name', 'dart::Bootstrap::_internal_patch_paths_', '--library_name', 'dart:_internal', '<@(_sources)', ], @@ -578,7 +578,7 @@ '--output', '<(internal_cc_file)', '--input_cc', '<(libgen_in_cc_file)', '--include', 'vm/bootstrap.h', - '--var_name', 'dart::Bootstrap::internal_source_paths_', + '--var_name', 'dart::Bootstrap::_internal_source_paths_', '--library_name', 'dart:_internal', '<@(_sources)', ], diff --git a/sdk/lib/core/corelib_sources.gypi b/sdk/lib/core/core_sources.gypi similarity index 100% rename from sdk/lib/core/corelib_sources.gypi rename to sdk/lib/core/core_sources.gypi diff --git a/utils/apidoc/docgen.gyp b/utils/apidoc/docgen.gyp index 0cdd4ea4f79..66a4fb60b9e 100644 --- a/utils/apidoc/docgen.gyp +++ b/utils/apidoc/docgen.gyp @@ -23,7 +23,7 @@ '../../pkg/pkg_files.gyp:pkg_files_stamp', ], 'includes': [ - '../../sdk/lib/core/corelib_sources.gypi', + '../../sdk/lib/core/core_sources.gypi', ], 'actions': [ {