Commit 1704bf7b authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Remove unnecessary argument of a function.

Change-Id: Iadfec0133d45f6539fd0b2b5fbea0e39ab7dfc29
Reviewed-on: https://chromium-review.googlesource.com/1145180Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54587}
parent 495b338d
......@@ -491,7 +491,7 @@ Reduction JSCreateLowering::ReduceNewArray(Node* node, Node* length,
// integer, always creates a holey backing store.
if (!IsHoleyElementsKind(initial_map.elements_kind())) {
initial_map = initial_map.AsElementsKind(
GetHoleyElementsKind(initial_map.elements_kind()), js_heap_broker());
GetHoleyElementsKind(initial_map.elements_kind()));
}
// Check that the {limit} is an unsigned integer in the valid range.
......@@ -540,7 +540,7 @@ Reduction JSCreateLowering::ReduceNewArray(Node* node, Node* length,
ElementsKind elements_kind = initial_map.elements_kind();
if (NodeProperties::GetType(length).Max() > 0.0) {
elements_kind = GetHoleyElementsKind(elements_kind);
initial_map = initial_map.AsElementsKind(elements_kind, js_heap_broker());
initial_map = initial_map.AsElementsKind(elements_kind);
}
DCHECK(IsFastElementsKind(elements_kind));
......@@ -731,8 +731,7 @@ Reduction JSCreateLowering::ReduceJSCreateArray(Node* node) {
if (site) {
ElementsKind elements_kind = site->GetElementsKind();
if (initial_map.elements_kind() != elements_kind) {
initial_map =
initial_map.AsElementsKind(elements_kind, js_heap_broker());
initial_map = initial_map.AsElementsKind(elements_kind);
}
can_inline_call = site->CanInlineCall();
pretenure = dependencies()->DependOnPretenureMode(*site);
......@@ -756,8 +755,7 @@ Reduction JSCreateLowering::ReduceJSCreateArray(Node* node) {
elements_kind, IsHoleyElementsKind(elements_kind)
? HOLEY_ELEMENTS
: PACKED_ELEMENTS);
initial_map =
initial_map.AsElementsKind(elements_kind, js_heap_broker());
initial_map = initial_map.AsElementsKind(elements_kind);
return ReduceNewArray(node, std::vector<Node*>{length}, initial_map,
pretenure);
}
......@@ -813,8 +811,7 @@ Reduction JSCreateLowering::ReduceJSCreateArray(Node* node) {
// we cannot inline this invocation of the Array constructor here.
return NoChange();
}
initial_map =
initial_map.AsElementsKind(elements_kind, js_heap_broker());
initial_map = initial_map.AsElementsKind(elements_kind);
return ReduceNewArray(node, values, initial_map, pretenure);
}
......
......@@ -167,13 +167,12 @@ void JSFunctionRef::EnsureHasInitialMap() const {
}
// TODO(mslekova): Pre-compute these on the main thread.
MapRef MapRef::AsElementsKind(ElementsKind kind,
const JSHeapBroker* broker) const {
MapRef MapRef::AsElementsKind(ElementsKind kind) const {
AllowHandleAllocation handle_allocation;
AllowHeapAllocation heap_allocation;
AllowHandleDereference allow_handle_dereference;
return MapRef(broker,
Map::AsElementsKind(broker->isolate(), object<Map>(), kind));
return MapRef(broker(),
Map::AsElementsKind(broker()->isolate(), object<Map>(), kind));
}
SlackTrackingResult JSFunctionRef::FinishSlackTracking() const {
......
......@@ -304,7 +304,7 @@ class MapRef : public HeapObjectRef {
ObjectRef constructor_or_backpointer() const;
ElementsKind elements_kind() const;
MapRef AsElementsKind(ElementsKind kind, const JSHeapBroker* broker) const;
MapRef AsElementsKind(ElementsKind kind) const;
bool is_stable() const;
bool has_prototype_slot() const;
......
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