| 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 resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 Element get currentElement; | 8 Element get currentElement; |
| 9 Set<Node> get superUses; | 9 Set<Node> get superUses; |
| 10 | 10 |
| (...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 statementScope = oldStatementScope; | 1946 statementScope = oldStatementScope; |
| 1947 | 1947 |
| 1948 scope = oldScope; | 1948 scope = oldScope; |
| 1949 enclosingElement = previousEnclosingElement; | 1949 enclosingElement = previousEnclosingElement; |
| 1950 | 1950 |
| 1951 world.registerInstantiatedClass(compiler.functionClass, mapping); | 1951 world.registerInstantiatedClass(compiler.functionClass, mapping); |
| 1952 } | 1952 } |
| 1953 | 1953 |
| 1954 visitIf(If node) { | 1954 visitIf(If node) { |
| 1955 visit(node.condition); | 1955 visit(node.condition); |
| 1956 visit(node.thenPart); | 1956 visitIn(node.thenPart, new BlockScope(scope)); |
| 1957 visit(node.elsePart); | 1957 visitIn(node.elsePart, new BlockScope(scope)); |
| 1958 } | 1958 } |
| 1959 | 1959 |
| 1960 static bool isLogicalOperator(Identifier op) { | 1960 static bool isLogicalOperator(Identifier op) { |
| 1961 String str = op.source.stringValue; | 1961 String str = op.source.stringValue; |
| 1962 return (identical(str, '&&') || str == '||' || str == '!'); | 1962 return (identical(str, '&&') || str == '||' || str == '!'); |
| 1963 } | 1963 } |
| 1964 | 1964 |
| 1965 Element resolveSend(Send node) { | 1965 Element resolveSend(Send node) { |
| 1966 Selector selector = resolveSelector(node, null); | 1966 Selector selector = resolveSelector(node, null); |
| 1967 if (node.isSuperCall) mapping.superUses.add(node); | 1967 if (node.isSuperCall) mapping.superUses.add(node); |
| (...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3938 return e; | 3938 return e; |
| 3939 } | 3939 } |
| 3940 | 3940 |
| 3941 /// Assumed to be called by [resolveRedirectingFactory]. | 3941 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3942 Element visitReturn(Return node) { | 3942 Element visitReturn(Return node) { |
| 3943 Node expression = node.expression; | 3943 Node expression = node.expression; |
| 3944 return finishConstructorReference(visit(expression), | 3944 return finishConstructorReference(visit(expression), |
| 3945 expression, expression); | 3945 expression, expression); |
| 3946 } | 3946 } |
| 3947 } | 3947 } |
| OLD | NEW |