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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ir/ir_builder.dart

Issue 373463002: dart2dart: Fixed assertions in IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: SVN merge Created 6 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 | sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart » ('j') | 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) 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 library dart2js.ir_builder; 5 library dart2js.ir_builder;
6 6
7 import 'ir_nodes.dart' as ir; 7 import 'ir_nodes.dart' as ir;
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../dart2jslib.dart'; 9 import '../dart2jslib.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 } 1395 }
1396 1396
1397 // Set the value 1397 // Set the value
1398 if (isClosureVariable(element)) { 1398 if (isClosureVariable(element)) {
1399 add(new ir.SetClosureVariable(element, valueToStore)); 1399 add(new ir.SetClosureVariable(element, valueToStore));
1400 } else if (Elements.isLocal(element)) { 1400 } else if (Elements.isLocal(element)) {
1401 valueToStore.useElementAsHint(element); 1401 valueToStore.useElementAsHint(element);
1402 assignedVars[variableIndex[element]] = valueToStore; 1402 assignedVars[variableIndex[element]] = valueToStore;
1403 } else if ((!node.isSuperCall && Elements.isErroneousElement(element)) || 1403 } else if ((!node.isSuperCall && Elements.isErroneousElement(element)) ||
1404 Elements.isStaticOrTopLevel(element)) { 1404 Elements.isStaticOrTopLevel(element)) {
1405 assert(element.isField || element.isSetter); 1405 assert(element.isErroneous || element.isField || element.isSetter);
1406 Selector selector = elements.getSelector(node); 1406 Selector selector = elements.getSelector(node);
1407 continueWithExpression( 1407 continueWithExpression(
1408 (k) => new ir.InvokeStatic(element, selector, k, [valueToStore])); 1408 (k) => new ir.InvokeStatic(element, selector, k, [valueToStore]));
1409 } else { 1409 } else {
1410 // Setter or index-setter invocation 1410 // Setter or index-setter invocation
1411 Selector selector = elements.getSelector(node); 1411 Selector selector = elements.getSelector(node);
1412 assert(selector.kind == SelectorKind.SETTER || 1412 assert(selector.kind == SelectorKind.SETTER ||
1413 selector.kind == SelectorKind.INDEX); 1413 selector.kind == SelectorKind.INDEX);
1414 List<ir.Definition> arguments = selector.isIndexSet 1414 List<ir.Definition> arguments = selector.isIndexSet
1415 ? [index, valueToStore] 1415 ? [index, valueToStore]
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 } 1715 }
1716 1716
1717 visitFunctionExpression(ast.FunctionExpression node) { 1717 visitFunctionExpression(ast.FunctionExpression node) {
1718 FunctionElement oldFunction = currentFunction; 1718 FunctionElement oldFunction = currentFunction;
1719 currentFunction = elements[node]; 1719 currentFunction = elements[node];
1720 visit(node.body); 1720 visit(node.body);
1721 currentFunction = oldFunction; 1721 currentFunction = oldFunction;
1722 } 1722 }
1723 1723
1724 } 1724 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698