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

Side by Side Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10703087: Ignore setters in constructors when evaluating determining firect field access (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 final JavaScriptBackend backend; 6 final JavaScriptBackend backend;
7 SsaCodeGeneratorTask(JavaScriptBackend backend) 7 SsaCodeGeneratorTask(JavaScriptBackend backend)
8 : this.backend = backend, 8 : this.backend = backend,
9 super(backend.compiler); 9 super(backend.compiler);
10 String get name() => 'SSA code generator'; 10 String get name() => 'SSA code generator';
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 backend.updateFieldConstructorSetters(node.element, 1851 backend.updateFieldConstructorSetters(node.element,
1852 node.value.guaranteedType); 1852 node.value.guaranteedType);
1853 } 1853 }
1854 String name = compiler.namer.getName(node.element); 1854 String name = compiler.namer.getName(node.element);
1855 beginExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE); 1855 beginExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE);
1856 use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE); 1856 use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE);
1857 buffer.add('.'); 1857 buffer.add('.');
1858 buffer.add(name); 1858 buffer.add(name);
1859 Type type = node.receiver.propagatedType.computeType(compiler); 1859 Type type = node.receiver.propagatedType.computeType(compiler);
1860 if (type != null) { 1860 if (type != null) {
1861 world.registerFieldSetter(node.element.name, type); 1861 if (!work.element.isGenerativeConstructorBody()) {
1862 world.registerFieldSetter(node.element.name, type);
1863 }
1862 backend.updateFieldIntegerSetters(node.element, 1864 backend.updateFieldIntegerSetters(node.element,
1863 node.value.isInteger()); 1865 node.value.isInteger());
1864 } 1866 }
1865 buffer.add(' = '); 1867 buffer.add(' = ');
1866 use(node.value, JSPrecedence.ASSIGNMENT_PRECEDENCE); 1868 use(node.value, JSPrecedence.ASSIGNMENT_PRECEDENCE);
1867 endExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE); 1869 endExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE);
1868 } 1870 }
1869 1871
1870 visitLocalGet(HLocalGet node) { 1872 visitLocalGet(HLocalGet node) {
1871 use(node.receiver, JSPrecedence.EXPRESSION_PRECEDENCE); 1873 use(node.receiver, JSPrecedence.EXPRESSION_PRECEDENCE);
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
3103 startBailoutSwitch(); 3105 startBailoutSwitch();
3104 } 3106 }
3105 } 3107 }
3106 3108
3107 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { 3109 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) {
3108 if (labeledBlockInfo.body.start.hasGuards()) { 3110 if (labeledBlockInfo.body.start.hasGuards()) {
3109 endBailoutSwitch(); 3111 endBailoutSwitch();
3110 } 3112 }
3111 } 3113 }
3112 } 3114 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698