| 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 9077c9f118c3974d3ea489f9e30530a363e1037b..28397eb68bc52a7f7558c4a456f6ffb850a98cc7 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
|
| @@ -104,3 +104,29 @@ enum BuiltinOperator {
|
| /// Compiles to `typeof x === 'number' && Math.floor(x) === x`
|
| IsNumberAndFloor,
|
| }
|
| +
|
| +/// A method supported natively in the CPS and Tree IRs using the
|
| +/// `ApplyBuiltinMethod` instructions.
|
| +///
|
| +/// These methods all operate on a distinguished 'object' argument, and
|
| +/// take zero or more additional arguments.
|
| +///
|
| +/// These methods may mutate and depend on the state of the object argument,
|
| +/// 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.
|
| + ///
|
| + /// Takes any number of arguments, each argument will be added to the
|
| + /// list on the order given (as per the JS `push` method).
|
| + ///
|
| + /// Compiles to `object.push(x1, ..., xN)`.
|
| + Push,
|
| +
|
| + /// Remove and return the last item from a native list.
|
| + ///
|
| + /// Takes no arguments.
|
| + ///
|
| + /// Compiles to `object.pop()`.
|
| + Pop,
|
| +}
|
|
|