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

Unified Diff: bin/main.cc

Issue 10911025: Get rid of support for string interpolation in #import strings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/dart_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/main.cc
===================================================================
--- bin/main.cc (revision 11672)
+++ bin/main.cc (working copy)
@@ -30,11 +30,6 @@
static const char* original_working_directory = NULL;
-// Global state that stores the import URL map specified on the
-// command line.
-static CommandLineOptions* import_map_options = NULL;
-
-
// Global state that indicates whether perf_events symbol information
// is to be generated or not.
static File* perf_events_symbols_file = NULL;
@@ -165,12 +160,6 @@
}
-static void ProcessImportMapOption(const char* map) {
- ASSERT(map != NULL);
- import_map_options->AddArgument(map);
-}
-
-
static struct {
const char* option_name;
void (*process)(const char* option);
@@ -180,7 +169,6 @@
{ "--debug", ProcessDebugOption },
{ "--generate_perf_events_symbols", ProcessPerfEventsOption },
{ "--generate_pprof_symbols=", ProcessPprofOption },
- { "--import_map=", ProcessImportMapOption },
{ "--package-root=", ProcessPackageRootOption },
{ "--generate_flow_graph", ProcessFlowGraphOption },
{ NULL, NULL }
@@ -507,30 +495,6 @@
}
-static Dart_Handle CreateImportMap(CommandLineOptions* map) {
- intptr_t length = (map == NULL) ? 0 : map->count();
- Dart_Handle import_map = Dart_NewList(length * 2);
- for (intptr_t i = 0; i < length; i++) {
- ASSERT(map->GetArgument(i) != NULL);
- char* name = strdup(map->GetArgument(i));
- ASSERT(name != NULL);
- char* map_name = strchr(name, ',');
- intptr_t index = i * 2;
- if (map_name != NULL) {
- *map_name = '\0';
- map_name += 1;
- Dart_ListSetAt(import_map, index, Dart_NewString(name));
- Dart_ListSetAt(import_map, (index + 1), Dart_NewString(map_name));
- } else {
- Dart_ListSetAt(import_map, index, Dart_NewString(name));
- Dart_ListSetAt(import_map, (index + 1), Dart_NewString(""));
- }
- free(name);
- }
- return import_map;
-}
-
-
// Returns true on success, false on failure.
static bool CreateIsolateAndSetupHelper(const char* script_uri,
const char* main,
@@ -562,15 +526,6 @@
return false;
}
- // Set up the import map for this isolate.
- result = Dart_SetImportMap(CreateImportMap(import_map_options));
- if (Dart_IsError(result)) {
- *error = strdup(Dart_GetError(result));
- Dart_ExitScope();
- Dart_ShutdownIsolate();
- return false;
- }
-
// Prepare builtin and its dependent libraries for use to resolve URIs.
Dart_Handle uri_lib = Builtin::LoadLibrary(Builtin::kUriLibrary);
if (Dart_IsError(uri_lib)) {
@@ -744,8 +699,6 @@
char* script_name;
CommandLineOptions vm_options(argc);
CommandLineOptions dart_options(argc);
- CommandLineOptions import_map(argc);
- import_map_options = &import_map;
bool print_flags_seen = false;
// Perform platform specific initialization.
« no previous file with comments | « no previous file | include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698