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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 90713003: Dart2js option to dump info about compilation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 class JavaScriptItemCompilationContext extends ItemCompilationContext { 9 class JavaScriptItemCompilationContext extends ItemCompilationContext {
10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>();
(...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 } 1938 }
1939 if (hasNoThrows && !hasNoInline) { 1939 if (hasNoThrows && !hasNoInline) {
1940 compiler.internalErrorOnElement( 1940 compiler.internalErrorOnElement(
1941 element, "@NoThrows() should always be combined with @NoInline"); 1941 element, "@NoThrows() should always be combined with @NoInline");
1942 } 1942 }
1943 if (hasNoSideEffects && !hasNoInline) { 1943 if (hasNoSideEffects && !hasNoInline) {
1944 compiler.internalErrorOnElement( 1944 compiler.internalErrorOnElement(
1945 element, "@NoSideEffects() should always be combined with @NoInline"); 1945 element, "@NoSideEffects() should always be combined with @NoInline");
1946 } 1946 }
1947 } 1947 }
1948
1949 CodeBuffer codeOf(FunctionElement functionElement) {
1950 return generatedCode.containsKey(functionElement)
ahe 2013/12/02 15:20:26 I'm not too fond of looking up things twice in a t
1951 ? jsAst.prettyPrint(generatedCode[functionElement], compiler)
1952 : null;
1953 }
1948 } 1954 }
1949 1955
1950 /// Records that [constant] is used by [user.element]. 1956 /// Records that [constant] is used by [user.element].
1951 class Dependency { 1957 class Dependency {
1952 final Constant constant; 1958 final Constant constant;
1953 final TreeElements user; 1959 final TreeElements user;
1954 1960
1955 const Dependency(this.constant, this.user); 1961 const Dependency(this.constant, this.user);
1956 } 1962 }
1957 1963
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 copy(constant.values); 2002 copy(constant.values);
1997 copy(constant.protoValue); 2003 copy(constant.protoValue);
1998 copy(constant); 2004 copy(constant);
1999 } 2005 }
2000 2006
2001 void visitConstructed(ConstructedConstant constant) { 2007 void visitConstructed(ConstructedConstant constant) {
2002 copy(constant.fields); 2008 copy(constant.fields);
2003 copy(constant); 2009 copy(constant);
2004 } 2010 }
2005 } 2011 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698