Index: src/compiler/js-frame-specialization.cc |
diff --git a/src/compiler/js-frame-specialization.cc b/src/compiler/js-frame-specialization.cc |
index 46ad4541993128efad67e948b93e42def059e5b1..769d615e4a4ddc5fba4d19f0b6152e1d1932df9f 100644 |
--- a/src/compiler/js-frame-specialization.cc |
+++ b/src/compiler/js-frame-specialization.cc |
@@ -27,42 +27,44 @@ Reduction JSFrameSpecialization::Reduce(Node* node) { |
Reduction JSFrameSpecialization::ReduceOsrValue(Node* node) { |
DCHECK_EQ(IrOpcode::kOsrValue, node->opcode()); |
- DisallowHeapAllocation no_gc; |
- Object* object; |
+ Handle<Object> value; |
int const index = OpParameter<int>(node); |
int const parameters_count = frame()->ComputeParametersCount() + 1; |
if (index == Linkage::kOsrContextSpillSlotIndex) { |
- object = frame()->context(); |
+ value = handle(frame()->context(), isolate()); |
} else if (index >= parameters_count) { |
- object = frame()->GetExpression(index - parameters_count); |
+ value = handle(frame()->GetExpression(index - parameters_count), isolate()); |
} else { |
// The OsrValue index 0 is the receiver. |
- object = index ? frame()->GetParameter(index - 1) : frame()->receiver(); |
+ value = |
+ handle(index ? frame()->GetParameter(index - 1) : frame()->receiver(), |
+ isolate()); |
} |
- return Replace(jsgraph()->Constant(handle(object, isolate()))); |
+ return Replace(jsgraph()->Constant(value)); |
} |
Reduction JSFrameSpecialization::ReduceParameter(Node* node) { |
DCHECK_EQ(IrOpcode::kParameter, node->opcode()); |
- DisallowHeapAllocation no_gc; |
- Object* object; |
+ Handle<Object> value; |
int const index = ParameterIndexOf(node->op()); |
int const parameters_count = frame()->ComputeParametersCount() + 1; |
if (index == Linkage::kJSCallClosureParamIndex) { |
// The Parameter index references the closure. |
- object = frame()->function(); |
+ value = handle(frame()->function(), isolate()); |
} else if (index == Linkage::GetJSCallArgCountParamIndex(parameters_count)) { |
// The Parameter index references the parameter count. |
- object = Smi::FromInt(parameters_count - 1); |
+ value = handle(Smi::FromInt(parameters_count - 1), isolate()); |
} else if (index == Linkage::GetJSCallContextParamIndex(parameters_count)) { |
// The Parameter index references the context. |
- object = frame()->context(); |
+ value = handle(frame()->context(), isolate()); |
} else { |
// The Parameter index 0 is the receiver. |
- object = index ? frame()->GetParameter(index - 1) : frame()->receiver(); |
+ value = |
+ handle(index ? frame()->GetParameter(index - 1) : frame()->receiver(), |
+ isolate()); |
} |
- return Replace(jsgraph()->Constant(handle(object, isolate()))); |
+ return Replace(jsgraph()->Constant(value)); |
} |