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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart2js.ir_builder; 5 part of dart2js.ir_builder;
6 6
7 /** 7 /**
8 * This task iterates through all resolved elements and builds [ir.Node]s. The 8 * This task iterates through all resolved elements and builds [ir.Node]s. The
9 * nodes are stored in the [nodes] map and accessible through [hasIr] and 9 * nodes are stored in the [nodes] map and accessible through [hasIr] and
10 * [getIr]. 10 * [getIr].
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // No super initializer found. Try to find the default constructor if 235 // No super initializer found. Try to find the default constructor if
236 // the class is not Object. 236 // the class is not Object.
237 ClassElement enclosingClass = element.enclosingClass; 237 ClassElement enclosingClass = element.enclosingClass;
238 if (!enclosingClass.isObject) { 238 if (!enclosingClass.isObject) {
239 ClassElement superClass = enclosingClass.superclass; 239 ClassElement superClass = enclosingClass.superclass;
240 FunctionElement target = superClass.lookupDefaultConstructor(); 240 FunctionElement target = superClass.lookupDefaultConstructor();
241 if (target == null) { 241 if (target == null) {
242 compiler.internalError(superClass, 242 compiler.internalError(superClass,
243 "No default constructor available."); 243 "No default constructor available.");
244 } 244 }
245 Selector selector = new Selector.fromElement(target); 245 Selector selector = new Selector.callDefaultConstructor();
246 result.add(irBuilder.makeSuperInitializer(target, 246 result.add(irBuilder.makeSuperInitializer(target,
247 <ir.RunnableBody>[], 247 <ir.RunnableBody>[],
248 selector)); 248 selector));
249 } 249 }
250 } 250 }
251 return result; 251 return result;
252 } 252 }
253 253
254 ir.Primitive visit(ast.Node node) => node.accept(this); 254 ir.Primitive visit(ast.Node node) => node.accept(this);
255 255
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 element, 1540 element,
1541 node, 1541 node,
1542 elements); 1542 elements);
1543 IrBuilder builder = 1543 IrBuilder builder =
1544 new JsIrBuilder(compiler.backend.constantSystem, element); 1544 new JsIrBuilder(compiler.backend.constantSystem, element);
1545 return withBuilder(builder, () => _makeFunctionBody(element, node)); 1545 return withBuilder(builder, () => _makeFunctionBody(element, node));
1546 } 1546 }
1547 1547
1548 } 1548 }
1549 1549
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698