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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 885313002: Fix new dart2dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 part of ssa; 5 part of ssa;
6 6
7 class SsaFunctionCompiler implements FunctionCompiler { 7 class SsaFunctionCompiler implements FunctionCompiler {
8 SsaCodeGeneratorTask generator; 8 SsaCodeGeneratorTask generator;
9 SsaBuilderTask builder; 9 SsaBuilderTask builder;
10 SsaOptimizerTask optimizer; 10 SsaOptimizerTask optimizer;
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 ClassElement superClass = enclosingClass.superclass; 1907 ClassElement superClass = enclosingClass.superclass;
1908 if (!enclosingClass.isObject) { 1908 if (!enclosingClass.isObject) {
1909 assert(superClass != null); 1909 assert(superClass != null);
1910 assert(superClass.resolutionState == STATE_DONE); 1910 assert(superClass.resolutionState == STATE_DONE);
1911 // TODO(johnniwinther): Should we find injected constructors as well? 1911 // TODO(johnniwinther): Should we find injected constructors as well?
1912 FunctionElement target = superClass.lookupDefaultConstructor(); 1912 FunctionElement target = superClass.lookupDefaultConstructor();
1913 if (target == null) { 1913 if (target == null) {
1914 compiler.internalError(superClass, 1914 compiler.internalError(superClass,
1915 "No default constructor available."); 1915 "No default constructor available.");
1916 } 1916 }
1917 Selector selector = 1917 Selector selector = new Selector.callDefaultConstructor();
1918 new Selector.callDefaultConstructor(enclosingClass.library);
1919 List<HInstruction> arguments = 1918 List<HInstruction> arguments =
1920 selector.makeArgumentsList2(const Link<ast.Node>(), 1919 selector.makeArgumentsList2(const Link<ast.Node>(),
1921 target.implementation, 1920 target.implementation,
1922 null, 1921 null,
1923 handleConstantForOptionalParameter); 1922 handleConstantForOptionalParameter);
1924 inlineSuperOrRedirect(target, 1923 inlineSuperOrRedirect(target,
1925 arguments, 1924 arguments,
1926 constructors, 1925 constructors,
1927 fieldValues, 1926 fieldValues,
1928 constructor); 1927 constructor);
(...skipping 4742 matching lines...) Expand 10 before | Expand all | Expand 10 after
6671 if (unaliased is TypedefType) throw 'unable to unalias $type'; 6670 if (unaliased is TypedefType) throw 'unable to unalias $type';
6672 unaliased.accept(this, builder); 6671 unaliased.accept(this, builder);
6673 } 6672 }
6674 6673
6675 void visitDynamicType(DynamicType type, SsaBuilder builder) { 6674 void visitDynamicType(DynamicType type, SsaBuilder builder) {
6676 JavaScriptBackend backend = builder.compiler.backend; 6675 JavaScriptBackend backend = builder.compiler.backend;
6677 ClassElement cls = backend.findHelper('DynamicRuntimeType'); 6676 ClassElement cls = backend.findHelper('DynamicRuntimeType');
6678 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 6677 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
6679 } 6678 }
6680 } 6679 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/universe/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698