Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |