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

Unified Diff: test/unittests/interpreter/bytecode-array-writer-unittest.cc

Issue 2112853002: Do not record source positions for non-JS or native script code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@simplifyjitlogging
Patch Set: update test expectation Created 4 years, 5 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
« no previous file with comments | « src/source-position-table.cc ('k') | test/webkit/fast/js/toString-overrides-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/bytecode-array-writer-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-array-writer-unittest.cc b/test/unittests/interpreter/bytecode-array-writer-unittest.cc
index b0d3b3ea0074397c401d453bd629f8a275da6eb7..8c5e1a8d54dcf22662d31863661b945aa80b2712 100644
--- a/test/unittests/interpreter/bytecode-array-writer-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-writer-unittest.cc
@@ -23,7 +23,9 @@ class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone {
public:
BytecodeArrayWriterUnittest()
: constant_array_builder_(isolate(), zone()),
- bytecode_array_writer_(isolate(), zone(), &constant_array_builder_) {}
+ bytecode_array_writer_(
+ isolate(), zone(), &constant_array_builder_,
+ SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS) {}
~BytecodeArrayWriterUnittest() override {}
void Write(BytecodeNode* node, const BytecodeSourceInfo& info);
@@ -135,14 +137,14 @@ TEST_F(BytecodeArrayWriterUnittest, SimpleExample) {
CHECK_EQ(bytecodes()->at(i), bytes[i]);
}
- writer()->ToBytecodeArray(0, 0, factory()->empty_fixed_array());
+ Handle<BytecodeArray> bytecode_array =
+ writer()->ToBytecodeArray(0, 0, factory()->empty_fixed_array());
CHECK_EQ(bytecodes()->size(), arraysize(bytes));
PositionTableEntry expected_positions[] = {
{0, 10, false}, {1, 55, true}, {7, 70, true}};
- Handle<ByteArray> source_positions =
- source_position_table_builder()->ToSourcePositionTable();
- SourcePositionTableIterator source_iterator(*source_positions);
+ SourcePositionTableIterator source_iterator(
+ bytecode_array->source_position_table());
for (size_t i = 0; i < arraysize(expected_positions); ++i) {
const PositionTableEntry& expected = expected_positions[i];
CHECK_EQ(source_iterator.code_offset(), expected.code_offset);
« no previous file with comments | « src/source-position-table.cc ('k') | test/webkit/fast/js/toString-overrides-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698