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

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

Issue 1469313002: [interpreter] Switch passing of new.target to register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« src/arm64/builtins-arm64.cc ('K') | « src/x64/builtins-x64.cc ('k') | no next file » | 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 4177e07dc28697ef27aff8b72e260384f69828e2..3d7c6d38ef7dabf613af6e66058d5c4b2e596d3f 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -5186,16 +5186,28 @@ TEST(NewTarget) {
InitializedHandleScope handle_scope;
BytecodeGeneratorHelper helper;
+ int new_target = Register::new_target().index();
+
ExpectedSnippet<int> snippets[] = {
{"return new.target;",
1 * kPointerSize,
1,
- 8,
+ 5,
+ {
+ B(Ldar), R(new_target), //
+ B(Star), R(0), //
+ B(Return), //
+ }},
+ {"new.target;",
+ 1 * kPointerSize,
+ 1,
+ 6,
{
- B(CallRuntime), U16(Runtime::kGetNewTarget), R(0), U8(0), //
- B(Star), R(0), //
- B(Return), //
- }}
+ B(Ldar), R(new_target), //
+ B(Star), R(0), //
+ B(LdaUndefined), //
+ B(Return), //
+ }},
};
for (size_t i = 0; i < arraysize(snippets); i++) {
« src/arm64/builtins-arm64.cc ('K') | « src/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698