| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.ir_builder; | 5 library dart2js.ir_builder; |
| 6 | 6 |
| 7 import 'cps_ir_nodes.dart' as ir; | 7 import 'cps_ir_nodes.dart' as ir; |
| 8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
| 9 import '../dart2jslib.dart'; | 9 import '../dart2jslib.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // and generating the correct syntax. | 103 // and generating the correct syntax. |
| 104 if (element.isGetter || element.isSetter) return false; | 104 if (element.isGetter || element.isSetter) return false; |
| 105 | 105 |
| 106 // TODO(lry): support native functions (also in [visitReturn]). | 106 // TODO(lry): support native functions (also in [visitReturn]). |
| 107 if (function.isNative) return false; | 107 if (function.isNative) return false; |
| 108 | 108 |
| 109 // TODO(kmillikin,sigurdm): support syntax for redirecting factory | 109 // TODO(kmillikin,sigurdm): support syntax for redirecting factory |
| 110 if (function is ConstructorElement && function.isRedirectingFactory) { | 110 if (function is ConstructorElement && function.isRedirectingFactory) { |
| 111 return false; | 111 return false; |
| 112 } | 112 } |
| 113 // TODO(kmillikin,sigurdm): support syntax for factory constructors |
| 114 if (function is ConstructorElement && function.isFactoryConstructor) { |
| 115 return false; |
| 116 } |
| 113 | 117 |
| 114 return true; | 118 return true; |
| 115 } | 119 } |
| 116 | 120 |
| 117 bool get inCheckedMode { | 121 bool get inCheckedMode { |
| 118 bool result = false; | 122 bool result = false; |
| 119 assert((result = true)); | 123 assert((result = true)); |
| 120 return result; | 124 return result; |
| 121 } | 125 } |
| 122 | 126 |
| (...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1809 } | 1813 } |
| 1810 | 1814 |
| 1811 visitFunctionExpression(ast.FunctionExpression node) { | 1815 visitFunctionExpression(ast.FunctionExpression node) { |
| 1812 FunctionElement oldFunction = currentFunction; | 1816 FunctionElement oldFunction = currentFunction; |
| 1813 currentFunction = elements[node]; | 1817 currentFunction = elements[node]; |
| 1814 visit(node.body); | 1818 visit(node.body); |
| 1815 currentFunction = oldFunction; | 1819 currentFunction = oldFunction; |
| 1816 } | 1820 } |
| 1817 | 1821 |
| 1818 } | 1822 } |
| OLD | NEW |