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

Unified Diff: src/interpreter/bytecode-array-writer.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
« no previous file with comments | « src/interpreter/bytecode-array-writer.h ('k') | src/interpreter/bytecode-dead-code-optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-writer.cc
diff --git a/src/interpreter/bytecode-array-writer.cc b/src/interpreter/bytecode-array-writer.cc
index ef1c0f53a12f1a5877843d93931293b92c5bd4f3..6694a3697cb1951956ee9e6ef4fd553d65ab89c2 100644
--- a/src/interpreter/bytecode-array-writer.cc
+++ b/src/interpreter/bytecode-array-writer.cc
@@ -18,10 +18,9 @@ STATIC_CONST_MEMBER_DEFINITION const size_t
BytecodeArrayWriter::kMaxSizeOfPackedBytecode;
BytecodeArrayWriter::BytecodeArrayWriter(
- Isolate* isolate, Zone* zone, ConstantArrayBuilder* constant_array_builder,
+ Zone* zone, ConstantArrayBuilder* constant_array_builder,
SourcePositionTableBuilder::RecordingMode source_position_mode)
- : isolate_(isolate),
- bytecodes_(zone),
+ : bytecodes_(zone),
max_register_count_(0),
unbound_jumps_(0),
source_position_table_builder_(zone, source_position_mode),
@@ -32,7 +31,7 @@ BytecodeArrayWriter::~BytecodeArrayWriter() {}
// override
Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray(
- int fixed_register_count, int parameter_count,
+ Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) {
DCHECK_EQ(0, unbound_jumps_);
@@ -43,14 +42,15 @@ Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray(
int frame_size_for_locals = fixed_register_count * kPointerSize;
int frame_size_used = max_register_count() * kPointerSize;
int frame_size = std::max(frame_size_for_locals, frame_size_used);
- Handle<FixedArray> constant_pool = constant_array_builder()->ToFixedArray();
- Handle<BytecodeArray> bytecode_array = isolate_->factory()->NewBytecodeArray(
+ Handle<FixedArray> constant_pool =
+ constant_array_builder()->ToFixedArray(isolate);
+ Handle<BytecodeArray> bytecode_array = isolate->factory()->NewBytecodeArray(
bytecode_size, &bytecodes()->front(), frame_size, parameter_count,
constant_pool);
bytecode_array->set_handler_table(*handler_table);
Handle<ByteArray> source_position_table =
source_position_table_builder()->ToSourcePositionTable(
- isolate(), Handle<AbstractCode>::cast(bytecode_array));
+ isolate, Handle<AbstractCode>::cast(bytecode_array));
bytecode_array->set_source_position_table(*source_position_table);
return bytecode_array;
}
« no previous file with comments | « src/interpreter/bytecode-array-writer.h ('k') | src/interpreter/bytecode-dead-code-optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698