Commit cb935071 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[torque] fix bug in CodeAssemblerParameterizedLabelBase

Bug: v8:7793
Change-Id: I6e1fb19fb260350daca8351321a79d038b5fdbd3
Reviewed-on: https://chromium-review.googlesource.com/c/1436053Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59401}
parent eae6bf2d
...@@ -1820,6 +1820,8 @@ void CodeAssemblerParameterizedLabelBase::AddInputs(std::vector<Node*> inputs) { ...@@ -1820,6 +1820,8 @@ void CodeAssemblerParameterizedLabelBase::AddInputs(std::vector<Node*> inputs) {
if (!phi_nodes_.empty()) { if (!phi_nodes_.empty()) {
DCHECK_EQ(inputs.size(), phi_nodes_.size()); DCHECK_EQ(inputs.size(), phi_nodes_.size());
for (size_t i = 0; i < inputs.size(); ++i) { for (size_t i = 0; i < inputs.size(); ++i) {
// We use {nullptr} as a sentinel for an uninitialized value.
if (phi_nodes_[i] == nullptr) continue;
state_->raw_assembler_->AppendPhiInput(phi_nodes_[i], inputs[i]); state_->raw_assembler_->AppendPhiInput(phi_nodes_[i], inputs[i]);
} }
} else { } else {
......
...@@ -413,6 +413,11 @@ namespace test { ...@@ -413,6 +413,11 @@ namespace test {
label Exit { label Exit {
check(j == 10); check(j == 10);
} }
// Test if we can handle uninitialized values on the stack.
let i: Smi;
for (let j: Smi = 0; j < 10; ++j) {
}
} }
macro TestSubtyping(x: Smi) { macro TestSubtyping(x: Smi) {
......
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