| 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 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 } | 1678 } |
| 1675 | 1679 |
| 1676 visitFunctionExpression(ast.FunctionExpression node) { | 1680 visitFunctionExpression(ast.FunctionExpression node) { |
| 1677 FunctionElement oldFunction = currentFunction; | 1681 FunctionElement oldFunction = currentFunction; |
| 1678 currentFunction = elements[node]; | 1682 currentFunction = elements[node]; |
| 1679 visit(node.body); | 1683 visit(node.body); |
| 1680 currentFunction = oldFunction; | 1684 currentFunction = oldFunction; |
| 1681 } | 1685 } |
| 1682 | 1686 |
| 1683 } | 1687 } |
| OLD | NEW |