Commit 54f852d1 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Only store PCs for full validation

The PC stored in each entry on the value stack and control stack is only
needed for error reporting, hence avoid storing it for the
{kNoValidation} and {kBooleanValidation} modes.

R=thibaudm@chromium.org

Bug: v8:10969
Change-Id: I14c6a6b1857545099e4a90d77d13107013f01565
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436540
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70260}
parent 20e1ba28
......@@ -260,7 +260,7 @@ class LiftoffCompiler {
// TODO(clemensb): Make this a template parameter.
static constexpr Decoder::ValidateFlag validate = Decoder::kBooleanValidation;
using Value = ValueBase;
using Value = ValueBase<validate>;
static constexpr auto kI32 = ValueType::kI32;
static constexpr auto kI64 = ValueType::kI64;
......@@ -273,7 +273,7 @@ class LiftoffCompiler {
LiftoffAssembler::CacheState state;
};
struct Control : public ControlBase<Value> {
struct Control : public ControlBase<Value, validate> {
std::unique_ptr<ElseState> else_state;
LiftoffAssembler::CacheState label_state;
MovableLabel label;
......
This diff is collapsed.
......@@ -78,7 +78,7 @@ class WasmGraphBuildingInterface {
using FullDecoder = WasmFullDecoder<validate, WasmGraphBuildingInterface>;
using CheckForNull = compiler::WasmGraphBuilder::CheckForNull;
struct Value : public ValueBase {
struct Value : public ValueBase<validate> {
TFNode* node = nullptr;
template <typename... Args>
......@@ -97,7 +97,7 @@ class WasmGraphBuildingInterface {
explicit TryInfo(SsaEnv* c) : catch_env(c) {}
};
struct Control : public ControlBase<Value> {
struct Control : public ControlBase<Value, validate> {
SsaEnv* end_env = nullptr; // end environment for the construct.
SsaEnv* false_env = nullptr; // false environment (only for if).
TryInfo* try_info = nullptr; // information about try statements.
......
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