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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_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/startup_emitter/fragment_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
index 5902c2d614e55f7ed5c3768d29302e9c8494dece..338f22e9c8855e06c9e8427736003122295102f0 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
@@ -1121,23 +1121,21 @@ class FragmentEmitter {
_encodeOptionalParameterDefaultValues(method);
}
- return js.js.statement(
- '''
+ return js.js.statement('''
installTearOff(#container, #getterName, #isStatic, #isIntercepted,
#requiredParameterCount, #optionalParameterDefaultValues,
- #callNames, #funsOrNames, #funType)''',
- {
- "container": container,
- "getterName": js.quoteName(method.tearOffName),
- // 'Truthy' values are ok for `isStatic` and `isIntercepted`.
- "isStatic": js.number(method.isStatic ? 1 : 0),
- "isIntercepted": js.number(isIntercepted ? 1 : 0),
- "requiredParameterCount": js.number(requiredParameterCount),
- "optionalParameterDefaultValues": optionalParameterDefaultValues,
- "callNames": callNameArray,
- "funsOrNames": funsOrNamesArray,
- "funType": method.functionType,
- });
+ #callNames, #funsOrNames, #funType)''', {
+ "container": container,
+ "getterName": js.quoteName(method.tearOffName),
+ // 'Truthy' values are ok for `isStatic` and `isIntercepted`.
+ "isStatic": js.number(method.isStatic ? 1 : 0),
+ "isIntercepted": js.number(isIntercepted ? 1 : 0),
+ "requiredParameterCount": js.number(requiredParameterCount),
+ "optionalParameterDefaultValues": optionalParameterDefaultValues,
+ "callNames": callNameArray,
+ "funsOrNames": funsOrNamesArray,
+ "funType": method.functionType,
+ });
}
/// Wraps the statement in a named function to that it shows up as a unit in
@@ -1303,16 +1301,13 @@ class FragmentEmitter {
/// See [emitEmbeddedGlobalsForDeferredLoading] for the format of the
/// deferred hunk.
- js.Expression initializeLoadedHunkFunction = js.js(
- """
+ js.Expression initializeLoadedHunkFunction = js.js("""
function(hash) {
initializeDeferredHunk($deferredGlobal[hash]);
#deferredInitialized[hash] = true;
- }""",
- {
- 'deferredInitialized':
- generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)
- });
+ }""", {
+ 'deferredInitialized': generateEmbeddedGlobalAccess(DEFERRED_INITIALIZED)
+ });
globals.add(new js.Property(
js.string(INITIALIZE_LOADED_HUNK), initializeLoadedHunkFunction));
@@ -1505,18 +1500,14 @@ class FragmentEmitter {
NativeGenerator
.needsIsolateAffinityTagInitialization(_closedWorld.backendUsage)) {
statements.add(NativeGenerator.generateIsolateAffinityTagInitialization(
- _closedWorld.backendUsage,
- generateEmbeddedGlobalAccess,
- js.js(
- """
+ _closedWorld.backendUsage, generateEmbeddedGlobalAccess, js.js("""
// On V8, the 'intern' function converts a string to a symbol, which
// makes property access much faster.
function (s) {
var o = {};
o[s] = 1;
return Object.keys(convertToFastObject(o))[0];
- }""",
- [])));
+ }""", [])));
}
Map<String, js.Expression> interceptorsByTag = <String, js.Expression>{};
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/native_generator.dart ('k') | tests/compiler/dart2js/analyze_only_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698