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

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

Issue 1136843006: dart2js cps: Access to lazily initialized fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
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 library dart2js.ir_nodes_sexpr; 5 library dart2js.ir_nodes_sexpr;
6 6
7 import '../constants/values.dart'; 7 import '../constants/values.dart';
8 import '../util/util.dart'; 8 import '../util/util.dart';
9 import 'cps_ir_nodes.dart'; 9 import 'cps_ir_nodes.dart';
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 return '(GetStatic $element)'; 340 return '(GetStatic $element)';
341 } 341 }
342 342
343 String visitSetStatic(SetStatic node) { 343 String visitSetStatic(SetStatic node) {
344 String element = node.element.name; 344 String element = node.element.name;
345 String value = access(node.value); 345 String value = access(node.value);
346 String body = indentBlock(() => visit(node.body)); 346 String body = indentBlock(() => visit(node.body));
347 return '$indentation(SetStatic $element $value\n$body)'; 347 return '$indentation(SetStatic $element $value\n$body)';
348 } 348 }
349 349
350 String visitGetLazyStatic(GetLazyStatic node) {
351 String element = node.element.name;
352 String cont = access(node.continuation);
353 return '$indentation(GetLazyStatic $element $cont)';
354 }
355
350 String visitCreateBox(CreateBox node) { 356 String visitCreateBox(CreateBox node) {
351 return '(CreateBox)'; 357 return '(CreateBox)';
352 } 358 }
353 359
354 String visitCreateInstance(CreateInstance node) { 360 String visitCreateInstance(CreateInstance node) {
355 String className = node.classElement.name; 361 String className = node.classElement.name;
356 String arguments = node.arguments.map(access).join(' '); 362 String arguments = node.arguments.map(access).join(' ');
357 String typeInformation = node.typeInformation.map(access).join(' '); 363 String typeInformation = node.typeInformation.map(access).join(' ');
358 return '(CreateInstance $className ($arguments)$typeInformation)'; 364 return '(CreateInstance $className ($arguments)$typeInformation)';
359 } 365 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void setReturnContinuation(Continuation node) { 504 void setReturnContinuation(Continuation node) {
499 assert(!_names.containsKey(node) || _names[node] == 'return'); 505 assert(!_names.containsKey(node) || _names[node] == 'return');
500 _names[node] = 'return'; 506 _names[node] = 'return';
501 } 507 }
502 508
503 String getName(Node node) { 509 String getName(Node node) {
504 if (!_names.containsKey(node)) return 'MISSING_NAME'; 510 if (!_names.containsKey(node)) return 'MISSING_NAME';
505 return _names[node]; 511 return _names[node];
506 } 512 }
507 } 513 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698