| 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 library dart2js.ir_nodes; | 4 library dart2js.ir_nodes; |
| 5 | 5 |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'cps_fragment.dart' show CpsFragment; | 7 import 'cps_fragment.dart' show CpsFragment; |
| 8 import '../constants/values.dart' as values; | 8 import '../constants/values.dart' as values; |
| 9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; | 9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2009 | 2009 |
| 2010 visit(Node node) => node.accept(this); | 2010 visit(Node node) => node.accept(this); |
| 2011 | 2011 |
| 2012 processReference(Reference ref) {} | 2012 processReference(Reference ref) {} |
| 2013 | 2013 |
| 2014 processFunctionDefinition(FunctionDefinition node) {} | 2014 processFunctionDefinition(FunctionDefinition node) {} |
| 2015 visitFunctionDefinition(FunctionDefinition node) { | 2015 visitFunctionDefinition(FunctionDefinition node) { |
| 2016 processFunctionDefinition(node); | 2016 processFunctionDefinition(node); |
| 2017 if (node.thisParameter != null) visit(node.thisParameter); | 2017 if (node.thisParameter != null) visit(node.thisParameter); |
| 2018 node.parameters.forEach(visit); | 2018 node.parameters.forEach(visit); |
| 2019 visit(node.returnContinuation); | |
| 2020 visit(node.body); | 2019 visit(node.body); |
| 2021 } | 2020 } |
| 2022 | 2021 |
| 2023 processContinuation(Continuation node) {} | 2022 processContinuation(Continuation node) {} |
| 2024 visitContinuation(Continuation node) { | 2023 visitContinuation(Continuation node) { |
| 2025 processContinuation(node); | 2024 processContinuation(node); |
| 2026 node.parameters.forEach(visit); | 2025 node.parameters.forEach(visit); |
| 2027 if (node.body != null) visit(node.body); | 2026 if (node.body != null) visit(node.body); |
| 2028 } | 2027 } |
| 2029 | 2028 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2370 } else { | 2369 } else { |
| 2371 _processBlock(traverseContinuation(cont)); | 2370 _processBlock(traverseContinuation(cont)); |
| 2372 } | 2371 } |
| 2373 }); | 2372 }); |
| 2374 } | 2373 } |
| 2375 | 2374 |
| 2376 visitFunctionDefinition(FunctionDefinition node) { | 2375 visitFunctionDefinition(FunctionDefinition node) { |
| 2377 processFunctionDefinition(node); | 2376 processFunctionDefinition(node); |
| 2378 if (node.thisParameter != null) visit(node.thisParameter); | 2377 if (node.thisParameter != null) visit(node.thisParameter); |
| 2379 node.parameters.forEach(visit); | 2378 node.parameters.forEach(visit); |
| 2380 visit(node.returnContinuation); | |
| 2381 visit(node.body); | 2379 visit(node.body); |
| 2382 } | 2380 } |
| 2383 | 2381 |
| 2384 visitContinuation(Continuation cont) { | 2382 visitContinuation(Continuation cont) { |
| 2385 if (cont.isReturnContinuation) { | 2383 if (cont.isReturnContinuation) { |
| 2386 traverseContinuation(cont); | 2384 traverseContinuation(cont); |
| 2387 } else { | 2385 } else { |
| 2388 int initialHeight = _stack.length; | 2386 int initialHeight = _stack.length; |
| 2389 Expression body = traverseContinuation(cont); | 2387 Expression body = traverseContinuation(cont); |
| 2390 _trampoline(body, initialHeight: initialHeight); | 2388 _trampoline(body, initialHeight: initialHeight); |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2832 plug(new Branch.loose(_definitions.getCopy(node.condition), | 2830 plug(new Branch.loose(_definitions.getCopy(node.condition), |
| 2833 _copies[node.trueContinuation.definition], | 2831 _copies[node.trueContinuation.definition], |
| 2834 _copies[node.falseContinuation.definition]) | 2832 _copies[node.falseContinuation.definition]) |
| 2835 ..isStrictCheck = node.isStrictCheck); | 2833 ..isStrictCheck = node.isStrictCheck); |
| 2836 } | 2834 } |
| 2837 | 2835 |
| 2838 visitUnreachable(Unreachable node) { | 2836 visitUnreachable(Unreachable node) { |
| 2839 plug(new Unreachable()); | 2837 plug(new Unreachable()); |
| 2840 } | 2838 } |
| 2841 } | 2839 } |
| OLD | NEW |