Commit a1f33fa2 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[deoptimizer] Refactor frame output writing in deoptimizer

This CL introduces an stack abstraction for writing frame descriptions.
Previously, we managed the output offset by hand, which is verbose and
error prone. This CL introduced FrameWriter, which offers a stack
abstraction with push operations for constructing the output frame
descriptions.

The abstraction is only applied to DoComputeBuiltinContinuation;
following CLs will apply it to the other DoCompute* functions.

Bug: v8:7679

Change-Id: Ia6e34de1ed63ba9245e2a08945b1e0548562ed43
Reviewed-on: https://chromium-review.googlesource.com/1019143Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52714}
parent 6b129066
This diff is collapsed.
......@@ -188,6 +188,8 @@ class TranslatedFrame {
TranslatedValue& operator*() { return (*position_); }
TranslatedValue* operator->() { return &(*position_); }
const TranslatedValue& operator*() const { return (*position_); }
const TranslatedValue* operator->() const { return &(*position_); }
private:
friend TranslatedFrame;
......@@ -520,6 +522,10 @@ class Deoptimizer : public Malloced {
Isolate* isolate() const { return isolate_; }
private:
friend class FrameWriter;
void QueueValueForTranslation(Address output_address, Object* obj,
const TranslatedFrame::iterator& iterator);
static const int kMinNumberOfEntries = 64;
static const int kMaxNumberOfEntries = 16384;
......
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