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

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

Issue 10442107: Implement super read. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update status files Created 8 years, 6 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) 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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 String methodName = compiler.namer.instanceMethodName( 1554 String methodName = compiler.namer.instanceMethodName(
1555 currentLibrary, superMethod.name, argumentCount); 1555 currentLibrary, superMethod.name, argumentCount);
1556 buffer.add('$className.prototype.$methodName.call'); 1556 buffer.add('$className.prototype.$methodName.call');
1557 visitArguments(node.inputs); 1557 visitArguments(node.inputs);
1558 } else if (superMethod.kind == ElementKind.FIELD) { 1558 } else if (superMethod.kind == ElementKind.FIELD) {
1559 buffer.add('this.${compiler.namer.getName(superMethod)}'); 1559 buffer.add('this.${compiler.namer.getName(superMethod)}');
1560 } else { 1560 } else {
1561 assert(superMethod.kind == ElementKind.GETTER); 1561 assert(superMethod.kind == ElementKind.GETTER);
1562 String methodName = 1562 String methodName =
1563 compiler.namer.getterName(currentLibrary, superMethod.name); 1563 compiler.namer.getterName(currentLibrary, superMethod.name);
1564 buffer.add('$className.prototype.$methodName.call()'); 1564 buffer.add('$className.prototype.$methodName.call(this)');
ngeoffray 2012/05/31 07:00:57 How could that code have ever worked before? Is th
ahe 2012/05/31 07:24:35 I think so. Actually, I think I need to change i
1565 } 1565 }
1566 endExpression(JSPrecedence.CALL_PRECEDENCE); 1566 endExpression(JSPrecedence.CALL_PRECEDENCE);
1567 world.registerStaticUse(superMethod); 1567 world.registerStaticUse(superMethod);
1568 } 1568 }
1569 1569
1570 visitFieldGet(HFieldGet node) { 1570 visitFieldGet(HFieldGet node) {
1571 if (!node.isFromActivation()) { 1571 if (!node.isFromActivation()) {
1572 String name = 1572 String name =
1573 compiler.namer.instanceFieldName(currentLibrary, node.name); 1573 compiler.namer.instanceFieldName(currentLibrary, node.name);
1574 beginExpression(JSPrecedence.MEMBER_PRECEDENCE); 1574 beginExpression(JSPrecedence.MEMBER_PRECEDENCE);
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 startBailoutSwitch(); 2632 startBailoutSwitch();
2633 } 2633 }
2634 } 2634 }
2635 2635
2636 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { 2636 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) {
2637 if (labeledBlockInfo.body.start.hasGuards()) { 2637 if (labeledBlockInfo.body.start.hasGuards()) {
2638 endBailoutSwitch(); 2638 endBailoutSwitch();
2639 } 2639 }
2640 } 2640 }
2641 } 2641 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/ssa/builder.dart ('k') | dart/samples/tests/samples/samples.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698