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

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

Issue 1131253002: dart2js: Properly track descriptor asts for dumpinfo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 7
8 class OldEmitter implements Emitter { 8 class OldEmitter implements Emitter {
9 final Compiler compiler; 9 final Compiler compiler;
10 final CodeEmitterTask task; 10 final CodeEmitterTask task;
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 bool needsNativeSupport = program.needsNativeSupport; 1353 bool needsNativeSupport = program.needsNativeSupport;
1354 mainOutput.addBuffer( 1354 mainOutput.addBuffer(
1355 jsAst.prettyPrint( 1355 jsAst.prettyPrint(
1356 buildSetupProgram(program, compiler, backend, namer, this), 1356 buildSetupProgram(program, compiler, backend, namer, this),
1357 compiler)); 1357 compiler));
1358 1358
1359 // The argument to reflectionDataParser is assigned to a temporary 'dart' 1359 // The argument to reflectionDataParser is assigned to a temporary 'dart'
1360 // so that 'dart.' will appear as the prefix to dart methods in stack 1360 // so that 'dart.' will appear as the prefix to dart methods in stack
1361 // traces and profile entries. 1361 // traces and profile entries.
1362 mainOutput..add('var dart =') 1362 mainOutput..add('var dart =')
1363 ..addBuffer(jsAst.prettyPrint(descriptorsAst, compiler)) 1363 ..addBuffer(jsAst.prettyPrint(descriptorsAst, compiler,
1364 monitor: compiler.dumpInfoTask))
1364 ..add('$N'); 1365 ..add('$N');
1365 if (compiler.useContentSecurityPolicy) { 1366 if (compiler.useContentSecurityPolicy) {
1366 jsAst.Statement precompiledFunctionAst = 1367 jsAst.Statement precompiledFunctionAst =
1367 buildCspPrecompiledFunctionFor(mainOutputUnit); 1368 buildCspPrecompiledFunctionFor(mainOutputUnit);
1368 mainOutput.addBuffer( 1369 mainOutput.addBuffer(
1369 jsAst.prettyPrint( 1370 jsAst.prettyPrint(
1370 precompiledFunctionAst, 1371 precompiledFunctionAst,
1371 compiler, 1372 compiler,
1372 monitor: compiler.dumpInfoTask, 1373 monitor: compiler.dumpInfoTask,
1373 allowVariableMinification: false)); 1374 allowVariableMinification: false));
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 // TODO(ahe): This defines a lot of properties on the 1821 // TODO(ahe): This defines a lot of properties on the
1821 // Isolate.prototype object. We know this will turn it into a 1822 // Isolate.prototype object. We know this will turn it into a
1822 // slow object in V8, so instead we should do something similar 1823 // slow object in V8, so instead we should do something similar
1823 // to Isolate.$finishIsolateConstructor. 1824 // to Isolate.$finishIsolateConstructor.
1824 output 1825 output
1825 ..add('var ${namer.currentIsolate}$_=$_$isolatePropertiesName$N') 1826 ..add('var ${namer.currentIsolate}$_=$_$isolatePropertiesName$N')
1826 // The argument to reflectionDataParser is assigned to a temporary 1827 // The argument to reflectionDataParser is assigned to a temporary
1827 // 'dart' so that 'dart.' will appear as the prefix to dart methods 1828 // 'dart' so that 'dart.' will appear as the prefix to dart methods
1828 // in stack traces and profile entries. 1829 // in stack traces and profile entries.
1829 ..add('var dart = $n ') 1830 ..add('var dart = $n ')
1830 ..addBuffer(jsAst.prettyPrint(libraryDescriptor, compiler)) 1831 ..addBuffer(jsAst.prettyPrint(libraryDescriptor, compiler,
1832 monitor: compiler.dumpInfoTask))
1831 ..add('$N'); 1833 ..add('$N');
1832 1834
1833 if (compiler.useContentSecurityPolicy) { 1835 if (compiler.useContentSecurityPolicy) {
1834 jsAst.Statement precompiledFunctionAst = 1836 jsAst.Statement precompiledFunctionAst =
1835 buildCspPrecompiledFunctionFor(outputUnit); 1837 buildCspPrecompiledFunctionFor(outputUnit);
1836 1838
1837 output.addBuffer( 1839 output.addBuffer(
1838 jsAst.prettyPrint( 1840 jsAst.prettyPrint(
1839 precompiledFunctionAst, compiler, 1841 precompiledFunctionAst, compiler,
1840 monitor: compiler.dumpInfoTask, 1842 monitor: compiler.dumpInfoTask,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 1952 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
1951 if (element.isInstanceMember) { 1953 if (element.isInstanceMember) {
1952 cachedClassBuilders.remove(element.enclosingClass); 1954 cachedClassBuilders.remove(element.enclosingClass);
1953 1955
1954 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 1956 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
1955 1957
1956 } 1958 }
1957 } 1959 }
1958 } 1960 }
1959 } 1961 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698