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

Unified Diff: test/unittests/interpreter/bytecode-array-builder-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-builder-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index 3e665ab6bd9e914e2eb6313898475dc8b0c243c6..e3065f7964f9f658a8a882f6fc8e885032b13264 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -376,7 +376,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
builder.Return();
// Generate BytecodeArray.
- Handle<BytecodeArray> the_array = builder.ToBytecodeArray();
+ Handle<BytecodeArray> the_array = builder.ToBytecodeArray(isolate());
CHECK_EQ(the_array->frame_size(),
builder.fixed_and_temporary_register_count() * kPointerSize);
@@ -465,7 +465,7 @@ TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) {
}
builder.Return();
- Handle<BytecodeArray> the_array = builder.ToBytecodeArray();
+ Handle<BytecodeArray> the_array = builder.ToBytecodeArray(isolate());
int total_registers = locals + contexts + temps;
CHECK_EQ(the_array->frame_size(), total_registers * kPointerSize);
}
@@ -538,7 +538,7 @@ TEST_F(BytecodeArrayBuilderTest, Constants) {
.LoadLiteral(heap_num_2_copy)
.Return();
- Handle<BytecodeArray> array = builder.ToBytecodeArray();
+ Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
// Should only have one entry for each identical constant.
CHECK_EQ(array->constant_pool()->length(), 3);
}
@@ -591,7 +591,7 @@ TEST_F(BytecodeArrayBuilderTest, ForwardJumps) {
builder.Bind(&far0).Bind(&far1).Bind(&far2).Bind(&far3).Bind(&far4);
builder.Return();
- Handle<BytecodeArray> array = builder.ToBytecodeArray();
+ Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
DCHECK_EQ(array->length(), 40 + kFarJumpDistance - 20 + 1);
BytecodeArrayIterator iterator(array);
@@ -711,7 +711,7 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
builder.Bind(&end);
builder.Return();
- Handle<BytecodeArray> array = builder.ToBytecodeArray();
+ Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
BytecodeArrayIterator iterator(array);
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump);
CHECK_EQ(iterator.GetImmediateOperand(0), 0);
@@ -806,7 +806,7 @@ TEST_F(BytecodeArrayBuilderTest, LabelReuse) {
.Bind(&after_jump1)
.Return();
- Handle<BytecodeArray> array = builder.ToBytecodeArray();
+ Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
BytecodeArrayIterator iterator(array);
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump);
CHECK_EQ(iterator.GetImmediateOperand(0), 2);
@@ -839,7 +839,7 @@ TEST_F(BytecodeArrayBuilderTest, LabelAddressReuse) {
}
builder.Return();
- Handle<BytecodeArray> array = builder.ToBytecodeArray();
+ Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
BytecodeArrayIterator iterator(array);
for (int i = 0; i < kRepeats; i++) {
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump);
« no previous file with comments | « test/cctest/interpreter/test-interpreter-intrinsics.cc ('k') | test/unittests/interpreter/bytecode-array-iterator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698