Commit 7584dbf5 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[array][torque] use new internal classes for sortState

Change-Id: Ibcac85442e755ceabd79cd87ebba7098b95a9182
Reviewed-on: https://chromium-review.googlesource.com/c/1454720Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59406}
parent 9f7c644b
......@@ -788,6 +788,12 @@ Cast<Callable>(o: HeapObject): Callable
return HeapObjectToCallable(o) otherwise CastError;
}
Cast<Undefined | Callable>(o: HeapObject): Undefined | Callable
labels CastError {
if (o == Undefined) return Undefined;
return HeapObjectToCallable(o) otherwise CastError;
}
Cast<JSArray>(o: HeapObject): JSArray
labels CastError {
return HeapObjectToJSArray(o) otherwise CastError;
......
......@@ -600,7 +600,7 @@ void CSAGenerator::EmitInstruction(const BranchInstruction& instruction,
void CSAGenerator::EmitInstruction(
const ConstexprBranchInstruction& instruction, Stack<std::string>* stack) {
out_ << " if (" << instruction.condition << ") {\n";
out_ << " if ((" << instruction.condition << ")) {\n";
out_ << " ca_.Goto(&" << BlockName(instruction.if_true);
for (const std::string& value : *stack) {
out_ << ", " << value;
......
This diff is collapsed.
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