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

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

Issue 1583783003: [Interpreter] Adds support for variable/function declarations in lookup slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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: 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 aa996c69af7cb60993b3ded6139b10905e7b40da..189b93ed21884fdcf3b2ae7ab91fc308ffc3e519 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -6228,10 +6228,8 @@ TEST(LookupSlotInEval) {
std::string script = std::string(function_prologue) +
std::string(snippets[i].code_snippet) +
std::string(function_epilogue);
- // TODO(mythria): use * as filter when function declarations are supported
- // inside eval.
Handle<BytecodeArray> bytecode_array =
- helper.MakeBytecode(script.c_str(), "t", "f");
+ helper.MakeBytecode(script.c_str(), "*", "f");
CheckBytecodeArrayEqual(snippets[i], bytecode_array);
}
}
@@ -6325,15 +6323,20 @@ TEST(LookupSlotWideInEval) {
std::string script = std::string(function_prologue) +
std::string(snippets[i].code_snippet) +
std::string(function_epilogue);
- // TODO(mythria): use * as filter when function declarations are supported
- // inside eval.
Handle<BytecodeArray> bytecode_array =
- helper.MakeBytecode(script.c_str(), "t", "f");
+ helper.MakeBytecode(script.c_str(), "*", "f");
CheckBytecodeArrayEqual(snippets[i], bytecode_array);
}
}
+TEST(LookupSlotVariableDecl) {
+ InitializedHandleScope handle_scope;
+ BytecodeGeneratorHelper helper;
rmcilroy 2016/01/14 11:21:12 no need for these variables (I thought the compile
mythria 2016/01/15 11:27:04 Done.
+ // TODO(mythria): tests for variable/function declaration in lookup slots.
+}
+
+
TEST(DeleteLookupSlotInEval) {
InitializedHandleScope handle_scope;
BytecodeGeneratorHelper helper;
@@ -6388,7 +6391,7 @@ TEST(DeleteLookupSlotInEval) {
std::string(snippets[i].code_snippet) +
std::string(function_epilogue);
Handle<BytecodeArray> bytecode_array =
- helper.MakeBytecode(script.c_str(), "t", "f");
+ helper.MakeBytecode(script.c_str(), "*", "f");
CheckBytecodeArrayEqual(snippets[i], bytecode_array);
}
}

Powered by Google App Engine
This is Rietveld 408576698