Commit a1cc076e authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[isolate] Remove unused save_context field

R=mstarzinger@chromium.org

Bug: v8:8562
Change-Id: I05abb6d9e594c797cad558befac4376b376bc514
Reviewed-on: https://chromium-review.googlesource.com/c/1448274Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59267}
parent 7539549e
...@@ -4532,19 +4532,16 @@ bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { ...@@ -4532,19 +4532,16 @@ bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const {
return GetCurrentStackPosition() - gap < stack_guard->real_climit(); return GetCurrentStackPosition() - gap < stack_guard->real_climit();
} }
SaveContext::SaveContext(Isolate* isolate) SaveContext::SaveContext(Isolate* isolate) : isolate_(isolate) {
: isolate_(isolate), prev_(isolate->save_context()) {
if (!isolate->context().is_null()) { if (!isolate->context().is_null()) {
context_ = Handle<Context>(isolate->context(), isolate); context_ = Handle<Context>(isolate->context(), isolate);
} }
isolate->set_save_context(this);
c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top()); c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top());
} }
SaveContext::~SaveContext() { SaveContext::~SaveContext() {
isolate_->set_context(context_.is_null() ? Context() : *context_); isolate_->set_context(context_.is_null() ? Context() : *context_);
isolate_->set_save_context(prev_);
} }
bool SaveContext::IsBelowFrame(StandardFrame* frame) { bool SaveContext::IsBelowFrame(StandardFrame* frame) {
......
...@@ -402,7 +402,6 @@ class ThreadLocalTop { ...@@ -402,7 +402,6 @@ class ThreadLocalTop {
// unify them later. // unify them later.
Object scheduled_exception_; Object scheduled_exception_;
bool external_caught_exception_ = false; bool external_caught_exception_ = false;
SaveContext* save_context_ = nullptr;
// Stack. // Stack.
// The frame pointer of the top c entry frame. // The frame pointer of the top c entry frame.
...@@ -672,8 +671,6 @@ class Isolate final : private HiddenFactory { ...@@ -672,8 +671,6 @@ class Isolate final : private HiddenFactory {
inline void set_context(Context context); inline void set_context(Context context);
Context* context_address() { return &thread_local_top_.context_; } Context* context_address() { return &thread_local_top_.context_; }
THREAD_LOCAL_TOP_ACCESSOR(SaveContext*, save_context)
// Access to current thread id. // Access to current thread id.
THREAD_LOCAL_TOP_ACCESSOR(ThreadId, thread_id) THREAD_LOCAL_TOP_ACCESSOR(ThreadId, thread_id)
...@@ -1947,16 +1944,12 @@ class PromiseOnStack { ...@@ -1947,16 +1944,12 @@ class PromiseOnStack {
}; };
// If the GCC version is 4.1.x or 4.2.x an additional field is added to the
// class as a work around for a bug in the generated code found with these
// versions of GCC. See V8 issue 122 for details.
class V8_EXPORT_PRIVATE SaveContext { class V8_EXPORT_PRIVATE SaveContext {
public: public:
explicit SaveContext(Isolate* isolate); explicit SaveContext(Isolate* isolate);
~SaveContext(); ~SaveContext();
Handle<Context> context() { return context_; } Handle<Context> context() { return context_; }
SaveContext* prev() { return prev_; }
// Returns true if this save context is below a given JavaScript frame. // Returns true if this save context is below a given JavaScript frame.
bool IsBelowFrame(StandardFrame* frame); bool IsBelowFrame(StandardFrame* frame);
...@@ -1964,7 +1957,6 @@ class V8_EXPORT_PRIVATE SaveContext { ...@@ -1964,7 +1957,6 @@ class V8_EXPORT_PRIVATE SaveContext {
private: private:
Isolate* const isolate_; Isolate* const isolate_;
Handle<Context> context_; Handle<Context> context_;
SaveContext* const prev_;
Address c_entry_fp_; Address c_entry_fp_;
}; };
......
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