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

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

Issue 2954493002: Less inequivalence on Hello World! (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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; 5 library dart2js.js_emitter.startup_emitter;
6 6
7 import 'package:js_runtime/shared/embedded_names.dart' 7 import 'package:js_runtime/shared/embedded_names.dart'
8 show JsBuiltin, METADATA, STATIC_FUNCTION_NAME_TO_CLOSURE, TYPES; 8 show JsBuiltin, METADATA, STATIC_FUNCTION_NAME_TO_CLOSURE, TYPES;
9 9
10 import '../../common.dart'; 10 import '../../common.dart';
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 Emitter(this._compiler, this.namer, NativeEmitter nativeEmitter, 49 Emitter(this._compiler, this.namer, NativeEmitter nativeEmitter,
50 this._closedWorld, CodeEmitterTask task, bool shouldGenerateSourceMap) 50 this._closedWorld, CodeEmitterTask task, bool shouldGenerateSourceMap)
51 : _emitter = new ModelEmitter(_compiler, namer, nativeEmitter, 51 : _emitter = new ModelEmitter(_compiler, namer, nativeEmitter,
52 _closedWorld, task, shouldGenerateSourceMap); 52 _closedWorld, task, shouldGenerateSourceMap);
53 53
54 DiagnosticReporter get reporter => _compiler.reporter; 54 DiagnosticReporter get reporter => _compiler.reporter;
55 55
56 @override 56 @override
57 int emitProgram(ProgramBuilder programBuilder) { 57 int emitProgram(ProgramBuilder programBuilder) {
58 Program program = programBuilder.buildProgram(); 58 Program program = programForTesting = programBuilder.buildProgram();
59 return _emitter.emitProgram(program); 59 return _emitter.emitProgram(program);
60 } 60 }
61 61
62 @override 62 @override
63 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) { 63 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) {
64 return _emitter.isConstantInlinedOrAlreadyEmitted(constant); 64 return _emitter.isConstantInlinedOrAlreadyEmitted(constant);
65 } 65 }
66 66
67 @override 67 @override
68 int compareConstants(ConstantValue a, ConstantValue b) { 68 int compareConstants(ConstantValue a, ConstantValue b) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 } 162 }
163 163
164 @override 164 @override
165 int generatedSize(OutputUnit unit) { 165 int generatedSize(OutputUnit unit) {
166 Fragment key = _emitter.outputBuffers.keys 166 Fragment key = _emitter.outputBuffers.keys
167 .firstWhere((Fragment fragment) => fragment.outputUnit == unit); 167 .firstWhere((Fragment fragment) => fragment.outputUnit == unit);
168 return _emitter.outputBuffers[key].length; 168 return _emitter.outputBuffers[key].length;
169 } 169 }
170 } 170 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart ('k') | pkg/compiler/lib/src/js_model/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698