Commit f1cd428d authored by adamk's avatar adamk Committed by Commit bot

Remove a bit more dead code after array spread desugaring

Review URL: https://codereview.chromium.org/1601023005

Cr-Commit-Position: refs/heads/master@{#33446}
parent 25e63b23
......@@ -497,10 +497,11 @@ void ObjectLiteral::BuildConstantProperties(Isolate* isolate) {
void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
DCHECK_LT(first_spread_index_, 0);
if (!constant_elements_.is_null()) return;
int constants_length =
first_spread_index_ >= 0 ? first_spread_index_ : values()->length();
int constants_length = values()->length();
// Allocate a fixed array to hold all the object literals.
Handle<JSArray> array = isolate->factory()->NewJSArray(
......@@ -508,7 +509,7 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
Strength::WEAK, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
// Fill in the literals.
bool is_simple = (first_spread_index_ < 0);
bool is_simple = true;
int depth_acc = 1;
bool is_holey = false;
int array_index = 0;
......
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