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

Unified Diff: test/cctest/interpreter/test-source-positions.cc

Issue 2038323002: [interpreter] Filter expression positions at source. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0060-source-position-testing
Patch Set: Created 4 years, 6 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-source-positions.cc
diff --git a/test/cctest/interpreter/test-source-positions.cc b/test/cctest/interpreter/test-source-positions.cc
index f851b3875054a47afbbabf0466cd7479b3c486dd..9a00ae608d8118e6bb292eebd975413fbdc69e36 100644
--- a/test/cctest/interpreter/test-source-positions.cc
+++ b/test/cctest/interpreter/test-source-positions.cc
@@ -28,7 +28,8 @@ class OptimizedBytecodeSourcePositionTester final {
public:
explicit OptimizedBytecodeSourcePositionTester(Isolate* isolate)
: isolate_(isolate) {
- optimization_flags_ = {&FLAG_ignition_peephole, &FLAG_ignition_reo};
+ optimization_flags_ = {&FLAG_ignition_filter_positions,
+ &FLAG_ignition_peephole, &FLAG_ignition_reo};
SaveFlags();
}
~OptimizedBytecodeSourcePositionTester() { RestoreFlags(); }
@@ -240,12 +241,24 @@ TEST(SourcePositionsEquivalent) {
"}\n",
"function g(a, b) { return a.func(b + b, b); }\n"
- "g(new (function Obj() { this.func = function() { return; }})(), 1)\n"};
+ "g(new (function Obj() { this.func = function() { return; }})(), 1)\n",
+
+ "var x = 55;\n"
+ "var y = x + (x = 1) + (x = 2) + (x = 3);\n"
+ "return y;\n",
+
+ "var x = 55;\n"
+ "var y = x + (x = 1) + (x = 2) + (x = 3);\n"
+ "return y;\n",
+ };
OptimizedBytecodeSourcePositionTester tester(handles.main_isolate());
for (size_t i = 0; i < arraysize(test_scripts); ++i) {
CHECK(tester.SourcePositionsMatch(test_scripts[i]));
}
+
+ CHECK(
+ tester.SourcePositionsMatch("return some_global[name];", "name", "'a'"));
}
} // namespace interpreter

Powered by Google App Engine
This is Rietveld 408576698