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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1607993002: dart2js cps: Fix return type for native functions. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Use return type instead of element type Created 4 years, 11 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
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 library dart2js.ir_nodes; 4 library dart2js.ir_nodes;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'cps_fragment.dart' show CpsFragment; 7 import 'cps_fragment.dart' show CpsFragment;
8 import '../constants/values.dart' as values; 8 import '../constants/values.dart' as values;
9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; 9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 bool get isSafeForElimination => true; 1522 bool get isSafeForElimination => true;
1523 bool get isSafeForReordering => true; 1523 bool get isSafeForReordering => true;
1524 1524
1525 void setParentPointers() { 1525 void setParentPointers() {
1526 _setParentsOnList(arguments, this); 1526 _setParentsOnList(arguments, this);
1527 } 1527 }
1528 } 1528 }
1529 1529
1530 class ForeignCode extends UnsafePrimitive { 1530 class ForeignCode extends UnsafePrimitive {
1531 final js.Template codeTemplate; 1531 final js.Template codeTemplate;
1532 final TypeMask type; 1532 final TypeMask storedType;
1533 final List<Reference<Primitive>> arguments; 1533 final List<Reference<Primitive>> arguments;
1534 final native.NativeBehavior nativeBehavior; 1534 final native.NativeBehavior nativeBehavior;
1535 final FunctionElement dependency; 1535 final FunctionElement dependency;
1536 1536
1537 ForeignCode(this.codeTemplate, this.type, List<Primitive> arguments, 1537 ForeignCode(this.codeTemplate, this.storedType, List<Primitive> arguments,
1538 this.nativeBehavior, {this.dependency}) 1538 this.nativeBehavior, {this.dependency})
1539 : this.arguments = _referenceList(arguments); 1539 : this.arguments = _referenceList(arguments);
1540 1540
1541 accept(Visitor visitor) => visitor.visitForeignCode(this); 1541 accept(Visitor visitor) => visitor.visitForeignCode(this);
1542 1542
1543 bool get hasValue => true; 1543 bool get hasValue => true;
1544 1544
1545 void setParentPointers() { 1545 void setParentPointers() {
1546 _setParentsOnList(arguments, this); 1546 _setParentsOnList(arguments, this);
1547 } 1547 }
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2830 plug(new Branch.loose(_definitions.getCopy(node.condition), 2830 plug(new Branch.loose(_definitions.getCopy(node.condition),
2831 _copies[node.trueContinuation.definition], 2831 _copies[node.trueContinuation.definition],
2832 _copies[node.falseContinuation.definition]) 2832 _copies[node.falseContinuation.definition])
2833 ..isStrictCheck = node.isStrictCheck); 2833 ..isStrictCheck = node.isStrictCheck);
2834 } 2834 }
2835 2835
2836 visitUnreachable(Unreachable node) { 2836 visitUnreachable(Unreachable node) {
2837 plug(new Unreachable()); 2837 plug(new Unreachable());
2838 } 2838 }
2839 } 2839 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698