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

Unified Diff: pkg/compiler/lib/src/cps_ir/builtin_operator.dart

Issue 1388473003: dart2js cps_ir: Use interceptors for is-checks. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/cps_ir/builtin_operator.dart
diff --git a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
index 28397eb68bc52a7f7558c4a456f6ffb850a98cc7..6dabc1f6179dc6c93bbbfd98b0c0d8d23580293b 100644
--- a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
+++ b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
@@ -103,6 +103,37 @@ enum BuiltinOperator {
///
/// Compiles to `typeof x === 'number' && Math.floor(x) === x`
IsNumberAndFloor,
+
+ /// Returns true if the argument is a fixed length Array.
+ ///
+ /// Uses one argument.
+ ///
+ /// Precondition: Argument is a JavaScript Array.
sra1 2015/10/06 06:47:58 I'm pretty sure there are some places where this i
+ IsFixedLengthJSArray,
+
+ // TODO(sra): Remove this and replace with IsFalsy(IsFixedLengthJSArray(x)).
+ IsExtendableJSArray,
+
+ /// Returns true if the argument is an unmodifiable Array.
+ ///
+ /// Uses one argument.
+ ///
+ /// Precondition: Argument is a JavaScript Array.
+ IsUnmodifiableJSArray,
+
+ // TODO(sra): Remove this and replace with IsFalsy(IsUnmodifiableArray(x)).
+ IsModifiableJSArray,
+
+
+ /// Compiles to
+ ///
+ /// typeof x === 'object' && x !== null && x.constructor === Array
+ ///
+ /// TODO(sra): Break into individual tests.
+ IsJSArray,
+ ISJSArrayNotNull,
+ IsJSArrayObject,
+ IsJSArrayConstructor,
}
/// A method supported natively in the CPS and Tree IRs using the
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698