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

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

Issue 2242193002: [Interpreter] Avoid accessing Isolate from during bytecode generation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_sourceposition
Patch Set: Rebase Created 4 years, 4 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/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 11a3fde256ce04afc790d9f96248650e19cfa38e..9681612ac4ff40253b46c223d06ab8c2d0075241 100644
--- a/test/unittests/interpreter/bytecode-array-writer-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-writer-unittest.cc
@@ -22,9 +22,9 @@ namespace interpreter {
class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone {
public:
BytecodeArrayWriterUnittest()
- : constant_array_builder_(isolate(), zone()),
+ : constant_array_builder_(zone(), isolate()->factory()->the_hole_value()),
bytecode_array_writer_(
- isolate(), zone(), &constant_array_builder_,
+ zone(), &constant_array_builder_,
SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS) {}
~BytecodeArrayWriterUnittest() override {}
@@ -137,8 +137,8 @@ TEST_F(BytecodeArrayWriterUnittest, SimpleExample) {
CHECK_EQ(bytecodes()->at(i), bytes[i]);
}
- Handle<BytecodeArray> bytecode_array =
- writer()->ToBytecodeArray(0, 0, factory()->empty_fixed_array());
+ Handle<BytecodeArray> bytecode_array = writer()->ToBytecodeArray(
+ isolate(), 0, 0, factory()->empty_fixed_array());
CHECK_EQ(bytecodes()->size(), arraysize(bytes));
PositionTableEntry expected_positions[] = {
@@ -235,8 +235,8 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) {
static_cast<int>(expected_bytes[i]));
}
- Handle<BytecodeArray> bytecode_array =
- writer()->ToBytecodeArray(0, 0, factory()->empty_fixed_array());
+ Handle<BytecodeArray> bytecode_array = writer()->ToBytecodeArray(
+ isolate(), 0, 0, factory()->empty_fixed_array());
SourcePositionTableIterator source_iterator(
bytecode_array->source_position_table());
for (size_t i = 0; i < arraysize(expected_positions); ++i) {

Powered by Google App Engine
This is Rietveld 408576698