Commit b8a50cf7 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm] Remove unused stack limit in export wrappers

R=mstarzinger@chromium.org

Bug: v8:9554
Change-Id: Id09bb2d98ae62fcbd7b444d467d7ff446991f020
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1722555Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62957}
parent 658ff200
......@@ -201,15 +201,11 @@ class V8_EXPORT_PRIVATE CompilationJob {
kFailed,
};
CompilationJob(uintptr_t stack_limit, State initial_state)
: state_(initial_state), stack_limit_(stack_limit) {
explicit CompilationJob(State initial_state) : state_(initial_state) {
timer_.Start();
}
virtual ~CompilationJob() = default;
void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; }
uintptr_t stack_limit() const { return stack_limit_; }
State state() const { return state_; }
protected:
......@@ -228,7 +224,6 @@ class V8_EXPORT_PRIVATE CompilationJob {
private:
State state_;
uintptr_t stack_limit_;
base::ElapsedTimer timer_;
};
......@@ -242,9 +237,10 @@ class V8_EXPORT_PRIVATE CompilationJob {
// Either of phases can either fail or succeed.
class UnoptimizedCompilationJob : public CompilationJob {
public:
UnoptimizedCompilationJob(intptr_t stack_limit, ParseInfo* parse_info,
UnoptimizedCompilationJob(uintptr_t stack_limit, ParseInfo* parse_info,
UnoptimizedCompilationInfo* compilation_info)
: CompilationJob(stack_limit, State::kReadyToExecute),
: CompilationJob(State::kReadyToExecute),
stack_limit_(stack_limit),
parse_info_(parse_info),
compilation_info_(compilation_info) {}
......@@ -265,6 +261,8 @@ class UnoptimizedCompilationJob : public CompilationJob {
return compilation_info_;
}
uintptr_t stack_limit() const { return stack_limit_; }
protected:
// Overridden by the actual implementation.
virtual Status ExecuteJobImpl() = 0;
......@@ -272,6 +270,7 @@ class UnoptimizedCompilationJob : public CompilationJob {
Isolate* isolate) = 0;
private:
uintptr_t stack_limit_;
ParseInfo* parse_info_;
UnoptimizedCompilationInfo* compilation_info_;
base::TimeDelta time_taken_to_execute_;
......@@ -289,11 +288,10 @@ class UnoptimizedCompilationJob : public CompilationJob {
// Each of the three phases can either fail or succeed.
class OptimizedCompilationJob : public CompilationJob {
public:
OptimizedCompilationJob(uintptr_t stack_limit,
OptimizedCompilationInfo* compilation_info,
OptimizedCompilationJob(OptimizedCompilationInfo* compilation_info,
const char* compiler_name,
State initial_state = State::kReadyToPrepare)
: CompilationJob(stack_limit, initial_state),
: CompilationJob(initial_state),
compilation_info_(compilation_info),
compiler_name_(compiler_name) {}
......
......@@ -893,9 +893,7 @@ PipelineCompilationJob::PipelineCompilationJob(
// Note that the OptimizedCompilationInfo is not initialized at the time
// we pass it to the CompilationJob constructor, but it is not
// dereferenced there.
: OptimizedCompilationJob(
function->GetIsolate()->stack_guard()->real_climit(),
&compilation_info_, "TurboFan"),
: OptimizedCompilationJob(&compilation_info_, "TurboFan"),
zone_(function->GetIsolate()->allocator(), ZONE_NAME),
zone_stats_(function->GetIsolate()->allocator()),
compilation_info_(&zone_, function->GetIsolate(), shared_info, function),
......@@ -1057,8 +1055,7 @@ class WasmHeapStubCompilationJob final : public OptimizedCompilationJob {
// Note that the OptimizedCompilationInfo is not initialized at the time
// we pass it to the CompilationJob constructor, but it is not
// dereferenced there.
: OptimizedCompilationJob(isolate->stack_guard()->real_climit(), &info_,
"TurboFan"),
: OptimizedCompilationJob(&info_, "TurboFan"),
debug_name_(std::move(debug_name)),
info_(CStrVector(debug_name_.get()), graph->zone(), kind),
call_descriptor_(call_descriptor),
......
......@@ -27,8 +27,7 @@ namespace {
class BlockingCompilationJob : public OptimizedCompilationJob {
public:
BlockingCompilationJob(Isolate* isolate, Handle<JSFunction> function)
: OptimizedCompilationJob(isolate->stack_guard()->real_climit(), &info_,
"BlockingCompilationJob",
: OptimizedCompilationJob(&info_, "BlockingCompilationJob",
State::kReadyToExecute),
shared_(function->shared(), isolate),
zone_(isolate->allocator(), ZONE_NAME),
......
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