Commit 71d3ae39 authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[maglev] Support TypeOf, CreateArrayFromIterable and IncBlockCounter

These bytecodes simply call a builtin.

Bug: v8:7700
Change-Id: I2616ea5571741a7f79b27bc6ddbd95cfb3254e97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3805063
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82158}
parent a8bff771
...@@ -1460,7 +1460,10 @@ void MaglevGraphBuilder::VisitLogicalNot() { ...@@ -1460,7 +1460,10 @@ void MaglevGraphBuilder::VisitLogicalNot() {
} }
} }
MAGLEV_UNIMPLEMENTED_BYTECODE(TypeOf) void MaglevGraphBuilder::VisitTypeOf() {
ValueNode* value = GetAccumulatorTagged();
SetAccumulator(BuildCallBuiltin<Builtin::kTypeof>({value}));
}
void MaglevGraphBuilder::VisitDeletePropertyStrict() { void MaglevGraphBuilder::VisitDeletePropertyStrict() {
ValueNode* object = LoadRegisterTagged(0); ValueNode* object = LoadRegisterTagged(0);
...@@ -2024,7 +2027,11 @@ void MaglevGraphBuilder::VisitCreateArrayLiteral() { ...@@ -2024,7 +2027,11 @@ void MaglevGraphBuilder::VisitCreateArrayLiteral() {
SetAccumulator(result); SetAccumulator(result);
} }
MAGLEV_UNIMPLEMENTED_BYTECODE(CreateArrayFromIterable) void MaglevGraphBuilder::VisitCreateArrayFromIterable() {
ValueNode* iterable = GetAccumulatorTagged();
SetAccumulator(
BuildCallBuiltin<Builtin::kIterableToListWithSymbolLookup>({iterable}));
}
void MaglevGraphBuilder::VisitCreateEmptyArrayLiteral() { void MaglevGraphBuilder::VisitCreateEmptyArrayLiteral() {
// TODO(v8:7700): Consider inlining the allocation. // TODO(v8:7700): Consider inlining the allocation.
...@@ -2429,7 +2436,11 @@ void MaglevGraphBuilder::VisitDebugger() { ...@@ -2429,7 +2436,11 @@ void MaglevGraphBuilder::VisitDebugger() {
BuildCallRuntime(Runtime::kHandleDebuggerStatement, {}); BuildCallRuntime(Runtime::kHandleDebuggerStatement, {});
} }
MAGLEV_UNIMPLEMENTED_BYTECODE(IncBlockCounter) void MaglevGraphBuilder::VisitIncBlockCounter() {
ValueNode* closure = GetClosure();
ValueNode* coverage_array_slot = GetSmiConstant(iterator_.GetIndexOperand(0));
BuildCallBuiltin<Builtin::kIncBlockCounter>({closure, coverage_array_slot});
}
void MaglevGraphBuilder::VisitAbort() { void MaglevGraphBuilder::VisitAbort() {
AbortReason reason = static_cast<AbortReason>(GetFlagOperand(0)); AbortReason reason = static_cast<AbortReason>(GetFlagOperand(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