Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: pkg/compiler/lib/src/cps_ir/finalize.dart

Issue 1521553003: dart2js cps: Replace GetLazyStatic with GetStatic. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove obsolete comment Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/eagerly_load_statics.dart ('k') | pkg/compiler/lib/src/cps_ir/gvn.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698