| 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 class SsaCodeGeneratorTask extends CompilerTask { | 5 class SsaCodeGeneratorTask extends CompilerTask { |
| 6 | 6 |
| 7 final JavaScriptBackend backend; | 7 final JavaScriptBackend backend; |
| 8 | 8 |
| 9 SsaCodeGeneratorTask(JavaScriptBackend backend) | 9 SsaCodeGeneratorTask(JavaScriptBackend backend) |
| 10 : this.backend = backend, | 10 : this.backend = backend, |
| (...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 | 1904 |
| 1905 visitThis(HThis node) { | 1905 visitThis(HThis node) { |
| 1906 push(new js.This()); | 1906 push(new js.This()); |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 visitThrow(HThrow node) { | 1909 visitThrow(HThrow node) { |
| 1910 if (node.isRethrow) { | 1910 if (node.isRethrow) { |
| 1911 use(node.inputs[0]); | 1911 use(node.inputs[0]); |
| 1912 pushStatement(new js.Throw(pop()), node); | 1912 pushStatement(new js.Throw(pop()), node); |
| 1913 } else { | 1913 } else { |
| 1914 generateThrowWithHelper(@'$throw', node.inputs[0]); | 1914 generateThrowWithHelper(r'$throw', node.inputs[0]); |
| 1915 } | 1915 } |
| 1916 } | 1916 } |
| 1917 | 1917 |
| 1918 visitBoundsCheck(HBoundsCheck node) { | 1918 visitBoundsCheck(HBoundsCheck node) { |
| 1919 // TODO(ngeoffray): Separate the two checks of the bounds check, so, | 1919 // TODO(ngeoffray): Separate the two checks of the bounds check, so, |
| 1920 // e.g., the zero checks can be shared if possible. | 1920 // e.g., the zero checks can be shared if possible. |
| 1921 | 1921 |
| 1922 // If the checks always succeeds, we would have removed the bounds check | 1922 // If the checks always succeeds, we would have removed the bounds check |
| 1923 // completely. | 1923 // completely. |
| 1924 assert(node.staticChecks != HBoundsCheck.ALWAYS_TRUE); | 1924 assert(node.staticChecks != HBoundsCheck.ALWAYS_TRUE); |
| (...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 if (leftType.canBeNull() && rightType.canBeNull()) { | 2994 if (leftType.canBeNull() && rightType.canBeNull()) { |
| 2995 if (left.isConstantNull() || right.isConstantNull() || | 2995 if (left.isConstantNull() || right.isConstantNull() || |
| 2996 (leftType.isPrimitive() && leftType == rightType)) { | 2996 (leftType.isPrimitive() && leftType == rightType)) { |
| 2997 return '=='; | 2997 return '=='; |
| 2998 } | 2998 } |
| 2999 return null; | 2999 return null; |
| 3000 } else { | 3000 } else { |
| 3001 return '==='; | 3001 return '==='; |
| 3002 } | 3002 } |
| 3003 } | 3003 } |
| OLD | NEW |