Commit 1c2c2f43 authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Interpreter] Avoid accessing Isolate from during bytecode generation.

Removes all accesses to the Isolate during bytecode generation and the
bytecode pipeline. Adds an DisallowIsolateAccessScope which is used to
enforce this invariant within the BytecodeGenerator.

BUG=v8:5203

Review-Url: https://codereview.chromium.org/2242193002
Cr-Commit-Position: refs/heads/master@{#38716}
parent ece2f108
...@@ -411,8 +411,15 @@ class Scope: public ZoneObject { ...@@ -411,8 +411,15 @@ class Scope: public ZoneObject {
// 'this' is bound, and what determines the function kind. // 'this' is bound, and what determines the function kind.
DeclarationScope* GetReceiverScope(); DeclarationScope* GetReceiverScope();
// Creates a scope info if it doesn't already exist.
Handle<ScopeInfo> GetScopeInfo(Isolate* isolate); Handle<ScopeInfo> GetScopeInfo(Isolate* isolate);
// GetScopeInfo() must have been called once to create the ScopeInfo.
Handle<ScopeInfo> scope_info() {
DCHECK(!scope_info_.is_null());
return scope_info_;
}
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Strict mode support. // Strict mode support.
bool IsDeclared(const AstRawString* name) { bool IsDeclared(const AstRawString* name) {
......
...@@ -21,17 +21,16 @@ BytecodeArrayBuilder::BytecodeArrayBuilder( ...@@ -21,17 +21,16 @@ BytecodeArrayBuilder::BytecodeArrayBuilder(
Isolate* isolate, Zone* zone, int parameter_count, int context_count, Isolate* isolate, Zone* zone, int parameter_count, int context_count,
int locals_count, FunctionLiteral* literal, int locals_count, FunctionLiteral* literal,
SourcePositionTableBuilder::RecordingMode source_position_mode) SourcePositionTableBuilder::RecordingMode source_position_mode)
: isolate_(isolate), : zone_(zone),
zone_(zone),
bytecode_generated_(false), bytecode_generated_(false),
constant_array_builder_(isolate, zone), constant_array_builder_(zone, isolate->factory()->the_hole_value()),
handler_table_builder_(isolate, zone), handler_table_builder_(zone),
return_seen_in_block_(false), return_seen_in_block_(false),
parameter_count_(parameter_count), parameter_count_(parameter_count),
local_register_count_(locals_count), local_register_count_(locals_count),
context_register_count_(context_count), context_register_count_(context_count),
temporary_allocator_(zone, fixed_register_count()), temporary_allocator_(zone, fixed_register_count()),
bytecode_array_writer_(isolate, zone, &constant_array_builder_, bytecode_array_writer_(zone, &constant_array_builder_,
source_position_mode), source_position_mode),
pipeline_(&bytecode_array_writer_) { pipeline_(&bytecode_array_writer_) {
DCHECK_GE(parameter_count_, 0); DCHECK_GE(parameter_count_, 0);
...@@ -75,14 +74,15 @@ bool BytecodeArrayBuilder::RegisterIsParameterOrLocal(Register reg) const { ...@@ -75,14 +74,15 @@ bool BytecodeArrayBuilder::RegisterIsParameterOrLocal(Register reg) const {
return reg.is_parameter() || reg.index() < locals_count(); return reg.is_parameter() || reg.index() < locals_count();
} }
Handle<BytecodeArray> BytecodeArrayBuilder::ToBytecodeArray() { Handle<BytecodeArray> BytecodeArrayBuilder::ToBytecodeArray(Isolate* isolate) {
DCHECK(return_seen_in_block_); DCHECK(return_seen_in_block_);
DCHECK(!bytecode_generated_); DCHECK(!bytecode_generated_);
bytecode_generated_ = true; bytecode_generated_ = true;
Handle<FixedArray> handler_table = handler_table_builder()->ToHandlerTable(); Handle<FixedArray> handler_table =
return pipeline_->ToBytecodeArray(fixed_register_count(), parameter_count(), handler_table_builder()->ToHandlerTable(isolate);
handler_table); return pipeline_->ToBytecodeArray(isolate, fixed_register_count(),
parameter_count(), handler_table);
} }
namespace { namespace {
......
...@@ -34,7 +34,7 @@ class BytecodeArrayBuilder final : public ZoneObject { ...@@ -34,7 +34,7 @@ class BytecodeArrayBuilder final : public ZoneObject {
SourcePositionTableBuilder::RecordingMode source_position_mode = SourcePositionTableBuilder::RecordingMode source_position_mode =
SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS); SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS);
Handle<BytecodeArray> ToBytecodeArray(); Handle<BytecodeArray> ToBytecodeArray(Isolate* isolate);
// Get the number of parameters expected by function. // Get the number of parameters expected by function.
int parameter_count() const { int parameter_count() const {
...@@ -363,7 +363,6 @@ class BytecodeArrayBuilder final : public ZoneObject { ...@@ -363,7 +363,6 @@ class BytecodeArrayBuilder final : public ZoneObject {
void LeaveBasicBlock() { return_seen_in_block_ = false; } void LeaveBasicBlock() { return_seen_in_block_ = false; }
Isolate* isolate() const { return isolate_; }
BytecodeArrayWriter* bytecode_array_writer() { BytecodeArrayWriter* bytecode_array_writer() {
return &bytecode_array_writer_; return &bytecode_array_writer_;
} }
...@@ -378,7 +377,6 @@ class BytecodeArrayBuilder final : public ZoneObject { ...@@ -378,7 +377,6 @@ class BytecodeArrayBuilder final : public ZoneObject {
return &handler_table_builder_; return &handler_table_builder_;
} }
Isolate* isolate_;
Zone* zone_; Zone* zone_;
bool bytecode_generated_; bool bytecode_generated_;
ConstantArrayBuilder constant_array_builder_; ConstantArrayBuilder constant_array_builder_;
......
...@@ -18,10 +18,9 @@ STATIC_CONST_MEMBER_DEFINITION const size_t ...@@ -18,10 +18,9 @@ STATIC_CONST_MEMBER_DEFINITION const size_t
BytecodeArrayWriter::kMaxSizeOfPackedBytecode; BytecodeArrayWriter::kMaxSizeOfPackedBytecode;
BytecodeArrayWriter::BytecodeArrayWriter( BytecodeArrayWriter::BytecodeArrayWriter(
Isolate* isolate, Zone* zone, ConstantArrayBuilder* constant_array_builder, Zone* zone, ConstantArrayBuilder* constant_array_builder,
SourcePositionTableBuilder::RecordingMode source_position_mode) SourcePositionTableBuilder::RecordingMode source_position_mode)
: isolate_(isolate), : bytecodes_(zone),
bytecodes_(zone),
max_register_count_(0), max_register_count_(0),
unbound_jumps_(0), unbound_jumps_(0),
source_position_table_builder_(zone, source_position_mode), source_position_table_builder_(zone, source_position_mode),
...@@ -32,7 +31,7 @@ BytecodeArrayWriter::~BytecodeArrayWriter() {} ...@@ -32,7 +31,7 @@ BytecodeArrayWriter::~BytecodeArrayWriter() {}
// override // override
Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray( Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) { Handle<FixedArray> handler_table) {
DCHECK_EQ(0, unbound_jumps_); DCHECK_EQ(0, unbound_jumps_);
...@@ -43,14 +42,15 @@ Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray( ...@@ -43,14 +42,15 @@ Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray(
int frame_size_for_locals = fixed_register_count * kPointerSize; int frame_size_for_locals = fixed_register_count * kPointerSize;
int frame_size_used = max_register_count() * kPointerSize; int frame_size_used = max_register_count() * kPointerSize;
int frame_size = std::max(frame_size_for_locals, frame_size_used); int frame_size = std::max(frame_size_for_locals, frame_size_used);
Handle<FixedArray> constant_pool = constant_array_builder()->ToFixedArray(); Handle<FixedArray> constant_pool =
Handle<BytecodeArray> bytecode_array = isolate_->factory()->NewBytecodeArray( constant_array_builder()->ToFixedArray(isolate);
Handle<BytecodeArray> bytecode_array = isolate->factory()->NewBytecodeArray(
bytecode_size, &bytecodes()->front(), frame_size, parameter_count, bytecode_size, &bytecodes()->front(), frame_size, parameter_count,
constant_pool); constant_pool);
bytecode_array->set_handler_table(*handler_table); bytecode_array->set_handler_table(*handler_table);
Handle<ByteArray> source_position_table = Handle<ByteArray> source_position_table =
source_position_table_builder()->ToSourcePositionTable( 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); bytecode_array->set_source_position_table(*source_position_table);
return bytecode_array; return bytecode_array;
} }
......
...@@ -23,8 +23,7 @@ class ConstantArrayBuilder; ...@@ -23,8 +23,7 @@ class ConstantArrayBuilder;
class BytecodeArrayWriter final : public BytecodePipelineStage { class BytecodeArrayWriter final : public BytecodePipelineStage {
public: public:
BytecodeArrayWriter( BytecodeArrayWriter(
Isolate* isolate, Zone* zone, Zone* zone, ConstantArrayBuilder* constant_array_builder,
ConstantArrayBuilder* constant_array_builder,
SourcePositionTableBuilder::RecordingMode source_position_mode); SourcePositionTableBuilder::RecordingMode source_position_mode);
virtual ~BytecodeArrayWriter(); virtual ~BytecodeArrayWriter();
...@@ -34,7 +33,7 @@ class BytecodeArrayWriter final : public BytecodePipelineStage { ...@@ -34,7 +33,7 @@ class BytecodeArrayWriter final : public BytecodePipelineStage {
void BindLabel(BytecodeLabel* label) override; void BindLabel(BytecodeLabel* label) override;
void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override;
Handle<BytecodeArray> ToBytecodeArray( Handle<BytecodeArray> ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) override; Handle<FixedArray> handler_table) override;
private: private:
...@@ -63,7 +62,6 @@ class BytecodeArrayWriter final : public BytecodePipelineStage { ...@@ -63,7 +62,6 @@ class BytecodeArrayWriter final : public BytecodePipelineStage {
void EmitJump(BytecodeNode* node, BytecodeLabel* label); void EmitJump(BytecodeNode* node, BytecodeLabel* label);
void UpdateSourcePositionTable(const BytecodeNode* const node); void UpdateSourcePositionTable(const BytecodeNode* const node);
Isolate* isolate() { return isolate_; }
ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; }
SourcePositionTableBuilder* source_position_table_builder() { SourcePositionTableBuilder* source_position_table_builder() {
return &source_position_table_builder_; return &source_position_table_builder_;
...@@ -73,7 +71,6 @@ class BytecodeArrayWriter final : public BytecodePipelineStage { ...@@ -73,7 +71,6 @@ class BytecodeArrayWriter final : public BytecodePipelineStage {
} }
int max_register_count() { return max_register_count_; } int max_register_count() { return max_register_count_; }
Isolate* isolate_;
ZoneVector<uint8_t> bytecodes_; ZoneVector<uint8_t> bytecodes_;
int max_register_count_; int max_register_count_;
int unbound_jumps_; int unbound_jumps_;
......
...@@ -14,10 +14,10 @@ BytecodeDeadCodeOptimizer::BytecodeDeadCodeOptimizer( ...@@ -14,10 +14,10 @@ BytecodeDeadCodeOptimizer::BytecodeDeadCodeOptimizer(
// override // override
Handle<BytecodeArray> BytecodeDeadCodeOptimizer::ToBytecodeArray( Handle<BytecodeArray> BytecodeDeadCodeOptimizer::ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) { Handle<FixedArray> handler_table) {
return next_stage_->ToBytecodeArray(fixed_register_count, parameter_count, return next_stage_->ToBytecodeArray(isolate, fixed_register_count,
handler_table); parameter_count, handler_table);
} }
// override // override
......
...@@ -24,7 +24,7 @@ class BytecodeDeadCodeOptimizer final : public BytecodePipelineStage, ...@@ -24,7 +24,7 @@ class BytecodeDeadCodeOptimizer final : public BytecodePipelineStage,
void BindLabel(BytecodeLabel* label) override; void BindLabel(BytecodeLabel* label) override;
void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override;
Handle<BytecodeArray> ToBytecodeArray( Handle<BytecodeArray> ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) override; Handle<FixedArray> handler_table) override;
private: private:
......
...@@ -600,9 +600,8 @@ class BytecodeGenerator::TestResultScope final : public ExpressionResultScope { ...@@ -600,9 +600,8 @@ class BytecodeGenerator::TestResultScope final : public ExpressionResultScope {
// Used to build a list of global declaration initial value pairs. // Used to build a list of global declaration initial value pairs.
class BytecodeGenerator::GlobalDeclarationsBuilder final : public ZoneObject { class BytecodeGenerator::GlobalDeclarationsBuilder final : public ZoneObject {
public: public:
GlobalDeclarationsBuilder(Isolate* isolate, Zone* zone) explicit GlobalDeclarationsBuilder(Zone* zone)
: isolate_(isolate), : declarations_(0, zone),
declarations_(0, zone),
constant_pool_entry_(0), constant_pool_entry_(0),
has_constant_pool_entry_(false) {} has_constant_pool_entry_(false) {}
...@@ -619,14 +618,14 @@ class BytecodeGenerator::GlobalDeclarationsBuilder final : public ZoneObject { ...@@ -619,14 +618,14 @@ class BytecodeGenerator::GlobalDeclarationsBuilder final : public ZoneObject {
Handle<FixedArray> AllocateDeclarationPairs(CompilationInfo* info) { Handle<FixedArray> AllocateDeclarationPairs(CompilationInfo* info) {
DCHECK(has_constant_pool_entry_); DCHECK(has_constant_pool_entry_);
int array_index = 0; int array_index = 0;
Handle<FixedArray> pairs = isolate_->factory()->NewFixedArray( Handle<FixedArray> pairs = info->isolate()->factory()->NewFixedArray(
static_cast<int>(declarations_.size() * 2), TENURED); static_cast<int>(declarations_.size() * 2), TENURED);
for (std::pair<FeedbackVectorSlot, FunctionLiteral*> declaration : for (std::pair<FeedbackVectorSlot, FunctionLiteral*> declaration :
declarations_) { declarations_) {
FunctionLiteral* func = declaration.second; FunctionLiteral* func = declaration.second;
Handle<Object> initial_value; Handle<Object> initial_value;
if (func == nullptr) { if (func == nullptr) {
initial_value = isolate_->factory()->undefined_value(); initial_value = info->isolate()->factory()->undefined_value();
} else { } else {
initial_value = initial_value =
Compiler::GetSharedFunctionInfo(func, info->script(), info); Compiler::GetSharedFunctionInfo(func, info->script(), info);
...@@ -657,15 +656,13 @@ class BytecodeGenerator::GlobalDeclarationsBuilder final : public ZoneObject { ...@@ -657,15 +656,13 @@ class BytecodeGenerator::GlobalDeclarationsBuilder final : public ZoneObject {
bool empty() { return declarations_.empty(); } bool empty() { return declarations_.empty(); }
private: private:
Isolate* isolate_;
ZoneVector<std::pair<FeedbackVectorSlot, FunctionLiteral*>> declarations_; ZoneVector<std::pair<FeedbackVectorSlot, FunctionLiteral*>> declarations_;
size_t constant_pool_entry_; size_t constant_pool_entry_;
bool has_constant_pool_entry_; bool has_constant_pool_entry_;
}; };
BytecodeGenerator::BytecodeGenerator(CompilationInfo* info) BytecodeGenerator::BytecodeGenerator(CompilationInfo* info)
: isolate_(info->isolate()), : zone_(info->zone()),
zone_(info->zone()),
builder_(new (zone()) BytecodeArrayBuilder( builder_(new (zone()) BytecodeArrayBuilder(
info->isolate(), info->zone(), info->num_parameters_including_this(), info->isolate(), info->zone(), info->num_parameters_including_this(),
info->scope()->MaxNestedContextChainLength(), info->scope()->MaxNestedContextChainLength(),
...@@ -673,8 +670,7 @@ BytecodeGenerator::BytecodeGenerator(CompilationInfo* info) ...@@ -673,8 +670,7 @@ BytecodeGenerator::BytecodeGenerator(CompilationInfo* info)
info->SourcePositionRecordingMode())), info->SourcePositionRecordingMode())),
info_(info), info_(info),
scope_(info->scope()), scope_(info->scope()),
globals_builder_(new (zone()) GlobalDeclarationsBuilder(info->isolate(), globals_builder_(new (zone()) GlobalDeclarationsBuilder(info->zone())),
info->zone())),
global_declarations_(0, info->zone()), global_declarations_(0, info->zone()),
function_literals_(0, info->zone()), function_literals_(0, info->zone()),
native_function_literals_(0, info->zone()), native_function_literals_(0, info->zone()),
...@@ -684,24 +680,26 @@ BytecodeGenerator::BytecodeGenerator(CompilationInfo* info) ...@@ -684,24 +680,26 @@ BytecodeGenerator::BytecodeGenerator(CompilationInfo* info)
register_allocator_(nullptr), register_allocator_(nullptr),
generator_resume_points_(info->literal()->yield_count(), info->zone()), generator_resume_points_(info->literal()->yield_count(), info->zone()),
generator_state_(), generator_state_(),
loop_depth_(0) { loop_depth_(0),
InitializeAstVisitor(isolate()->stack_guard()->real_climit()); home_object_symbol_(info->isolate()->factory()->home_object_symbol()),
prototype_string_(info->isolate()->factory()->prototype_string()) {
InitializeAstVisitor(info->isolate()->stack_guard()->real_climit());
} }
Handle<BytecodeArray> BytecodeGenerator::MakeBytecode() { Handle<BytecodeArray> BytecodeGenerator::MakeBytecode(Isolate* isolate) {
// Create an inner HandleScope to avoid unnecessarily canonicalizing handles // Create an inner HandleScope to avoid unnecessarily canonicalizing handles
// created as part of bytecode finalization. // created as part of bytecode finalization.
HandleScope scope(isolate()); HandleScope scope(isolate);
GenerateBytecode(); GenerateBytecode();
FinalizeBytecode(); FinalizeBytecode(isolate);
if (HasStackOverflow()) return Handle<BytecodeArray>(); if (HasStackOverflow()) return Handle<BytecodeArray>();
return scope.CloseAndEscape(builder()->ToBytecodeArray()); return scope.CloseAndEscape(builder()->ToBytecodeArray(isolate));
} }
void BytecodeGenerator::FinalizeBytecode() { void BytecodeGenerator::FinalizeBytecode(Isolate* isolate) {
// Build global declaration pair arrays. // Build global declaration pair arrays.
for (GlobalDeclarationsBuilder* globals_builder : global_declarations_) { for (GlobalDeclarationsBuilder* globals_builder : global_declarations_) {
Handle<FixedArray> declarations = Handle<FixedArray> declarations =
...@@ -1025,7 +1023,7 @@ void BytecodeGenerator::VisitDeclarations( ...@@ -1025,7 +1023,7 @@ void BytecodeGenerator::VisitDeclarations(
// Push and reset globals builder. // Push and reset globals builder.
global_declarations_.push_back(globals_builder()); global_declarations_.push_back(globals_builder());
globals_builder_ = new (zone()) GlobalDeclarationsBuilder(isolate(), zone()); globals_builder_ = new (zone()) GlobalDeclarationsBuilder(zone());
} }
void BytecodeGenerator::VisitStatements(ZoneList<Statement*>* statements) { void BytecodeGenerator::VisitStatements(ZoneList<Statement*>* statements) {
...@@ -1497,11 +1495,10 @@ void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) { ...@@ -1497,11 +1495,10 @@ void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
register_allocator()->PrepareForConsecutiveAllocations(2); register_allocator()->PrepareForConsecutiveAllocations(2);
Register literal = register_allocator()->NextConsecutiveRegister(); Register literal = register_allocator()->NextConsecutiveRegister();
Register prototype = register_allocator()->NextConsecutiveRegister(); Register prototype = register_allocator()->NextConsecutiveRegister();
Handle<String> name = isolate()->factory()->prototype_string();
FeedbackVectorSlot slot = expr->PrototypeSlot(); FeedbackVectorSlot slot = expr->PrototypeSlot();
builder() builder()
->StoreAccumulatorInRegister(literal) ->StoreAccumulatorInRegister(literal)
.LoadNamedProperty(literal, name, feedback_index(slot)) .LoadNamedProperty(literal, prototype_string(), feedback_index(slot))
.StoreAccumulatorInRegister(prototype); .StoreAccumulatorInRegister(prototype);
VisitClassLiteralProperties(expr, literal, prototype); VisitClassLiteralProperties(expr, literal, prototype);
...@@ -1619,7 +1616,7 @@ void BytecodeGenerator::VisitClassLiteralStaticPrototypeWithComputedName( ...@@ -1619,7 +1616,7 @@ void BytecodeGenerator::VisitClassLiteralStaticPrototypeWithComputedName(
Register key) { Register key) {
BytecodeLabel done; BytecodeLabel done;
builder() builder()
->LoadLiteral(isolate()->factory()->prototype_string()) ->LoadLiteral(prototype_string())
.CompareOperation(Token::Value::EQ_STRICT, key) .CompareOperation(Token::Value::EQ_STRICT, key)
.JumpIfFalse(&done) .JumpIfFalse(&done)
.CallRuntime(Runtime::kThrowStaticPrototypeError, Register(0), 0) .CallRuntime(Runtime::kThrowStaticPrototypeError, Register(0), 0)
...@@ -3172,7 +3169,7 @@ void BytecodeGenerator::VisitNewLocalFunctionContext() { ...@@ -3172,7 +3169,7 @@ void BytecodeGenerator::VisitNewLocalFunctionContext() {
builder() builder()
->LoadAccumulatorWithRegister(Register::function_closure()) ->LoadAccumulatorWithRegister(Register::function_closure())
.StoreAccumulatorInRegister(closure) .StoreAccumulatorInRegister(closure)
.LoadLiteral(scope->GetScopeInfo(isolate())) .LoadLiteral(scope->scope_info())
.StoreAccumulatorInRegister(scope_info) .StoreAccumulatorInRegister(scope_info)
.CallRuntime(Runtime::kNewScriptContext, closure, 2); .CallRuntime(Runtime::kNewScriptContext, closure, 2);
} else { } else {
...@@ -3215,8 +3212,7 @@ void BytecodeGenerator::VisitNewLocalBlockContext(Scope* scope) { ...@@ -3215,8 +3212,7 @@ void BytecodeGenerator::VisitNewLocalBlockContext(Scope* scope) {
DCHECK(scope->is_block_scope()); DCHECK(scope->is_block_scope());
VisitFunctionClosureForContext(); VisitFunctionClosureForContext();
builder()->CreateBlockContext(scope->scope_info());
builder()->CreateBlockContext(scope->GetScopeInfo(isolate()));
execution_result()->SetResultInAccumulator(); execution_result()->SetResultInAccumulator();
} }
...@@ -3271,11 +3267,11 @@ void BytecodeGenerator::VisitSetHomeObject(Register value, Register home_object, ...@@ -3271,11 +3267,11 @@ void BytecodeGenerator::VisitSetHomeObject(Register value, Register home_object,
int slot_number) { int slot_number) {
Expression* expr = property->value(); Expression* expr = property->value();
if (FunctionLiteral::NeedsHomeObject(expr)) { if (FunctionLiteral::NeedsHomeObject(expr)) {
Handle<Name> name = isolate()->factory()->home_object_symbol();
FeedbackVectorSlot slot = property->GetSlot(slot_number); FeedbackVectorSlot slot = property->GetSlot(slot_number);
builder() builder()
->LoadAccumulatorWithRegister(home_object) ->LoadAccumulatorWithRegister(home_object)
.StoreNamedProperty(value, name, feedback_index(slot), language_mode()); .StoreNamedProperty(value, home_object_symbol(), feedback_index(slot),
language_mode());
} }
} }
......
...@@ -24,7 +24,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { ...@@ -24,7 +24,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
public: public:
explicit BytecodeGenerator(CompilationInfo* info); explicit BytecodeGenerator(CompilationInfo* info);
Handle<BytecodeArray> MakeBytecode(); Handle<BytecodeArray> MakeBytecode(Isolate* isolate);
#define DECLARE_VISIT(type) void Visit##type(type* node); #define DECLARE_VISIT(type) void Visit##type(type* node);
AST_NODE_LIST(DECLARE_VISIT) AST_NODE_LIST(DECLARE_VISIT)
...@@ -54,7 +54,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { ...@@ -54,7 +54,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void GenerateBytecode(); void GenerateBytecode();
void GenerateBytecodeBody(); void GenerateBytecodeBody();
void FinalizeBytecode(); void FinalizeBytecode(Isolate* isolate);
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
...@@ -177,7 +177,6 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { ...@@ -177,7 +177,6 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void InitializeWithConsecutiveRegisters(Register (&registers)[N]); void InitializeWithConsecutiveRegisters(Register (&registers)[N]);
inline BytecodeArrayBuilder* builder() const { return builder_; } inline BytecodeArrayBuilder* builder() const { return builder_; }
inline Isolate* isolate() const { return isolate_; }
inline Zone* zone() const { return zone_; } inline Zone* zone() const { return zone_; }
inline DeclarationScope* scope() const { return scope_; } inline DeclarationScope* scope() const { return scope_; }
inline CompilationInfo* info() const { return info_; } inline CompilationInfo* info() const { return info_; }
...@@ -206,23 +205,31 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> { ...@@ -206,23 +205,31 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
inline LanguageMode language_mode() const; inline LanguageMode language_mode() const;
int feedback_index(FeedbackVectorSlot slot) const; int feedback_index(FeedbackVectorSlot slot) const;
Isolate* isolate_; Handle<Name> home_object_symbol() const { return home_object_symbol_; }
Handle<Name> prototype_string() const { return prototype_string_; }
Zone* zone_; Zone* zone_;
BytecodeArrayBuilder* builder_; BytecodeArrayBuilder* builder_;
CompilationInfo* info_; CompilationInfo* info_;
DeclarationScope* scope_; DeclarationScope* scope_;
GlobalDeclarationsBuilder* globals_builder_; GlobalDeclarationsBuilder* globals_builder_;
ZoneVector<GlobalDeclarationsBuilder*> global_declarations_; ZoneVector<GlobalDeclarationsBuilder*> global_declarations_;
ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_; ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_;
ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> ZoneVector<std::pair<NativeFunctionLiteral*, size_t>>
native_function_literals_; native_function_literals_;
ControlScope* execution_control_; ControlScope* execution_control_;
ContextScope* execution_context_; ContextScope* execution_context_;
ExpressionResultScope* execution_result_; ExpressionResultScope* execution_result_;
RegisterAllocationScope* register_allocator_; RegisterAllocationScope* register_allocator_;
ZoneVector<BytecodeLabel> generator_resume_points_; ZoneVector<BytecodeLabel> generator_resume_points_;
Register generator_state_; Register generator_state_;
int loop_depth_; int loop_depth_;
Handle<Name> home_object_symbol_;
Handle<Name> prototype_string_;
}; };
} // namespace interpreter } // namespace interpreter
......
...@@ -19,11 +19,11 @@ BytecodePeepholeOptimizer::BytecodePeepholeOptimizer( ...@@ -19,11 +19,11 @@ BytecodePeepholeOptimizer::BytecodePeepholeOptimizer(
// override // override
Handle<BytecodeArray> BytecodePeepholeOptimizer::ToBytecodeArray( Handle<BytecodeArray> BytecodePeepholeOptimizer::ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) { Handle<FixedArray> handler_table) {
Flush(); Flush();
return next_stage_->ToBytecodeArray(fixed_register_count, parameter_count, return next_stage_->ToBytecodeArray(isolate, fixed_register_count,
handler_table); parameter_count, handler_table);
} }
// override // override
......
...@@ -28,7 +28,7 @@ class BytecodePeepholeOptimizer final : public BytecodePipelineStage, ...@@ -28,7 +28,7 @@ class BytecodePeepholeOptimizer final : public BytecodePipelineStage,
void BindLabel(BytecodeLabel* label) override; void BindLabel(BytecodeLabel* label) override;
void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override;
Handle<BytecodeArray> ToBytecodeArray( Handle<BytecodeArray> ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) override; Handle<FixedArray> handler_table) override;
private: private:
......
...@@ -47,7 +47,7 @@ class BytecodePipelineStage { ...@@ -47,7 +47,7 @@ class BytecodePipelineStage {
// Flush the pipeline and generate a bytecode array. // Flush the pipeline and generate a bytecode array.
virtual Handle<BytecodeArray> ToBytecodeArray( virtual Handle<BytecodeArray> ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) = 0; Handle<FixedArray> handler_table) = 0;
}; };
......
...@@ -208,11 +208,11 @@ BytecodeRegisterOptimizer::BytecodeRegisterOptimizer( ...@@ -208,11 +208,11 @@ BytecodeRegisterOptimizer::BytecodeRegisterOptimizer(
// override // override
Handle<BytecodeArray> BytecodeRegisterOptimizer::ToBytecodeArray( Handle<BytecodeArray> BytecodeRegisterOptimizer::ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) { Handle<FixedArray> handler_table) {
FlushState(); FlushState();
return next_stage_->ToBytecodeArray(fixed_register_count, parameter_count, return next_stage_->ToBytecodeArray(isolate, fixed_register_count,
handler_table); parameter_count, handler_table);
} }
// override // override
......
...@@ -31,7 +31,7 @@ class BytecodeRegisterOptimizer final : public BytecodePipelineStage, ...@@ -31,7 +31,7 @@ class BytecodeRegisterOptimizer final : public BytecodePipelineStage,
void BindLabel(BytecodeLabel* label) override; void BindLabel(BytecodeLabel* label) override;
void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override;
Handle<BytecodeArray> ToBytecodeArray( Handle<BytecodeArray> ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) override; Handle<FixedArray> handler_table) override;
private: private:
......
...@@ -70,11 +70,12 @@ STATIC_CONST_MEMBER_DEFINITION const size_t ...@@ -70,11 +70,12 @@ STATIC_CONST_MEMBER_DEFINITION const size_t
STATIC_CONST_MEMBER_DEFINITION const size_t STATIC_CONST_MEMBER_DEFINITION const size_t
ConstantArrayBuilder::k32BitCapacity; ConstantArrayBuilder::k32BitCapacity;
ConstantArrayBuilder::ConstantArrayBuilder(Isolate* isolate, Zone* zone) ConstantArrayBuilder::ConstantArrayBuilder(Zone* zone,
: isolate_(isolate), Handle<Object> the_hole_value)
constants_map_(zone), : constants_map_(zone),
smi_map_(zone), smi_map_(zone),
smi_pairs_(zone) { smi_pairs_(zone),
the_hole_value_(the_hole_value) {
idx_slice_[0] = idx_slice_[0] =
new (zone) ConstantArraySlice(zone, 0, k8BitCapacity, OperandSize::kByte); new (zone) ConstantArraySlice(zone, 0, k8BitCapacity, OperandSize::kByte);
idx_slice_[1] = new (zone) ConstantArraySlice( idx_slice_[1] = new (zone) ConstantArraySlice(
...@@ -111,18 +112,18 @@ Handle<Object> ConstantArrayBuilder::At(size_t index) const { ...@@ -111,18 +112,18 @@ Handle<Object> ConstantArrayBuilder::At(size_t index) const {
return slice->At(index); return slice->At(index);
} else { } else {
DCHECK_LT(index, slice->capacity()); DCHECK_LT(index, slice->capacity());
return isolate_->factory()->the_hole_value(); return the_hole_value();
} }
} }
Handle<FixedArray> ConstantArrayBuilder::ToFixedArray() { Handle<FixedArray> ConstantArrayBuilder::ToFixedArray(Isolate* isolate) {
// First insert reserved SMI values. // First insert reserved SMI values.
for (auto reserved_smi : smi_pairs_) { for (auto reserved_smi : smi_pairs_) {
InsertAllocatedEntry(reserved_smi.second, InsertAllocatedEntry(reserved_smi.second,
handle(reserved_smi.first, isolate_)); handle(reserved_smi.first, isolate));
} }
Handle<FixedArray> fixed_array = isolate_->factory()->NewFixedArray( Handle<FixedArray> fixed_array = isolate->factory()->NewFixedArray(
static_cast<int>(size()), PretenureFlag::TENURED); static_cast<int>(size()), PretenureFlag::TENURED);
int array_index = 0; int array_index = 0;
for (const ConstantArraySlice* slice : idx_slice_) { for (const ConstantArraySlice* slice : idx_slice_) {
...@@ -144,7 +145,7 @@ Handle<FixedArray> ConstantArrayBuilder::ToFixedArray() { ...@@ -144,7 +145,7 @@ Handle<FixedArray> ConstantArrayBuilder::ToFixedArray() {
std::min(static_cast<size_t>(fixed_array->length() - array_index), std::min(static_cast<size_t>(fixed_array->length() - array_index),
slice->capacity() - slice->size()); slice->capacity() - slice->size());
for (size_t i = 0; i < padding; i++) { for (size_t i = 0; i < padding; i++) {
fixed_array->set(array_index++, *isolate_->factory()->the_hole_value()); fixed_array->set(array_index++, *the_hole_value());
} }
} }
DCHECK_EQ(array_index, fixed_array->length()); DCHECK_EQ(array_index, fixed_array->length());
...@@ -197,12 +198,12 @@ ConstantArrayBuilder::OperandSizeToSlice(OperandSize operand_size) const { ...@@ -197,12 +198,12 @@ ConstantArrayBuilder::OperandSizeToSlice(OperandSize operand_size) const {
} }
size_t ConstantArrayBuilder::AllocateEntry() { size_t ConstantArrayBuilder::AllocateEntry() {
return AllocateIndex(isolate_->factory()->the_hole_value()); return AllocateIndex(the_hole_value());
} }
void ConstantArrayBuilder::InsertAllocatedEntry(size_t index, void ConstantArrayBuilder::InsertAllocatedEntry(size_t index,
Handle<Object> object) { Handle<Object> object) {
DCHECK_EQ(isolate_->heap()->the_hole_value(), *At(index)); DCHECK_EQ(the_hole_value().address(), At(index).address());
ConstantArraySlice* slice = IndexToSlice(index); ConstantArraySlice* slice = IndexToSlice(index);
slice->InsertAt(index, object); slice->InsertAt(index, object);
} }
......
...@@ -32,10 +32,10 @@ class ConstantArrayBuilder final BASE_EMBEDDED { ...@@ -32,10 +32,10 @@ class ConstantArrayBuilder final BASE_EMBEDDED {
static const size_t k32BitCapacity = static const size_t k32BitCapacity =
kMaxUInt32 - k16BitCapacity - k8BitCapacity + 1; kMaxUInt32 - k16BitCapacity - k8BitCapacity + 1;
ConstantArrayBuilder(Isolate* isolate, Zone* zone); ConstantArrayBuilder(Zone* zone, Handle<Object> the_hole_value);
// Generate a fixed array of constants based on inserted objects. // Generate a fixed array of constants based on inserted objects.
Handle<FixedArray> ToFixedArray(); Handle<FixedArray> ToFixedArray(Isolate* isolate);
// Returns the object in the constant pool array that at index // Returns the object in the constant pool array that at index
// |index|. // |index|.
...@@ -105,11 +105,13 @@ class ConstantArrayBuilder final BASE_EMBEDDED { ...@@ -105,11 +105,13 @@ class ConstantArrayBuilder final BASE_EMBEDDED {
ConstantArraySlice* IndexToSlice(size_t index) const; ConstantArraySlice* IndexToSlice(size_t index) const;
ConstantArraySlice* OperandSizeToSlice(OperandSize operand_size) const; ConstantArraySlice* OperandSizeToSlice(OperandSize operand_size) const;
Isolate* isolate_; Handle<Object> the_hole_value() const { return the_hole_value_; }
ConstantArraySlice* idx_slice_[3]; ConstantArraySlice* idx_slice_[3];
ZoneMap<Address, index_t> constants_map_; ZoneMap<Address, index_t> constants_map_;
ZoneMap<Smi*, index_t> smi_map_; ZoneMap<Smi*, index_t> smi_map_;
ZoneVector<std::pair<Smi*, index_t>> smi_pairs_; ZoneVector<std::pair<Smi*, index_t>> smi_pairs_;
Handle<Object> the_hole_value_;
}; };
} // namespace interpreter } // namespace interpreter
......
...@@ -13,13 +13,12 @@ namespace v8 { ...@@ -13,13 +13,12 @@ namespace v8 {
namespace internal { namespace internal {
namespace interpreter { namespace interpreter {
HandlerTableBuilder::HandlerTableBuilder(Isolate* isolate, Zone* zone) HandlerTableBuilder::HandlerTableBuilder(Zone* zone) : entries_(zone) {}
: isolate_(isolate), entries_(zone) {}
Handle<HandlerTable> HandlerTableBuilder::ToHandlerTable() { Handle<HandlerTable> HandlerTableBuilder::ToHandlerTable(Isolate* isolate) {
int handler_table_size = static_cast<int>(entries_.size()); int handler_table_size = static_cast<int>(entries_.size());
Handle<HandlerTable> table = Handle<HandlerTable> table =
Handle<HandlerTable>::cast(isolate_->factory()->NewFixedArray( Handle<HandlerTable>::cast(isolate->factory()->NewFixedArray(
HandlerTable::LengthForRange(handler_table_size), TENURED)); HandlerTable::LengthForRange(handler_table_size), TENURED));
for (int i = 0; i < handler_table_size; ++i) { for (int i = 0; i < handler_table_size; ++i) {
Entry& entry = entries_[i]; Entry& entry = entries_[i];
......
...@@ -21,11 +21,11 @@ namespace interpreter { ...@@ -21,11 +21,11 @@ namespace interpreter {
// A helper class for constructing exception handler tables for the interpreter. // A helper class for constructing exception handler tables for the interpreter.
class HandlerTableBuilder final BASE_EMBEDDED { class HandlerTableBuilder final BASE_EMBEDDED {
public: public:
HandlerTableBuilder(Isolate* isolate, Zone* zone); explicit HandlerTableBuilder(Zone* zone);
// Builds the actual handler table by copying the current values into a heap // Builds the actual handler table by copying the current values into a heap
// object. Any further mutations to the builder won't be reflected. // object. Any further mutations to the builder won't be reflected.
Handle<HandlerTable> ToHandlerTable(); Handle<HandlerTable> ToHandlerTable(Isolate* isolate);
// Creates a new handler table entry and returns a {hander_id} identifying the // Creates a new handler table entry and returns a {hander_id} identifying the
// entry, so that it can be referenced by below setter functions. // entry, so that it can be referenced by below setter functions.
...@@ -50,7 +50,6 @@ class HandlerTableBuilder final BASE_EMBEDDED { ...@@ -50,7 +50,6 @@ class HandlerTableBuilder final BASE_EMBEDDED {
HandlerTable::CatchPrediction catch_prediction_; HandlerTable::CatchPrediction catch_prediction_;
}; };
Isolate* isolate_;
ZoneVector<Entry> entries_; ZoneVector<Entry> entries_;
DISALLOW_COPY_AND_ASSIGN(HandlerTableBuilder); DISALLOW_COPY_AND_ASSIGN(HandlerTableBuilder);
......
...@@ -157,7 +157,7 @@ bool Interpreter::MakeBytecode(CompilationInfo* info) { ...@@ -157,7 +157,7 @@ bool Interpreter::MakeBytecode(CompilationInfo* info) {
#endif // DEBUG #endif // DEBUG
BytecodeGenerator generator(info); BytecodeGenerator generator(info);
Handle<BytecodeArray> bytecodes = generator.MakeBytecode(); Handle<BytecodeArray> bytecodes = generator.MakeBytecode(info->isolate());
if (generator.HasStackOverflow()) return false; if (generator.HasStackOverflow()) return false;
......
...@@ -28,7 +28,7 @@ class InvokeIntrinsicHelper { ...@@ -28,7 +28,7 @@ class InvokeIntrinsicHelper {
BytecodeArrayBuilder builder(isolate_, zone_, sizeof...(args), 0, 0); BytecodeArrayBuilder builder(isolate_, zone_, sizeof...(args), 0, 0);
builder.CallRuntime(function_id_, builder.Parameter(0), sizeof...(args)) builder.CallRuntime(function_id_, builder.Parameter(0), sizeof...(args))
.Return(); .Return();
InterpreterTester tester(isolate_, builder.ToBytecodeArray()); InterpreterTester tester(isolate_, builder.ToBytecodeArray(isolate_));
auto callable = tester.GetCallable<A...>(); auto callable = tester.GetCallable<A...>();
return callable(args...).ToHandleChecked(); return callable(args...).ToHandleChecked();
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -376,7 +376,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { ...@@ -376,7 +376,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
builder.Return(); builder.Return();
// Generate BytecodeArray. // Generate BytecodeArray.
Handle<BytecodeArray> the_array = builder.ToBytecodeArray(); Handle<BytecodeArray> the_array = builder.ToBytecodeArray(isolate());
CHECK_EQ(the_array->frame_size(), CHECK_EQ(the_array->frame_size(),
builder.fixed_and_temporary_register_count() * kPointerSize); builder.fixed_and_temporary_register_count() * kPointerSize);
...@@ -465,7 +465,7 @@ TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) { ...@@ -465,7 +465,7 @@ TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) {
} }
builder.Return(); builder.Return();
Handle<BytecodeArray> the_array = builder.ToBytecodeArray(); Handle<BytecodeArray> the_array = builder.ToBytecodeArray(isolate());
int total_registers = locals + contexts + temps; int total_registers = locals + contexts + temps;
CHECK_EQ(the_array->frame_size(), total_registers * kPointerSize); CHECK_EQ(the_array->frame_size(), total_registers * kPointerSize);
} }
...@@ -538,7 +538,7 @@ TEST_F(BytecodeArrayBuilderTest, Constants) { ...@@ -538,7 +538,7 @@ TEST_F(BytecodeArrayBuilderTest, Constants) {
.LoadLiteral(heap_num_2_copy) .LoadLiteral(heap_num_2_copy)
.Return(); .Return();
Handle<BytecodeArray> array = builder.ToBytecodeArray(); Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
// Should only have one entry for each identical constant. // Should only have one entry for each identical constant.
CHECK_EQ(array->constant_pool()->length(), 3); CHECK_EQ(array->constant_pool()->length(), 3);
} }
...@@ -591,7 +591,7 @@ TEST_F(BytecodeArrayBuilderTest, ForwardJumps) { ...@@ -591,7 +591,7 @@ TEST_F(BytecodeArrayBuilderTest, ForwardJumps) {
builder.Bind(&far0).Bind(&far1).Bind(&far2).Bind(&far3).Bind(&far4); builder.Bind(&far0).Bind(&far1).Bind(&far2).Bind(&far3).Bind(&far4);
builder.Return(); builder.Return();
Handle<BytecodeArray> array = builder.ToBytecodeArray(); Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
DCHECK_EQ(array->length(), 40 + kFarJumpDistance - 20 + 1); DCHECK_EQ(array->length(), 40 + kFarJumpDistance - 20 + 1);
BytecodeArrayIterator iterator(array); BytecodeArrayIterator iterator(array);
...@@ -711,7 +711,7 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) { ...@@ -711,7 +711,7 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
builder.Bind(&end); builder.Bind(&end);
builder.Return(); builder.Return();
Handle<BytecodeArray> array = builder.ToBytecodeArray(); Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
BytecodeArrayIterator iterator(array); BytecodeArrayIterator iterator(array);
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump); CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump);
CHECK_EQ(iterator.GetImmediateOperand(0), 0); CHECK_EQ(iterator.GetImmediateOperand(0), 0);
...@@ -806,7 +806,7 @@ TEST_F(BytecodeArrayBuilderTest, LabelReuse) { ...@@ -806,7 +806,7 @@ TEST_F(BytecodeArrayBuilderTest, LabelReuse) {
.Bind(&after_jump1) .Bind(&after_jump1)
.Return(); .Return();
Handle<BytecodeArray> array = builder.ToBytecodeArray(); Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
BytecodeArrayIterator iterator(array); BytecodeArrayIterator iterator(array);
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump); CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump);
CHECK_EQ(iterator.GetImmediateOperand(0), 2); CHECK_EQ(iterator.GetImmediateOperand(0), 2);
...@@ -839,7 +839,7 @@ TEST_F(BytecodeArrayBuilderTest, LabelAddressReuse) { ...@@ -839,7 +839,7 @@ TEST_F(BytecodeArrayBuilderTest, LabelAddressReuse) {
} }
builder.Return(); builder.Return();
Handle<BytecodeArray> array = builder.ToBytecodeArray(); Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
BytecodeArrayIterator iterator(array); BytecodeArrayIterator iterator(array);
for (int i = 0; i < kRepeats; i++) { for (int i = 0; i < kRepeats; i++) {
CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump); CHECK_EQ(iterator.current_bytecode(), Bytecode::kJump);
......
...@@ -62,7 +62,7 @@ TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) { ...@@ -62,7 +62,7 @@ TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) {
.Return(); .Return();
// Test iterator sees the expected output from the builder. // Test iterator sees the expected output from the builder.
BytecodeArrayIterator iterator(builder.ToBytecodeArray()); BytecodeArrayIterator iterator(builder.ToBytecodeArray(isolate()));
const int kPrefixByteSize = 1; const int kPrefixByteSize = 1;
int offset = 0; int offset = 0;
......
...@@ -22,9 +22,9 @@ namespace interpreter { ...@@ -22,9 +22,9 @@ namespace interpreter {
class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone { class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone {
public: public:
BytecodeArrayWriterUnittest() BytecodeArrayWriterUnittest()
: constant_array_builder_(isolate(), zone()), : constant_array_builder_(zone(), isolate()->factory()->the_hole_value()),
bytecode_array_writer_( bytecode_array_writer_(
isolate(), zone(), &constant_array_builder_, zone(), &constant_array_builder_,
SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS) {} SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS) {}
~BytecodeArrayWriterUnittest() override {} ~BytecodeArrayWriterUnittest() override {}
...@@ -137,8 +137,8 @@ TEST_F(BytecodeArrayWriterUnittest, SimpleExample) { ...@@ -137,8 +137,8 @@ TEST_F(BytecodeArrayWriterUnittest, SimpleExample) {
CHECK_EQ(bytecodes()->at(i), bytes[i]); CHECK_EQ(bytecodes()->at(i), bytes[i]);
} }
Handle<BytecodeArray> bytecode_array = Handle<BytecodeArray> bytecode_array = writer()->ToBytecodeArray(
writer()->ToBytecodeArray(0, 0, factory()->empty_fixed_array()); isolate(), 0, 0, factory()->empty_fixed_array());
CHECK_EQ(bytecodes()->size(), arraysize(bytes)); CHECK_EQ(bytecodes()->size(), arraysize(bytes));
PositionTableEntry expected_positions[] = { PositionTableEntry expected_positions[] = {
...@@ -235,8 +235,8 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) { ...@@ -235,8 +235,8 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) {
static_cast<int>(expected_bytes[i])); static_cast<int>(expected_bytes[i]));
} }
Handle<BytecodeArray> bytecode_array = Handle<BytecodeArray> bytecode_array = writer()->ToBytecodeArray(
writer()->ToBytecodeArray(0, 0, factory()->empty_fixed_array()); isolate(), 0, 0, factory()->empty_fixed_array());
SourcePositionTableIterator source_iterator( SourcePositionTableIterator source_iterator(
bytecode_array->source_position_table()); bytecode_array->source_position_table());
for (size_t i = 0; i < arraysize(expected_positions); ++i) { for (size_t i = 0; i < arraysize(expected_positions); ++i) {
......
...@@ -32,7 +32,7 @@ class BytecodeDeadCodeOptimizerTest : public BytecodePipelineStage, ...@@ -32,7 +32,7 @@ class BytecodeDeadCodeOptimizerTest : public BytecodePipelineStage,
void BindLabel(BytecodeLabel* label) override {} void BindLabel(BytecodeLabel* label) override {}
void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {} void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {}
Handle<BytecodeArray> ToBytecodeArray( Handle<BytecodeArray> ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handle_table) override { Handle<FixedArray> handle_table) override {
return Handle<BytecodeArray>(); return Handle<BytecodeArray>();
} }
......
...@@ -39,13 +39,14 @@ class BytecodePeepholeOptimizerTest : public BytecodePipelineStage, ...@@ -39,13 +39,14 @@ class BytecodePeepholeOptimizerTest : public BytecodePipelineStage,
void BindLabel(BytecodeLabel* label) override {} void BindLabel(BytecodeLabel* label) override {}
void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {} void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {}
Handle<BytecodeArray> ToBytecodeArray( Handle<BytecodeArray> ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handle_table) override { Handle<FixedArray> handle_table) override {
return Handle<BytecodeArray>(); return Handle<BytecodeArray>();
} }
void Flush() { void Flush() {
optimizer()->ToBytecodeArray(0, 0, factory()->empty_fixed_array()); optimizer()->ToBytecodeArray(isolate(), 0, 0,
factory()->empty_fixed_array());
} }
BytecodePeepholeOptimizer* optimizer() { return &peephole_optimizer_; } BytecodePeepholeOptimizer* optimizer() { return &peephole_optimizer_; }
......
...@@ -35,7 +35,7 @@ class BytecodeRegisterOptimizerTest : public BytecodePipelineStage, ...@@ -35,7 +35,7 @@ class BytecodeRegisterOptimizerTest : public BytecodePipelineStage,
void BindLabel(BytecodeLabel* label) override {} void BindLabel(BytecodeLabel* label) override {}
void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {} void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {}
Handle<BytecodeArray> ToBytecodeArray( Handle<BytecodeArray> ToBytecodeArray(
int fixed_register_count, int parameter_count, Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handle_table) override { Handle<FixedArray> handle_table) override {
return Handle<BytecodeArray>(); return Handle<BytecodeArray>();
} }
......
...@@ -30,7 +30,7 @@ STATIC_CONST_MEMBER_DEFINITION const size_t ...@@ -30,7 +30,7 @@ STATIC_CONST_MEMBER_DEFINITION const size_t
TEST_F(ConstantArrayBuilderTest, AllocateAllEntries) { TEST_F(ConstantArrayBuilderTest, AllocateAllEntries) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
for (size_t i = 0; i < k16BitCapacity; i++) { for (size_t i = 0; i < k16BitCapacity; i++) {
builder.Insert(handle(Smi::FromInt(static_cast<int>(i)), isolate())); builder.Insert(handle(Smi::FromInt(static_cast<int>(i)), isolate()));
} }
...@@ -42,14 +42,14 @@ TEST_F(ConstantArrayBuilderTest, AllocateAllEntries) { ...@@ -42,14 +42,14 @@ TEST_F(ConstantArrayBuilderTest, AllocateAllEntries) {
TEST_F(ConstantArrayBuilderTest, ToFixedArray) { TEST_F(ConstantArrayBuilderTest, ToFixedArray) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
static const size_t kNumberOfElements = 37; static const size_t kNumberOfElements = 37;
for (size_t i = 0; i < kNumberOfElements; i++) { for (size_t i = 0; i < kNumberOfElements; i++) {
Handle<Object> object = isolate()->factory()->NewNumberFromSize(i); Handle<Object> object = isolate()->factory()->NewNumberFromSize(i);
builder.Insert(object); builder.Insert(object);
CHECK(builder.At(i)->SameValue(*object)); CHECK(builder.At(i)->SameValue(*object));
} }
Handle<FixedArray> constant_array = builder.ToFixedArray(); Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
CHECK_EQ(constant_array->length(), kNumberOfElements); CHECK_EQ(constant_array->length(), kNumberOfElements);
for (size_t i = 0; i < kNumberOfElements; i++) { for (size_t i = 0; i < kNumberOfElements; i++) {
CHECK(constant_array->get(static_cast<int>(i))->SameValue(*builder.At(i))); CHECK(constant_array->get(static_cast<int>(i))->SameValue(*builder.At(i)));
...@@ -58,14 +58,14 @@ TEST_F(ConstantArrayBuilderTest, ToFixedArray) { ...@@ -58,14 +58,14 @@ TEST_F(ConstantArrayBuilderTest, ToFixedArray) {
TEST_F(ConstantArrayBuilderTest, ToLargeFixedArray) { TEST_F(ConstantArrayBuilderTest, ToLargeFixedArray) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
static const size_t kNumberOfElements = 37373; static const size_t kNumberOfElements = 37373;
for (size_t i = 0; i < kNumberOfElements; i++) { for (size_t i = 0; i < kNumberOfElements; i++) {
Handle<Object> object = isolate()->factory()->NewNumberFromSize(i); Handle<Object> object = isolate()->factory()->NewNumberFromSize(i);
builder.Insert(object); builder.Insert(object);
CHECK(builder.At(i)->SameValue(*object)); CHECK(builder.At(i)->SameValue(*object));
} }
Handle<FixedArray> constant_array = builder.ToFixedArray(); Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
CHECK_EQ(constant_array->length(), kNumberOfElements); CHECK_EQ(constant_array->length(), kNumberOfElements);
for (size_t i = 0; i < kNumberOfElements; i++) { for (size_t i = 0; i < kNumberOfElements; i++) {
CHECK(constant_array->get(static_cast<int>(i))->SameValue(*builder.At(i))); CHECK(constant_array->get(static_cast<int>(i))->SameValue(*builder.At(i)));
...@@ -74,13 +74,13 @@ TEST_F(ConstantArrayBuilderTest, ToLargeFixedArray) { ...@@ -74,13 +74,13 @@ TEST_F(ConstantArrayBuilderTest, ToLargeFixedArray) {
TEST_F(ConstantArrayBuilderTest, ToLargeFixedArrayWithReservations) { TEST_F(ConstantArrayBuilderTest, ToLargeFixedArrayWithReservations) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
static const size_t kNumberOfElements = 37373; static const size_t kNumberOfElements = 37373;
for (size_t i = 0; i < kNumberOfElements; i++) { for (size_t i = 0; i < kNumberOfElements; i++) {
builder.CommitReservedEntry(builder.CreateReservedEntry(), builder.CommitReservedEntry(builder.CreateReservedEntry(),
Smi::FromInt(static_cast<int>(i))); Smi::FromInt(static_cast<int>(i)));
} }
Handle<FixedArray> constant_array = builder.ToFixedArray(); Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
CHECK_EQ(constant_array->length(), kNumberOfElements); CHECK_EQ(constant_array->length(), kNumberOfElements);
for (size_t i = 0; i < kNumberOfElements; i++) { for (size_t i = 0; i < kNumberOfElements; i++) {
CHECK(constant_array->get(static_cast<int>(i))->SameValue(*builder.At(i))); CHECK(constant_array->get(static_cast<int>(i))->SameValue(*builder.At(i)));
...@@ -90,7 +90,8 @@ TEST_F(ConstantArrayBuilderTest, ToLargeFixedArrayWithReservations) { ...@@ -90,7 +90,8 @@ TEST_F(ConstantArrayBuilderTest, ToLargeFixedArrayWithReservations) {
TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithIdx8Reservations) { TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithIdx8Reservations) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
for (size_t reserved = 1; reserved < k8BitCapacity; reserved *= 3) { for (size_t reserved = 1; reserved < k8BitCapacity; reserved *= 3) {
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(),
isolate()->factory()->the_hole_value());
for (size_t i = 0; i < reserved; i++) { for (size_t i = 0; i < reserved; i++) {
OperandSize operand_size = builder.CreateReservedEntry(); OperandSize operand_size = builder.CreateReservedEntry();
CHECK(operand_size == OperandSize::kByte); CHECK(operand_size == OperandSize::kByte);
...@@ -135,7 +136,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithIdx8Reservations) { ...@@ -135,7 +136,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithIdx8Reservations) {
CHECK_EQ(static_cast<int>(index), k8BitCapacity - reserved + i); CHECK_EQ(static_cast<int>(index), k8BitCapacity - reserved + i);
} }
Handle<FixedArray> constant_array = builder.ToFixedArray(); Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
CHECK_EQ(constant_array->length(), 2 * k8BitCapacity + reserved); CHECK_EQ(constant_array->length(), 2 * k8BitCapacity + reserved);
// Check all committed values match expected // Check all committed values match expected
...@@ -155,7 +156,8 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithIdx8Reservations) { ...@@ -155,7 +156,8 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithIdx8Reservations) {
TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithWideReservations) { TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithWideReservations) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
for (size_t reserved = 1; reserved < k8BitCapacity; reserved *= 3) { for (size_t reserved = 1; reserved < k8BitCapacity; reserved *= 3) {
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(),
isolate()->factory()->the_hole_value());
for (size_t i = 0; i < k8BitCapacity; i++) { for (size_t i = 0; i < k8BitCapacity; i++) {
builder.CommitReservedEntry(builder.CreateReservedEntry(), builder.CommitReservedEntry(builder.CreateReservedEntry(),
Smi::FromInt(static_cast<int>(i))); Smi::FromInt(static_cast<int>(i)));
...@@ -185,7 +187,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithWideReservations) { ...@@ -185,7 +187,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithWideReservations) {
CHECK_EQ(builder.size(), i + 1); CHECK_EQ(builder.size(), i + 1);
} }
Handle<FixedArray> constant_array = builder.ToFixedArray(); Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
CHECK_EQ(constant_array->length(), k8BitCapacity + reserved); CHECK_EQ(constant_array->length(), k8BitCapacity + reserved);
for (size_t i = 0; i < k8BitCapacity + reserved; i++) { for (size_t i = 0; i < k8BitCapacity + reserved; i++) {
Object* value = constant_array->get(static_cast<int>(i)); Object* value = constant_array->get(static_cast<int>(i));
...@@ -196,7 +198,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithWideReservations) { ...@@ -196,7 +198,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithWideReservations) {
TEST_F(ConstantArrayBuilderTest, GapFilledWhenLowReservationCommitted) { TEST_F(ConstantArrayBuilderTest, GapFilledWhenLowReservationCommitted) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
for (size_t i = 0; i < k8BitCapacity; i++) { for (size_t i = 0; i < k8BitCapacity; i++) {
OperandSize operand_size = builder.CreateReservedEntry(); OperandSize operand_size = builder.CreateReservedEntry();
CHECK(OperandSize::kByte == operand_size); CHECK(OperandSize::kByte == operand_size);
...@@ -212,7 +214,7 @@ TEST_F(ConstantArrayBuilderTest, GapFilledWhenLowReservationCommitted) { ...@@ -212,7 +214,7 @@ TEST_F(ConstantArrayBuilderTest, GapFilledWhenLowReservationCommitted) {
Smi::FromInt(static_cast<int>(i))); Smi::FromInt(static_cast<int>(i)));
CHECK_EQ(builder.size(), 2 * k8BitCapacity); CHECK_EQ(builder.size(), 2 * k8BitCapacity);
} }
Handle<FixedArray> constant_array = builder.ToFixedArray(); Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
CHECK_EQ(constant_array->length(), 2 * k8BitCapacity); CHECK_EQ(constant_array->length(), 2 * k8BitCapacity);
for (size_t i = 0; i < k8BitCapacity; i++) { for (size_t i = 0; i < k8BitCapacity; i++) {
Object* original = constant_array->get(static_cast<int>(k8BitCapacity + i)); Object* original = constant_array->get(static_cast<int>(k8BitCapacity + i));
...@@ -225,7 +227,7 @@ TEST_F(ConstantArrayBuilderTest, GapFilledWhenLowReservationCommitted) { ...@@ -225,7 +227,7 @@ TEST_F(ConstantArrayBuilderTest, GapFilledWhenLowReservationCommitted) {
TEST_F(ConstantArrayBuilderTest, GapNotFilledWhenLowReservationDiscarded) { TEST_F(ConstantArrayBuilderTest, GapNotFilledWhenLowReservationDiscarded) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
for (size_t i = 0; i < k8BitCapacity; i++) { for (size_t i = 0; i < k8BitCapacity; i++) {
OperandSize operand_size = builder.CreateReservedEntry(); OperandSize operand_size = builder.CreateReservedEntry();
CHECK(OperandSize::kByte == operand_size); CHECK(OperandSize::kByte == operand_size);
...@@ -253,7 +255,7 @@ TEST_F(ConstantArrayBuilderTest, GapNotFilledWhenLowReservationDiscarded) { ...@@ -253,7 +255,7 @@ TEST_F(ConstantArrayBuilderTest, GapNotFilledWhenLowReservationDiscarded) {
TEST_F(ConstantArrayBuilderTest, HolesWithUnusedReservations) { TEST_F(ConstantArrayBuilderTest, HolesWithUnusedReservations) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
static int kNumberOfHoles = 128; static int kNumberOfHoles = 128;
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
for (int i = 0; i < kNumberOfHoles; ++i) { for (int i = 0; i < kNumberOfHoles; ++i) {
CHECK_EQ(builder.CreateReservedEntry(), OperandSize::kByte); CHECK_EQ(builder.CreateReservedEntry(), OperandSize::kByte);
} }
...@@ -262,7 +264,7 @@ TEST_F(ConstantArrayBuilderTest, HolesWithUnusedReservations) { ...@@ -262,7 +264,7 @@ TEST_F(ConstantArrayBuilderTest, HolesWithUnusedReservations) {
} }
CHECK_EQ(builder.Insert(isolate()->factory()->NewNumber(256)), 256); CHECK_EQ(builder.Insert(isolate()->factory()->NewNumber(256)), 256);
Handle<FixedArray> constant_array = builder.ToFixedArray(); Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
CHECK_EQ(constant_array->length(), 257); CHECK_EQ(constant_array->length(), 257);
for (int i = 128; i < 256; i++) { for (int i = 128; i < 256; i++) {
CHECK(constant_array->get(i)->SameValue( CHECK(constant_array->get(i)->SameValue(
...@@ -276,7 +278,7 @@ TEST_F(ConstantArrayBuilderTest, HolesWithUnusedReservations) { ...@@ -276,7 +278,7 @@ TEST_F(ConstantArrayBuilderTest, HolesWithUnusedReservations) {
TEST_F(ConstantArrayBuilderTest, ReservationsAtAllScales) { TEST_F(ConstantArrayBuilderTest, ReservationsAtAllScales) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
for (int i = 0; i < 256; i++) { for (int i = 0; i < 256; i++) {
CHECK_EQ(builder.CreateReservedEntry(), OperandSize::kByte); CHECK_EQ(builder.CreateReservedEntry(), OperandSize::kByte);
} }
...@@ -291,7 +293,7 @@ TEST_F(ConstantArrayBuilderTest, ReservationsAtAllScales) { ...@@ -291,7 +293,7 @@ TEST_F(ConstantArrayBuilderTest, ReservationsAtAllScales) {
256); 256);
CHECK_EQ(builder.CommitReservedEntry(OperandSize::kQuad, Smi::FromInt(3)), CHECK_EQ(builder.CommitReservedEntry(OperandSize::kQuad, Smi::FromInt(3)),
65536); 65536);
Handle<FixedArray> constant_array = builder.ToFixedArray(); Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
CHECK_EQ(constant_array->length(), 65537); CHECK_EQ(constant_array->length(), 65537);
int count = 1; int count = 1;
for (int i = 0; i < constant_array->length(); ++i) { for (int i = 0; i < constant_array->length(); ++i) {
...@@ -307,7 +309,7 @@ TEST_F(ConstantArrayBuilderTest, ReservationsAtAllScales) { ...@@ -307,7 +309,7 @@ TEST_F(ConstantArrayBuilderTest, ReservationsAtAllScales) {
TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithFixedReservations) { TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithFixedReservations) {
CanonicalHandleScope canonical(isolate()); CanonicalHandleScope canonical(isolate());
ConstantArrayBuilder builder(isolate(), zone()); ConstantArrayBuilder builder(zone(), isolate()->factory()->the_hole_value());
for (size_t i = 0; i < k16BitCapacity; i++) { for (size_t i = 0; i < k16BitCapacity; i++) {
if ((i % 2) == 0) { if ((i % 2) == 0) {
CHECK_EQ(i, builder.AllocateEntry()); CHECK_EQ(i, builder.AllocateEntry());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment