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

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart

Issue 1526623004: cps_ir: Add JS checks, use argument nullability (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
index 6cd53ec0796b00f0330b53b464dbde6749c76b60..6fdd0f2558aa3bc313e5f0f9efa714ed6bb7b5a7 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
@@ -865,17 +865,22 @@ class ForeignCode extends Node {
final types.TypeMask type;
final List<Expression> arguments;
final native.NativeBehavior nativeBehavior;
+ final List<bool> nullableArguments; // One 'bit' per argument.
final Element dependency;
ForeignCode(this.codeTemplate, this.type, this.arguments, this.nativeBehavior,
- this.dependency);
+ this.nullableArguments, this.dependency) {
+ assert(arguments.length == nullableArguments.length);
+ }
}
class ForeignExpression extends ForeignCode implements Expression {
- ForeignExpression(js.Template codeTemplate, types.TypeMask type,
+ ForeignExpression(
+ js.Template codeTemplate, types.TypeMask type,
List<Expression> arguments, native.NativeBehavior nativeBehavior,
+ List<bool> nullableArguments,
Element dependency)
- : super(codeTemplate, type, arguments, nativeBehavior,
+ : super(codeTemplate, type, arguments, nativeBehavior, nullableArguments,
dependency);
accept(ExpressionVisitor visitor) {
@@ -888,10 +893,12 @@ class ForeignExpression extends ForeignCode implements Expression {
}
class ForeignStatement extends ForeignCode implements Statement {
- ForeignStatement(js.Template codeTemplate, types.TypeMask type,
+ ForeignStatement(
+ js.Template codeTemplate, types.TypeMask type,
List<Expression> arguments, native.NativeBehavior nativeBehavior,
+ List<bool> nullableArguments,
Element dependency)
- : super(codeTemplate, type, arguments, nativeBehavior,
+ : super(codeTemplate, type, arguments, nativeBehavior, nullableArguments,
dependency);
accept(StatementVisitor visitor) {
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698