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

Unified Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 1410003003: [Interpreter] Add support for JS runtime calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_api_builtin
Patch Set: Rebased Created 5 years, 1 month 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 | « src/interpreter/interpreter.cc ('k') | test/unittests/compiler/interpreter-assembler-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/test-bytecode-generator.cc
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc
index 0f36ae84147ac05ed8aa099716b3284fcd8be194..11a88e93a97c960c8c2db8d950ff3ad03acf9fb8 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -1547,10 +1547,10 @@ TEST(CallRuntime) {
InitializedHandleScope handle_scope;
BytecodeGeneratorHelper helper;
- ExpectedSnippet<int> snippets[] = {
+ ExpectedSnippet<InstanceType> snippets[] = {
{
"function f() { %TheHole() }\nf()",
- 1 * kPointerSize,
+ 0,
1,
7,
{
@@ -1585,6 +1585,24 @@ TEST(CallRuntime) {
B(Return) //
},
},
+ {
+ "function f() { return %spread_iterable([1]) }\nf()",
+ 2 * kPointerSize,
+ 1,
+ 16,
+ {
+ B(LdaUndefined), //
+ B(Star), R(0), //
+ B(LdaConstant), U8(0), //
+ B(CreateArrayLiteral), U8(0), U8(3), //
+ B(Star), R(1), //
+ B(CallJSRuntime), U16(Context::SPREAD_ITERABLE_INDEX), R(0), //
+ U8(1), //
+ B(Return), //
+ },
+ 1,
+ {InstanceType::FIXED_ARRAY_TYPE},
+ },
};
for (size_t i = 0; i < arraysize(snippets); i++) {
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | test/unittests/compiler/interpreter-assembler-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698