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

Unified Diff: bin/gen_snapshot.cc

Issue 9359009: Implement support for specifying string interopolation style variable substitution in the import ... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/dartutils.cc ('k') | bin/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/gen_snapshot.cc
===================================================================
--- bin/gen_snapshot.cc (revision 4054)
+++ bin/gen_snapshot.cc (working copy)
@@ -116,7 +116,8 @@
static Dart_Handle CreateSnapshotLibraryTagHandler(Dart_LibraryTag tag,
Dart_Handle library,
- Dart_Handle url) {
+ Dart_Handle url,
+ Dart_Handle import_map) {
if (!Dart_IsLibrary(library)) {
return Dart_Error("not a library");
}
@@ -137,7 +138,12 @@
}
return DartUtils::CanonicalizeURL(url_mapping, library, url_string);
}
- return DartUtils::LoadSource(url_mapping, library, url, tag, url_string);
+ return DartUtils::LoadSource(url_mapping,
+ library,
+ url,
+ tag,
+ url_string,
+ import_map);
}
@@ -147,14 +153,19 @@
return source; // source contains the error string.
}
Dart_Handle url = Dart_NewString(script_name);
+ Dart_Handle import_map = Dart_NewList(0);
- return Dart_LoadScript(url, source, CreateSnapshotLibraryTagHandler);
+ return Dart_LoadScript(url,
+ source,
+ CreateSnapshotLibraryTagHandler,
+ import_map);
}
static Dart_Handle BuiltinLibraryTagHandler(Dart_LibraryTag tag,
Dart_Handle library,
- Dart_Handle url) {
+ Dart_Handle url,
+ Dart_Handle import_map) {
if (!Dart_IsLibrary(library)) {
return Dart_Error("not a library");
}
@@ -187,7 +198,11 @@
if (id == Builtin::kBuiltinLibrary) {
// Load the dart:builtin library as the script.
Dart_Handle url = Dart_NewString(DartUtils::kBuiltinLibURL);
- lib = Dart_LoadScript(url, source, BuiltinLibraryTagHandler);
+ Dart_Handle import_map = Dart_NewList(0);
+ lib = Dart_LoadScript(url,
+ source,
+ BuiltinLibraryTagHandler,
+ import_map);
} else {
ASSERT(id == Builtin::kIOLibrary);
// Load the dart:io library to make it available in the snapshot
« no previous file with comments | « bin/dartutils.cc ('k') | bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698