| 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 20bb4404d9cbb652c3cb934bd81a5851a6e132f7..fe8e0153a34cf6e54ebd2f8c27596d4b85c245d2 100644
|
| --- a/test/cctest/interpreter/test-source-positions.cc
|
| +++ b/test/cctest/interpreter/test-source-positions.cc
|
| @@ -19,9 +19,10 @@ namespace interpreter {
|
|
|
| // Flags enabling optimizations that change generated bytecode array.
|
| // Format is <command-line flag> <flag name> <bit index>
|
| -#define OPTIMIZATION_FLAGS(V) \
|
| - V(FLAG_ignition_reo, kUseReo, 0) \
|
| - V(FLAG_ignition_peephole, kUsePeephole, 1)
|
| +#define OPTIMIZATION_FLAGS(V) \
|
| + V(FLAG_ignition_reo, kUseReo, 0) \
|
| + V(FLAG_ignition_peephole, kUsePeephole, 1) \
|
| + V(FLAG_ignition_filter_positions, kUsePositionFiltering, 2)
|
|
|
| #define DECLARE_BIT(_, Name, BitIndex) static const int Name = 1 << BitIndex;
|
| OPTIMIZATION_FLAGS(DECLARE_BIT)
|
| @@ -30,10 +31,14 @@ OPTIMIZATION_FLAGS(DECLARE_BIT)
|
| // Test cases source positions are checked for. Please ensure all
|
| // combinations of flags are present here. This is done manually
|
| // because it provides easier to comprehend failure case for humans.
|
| -#define TEST_CASES(V) \
|
| - V(UsingReo, kUseReo) \
|
| - V(UsingReoAndPeephole, kUseReo | kUsePeephole) \
|
| - V(UsingPeephole, kUsePeephole)
|
| +#define TEST_CASES(V) \
|
| + V(UsingReo, kUseReo) \
|
| + V(UsingPeephole, kUsePeephole) \
|
| + V(UsingReoAndPeephole, kUseReo | kUsePeephole) \
|
| + V(UsingPositionFiltering, kUsePositionFiltering) \
|
| + V(UsingReoAndPositionFiltering, kUseReo | kUsePositionFiltering) \
|
| + V(UsingPeepholeAndPositionFiltering, kUsePeephole | kUsePositionFiltering) \
|
| + V(UsingAllOptimizations, kUseReo | kUsePeephole | kUsePositionFiltering)
|
|
|
| static const char* kTestScripts[] = {
|
| "var x = (y = 3) + (x = y); return x + y;",
|
| @@ -223,6 +228,9 @@ void TestSourcePositionsEquivalent(int optimization_bitmap) {
|
| for (auto test_script : kTestScripts) {
|
| CHECK(tester.SourcePositionsMatch(optimization_bitmap, test_script));
|
| }
|
| +
|
| + CHECK(tester.SourcePositionsMatch(
|
| + optimization_bitmap, "return some_global[name];", "name", "'a'"));
|
| }
|
|
|
| #define MAKE_TEST(Name, Bitmap) \
|
|
|