Commit 9091eb19 authored by jarin's avatar jarin Committed by Commit bot

[deoptimizer] Materialize array iterators in the deoptimizer.

This also introduces exhaustive switch-cases for instance types.

BUG=chromium:681383

Review-Url: https://codereview.chromium.org/2646433002
Cr-Commit-Position: refs/heads/master@{#42447}
parent e1fbcce8
This diff is collapsed.
......@@ -292,6 +292,9 @@ class TranslatedState {
void UpdateFromPreviouslyMaterializedObjects();
Handle<Object> MaterializeAt(int frame_index, int* value_index);
Handle<Object> MaterializeObjectAt(int object_index);
class CapturedObjectMaterializer;
Handle<Object> MaterializeCapturedObjectAt(TranslatedValue* slot,
int frame_index, int* value_index);
bool GetAdaptedArguments(Handle<JSObject>* result, int frame_index);
static uint32_t GetUInt32Slot(Address fp, int slot_index);
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function f(deopt) {
let array = [42];
let it = array[Symbol.iterator]();
if (deopt) {
%_DeoptimizeNow();
return it.next().value;
}
}
f(false);
f(false);
%OptimizeFunctionOnNextCall(f);
assertEquals(f(true), 42);
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