Commit 776c8dd4 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Remove redundant buffer fill

This loop is redundant in {GetNodes}.

R=titzer@chromium.org

Bug: v8:8423
Change-Id: Ia624fbe145ae2cd77ea099c3f109899ea6fac9c0
Reviewed-on: https://chromium-review.googlesource.com/c/1370031Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58131}
parent 5e3767f8
...@@ -248,12 +248,8 @@ class WasmGraphBuildingInterface { ...@@ -248,12 +248,8 @@ class WasmGraphBuildingInterface {
DCHECK_EQ(1, decoder->control_depth()); DCHECK_EQ(1, decoder->control_depth());
SetEnv(decoder->control_at(0)->end_env); SetEnv(decoder->control_at(0)->end_env);
} }
size_t num_values = values.size(); TFNode** nodes = GetNodes(values);
TFNode** buffer = GetNodes(values); BUILD(Return, static_cast<uint32_t>(values.size()), nodes);
for (size_t i = 0; i < num_values; ++i) {
buffer[i] = values[i].node;
}
BUILD(Return, static_cast<uint32_t>(values.size()), buffer);
} }
void GetLocal(FullDecoder* decoder, Value* result, void GetLocal(FullDecoder* decoder, Value* result,
......
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