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

Unified Diff: tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart

Issue 1223813006: dart2js cps: Direct access on JS arrays. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update unit tests and remove unused functions Created 5 years, 5 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: tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
diff --git a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
index 809aa99b9871b73b6c9a9979fa3c7b04102cae18..8b7b7cd38442b34282540c4fc6a3e709480d8f96 100644
--- a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
+++ b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
@@ -150,6 +150,9 @@ class SExpressionUnstringifier {
static const String GET_STATIC = "GetStatic";
static const String TYPE_TEST = "TypeTest";
static const String APPLY_BUILTIN_OPERATOR = "ApplyBuiltinOperator";
+ static const String GET_LENGTH = "GetLength";
+ static const String GET_INDEX = "GetIndex";
+ static const String SET_INDEX = "SetIndex";
// Other
static const String FUNCTION_DEFINITION = "FunctionDefinition";
@@ -610,6 +613,33 @@ class SExpressionUnstringifier {
return new ApplyBuiltinOperator(operator, arguments);
}
+ /// (GetLength object)
+ GetLength parseGetLength() {
+ tokens.consumeStart(GET_LENGTH);
+ Primitive object = name2variable[tokens.read()];
+ tokens.consumeEnd();
+ return new GetLength(object);
+ }
+
+ /// (GetIndex object index)
+ GetIndex parseGetIndex() {
+ tokens.consumeStart(GET_INDEX);
+ Primitive object = name2variable[tokens.read()];
+ Primitive index = name2variable[tokens.read()];
+ tokens.consumeEnd();
+ return new GetIndex(object, index);
+ }
+
+ /// (SetIndex object index value)
+ SetIndex parseSetIndex() {
+ tokens.consumeStart(SET_INDEX);
+ Primitive object = name2variable[tokens.read()];
+ Primitive index = name2variable[tokens.read()];
+ Primitive value = name2variable[tokens.read()];
+ tokens.consumeEnd();
+ return new SetIndex(object, index, value);
+ }
+
/// (SetStatic field value body)
SetStatic parseSetStatic() {
tokens.consumeStart(SET_STATIC);
@@ -684,6 +714,12 @@ class SExpressionUnstringifier {
return parseTypeTest();
case APPLY_BUILTIN_OPERATOR:
return parseApplyBuiltinOperator();
+ case GET_LENGTH:
+ return parseGetLength();
+ case GET_INDEX:
+ return parseGetIndex();
+ case SET_INDEX:
+ return parseSetIndex();
default:
assert(false);
}
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart ('k') | tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698