Commit e3602c11 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[gasm] Port the PromiseConstructor reduction to GraphAssembler

The most interesting part of this change is that try-catch patterns
are now supported by graph assembler through TryCatchBuilder0.

Bug: v8:9972
Change-Id: I6ef0d51d4a1973eb8a30a5072c630261860f0a05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1986000
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65874}
parent 26f2c1cc
......@@ -136,15 +136,14 @@ class NodeWrapper {
Node* operator->() const { return node_; }
private:
Node* const node_;
Node* node_;
};
class Effect : public NodeWrapper {
public:
explicit constexpr Effect(Node* node) : NodeWrapper(node) {
// TODO(jgruber): Remove the End/Dead special case.
// TODO(jgruber): Remove the End special case.
SLOW_DCHECK(node == nullptr || node->op()->opcode() == IrOpcode::kEnd ||
node->op()->opcode() == IrOpcode::kDead ||
node->op()->EffectOutputCount() > 0);
}
};
......@@ -152,9 +151,8 @@ class Effect : public NodeWrapper {
class Control : public NodeWrapper {
public:
explicit constexpr Control(Node* node) : NodeWrapper(node) {
// TODO(jgruber): Remove the End/Dead special case.
SLOW_DCHECK(node == nullptr || node->op()->opcode() == IrOpcode::kEnd ||
node->op()->opcode() == IrOpcode::kDead ||
// TODO(jgruber): Remove the End special case.
SLOW_DCHECK(node == nullptr || node->opcode() == IrOpcode::kEnd ||
node->op()->ControlOutputCount() > 0);
}
};
......@@ -162,7 +160,10 @@ class Control : public NodeWrapper {
class FrameState : public NodeWrapper {
public:
explicit constexpr FrameState(Node* node) : NodeWrapper(node) {
SLOW_DCHECK(node->op()->opcode() == IrOpcode::kFrameState);
// TODO(jgruber): Disallow kStart (needed for PromiseConstructorBasic unit
// test, among others).
SLOW_DCHECK(node->opcode() == IrOpcode::kFrameState ||
node->opcode() == IrOpcode::kStart);
}
};
......
This diff is collapsed.
......@@ -214,25 +214,6 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer {
Node* context, Node* effect,
Node* control);
// If {fncallback} is not callable, throw a TypeError.
// {control} is altered, and new nodes {check_fail} and {check_throw} are
// returned. {check_fail} is the control branch where IsCallable failed,
// and {check_throw} is the call to throw a TypeError in that
// branch.
void WireInCallbackIsCallableCheck(Node* fncallback, Node* context,
Node* check_frame_state, Node* effect,
Node** control, Node** check_fail,
Node** check_throw);
void RewirePostCallbackExceptionEdges(Node* check_throw, Node* on_exception,
Node* effect, Node** check_fail,
Node** control);
Node* CreateArtificialFrameState(Node* node, Node* outer_frame_state,
int parameter_count, BailoutId bailout_id,
FrameStateType frame_state_type,
const SharedFunctionInfoRef& shared,
Node* context = nullptr);
void CheckIfElementsKind(Node* receiver_elements_kind, ElementsKind kind,
Node* control, Node** if_true, Node** if_false);
Node* LoadReceiverElementsKind(Node* receiver, Node** effect, Node** control);
......
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