OLD | NEW |
1 library dart2js.cps_ir.finalize; | 1 library dart2js.cps_ir.finalize; |
2 | 2 |
3 import 'cps_ir_nodes.dart'; | 3 import 'cps_ir_nodes.dart'; |
4 import 'cps_fragment.dart'; | 4 import 'cps_fragment.dart'; |
5 import 'optimizers.dart' show Pass; | 5 import 'optimizers.dart' show Pass; |
6 import '../js_backend/js_backend.dart' show JavaScriptBackend; | 6 import '../js_backend/js_backend.dart' show JavaScriptBackend; |
7 import '../js_backend/backend_helpers.dart'; | 7 import '../js_backend/backend_helpers.dart'; |
8 | 8 |
9 /// A transformation pass that must run immediately before the tree IR builder. | 9 /// A transformation pass that must run immediately before the tree IR builder. |
10 /// | 10 /// |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 cps.ifTruthy(cps.applyBuiltin(BuiltinOperator.StrictEq, | 65 cps.ifTruthy(cps.applyBuiltin(BuiltinOperator.StrictEq, |
66 [node.length.definition, cps.makeZero()])) | 66 [node.length.definition, cps.makeZero()])) |
67 .invokeContinuation(fail); | 67 .invokeContinuation(fail); |
68 } | 68 } |
69 cps.insideContinuation(fail).invokeStaticThrower( | 69 cps.insideContinuation(fail).invokeStaticThrower( |
70 helpers.throwIndexOutOfRangeException, | 70 helpers.throwIndexOutOfRangeException, |
71 [node.object.definition, node.index.definition]); | 71 [node.object.definition, node.index.definition]); |
72 node..replaceUsesWith(node.object.definition)..destroy(); | 72 node..replaceUsesWith(node.object.definition)..destroy(); |
73 return cps; | 73 return cps; |
74 } | 74 } |
| 75 |
| 76 void visitGetStatic(GetStatic node) { |
| 77 if (node.witness != null) { |
| 78 node..witness.unlink()..witness = null; |
| 79 } |
| 80 } |
75 } | 81 } |
OLD | NEW |