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

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

Issue 1667073002: [interpreter, debugger] implement debugger statement. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sourcepositiontable
Patch Set: fix test expectation Created 4 years, 10 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 e69a5ba06d654d6ca6a46780affd2fa878a329a2..c3151976f820a80a94848c6f6c9c0c679f72fd81 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -8341,6 +8341,31 @@ TEST(WithStatement) {
}
}
+TEST(DoDebugger) {
+ InitializedHandleScope handle_scope;
+ BytecodeGeneratorHelper helper;
+
+ // clang-format off
+ ExpectedSnippet<const char*> snippet = {
+ "debugger;",
+ 0,
+ 1,
+ 4,
+ {
+ B(StackCheck), //
+ B(Debugger), //
+ B(LdaUndefined), //
+ B(Return) //
+ },
+ 0
+ };
+ // clang-format on
+
+ Handle<BytecodeArray> bytecode_array =
+ helper.MakeBytecodeForFunctionBody(snippet.code_snippet);
+ CheckBytecodeArrayEqual(snippet, bytecode_array);
+}
+
} // namespace interpreter
} // namespace internal
} // namespace v8
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | test/mjsunit/ignition/debugger-statement.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698