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

Unified Diff: pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart

Issue 2990223002: Reformat untouched files. (Closed)
Patch Set: Created 3 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
Index: pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
index 527812f7227c35cbdc7f226d16c2fd9947f72a78..21260eeaf393ec6c2109c3ee6b0d7318dddf6a83 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
@@ -438,16 +438,14 @@ class ModelEmitter {
/// See [emitEmbeddedGlobalsForDeferredLoading] for the format of the
/// deferred hunk.
- js.Expression initializeLoadedHunkFunction = js.js(
- """
+ js.Expression initializeLoadedHunkFunction = js.js("""
function(hash) {
var hunk = $deferredInitializersGlobal[hash];
$setupProgramName(hunk[0], #typesAccess.length);
eval(hunk[1]);
var deferredTypes = eval(hunk[2]);
#typesAccess.push.apply(#typesAccess, deferredTypes);
- }""",
- {'typesAccess': typesAccess});
+ }""", {'typesAccess': typesAccess});
globals.add(new js.Property(
js.string(INITIALIZE_LOADED_HUNK), initializeLoadedHunkFunction));
@@ -468,16 +466,14 @@ class ModelEmitter {
// Types are non-evaluated and must be compiled at first use.
// Compiled strings are guaranteed not to be strings, and it's thus safe
// to use a type-test to determine if a type has already been compiled.
- return js.js.statement(
- '''function $readMetadataTypeName(index) {
+ return js.js.statement('''function $readMetadataTypeName(index) {
var type = #typesAccess[index];
if (typeof type == 'string') {
type = expressionCompile(type);
#typesAccess[index] = type;
}
return type;
- }''',
- {"typesAccess": generateEmbeddedGlobalAccess(TYPES)});
+ }''', {"typesAccess": generateEmbeddedGlobalAccess(TYPES)});
}
js.Template get templateForReadType {
@@ -493,19 +489,17 @@ class ModelEmitter {
// Types are non-evaluated and must be compiled at first use.
// Compiled strings are guaranteed not to be strings, and it's thus safe
// to use a type-test to determine if a type has already been compiled.
- return js.js.statement(
- '''function $readMetadataName(index) {
+ return js.js.statement('''function $readMetadataName(index) {
var lazyMetadata = #lazyMetadataAccess[index];
if (typeof lazyMetadata == 'string') {
#metadataAccess[index] = expressionCompile(lazyMetadata);
#lazyMetadataAccess[index] = null;
}
return #metadataAccess[index];
- }''',
- {
- "lazyMetadataAccess": generateEmbeddedGlobalAccess(lazyMetadataName),
- "metadataAccess": generateEmbeddedGlobalAccess(METADATA)
- });
+ }''', {
+ "lazyMetadataAccess": generateEmbeddedGlobalAccess(lazyMetadataName),
+ "metadataAccess": generateEmbeddedGlobalAccess(METADATA)
+ });
}
js.Template get templateForReadMetadata {

Powered by Google App Engine
This is Rietveld 408576698