| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 dart2js.cps_ir.optimizers; | 5 part of dart2js.cps_ir.optimizers; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * [ShrinkingReducer] applies shrinking reductions to CPS terms as described | 8 * [ShrinkingReducer] applies shrinking reductions to CPS terms as described |
| 9 * in 'Compiling with Continuations, Continued' by Andrew Kennedy. | 9 * in 'Compiling with Continuations, Continued' by Andrew Kennedy. |
| 10 */ | 10 */ |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 node.continuation.parent = node; | 365 node.continuation.parent = node; |
| 366 node.arguments.forEach((Reference ref) => ref.parent = node); | 366 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 367 } | 367 } |
| 368 | 368 |
| 369 processInvokeMethod(InvokeMethod node) { | 369 processInvokeMethod(InvokeMethod node) { |
| 370 node.receiver.parent = node; | 370 node.receiver.parent = node; |
| 371 node.continuation.parent = node; | 371 node.continuation.parent = node; |
| 372 node.arguments.forEach((Reference ref) => ref.parent = node); | 372 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 373 } | 373 } |
| 374 | 374 |
| 375 processInvokeSuperMethod(InvokeSuperMethod node) { | 375 processInvokeMethodDirectly(InvokeMethodDirectly node) { |
| 376 node.receiver.parent = node; |
| 376 node.continuation.parent = node; | 377 node.continuation.parent = node; |
| 377 node.arguments.forEach((Reference ref) => ref.parent = node); | 378 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 378 } | 379 } |
| 379 | 380 |
| 380 processInvokeConstructor(InvokeConstructor node) { | 381 processInvokeConstructor(InvokeConstructor node) { |
| 381 node.continuation.parent = node; | 382 node.continuation.parent = node; |
| 382 node.arguments.forEach((Reference ref) => ref.parent = node); | 383 node.arguments.forEach((Reference ref) => ref.parent = node); |
| 383 } | 384 } |
| 384 | 385 |
| 385 processConcatenateStrings(ConcatenateStrings node) { | 386 processConcatenateStrings(ConcatenateStrings node) { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 } | 501 } |
| 501 | 502 |
| 502 String toString() => "$kind: $node"; | 503 String toString() => "$kind: $node"; |
| 503 } | 504 } |
| 504 | 505 |
| 505 /// A dummy class used solely to mark nodes as deleted once they are removed | 506 /// A dummy class used solely to mark nodes as deleted once they are removed |
| 506 /// from a term. | 507 /// from a term. |
| 507 class _DeletedNode extends Node { | 508 class _DeletedNode extends Node { |
| 508 accept(_) => null; | 509 accept(_) => null; |
| 509 } | 510 } |
| OLD | NEW |