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

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

Issue 1240263002: dart2js cps: Streamline expressions and primitives. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 cps_ir.cps_fragment; 5 library cps_ir.cps_fragment;
6 6
7 import 'cps_ir_nodes.dart'; 7 import 'cps_ir_nodes.dart';
8 import '../constants/values.dart'; 8 import '../constants/values.dart';
9 import '../universe/universe.dart' show Selector; 9 import '../universe/universe.dart' show Selector;
10 import '../types/types.dart' show TypeMask; 10 import '../types/types.dart' show TypeMask;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 other.root = null; 271 other.root = null;
272 } 272 }
273 273
274 /// Reads the value of the given mutable variable. 274 /// Reads the value of the given mutable variable.
275 Primitive getMutable(MutableVariable variable) { 275 Primitive getMutable(MutableVariable variable) {
276 return letPrim(new GetMutableVariable(variable)); 276 return letPrim(new GetMutableVariable(variable));
277 } 277 }
278 278
279 /// Sets the value of the given mutable variable. 279 /// Sets the value of the given mutable variable.
280 void setMutable(MutableVariable variable, Primitive value) { 280 void setMutable(MutableVariable variable, Primitive value) {
281 SetMutableVariable setter = new SetMutableVariable(variable, value); 281 letPrim(new SetMutableVariable(variable, value));
282 put(setter);
283 context = setter;
284 } 282 }
285 283
286 /// Declare a new mutable variable. 284 /// Declare a new mutable variable.
287 void letMutable(MutableVariable variable, Primitive initialValue) { 285 void letMutable(MutableVariable variable, Primitive initialValue) {
288 LetMutable let = new LetMutable(variable, initialValue); 286 LetMutable let = new LetMutable(variable, initialValue);
289 put(let); 287 put(let);
290 context = let; 288 context = let;
291 } 289 }
292 } 290 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698