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

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

Issue 1645053002: dart2js cps: Refactor tracking of side effects. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Treat named argument as optional Created 4 years, 9 months 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 // 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 4
5 library dart2js.ir_builder; 5 library dart2js.ir_builder;
6 6
7 import '../closure.dart' as closure; 7 import '../closure.dart' as closure;
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/names.dart' show 9 import '../common/names.dart' show
10 Names, 10 Names,
(...skipping 2570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 /// 2581 ///
2582 /// If inside a closure class, [buildThis] will redirect access through 2582 /// If inside a closure class, [buildThis] will redirect access through
2583 /// closure fields in order to access the receiver from the enclosing method. 2583 /// closure fields in order to access the receiver from the enclosing method.
2584 ir.Primitive buildThis() { 2584 ir.Primitive buildThis() {
2585 if (state.enclosingThis != null) return state.enclosingThis; 2585 if (state.enclosingThis != null) return state.enclosingThis;
2586 assert(state.thisParameter != null); 2586 assert(state.thisParameter != null);
2587 return state.thisParameter; 2587 return state.thisParameter;
2588 } 2588 }
2589 2589
2590 ir.Primitive buildFieldGet(ir.Primitive receiver, FieldElement target) { 2590 ir.Primitive buildFieldGet(ir.Primitive receiver, FieldElement target) {
2591 return addPrimitive(new ir.GetField(receiver, target)); 2591 return addPrimitive(new ir.GetField(receiver, target,
2592 isFinal: program.fieldNeverChanges(target)));
2592 } 2593 }
2593 2594
2594 void buildFieldSet(ir.Primitive receiver, 2595 void buildFieldSet(ir.Primitive receiver,
2595 FieldElement target, 2596 FieldElement target,
2596 ir.Primitive value) { 2597 ir.Primitive value) {
2597 addPrimitive(new ir.SetField(receiver, target, value)); 2598 addPrimitive(new ir.SetField(receiver, target, value));
2598 } 2599 }
2599 2600
2600 ir.Primitive buildSuperFieldGet(FieldElement target) { 2601 ir.Primitive buildSuperFieldGet(FieldElement target) {
2601 return addPrimitive(new ir.GetField(buildThis(), target)); 2602 return addPrimitive(new ir.GetField(buildThis(), target));
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2936 this.stackTraceVariable, 2937 this.stackTraceVariable,
2937 this.buildCatchBlock}); 2938 this.buildCatchBlock});
2938 } 2939 }
2939 2940
2940 class SwitchCaseInfo { 2941 class SwitchCaseInfo {
2941 final SubbuildFunction buildCondition; 2942 final SubbuildFunction buildCondition;
2942 final SubbuildFunction buildBody; 2943 final SubbuildFunction buildBody;
2943 2944
2944 SwitchCaseInfo(this.buildCondition, this.buildBody); 2945 SwitchCaseInfo(this.buildCondition, this.buildBody);
2945 } 2946 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698