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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart

Issue 2693163002: Split backend implementation of EnqueuerListener (Closed)
Patch Set: Updated cf. comments Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.js_emitter.startup_emitter.model_emitter; 5 library dart2js.js_emitter.startup_emitter.model_emitter;
6 6
7 import 'dart:convert' show JsonEncoder; 7 import 'dart:convert' show JsonEncoder;
8 8
9 import 'package:js_runtime/shared/embedded_names.dart' 9 import 'package:js_runtime/shared/embedded_names.dart'
10 show 10 show
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // Now that we have written the deferred hunks, we can update the hash 187 // Now that we have written the deferred hunks, we can update the hash
188 // tokens in the main-fragment. 188 // tokens in the main-fragment.
189 deferredHashTokens 189 deferredHashTokens
190 .forEach((DeferredFragment key, _DeferredFragmentHash token) { 190 .forEach((DeferredFragment key, _DeferredFragmentHash token) {
191 token.setHash(hunkHashes[key]); 191 token.setHash(hunkHashes[key]);
192 }); 192 });
193 193
194 writeMainFragment(mainFragment, mainCode, 194 writeMainFragment(mainFragment, mainCode,
195 isSplit: program.deferredFragments.isNotEmpty); 195 isSplit: program.deferredFragments.isNotEmpty);
196 196
197 if (backend.requiresPreamble && !backend.htmlLibraryIsLoaded) { 197 if (backend.backendUsage.requiresPreamble && !backend.htmlLibraryIsLoaded) {
198 reporter.reportHintMessage(NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE); 198 reporter.reportHintMessage(NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE);
199 } 199 }
200 200
201 if (compiler.options.deferredMapUri != null) { 201 if (compiler.options.deferredMapUri != null) {
202 writeDeferredMap(); 202 writeDeferredMap();
203 } 203 }
204 204
205 // Return the total program size. 205 // Return the total program size.
206 return outputBuffers.values.fold(0, (a, b) => a + b.length); 206 return outputBuffers.values.fold(0, (a, b) => a + b.length);
207 } 207 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 // data. 396 // data.
397 mapping["_comment"] = "This mapping shows which compiled `.js` files are " 397 mapping["_comment"] = "This mapping shows which compiled `.js` files are "
398 "needed for a given deferred library import."; 398 "needed for a given deferred library import.";
399 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); 399 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap());
400 compiler.outputProvider( 400 compiler.outputProvider(
401 compiler.options.deferredMapUri.path, 'deferred_map') 401 compiler.options.deferredMapUri.path, 'deferred_map')
402 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) 402 ..add(const JsonEncoder.withIndent(" ").convert(mapping))
403 ..close(); 403 ..close();
404 } 404 }
405 } 405 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698