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

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

Issue 1713983002: dart2js cps: Add SetLength instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Use trust-primitives and refine type of length to uint32' Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/bounds_checker.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 79928219ca22286301be45a45d57c91f73fc6b5a..295cd3b9bfbbee008e9a062272e2e796055f26d5 100644
--- a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
+++ b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
@@ -187,7 +187,7 @@ enum BuiltinOperator {
/// but may not depend on or mutate any other state. An exception is thrown
/// if the object is null, but otherwise they cannot throw or diverge.
enum BuiltinMethod {
- /// Add an item to a native list.
+ /// Add an item to an array.
///
/// Takes any number of arguments, each argument will be added to the
/// list on the order given (as per the JS `push` method).
@@ -195,12 +195,17 @@ enum BuiltinMethod {
/// Compiles to `object.push(x1, ..., xN)`.
Push,
- /// Remove and return the last item from a native list.
+ /// Remove and return the last item from an array.
///
/// Takes no arguments.
///
/// Compiles to `object.pop()`.
Pop,
+
+ /// Sets the length of the array.
+ ///
+ /// Compiles to `object.length = x1`.
+ SetLength,
}
/// True for the built-in operators that may be used in a compound assignment.
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/bounds_checker.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