Commit e7d8e978 authored by Jakob Gruber's avatar Jakob Gruber Committed by V8 LUCI CQ

[compiler] Change all JS operators to hold TinyRefs instead of handles

Bug: v8:7790
Change-Id: Ia5903364a774bd49db1a646b3066b9972deac725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3074465
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76119}
parent b460a69d
...@@ -1676,8 +1676,7 @@ Node* BytecodeGraphBuilder::BuildLoadGlobal(NameRef name, ...@@ -1676,8 +1676,7 @@ Node* BytecodeGraphBuilder::BuildLoadGlobal(NameRef name,
TypeofMode typeof_mode) { TypeofMode typeof_mode) {
FeedbackSource feedback = CreateFeedbackSource(feedback_slot_index); FeedbackSource feedback = CreateFeedbackSource(feedback_slot_index);
DCHECK(IsLoadGlobalICKind(broker()->GetFeedbackSlotKind(feedback))); DCHECK(IsLoadGlobalICKind(broker()->GetFeedbackSlotKind(feedback)));
const Operator* op = const Operator* op = javascript()->LoadGlobal(name, feedback, typeof_mode);
javascript()->LoadGlobal(name.object(), feedback, typeof_mode);
DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode())); DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode()));
return NewNode(op, feedback_vector_node()); return NewNode(op, feedback_vector_node());
} }
...@@ -1708,8 +1707,7 @@ void BytecodeGraphBuilder::VisitStaGlobal() { ...@@ -1708,8 +1707,7 @@ void BytecodeGraphBuilder::VisitStaGlobal() {
LanguageMode language_mode = LanguageMode language_mode =
GetLanguageModeFromSlotKind(broker()->GetFeedbackSlotKind(feedback)); GetLanguageModeFromSlotKind(broker()->GetFeedbackSlotKind(feedback));
const Operator* op = const Operator* op = javascript()->StoreGlobal(language_mode, name, feedback);
javascript()->StoreGlobal(language_mode, name.object(), feedback);
DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode())); DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode()));
Node* node = NewNode(op, value, feedback_vector_node()); Node* node = NewNode(op, value, feedback_vector_node());
environment()->RecordAfterState(node, Environment::kAttachFrameState); environment()->RecordAfterState(node, Environment::kAttachFrameState);
...@@ -1892,13 +1890,12 @@ base::Optional<ScopeInfoRef> BytecodeGraphBuilder::TryGetScopeInfo() { ...@@ -1892,13 +1890,12 @@ base::Optional<ScopeInfoRef> BytecodeGraphBuilder::TryGetScopeInfo() {
Node* context = environment()->Context(); Node* context = environment()->Context();
switch (context->opcode()) { switch (context->opcode()) {
case IrOpcode::kJSCreateFunctionContext: case IrOpcode::kJSCreateFunctionContext:
return MakeRef( return CreateFunctionContextParametersOf(context->op())
broker(), .scope_info(broker());
CreateFunctionContextParametersOf(context->op()).scope_info());
case IrOpcode::kJSCreateBlockContext: case IrOpcode::kJSCreateBlockContext:
case IrOpcode::kJSCreateCatchContext: case IrOpcode::kJSCreateCatchContext:
case IrOpcode::kJSCreateWithContext: case IrOpcode::kJSCreateWithContext:
return MakeRef(broker(), ScopeInfoOf(context->op())); return ScopeInfoOf(broker(), context->op());
case IrOpcode::kParameter: { case IrOpcode::kParameter: {
ScopeInfoRef scope_info = shared_info_.scope_info(); ScopeInfoRef scope_info = shared_info_.scope_info();
if (scope_info.HasOuterScopeInfo()) { if (scope_info.HasOuterScopeInfo()) {
...@@ -2101,7 +2098,7 @@ void BytecodeGraphBuilder::VisitLdaNamedProperty() { ...@@ -2101,7 +2098,7 @@ void BytecodeGraphBuilder::VisitLdaNamedProperty() {
NameRef name = MakeRefForConstantForIndexOperand<Name>(1); NameRef name = MakeRefForConstantForIndexOperand<Name>(1);
FeedbackSource feedback = FeedbackSource feedback =
CreateFeedbackSource(bytecode_iterator().GetIndexOperand(2)); CreateFeedbackSource(bytecode_iterator().GetIndexOperand(2));
const Operator* op = javascript()->LoadNamed(name.object(), feedback); const Operator* op = javascript()->LoadNamed(name, feedback);
JSTypeHintLowering::LoweringResult lowering = JSTypeHintLowering::LoweringResult lowering =
TryBuildSimplifiedLoadNamed(op, feedback.slot); TryBuildSimplifiedLoadNamed(op, feedback.slot);
...@@ -2127,8 +2124,7 @@ void BytecodeGraphBuilder::VisitLdaNamedPropertyFromSuper() { ...@@ -2127,8 +2124,7 @@ void BytecodeGraphBuilder::VisitLdaNamedPropertyFromSuper() {
FeedbackSource feedback = FeedbackSource feedback =
CreateFeedbackSource(bytecode_iterator().GetIndexOperand(2)); CreateFeedbackSource(bytecode_iterator().GetIndexOperand(2));
const Operator* op = const Operator* op = javascript()->LoadNamedFromSuper(name, feedback);
javascript()->LoadNamedFromSuper(name.object(), feedback);
JSTypeHintLowering::LoweringResult lowering = JSTypeHintLowering::LoweringResult lowering =
TryBuildSimplifiedLoadNamed(op, feedback.slot); TryBuildSimplifiedLoadNamed(op, feedback.slot);
...@@ -2186,12 +2182,12 @@ void BytecodeGraphBuilder::BuildNamedStore(StoreMode store_mode) { ...@@ -2186,12 +2182,12 @@ void BytecodeGraphBuilder::BuildNamedStore(StoreMode store_mode) {
DCHECK_EQ(FeedbackSlotKind::kStoreOwnNamed, DCHECK_EQ(FeedbackSlotKind::kStoreOwnNamed,
broker()->GetFeedbackSlotKind(feedback)); broker()->GetFeedbackSlotKind(feedback));
op = javascript()->StoreNamedOwn(name.object(), feedback); op = javascript()->StoreNamedOwn(name, feedback);
} else { } else {
DCHECK_EQ(StoreMode::kNormal, store_mode); DCHECK_EQ(StoreMode::kNormal, store_mode);
LanguageMode language_mode = LanguageMode language_mode =
GetLanguageModeFromSlotKind(broker()->GetFeedbackSlotKind(feedback)); GetLanguageModeFromSlotKind(broker()->GetFeedbackSlotKind(feedback));
op = javascript()->StoreNamed(language_mode, name.object(), feedback); op = javascript()->StoreNamed(language_mode, name, feedback);
} }
JSTypeHintLowering::LoweringResult lowering = JSTypeHintLowering::LoweringResult lowering =
...@@ -2289,10 +2285,10 @@ void BytecodeGraphBuilder::VisitCreateClosure() { ...@@ -2289,10 +2285,10 @@ void BytecodeGraphBuilder::VisitCreateClosure() {
bytecode_iterator().GetFlagOperand(2)) bytecode_iterator().GetFlagOperand(2))
? AllocationType::kOld ? AllocationType::kOld
: AllocationType::kYoung; : AllocationType::kYoung;
Handle<CodeT> compile_lazy = broker()->CanonicalPersistentHandle( CodeTRef compile_lazy = MakeRef(
ToCodeT(*BUILTIN_CODE(jsgraph()->isolate(), CompileLazy))); broker(), ToCodeT(*BUILTIN_CODE(jsgraph()->isolate(), CompileLazy)));
const Operator* op = javascript()->CreateClosure(shared_info.object(), const Operator* op =
compile_lazy, allocation); javascript()->CreateClosure(shared_info, compile_lazy, allocation);
Node* closure = NewNode( Node* closure = NewNode(
op, BuildLoadFeedbackCell(bytecode_iterator().GetIndexOperand(1))); op, BuildLoadFeedbackCell(bytecode_iterator().GetIndexOperand(1)));
environment()->BindAccumulator(closure); environment()->BindAccumulator(closure);
...@@ -2300,7 +2296,7 @@ void BytecodeGraphBuilder::VisitCreateClosure() { ...@@ -2300,7 +2296,7 @@ void BytecodeGraphBuilder::VisitCreateClosure() {
void BytecodeGraphBuilder::VisitCreateBlockContext() { void BytecodeGraphBuilder::VisitCreateBlockContext() {
ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(0); ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(0);
const Operator* op = javascript()->CreateBlockContext(scope_info.object()); const Operator* op = javascript()->CreateBlockContext(scope_info);
Node* context = NewNode(op); Node* context = NewNode(op);
environment()->BindAccumulator(context); environment()->BindAccumulator(context);
} }
...@@ -2308,8 +2304,8 @@ void BytecodeGraphBuilder::VisitCreateBlockContext() { ...@@ -2308,8 +2304,8 @@ void BytecodeGraphBuilder::VisitCreateBlockContext() {
void BytecodeGraphBuilder::VisitCreateFunctionContext() { void BytecodeGraphBuilder::VisitCreateFunctionContext() {
ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(0); ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(0);
uint32_t slots = bytecode_iterator().GetUnsignedImmediateOperand(1); uint32_t slots = bytecode_iterator().GetUnsignedImmediateOperand(1);
const Operator* op = javascript()->CreateFunctionContext( const Operator* op =
scope_info.object(), slots, FUNCTION_SCOPE); javascript()->CreateFunctionContext(scope_info, slots, FUNCTION_SCOPE);
Node* context = NewNode(op); Node* context = NewNode(op);
environment()->BindAccumulator(context); environment()->BindAccumulator(context);
} }
...@@ -2317,8 +2313,8 @@ void BytecodeGraphBuilder::VisitCreateFunctionContext() { ...@@ -2317,8 +2313,8 @@ void BytecodeGraphBuilder::VisitCreateFunctionContext() {
void BytecodeGraphBuilder::VisitCreateEvalContext() { void BytecodeGraphBuilder::VisitCreateEvalContext() {
ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(0); ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(0);
uint32_t slots = bytecode_iterator().GetUnsignedImmediateOperand(1); uint32_t slots = bytecode_iterator().GetUnsignedImmediateOperand(1);
const Operator* op = javascript()->CreateFunctionContext(scope_info.object(), const Operator* op =
slots, EVAL_SCOPE); javascript()->CreateFunctionContext(scope_info, slots, EVAL_SCOPE);
Node* context = NewNode(op); Node* context = NewNode(op);
environment()->BindAccumulator(context); environment()->BindAccumulator(context);
} }
...@@ -2328,7 +2324,7 @@ void BytecodeGraphBuilder::VisitCreateCatchContext() { ...@@ -2328,7 +2324,7 @@ void BytecodeGraphBuilder::VisitCreateCatchContext() {
Node* exception = environment()->LookupRegister(reg); Node* exception = environment()->LookupRegister(reg);
ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(1); ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(1);
const Operator* op = javascript()->CreateCatchContext(scope_info.object()); const Operator* op = javascript()->CreateCatchContext(scope_info);
Node* context = NewNode(op, exception); Node* context = NewNode(op, exception);
environment()->BindAccumulator(context); environment()->BindAccumulator(context);
} }
...@@ -2338,7 +2334,7 @@ void BytecodeGraphBuilder::VisitCreateWithContext() { ...@@ -2338,7 +2334,7 @@ void BytecodeGraphBuilder::VisitCreateWithContext() {
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(1); ScopeInfoRef scope_info = MakeRefForConstantForIndexOperand<ScopeInfo>(1);
const Operator* op = javascript()->CreateWithContext(scope_info.object()); const Operator* op = javascript()->CreateWithContext(scope_info);
Node* context = NewNode(op, object); Node* context = NewNode(op, object);
environment()->BindAccumulator(context); environment()->BindAccumulator(context);
} }
...@@ -2367,8 +2363,8 @@ void BytecodeGraphBuilder::VisitCreateRegExpLiteral() { ...@@ -2367,8 +2363,8 @@ void BytecodeGraphBuilder::VisitCreateRegExpLiteral() {
FeedbackSource pair = CreateFeedbackSource(slot_id); FeedbackSource pair = CreateFeedbackSource(slot_id);
int literal_flags = bytecode_iterator().GetFlagOperand(2); int literal_flags = bytecode_iterator().GetFlagOperand(2);
STATIC_ASSERT(JSCreateLiteralRegExpNode::FeedbackVectorIndex() == 0); STATIC_ASSERT(JSCreateLiteralRegExpNode::FeedbackVectorIndex() == 0);
const Operator* op = javascript()->CreateLiteralRegExp( const Operator* op =
constant_pattern.object(), pair, literal_flags); javascript()->CreateLiteralRegExp(constant_pattern, pair, literal_flags);
DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode())); DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode()));
Node* literal = NewNode(op, feedback_vector_node()); Node* literal = NewNode(op, feedback_vector_node());
environment()->BindAccumulator(literal, Environment::kAttachFrameState); environment()->BindAccumulator(literal, Environment::kAttachFrameState);
...@@ -2390,9 +2386,8 @@ void BytecodeGraphBuilder::VisitCreateArrayLiteral() { ...@@ -2390,9 +2386,8 @@ void BytecodeGraphBuilder::VisitCreateArrayLiteral() {
int number_of_elements = int number_of_elements =
array_boilerplate_description.constants_elements_length(); array_boilerplate_description.constants_elements_length();
STATIC_ASSERT(JSCreateLiteralArrayNode::FeedbackVectorIndex() == 0); STATIC_ASSERT(JSCreateLiteralArrayNode::FeedbackVectorIndex() == 0);
const Operator* op = const Operator* op = javascript()->CreateLiteralArray(
javascript()->CreateLiteralArray(array_boilerplate_description.object(), array_boilerplate_description, pair, literal_flags, number_of_elements);
pair, literal_flags, number_of_elements);
DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode())); DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode()));
Node* literal = NewNode(op, feedback_vector_node()); Node* literal = NewNode(op, feedback_vector_node());
environment()->BindAccumulator(literal, Environment::kAttachFrameState); environment()->BindAccumulator(literal, Environment::kAttachFrameState);
...@@ -2424,7 +2419,7 @@ void BytecodeGraphBuilder::VisitCreateObjectLiteral() { ...@@ -2424,7 +2419,7 @@ void BytecodeGraphBuilder::VisitCreateObjectLiteral() {
int number_of_properties = constant_properties.size(); int number_of_properties = constant_properties.size();
STATIC_ASSERT(JSCreateLiteralObjectNode::FeedbackVectorIndex() == 0); STATIC_ASSERT(JSCreateLiteralObjectNode::FeedbackVectorIndex() == 0);
const Operator* op = javascript()->CreateLiteralObject( const Operator* op = javascript()->CreateLiteralObject(
constant_properties.object(), pair, literal_flags, number_of_properties); constant_properties, pair, literal_flags, number_of_properties);
DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode())); DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode()));
Node* literal = NewNode(op, feedback_vector_node()); Node* literal = NewNode(op, feedback_vector_node());
environment()->BindAccumulator(literal, Environment::kAttachFrameState); environment()->BindAccumulator(literal, Environment::kAttachFrameState);
...@@ -2456,8 +2451,8 @@ void BytecodeGraphBuilder::VisitGetTemplateObject() { ...@@ -2456,8 +2451,8 @@ void BytecodeGraphBuilder::VisitGetTemplateObject() {
TemplateObjectDescriptionRef description = TemplateObjectDescriptionRef description =
MakeRefForConstantForIndexOperand<TemplateObjectDescription>(0); MakeRefForConstantForIndexOperand<TemplateObjectDescription>(0);
STATIC_ASSERT(JSGetTemplateObjectNode::FeedbackVectorIndex() == 0); STATIC_ASSERT(JSGetTemplateObjectNode::FeedbackVectorIndex() == 0);
const Operator* op = javascript()->GetTemplateObject( const Operator* op =
description.object(), shared_info().object(), source); javascript()->GetTemplateObject(description, shared_info(), source);
DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode())); DCHECK(IrOpcode::IsFeedbackCollectingOpcode(op->opcode()));
Node* template_object = NewNode(op, feedback_vector_node()); Node* template_object = NewNode(op, feedback_vector_node());
environment()->BindAccumulator(template_object); environment()->BindAccumulator(template_object);
......
...@@ -212,6 +212,14 @@ class TinyRef { ...@@ -212,6 +212,14 @@ class TinyRef {
HEAP_BROKER_OBJECT_LIST(V) HEAP_BROKER_OBJECT_LIST(V)
#undef V #undef V
#ifdef V8_EXTERNAL_CODE_SPACE
using CodeTRef = CodeDataContainerRef;
using CodeTTinyRef = CodeDataContainerTinyRef;
#else
using CodeTRef = CodeRef;
using CodeTTinyRef = CodeTinyRef;
#endif
class V8_EXPORT_PRIVATE ObjectRef { class V8_EXPORT_PRIVATE ObjectRef {
public: public:
ObjectRef(JSHeapBroker* broker, ObjectData* data, bool check_type = true) ObjectRef(JSHeapBroker* broker, ObjectData* data, bool check_type = true)
......
...@@ -834,7 +834,7 @@ class PromiseBuiltinReducerAssembler : public JSCallReducerAssembler { ...@@ -834,7 +834,7 @@ class PromiseBuiltinReducerAssembler : public JSCallReducerAssembler {
int slot_count) { int slot_count) {
return AddNode<Context>(graph()->NewNode( return AddNode<Context>(graph()->NewNode(
javascript()->CreateFunctionContext( javascript()->CreateFunctionContext(
native_context.scope_info().object(), native_context.scope_info(),
slot_count - Context::MIN_CONTEXT_SLOTS, FUNCTION_SCOPE), slot_count - Context::MIN_CONTEXT_SLOTS, FUNCTION_SCOPE),
outer_context, effect(), control())); outer_context, effect(), control()));
} }
...@@ -851,11 +851,10 @@ class PromiseBuiltinReducerAssembler : public JSCallReducerAssembler { ...@@ -851,11 +851,10 @@ class PromiseBuiltinReducerAssembler : public JSCallReducerAssembler {
isolate()->factory()->many_closures_cell(); isolate()->factory()->many_closures_cell();
Callable const callable = Callable const callable =
Builtins::CallableFor(isolate(), shared.builtin_id()); Builtins::CallableFor(isolate(), shared.builtin_id());
Handle<CodeT> code = CodeTRef code = MakeRef(broker_, ToCodeT(*callable.code()));
broker_->CanonicalPersistentHandle(ToCodeT(*callable.code()));
return AddNode<JSFunction>(graph()->NewNode( return AddNode<JSFunction>(graph()->NewNode(
javascript()->CreateClosure(shared.object(), code), javascript()->CreateClosure(shared, code), HeapConstant(feedback_cell),
HeapConstant(feedback_cell), context, effect(), control())); context, effect(), control()));
} }
void CallPromiseExecutor(TNode<Object> executor, TNode<JSFunction> resolve, void CallPromiseExecutor(TNode<Object> executor, TNode<JSFunction> resolve,
...@@ -2715,7 +2714,7 @@ Reduction JSCallReducer::ReduceFunctionPrototypeBind(Node* node) { ...@@ -2715,7 +2714,7 @@ Reduction JSCallReducer::ReduceFunctionPrototypeBind(Node* node) {
DCHECK_EQ(cursor, input_count); DCHECK_EQ(cursor, input_count);
Node* value = effect = Node* value = effect =
graph()->NewNode(javascript()->CreateBoundFunction( graph()->NewNode(javascript()->CreateBoundFunction(
arity_with_bound_this - kBoundThis, map.object()), arity_with_bound_this - kBoundThis, map),
input_count, inputs); input_count, inputs);
ReplaceWithValue(node, value, effect, control); ReplaceWithValue(node, value, effect, control);
return Replace(value); return Replace(value);
...@@ -4395,7 +4394,7 @@ Reduction JSCallReducer::ReduceJSCall(Node* node) { ...@@ -4395,7 +4394,7 @@ Reduction JSCallReducer::ReduceJSCall(Node* node) {
// Same if the {target} is the result of a CheckClosure operation. // Same if the {target} is the result of a CheckClosure operation.
if (target->opcode() == IrOpcode::kJSCreateClosure) { if (target->opcode() == IrOpcode::kJSCreateClosure) {
CreateClosureParameters const& p = JSCreateClosureNode{target}.Parameters(); CreateClosureParameters const& p = JSCreateClosureNode{target}.Parameters();
return ReduceJSCall(node, MakeRef(broker(), p.shared_info())); return ReduceJSCall(node, p.shared_info(broker()));
} else if (target->opcode() == IrOpcode::kCheckClosure) { } else if (target->opcode() == IrOpcode::kCheckClosure) {
FeedbackCellRef cell = MakeRef(broker(), FeedbackCellOf(target->op())); FeedbackCellRef cell = MakeRef(broker(), FeedbackCellOf(target->op()));
if (cell.shared_function_info().has_value()) { if (cell.shared_function_info().has_value()) {
...@@ -6830,9 +6829,8 @@ Node* JSCallReducer::CreateClosureFromBuiltinSharedFunctionInfo( ...@@ -6830,9 +6829,8 @@ Node* JSCallReducer::CreateClosureFromBuiltinSharedFunctionInfo(
isolate()->factory()->many_closures_cell(); isolate()->factory()->many_closures_cell();
Callable const callable = Callable const callable =
Builtins::CallableFor(isolate(), shared.builtin_id()); Builtins::CallableFor(isolate(), shared.builtin_id());
Handle<CodeT> code = CodeTRef code = MakeRef(broker(), ToCodeT(*callable.code()));
broker()->CanonicalPersistentHandle(ToCodeT(*callable.code())); return graph()->NewNode(javascript()->CreateClosure(shared, code),
return graph()->NewNode(javascript()->CreateClosure(shared.object(), code),
jsgraph()->HeapConstant(feedback_cell), context, jsgraph()->HeapConstant(feedback_cell), context,
effect, control); effect, control);
} }
...@@ -6884,7 +6882,7 @@ Reduction JSCallReducer::ReducePromisePrototypeFinally(Node* node) { ...@@ -6884,7 +6882,7 @@ Reduction JSCallReducer::ReducePromisePrototypeFinally(Node* node) {
// Allocate shared context for the closures below. // Allocate shared context for the closures below.
context = etrue = context = etrue =
graph()->NewNode(javascript()->CreateFunctionContext( graph()->NewNode(javascript()->CreateFunctionContext(
native_context().scope_info().object(), native_context().scope_info(),
PromiseBuiltins::kPromiseFinallyContextLength - PromiseBuiltins::kPromiseFinallyContextLength -
Context::MIN_CONTEXT_SLOTS, Context::MIN_CONTEXT_SLOTS,
FUNCTION_SCOPE), FUNCTION_SCOPE),
......
...@@ -873,7 +873,7 @@ Reduction JSCreateLowering::ReduceJSCreateBoundFunction(Node* node) { ...@@ -873,7 +873,7 @@ Reduction JSCreateLowering::ReduceJSCreateBoundFunction(Node* node) {
CreateBoundFunctionParameters const& p = CreateBoundFunctionParameters const& p =
CreateBoundFunctionParametersOf(node->op()); CreateBoundFunctionParametersOf(node->op());
int const arity = static_cast<int>(p.arity()); int const arity = static_cast<int>(p.arity());
MapRef const map = MakeRef(broker(), p.map()); MapRef const map = p.map(broker());
Node* bound_target_function = NodeProperties::GetValueInput(node, 0); Node* bound_target_function = NodeProperties::GetValueInput(node, 0);
Node* bound_this = NodeProperties::GetValueInput(node, 1); Node* bound_this = NodeProperties::GetValueInput(node, 1);
Node* effect = NodeProperties::GetEffectInput(node); Node* effect = NodeProperties::GetEffectInput(node);
...@@ -914,9 +914,9 @@ Reduction JSCreateLowering::ReduceJSCreateBoundFunction(Node* node) { ...@@ -914,9 +914,9 @@ Reduction JSCreateLowering::ReduceJSCreateBoundFunction(Node* node) {
Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) { Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) {
JSCreateClosureNode n(node); JSCreateClosureNode n(node);
CreateClosureParameters const& p = n.Parameters(); CreateClosureParameters const& p = n.Parameters();
SharedFunctionInfoRef shared = MakeRef(broker(), p.shared_info()); SharedFunctionInfoRef shared = p.shared_info(broker());
FeedbackCellRef feedback_cell = n.GetFeedbackCellRefChecked(broker()); FeedbackCellRef feedback_cell = n.GetFeedbackCellRefChecked(broker());
HeapObjectRef code = MakeRef(broker(), p.code()); HeapObjectRef code = p.code(broker());
Effect effect = n.effect(); Effect effect = n.effect();
Control control = n.control(); Control control = n.control();
Node* context = n.context(); Node* context = n.context();
...@@ -1198,7 +1198,7 @@ Reduction JSCreateLowering::ReduceJSCreateFunctionContext(Node* node) { ...@@ -1198,7 +1198,7 @@ Reduction JSCreateLowering::ReduceJSCreateFunctionContext(Node* node) {
DCHECK_EQ(IrOpcode::kJSCreateFunctionContext, node->opcode()); DCHECK_EQ(IrOpcode::kJSCreateFunctionContext, node->opcode());
const CreateFunctionContextParameters& parameters = const CreateFunctionContextParameters& parameters =
CreateFunctionContextParametersOf(node->op()); CreateFunctionContextParametersOf(node->op());
ScopeInfoRef scope_info = MakeRef(broker(), parameters.scope_info()); ScopeInfoRef scope_info = parameters.scope_info(broker());
int slot_count = parameters.slot_count(); int slot_count = parameters.slot_count();
ScopeType scope_type = parameters.scope_type(); ScopeType scope_type = parameters.scope_type();
...@@ -1238,7 +1238,7 @@ Reduction JSCreateLowering::ReduceJSCreateFunctionContext(Node* node) { ...@@ -1238,7 +1238,7 @@ Reduction JSCreateLowering::ReduceJSCreateFunctionContext(Node* node) {
Reduction JSCreateLowering::ReduceJSCreateWithContext(Node* node) { Reduction JSCreateLowering::ReduceJSCreateWithContext(Node* node) {
DCHECK_EQ(IrOpcode::kJSCreateWithContext, node->opcode()); DCHECK_EQ(IrOpcode::kJSCreateWithContext, node->opcode());
ScopeInfoRef scope_info = MakeRef(broker(), ScopeInfoOf(node->op())); ScopeInfoRef scope_info = ScopeInfoOf(broker(), node->op());
Node* extension = NodeProperties::GetValueInput(node, 0); Node* extension = NodeProperties::GetValueInput(node, 0);
Node* effect = NodeProperties::GetEffectInput(node); Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node); Node* control = NodeProperties::GetControlInput(node);
...@@ -1259,7 +1259,7 @@ Reduction JSCreateLowering::ReduceJSCreateWithContext(Node* node) { ...@@ -1259,7 +1259,7 @@ Reduction JSCreateLowering::ReduceJSCreateWithContext(Node* node) {
Reduction JSCreateLowering::ReduceJSCreateCatchContext(Node* node) { Reduction JSCreateLowering::ReduceJSCreateCatchContext(Node* node) {
DCHECK_EQ(IrOpcode::kJSCreateCatchContext, node->opcode()); DCHECK_EQ(IrOpcode::kJSCreateCatchContext, node->opcode());
ScopeInfoRef scope_info = MakeRef(broker(), ScopeInfoOf(node->op())); ScopeInfoRef scope_info = ScopeInfoOf(broker(), node->op());
Node* exception = NodeProperties::GetValueInput(node, 0); Node* exception = NodeProperties::GetValueInput(node, 0);
Node* effect = NodeProperties::GetEffectInput(node); Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node); Node* control = NodeProperties::GetControlInput(node);
...@@ -1280,7 +1280,7 @@ Reduction JSCreateLowering::ReduceJSCreateCatchContext(Node* node) { ...@@ -1280,7 +1280,7 @@ Reduction JSCreateLowering::ReduceJSCreateCatchContext(Node* node) {
Reduction JSCreateLowering::ReduceJSCreateBlockContext(Node* node) { Reduction JSCreateLowering::ReduceJSCreateBlockContext(Node* node) {
DCHECK_EQ(IrOpcode::kJSCreateBlockContext, node->opcode()); DCHECK_EQ(IrOpcode::kJSCreateBlockContext, node->opcode());
ScopeInfoRef scope_info = MakeRef(broker(), ScopeInfoOf(node->op())); ScopeInfoRef scope_info = ScopeInfoOf(broker(), node->op());
int const context_length = scope_info.ContextLength(); int const context_length = scope_info.ContextLength();
// Use inline allocation for block contexts up to a size limit. // Use inline allocation for block contexts up to a size limit.
......
This diff is collapsed.
...@@ -46,23 +46,23 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) { ...@@ -46,23 +46,23 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) {
break; break;
} }
case IrOpcode::kJSCreateBlockContext: { case IrOpcode::kJSCreateBlockContext: {
MakeRef(broker(), ScopeInfoOf(node->op())); USE(ScopeInfoOf(broker(), node->op()));
break; break;
} }
case IrOpcode::kJSCreateBoundFunction: { case IrOpcode::kJSCreateBoundFunction: {
CreateBoundFunctionParameters const& p = CreateBoundFunctionParameters const& p =
CreateBoundFunctionParametersOf(node->op()); CreateBoundFunctionParametersOf(node->op());
MakeRef(broker(), p.map()); p.map(broker());
break; break;
} }
case IrOpcode::kJSCreateCatchContext: { case IrOpcode::kJSCreateCatchContext: {
MakeRef(broker(), ScopeInfoOf(node->op())); USE(ScopeInfoOf(broker(), node->op()));
break; break;
} }
case IrOpcode::kJSCreateClosure: { case IrOpcode::kJSCreateClosure: {
CreateClosureParameters const& p = CreateClosureParametersOf(node->op()); CreateClosureParameters const& p = CreateClosureParametersOf(node->op());
MakeRef(broker(), p.shared_info()); p.shared_info(broker());
MakeRef(broker(), p.code()); p.code(broker());
break; break;
} }
case IrOpcode::kJSCreateEmptyLiteralArray: { case IrOpcode::kJSCreateEmptyLiteralArray: {
...@@ -119,7 +119,7 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) { ...@@ -119,7 +119,7 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) {
case IrOpcode::kJSCreateFunctionContext: { case IrOpcode::kJSCreateFunctionContext: {
CreateFunctionContextParameters const& p = CreateFunctionContextParameters const& p =
CreateFunctionContextParametersOf(node->op()); CreateFunctionContextParametersOf(node->op());
MakeRef(broker(), p.scope_info()); p.scope_info(broker());
break; break;
} }
case IrOpcode::kJSCreateLiteralArray: case IrOpcode::kJSCreateLiteralArray:
...@@ -140,18 +140,18 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) { ...@@ -140,18 +140,18 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) {
case IrOpcode::kJSGetTemplateObject: { case IrOpcode::kJSGetTemplateObject: {
GetTemplateObjectParameters const& p = GetTemplateObjectParameters const& p =
GetTemplateObjectParametersOf(node->op()); GetTemplateObjectParametersOf(node->op());
MakeRef(broker(), p.shared()); p.shared(broker());
MakeRef(broker(), p.description()); p.description(broker());
broker()->GetFeedbackForTemplateObject(p.feedback()); broker()->GetFeedbackForTemplateObject(p.feedback());
break; break;
} }
case IrOpcode::kJSCreateWithContext: { case IrOpcode::kJSCreateWithContext: {
MakeRef(broker(), ScopeInfoOf(node->op())); USE(ScopeInfoOf(broker(), node->op()));
break; break;
} }
case IrOpcode::kJSLoadNamed: { case IrOpcode::kJSLoadNamed: {
NamedAccess const& p = NamedAccessOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
NameRef name = MakeRef(broker(), p.name()); NameRef name = p.name(broker());
if (p.feedback().IsValid()) { if (p.feedback().IsValid()) {
broker()->GetFeedbackForPropertyAccess(p.feedback(), AccessMode::kLoad, broker()->GetFeedbackForPropertyAccess(p.feedback(), AccessMode::kLoad,
name); name);
...@@ -160,7 +160,7 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) { ...@@ -160,7 +160,7 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) {
} }
case IrOpcode::kJSLoadNamedFromSuper: { case IrOpcode::kJSLoadNamedFromSuper: {
NamedAccess const& p = NamedAccessOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
NameRef name = MakeRef(broker(), p.name()); NameRef name = p.name(broker());
if (p.feedback().IsValid()) { if (p.feedback().IsValid()) {
broker()->GetFeedbackForPropertyAccess(p.feedback(), AccessMode::kLoad, broker()->GetFeedbackForPropertyAccess(p.feedback(), AccessMode::kLoad,
name); name);
...@@ -169,7 +169,7 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) { ...@@ -169,7 +169,7 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) {
} }
case IrOpcode::kJSStoreNamed: { case IrOpcode::kJSStoreNamed: {
NamedAccess const& p = NamedAccessOf(node->op()); NamedAccess const& p = NamedAccessOf(node->op());
MakeRef(broker(), p.name()); p.name(broker());
break; break;
} }
case IrOpcode::kStoreField: case IrOpcode::kStoreField:
......
...@@ -111,7 +111,7 @@ JSInliningHeuristic::Candidate JSInliningHeuristic::CollectFunctions( ...@@ -111,7 +111,7 @@ JSInliningHeuristic::Candidate JSInliningHeuristic::CollectFunctions(
JSCreateClosureNode n(callee); JSCreateClosureNode n(callee);
CreateClosureParameters const& p = n.Parameters(); CreateClosureParameters const& p = n.Parameters();
FeedbackCellRef feedback_cell = n.GetFeedbackCellRefChecked(broker()); FeedbackCellRef feedback_cell = n.GetFeedbackCellRefChecked(broker());
SharedFunctionInfoRef shared_info = MakeRef(broker(), p.shared_info()); SharedFunctionInfoRef shared_info = p.shared_info(broker());
out.shared_info = shared_info; out.shared_info = shared_info;
if (feedback_cell.value().has_value() && if (feedback_cell.value().has_value() &&
CanConsiderForInlining(broker(), shared_info, *feedback_cell.value())) { CanConsiderForInlining(broker(), shared_info, *feedback_cell.value())) {
......
...@@ -1002,9 +1002,9 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadGlobal(Node* node) { ...@@ -1002,9 +1002,9 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadGlobal(Node* node) {
ReplaceWithValue(node, value, effect); ReplaceWithValue(node, value, effect);
return Replace(value); return Replace(value);
} else if (feedback.IsPropertyCell()) { } else if (feedback.IsPropertyCell()) {
return ReduceGlobalAccess(node, nullptr, nullptr, nullptr, return ReduceGlobalAccess(node, nullptr, nullptr, nullptr, p.name(broker()),
MakeRef(broker(), p.name()), AccessMode::kLoad, AccessMode::kLoad, nullptr,
nullptr, feedback.property_cell()); feedback.property_cell());
} else { } else {
DCHECK(feedback.IsMegamorphic()); DCHECK(feedback.IsMegamorphic());
return NoChange(); return NoChange();
...@@ -1033,9 +1033,9 @@ Reduction JSNativeContextSpecialization::ReduceJSStoreGlobal(Node* node) { ...@@ -1033,9 +1033,9 @@ Reduction JSNativeContextSpecialization::ReduceJSStoreGlobal(Node* node) {
ReplaceWithValue(node, value, effect, control); ReplaceWithValue(node, value, effect, control);
return Replace(value); return Replace(value);
} else if (feedback.IsPropertyCell()) { } else if (feedback.IsPropertyCell()) {
return ReduceGlobalAccess(node, nullptr, nullptr, value, return ReduceGlobalAccess(node, nullptr, nullptr, value, p.name(broker()),
MakeRef(broker(), p.name()), AccessMode::kStore, AccessMode::kStore, nullptr,
nullptr, feedback.property_cell()); feedback.property_cell());
} else { } else {
DCHECK(feedback.IsMegamorphic()); DCHECK(feedback.IsMegamorphic());
return NoChange(); return NoChange();
...@@ -1441,7 +1441,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadNamed(Node* node) { ...@@ -1441,7 +1441,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadNamed(Node* node) {
JSLoadNamedNode n(node); JSLoadNamedNode n(node);
NamedAccess const& p = n.Parameters(); NamedAccess const& p = n.Parameters();
Node* const receiver = n.object(); Node* const receiver = n.object();
NameRef name = MakeRef(broker(), p.name()); NameRef name = p.name(broker());
// Check if we have a constant receiver. // Check if we have a constant receiver.
HeapObjectMatcher m(receiver); HeapObjectMatcher m(receiver);
...@@ -1481,7 +1481,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadNamedFromSuper( ...@@ -1481,7 +1481,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadNamedFromSuper(
Node* node) { Node* node) {
JSLoadNamedFromSuperNode n(node); JSLoadNamedFromSuperNode n(node);
NamedAccess const& p = n.Parameters(); NamedAccess const& p = n.Parameters();
NameRef name = MakeRef(broker(), p.name()); NameRef name = p.name(broker());
if (!p.feedback().IsValid()) return NoChange(); if (!p.feedback().IsValid()) return NoChange();
return ReducePropertyAccess(node, nullptr, name, jsgraph()->Dead(), return ReducePropertyAccess(node, nullptr, name, jsgraph()->Dead(),
...@@ -1499,7 +1499,7 @@ Reduction JSNativeContextSpecialization::ReduceJSGetIterator(Node* node) { ...@@ -1499,7 +1499,7 @@ Reduction JSNativeContextSpecialization::ReduceJSGetIterator(Node* node) {
Control control = n.control(); Control control = n.control();
// Load iterator property operator // Load iterator property operator
Handle<Name> iterator_symbol = factory()->iterator_symbol(); NameRef iterator_symbol = MakeRef(broker(), factory()->iterator_symbol());
const Operator* load_op = const Operator* load_op =
javascript()->LoadNamed(iterator_symbol, p.loadFeedback()); javascript()->LoadNamed(iterator_symbol, p.loadFeedback());
...@@ -1576,17 +1576,16 @@ Reduction JSNativeContextSpecialization::ReduceJSStoreNamed(Node* node) { ...@@ -1576,17 +1576,16 @@ Reduction JSNativeContextSpecialization::ReduceJSStoreNamed(Node* node) {
JSStoreNamedNode n(node); JSStoreNamedNode n(node);
NamedAccess const& p = n.Parameters(); NamedAccess const& p = n.Parameters();
if (!p.feedback().IsValid()) return NoChange(); if (!p.feedback().IsValid()) return NoChange();
return ReducePropertyAccess(node, nullptr, MakeRef(broker(), p.name()), return ReducePropertyAccess(node, nullptr, p.name(broker()), n.value(),
n.value(), FeedbackSource(p.feedback()), FeedbackSource(p.feedback()), AccessMode::kStore);
AccessMode::kStore);
} }
Reduction JSNativeContextSpecialization::ReduceJSStoreNamedOwn(Node* node) { Reduction JSNativeContextSpecialization::ReduceJSStoreNamedOwn(Node* node) {
JSStoreNamedOwnNode n(node); JSStoreNamedOwnNode n(node);
StoreNamedOwnParameters const& p = n.Parameters(); StoreNamedOwnParameters const& p = n.Parameters();
if (!p.feedback().IsValid()) return NoChange(); if (!p.feedback().IsValid()) return NoChange();
return ReducePropertyAccess(node, nullptr, MakeRef(broker(), p.name()), return ReducePropertyAccess(node, nullptr, p.name(broker()), n.value(),
n.value(), FeedbackSource(p.feedback()), FeedbackSource(p.feedback()),
AccessMode::kStoreInLiteral); AccessMode::kStoreInLiteral);
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -1173,7 +1173,7 @@ Reduction JSTypedLowering::ReduceJSLoadNamed(Node* node) { ...@@ -1173,7 +1173,7 @@ Reduction JSTypedLowering::ReduceJSLoadNamed(Node* node) {
JSLoadNamedNode n(node); JSLoadNamedNode n(node);
Node* receiver = n.object(); Node* receiver = n.object();
Type receiver_type = NodeProperties::GetType(receiver); Type receiver_type = NodeProperties::GetType(receiver);
NameRef name = MakeRef(broker(), NamedAccessOf(node->op()).name()); NameRef name = NamedAccessOf(node->op()).name(broker());
NameRef length_str = MakeRef(broker(), factory()->length_string()); NameRef length_str = MakeRef(broker(), factory()->length_string());
// Optimize "length" property of strings. // Optimize "length" property of strings.
if (name.equals(length_str) && receiver_type.Is(Type::String())) { if (name.equals(length_str) && receiver_type.Is(Type::String())) {
...@@ -1705,7 +1705,7 @@ Reduction JSTypedLowering::ReduceJSCall(Node* node) { ...@@ -1705,7 +1705,7 @@ Reduction JSTypedLowering::ReduceJSCall(Node* node) {
} else if (target->opcode() == IrOpcode::kJSCreateClosure) { } else if (target->opcode() == IrOpcode::kJSCreateClosure) {
CreateClosureParameters const& ccp = CreateClosureParameters const& ccp =
JSCreateClosureNode{target}.Parameters(); JSCreateClosureNode{target}.Parameters();
shared = MakeRef(broker(), ccp.shared_info()); shared = ccp.shared_info(broker());
} else if (target->opcode() == IrOpcode::kCheckClosure) { } else if (target->opcode() == IrOpcode::kCheckClosure) {
FeedbackCellRef cell = MakeRef(broker(), FeedbackCellOf(target->op())); FeedbackCellRef cell = MakeRef(broker(), FeedbackCellOf(target->op()));
base::Optional<FeedbackVectorRef> feedback_vector = cell.value(); base::Optional<FeedbackVectorRef> feedback_vector = cell.value();
......
...@@ -201,7 +201,7 @@ TEST(ReduceJSLoadContext1) { ...@@ -201,7 +201,7 @@ TEST(ReduceJSLoadContext1) {
Node* start = t.graph()->NewNode(t.common()->Start(0)); Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start); t.graph()->SetStart(start);
Handle<ScopeInfo> empty(ScopeInfo::Empty(t.main_isolate()), t.main_isolate()); ScopeInfoRef empty = MakeRef(t.broker(), ScopeInfo::Empty(t.main_isolate()));
const i::compiler::Operator* create_function_context = const i::compiler::Operator* create_function_context =
t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE); t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE);
...@@ -271,7 +271,7 @@ TEST(ReduceJSLoadContext2) { ...@@ -271,7 +271,7 @@ TEST(ReduceJSLoadContext2) {
Node* start = t.graph()->NewNode(t.common()->Start(0)); Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start); t.graph()->SetStart(start);
Handle<ScopeInfo> empty(ScopeInfo::Empty(t.main_isolate()), t.main_isolate()); ScopeInfoRef empty = MakeRef(t.broker(), ScopeInfo::Empty(t.main_isolate()));
const i::compiler::Operator* create_function_context = const i::compiler::Operator* create_function_context =
t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE); t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE);
...@@ -365,8 +365,7 @@ TEST(ReduceJSLoadContext3) { ...@@ -365,8 +365,7 @@ TEST(ReduceJSLoadContext3) {
Node* start = t.graph()->NewNode(t.common()->Start(2)); Node* start = t.graph()->NewNode(t.common()->Start(2));
t.graph()->SetStart(start); t.graph()->SetStart(start);
Handle<ScopeInfo> empty(ScopeInfo::Empty(t.main_isolate()), ScopeInfoRef empty = MakeRef(t.broker(), ScopeInfo::Empty(t.main_isolate()));
handle_zone_scope.main_isolate());
const i::compiler::Operator* create_function_context = const i::compiler::Operator* create_function_context =
t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE); t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE);
...@@ -496,7 +495,7 @@ TEST(ReduceJSStoreContext1) { ...@@ -496,7 +495,7 @@ TEST(ReduceJSStoreContext1) {
Node* start = t.graph()->NewNode(t.common()->Start(0)); Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start); t.graph()->SetStart(start);
Handle<ScopeInfo> empty(ScopeInfo::Empty(t.main_isolate()), t.main_isolate()); ScopeInfoRef empty = MakeRef(t.broker(), ScopeInfo::Empty(t.main_isolate()));
const i::compiler::Operator* create_function_context = const i::compiler::Operator* create_function_context =
t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE); t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE);
...@@ -540,7 +539,7 @@ TEST(ReduceJSStoreContext2) { ...@@ -540,7 +539,7 @@ TEST(ReduceJSStoreContext2) {
Node* start = t.graph()->NewNode(t.common()->Start(0)); Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start); t.graph()->SetStart(start);
Handle<ScopeInfo> empty(ScopeInfo::Empty(t.main_isolate()), t.main_isolate()); ScopeInfoRef empty = MakeRef(t.broker(), ScopeInfo::Empty(t.main_isolate()));
const i::compiler::Operator* create_function_context = const i::compiler::Operator* create_function_context =
t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE); t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE);
...@@ -606,8 +605,7 @@ TEST(ReduceJSStoreContext3) { ...@@ -606,8 +605,7 @@ TEST(ReduceJSStoreContext3) {
Node* start = t.graph()->NewNode(t.common()->Start(2)); Node* start = t.graph()->NewNode(t.common()->Start(2));
t.graph()->SetStart(start); t.graph()->SetStart(start);
Handle<ScopeInfo> empty(ScopeInfo::Empty(t.main_isolate()), ScopeInfoRef empty = MakeRef(t.broker(), ScopeInfo::Empty(t.main_isolate()));
handle_zone_scope.main_isolate());
const i::compiler::Operator* create_function_context = const i::compiler::Operator* create_function_context =
t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE); t.javascript()->CreateFunctionContext(empty, 42, FUNCTION_SCOPE);
......
...@@ -157,7 +157,7 @@ TEST_F(JSCreateLoweringTest, JSCreateFunctionContextViaInlinedAllocation) { ...@@ -157,7 +157,7 @@ TEST_F(JSCreateLoweringTest, JSCreateFunctionContextViaInlinedAllocation) {
Node* const control = graph()->start(); Node* const control = graph()->start();
Reduction const r = Reduce(graph()->NewNode( Reduction const r = Reduce(graph()->NewNode(
javascript()->CreateFunctionContext( javascript()->CreateFunctionContext(
handle(ScopeInfo::Empty(isolate()), isolate()), 8, FUNCTION_SCOPE), MakeRef(broker(), ScopeInfo::Empty(isolate())), 8, FUNCTION_SCOPE),
context, effect, control)); context, effect, control));
ASSERT_TRUE(r.Changed()); ASSERT_TRUE(r.Changed());
EXPECT_THAT(r.replacement(), EXPECT_THAT(r.replacement(),
...@@ -171,8 +171,8 @@ TEST_F(JSCreateLoweringTest, JSCreateFunctionContextViaInlinedAllocation) { ...@@ -171,8 +171,8 @@ TEST_F(JSCreateLoweringTest, JSCreateFunctionContextViaInlinedAllocation) {
// JSCreateWithContext // JSCreateWithContext
TEST_F(JSCreateLoweringTest, JSCreateWithContext) { TEST_F(JSCreateLoweringTest, JSCreateWithContext) {
Handle<ScopeInfo> scope_info = ScopeInfoRef scope_info =
ReadOnlyRoots(isolate()).empty_function_scope_info_handle(); MakeRef(broker(), ReadOnlyRoots(isolate()).empty_function_scope_info());
Node* const object = Parameter(Type::Receiver()); Node* const object = Parameter(Type::Receiver());
Node* const context = Parameter(Type::Any()); Node* const context = Parameter(Type::Any());
Node* const effect = graph()->start(); Node* const effect = graph()->start();
...@@ -193,8 +193,8 @@ TEST_F(JSCreateLoweringTest, JSCreateWithContext) { ...@@ -193,8 +193,8 @@ TEST_F(JSCreateLoweringTest, JSCreateWithContext) {
// JSCreateCatchContext // JSCreateCatchContext
TEST_F(JSCreateLoweringTest, JSCreateCatchContext) { TEST_F(JSCreateLoweringTest, JSCreateCatchContext) {
Handle<ScopeInfo> scope_info = ScopeInfoRef scope_info =
ReadOnlyRoots(isolate()).empty_function_scope_info_handle(); MakeRef(broker(), ReadOnlyRoots(isolate()).empty_function_scope_info());
Node* const exception = Parameter(Type::Receiver()); Node* const exception = Parameter(Type::Receiver());
Node* const context = Parameter(Type::Any()); Node* const context = Parameter(Type::Any());
Node* const effect = graph()->start(); Node* const effect = graph()->start();
......
...@@ -400,7 +400,7 @@ TEST_F(JSTypedLoweringTest, JSStoreContext) { ...@@ -400,7 +400,7 @@ TEST_F(JSTypedLoweringTest, JSStoreContext) {
TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) { TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) {
Handle<Name> name = factory()->length_string(); NameRef name = MakeRef(broker(), factory()->length_string());
Node* const receiver = Parameter(Type::String(), 0); Node* const receiver = Parameter(Type::String(), 0);
Node* const feedback = UndefinedConstant(); Node* const feedback = UndefinedConstant();
Node* const context = UndefinedConstant(); Node* const context = UndefinedConstant();
......
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