// Reserve space for statics needing saving and restoring.
-int Relocatable::ArchiveSpacePerThread(Isolate* isolate) {
- return sizeof(isolate->relocatable_top());
+int Relocatable::ArchiveSpacePerThread() {
+ return sizeof(Relocatable*); // NOLINT
}
char* Relocatable::ArchiveState(Isolate* isolate, char* to) {
*reinterpret_cast<Relocatable**>(to) = isolate->relocatable_top();
isolate->set_relocatable_top(NULL);
- return to + ArchiveSpacePerThread(isolate);
+ return to + ArchiveSpacePerThread();
}
// Restore statics that are thread local.
char* Relocatable::RestoreState(Isolate* isolate, char* from) {
isolate->set_relocatable_top(*reinterpret_cast<Relocatable**>(from));
- return from + ArchiveSpacePerThread(isolate);
+ return from + ArchiveSpacePerThread();
}
-char* Relocatable::Iterate(
- Isolate* isolate, ObjectVisitor* v, char* thread_storage) {
+char* Relocatable::Iterate(ObjectVisitor* v, char* thread_storage) {
Relocatable* top = *reinterpret_cast<Relocatable**>(thread_storage);
Iterate(v, top);
- return thread_storage + ArchiveSpacePerThread(isolate);
+ return thread_storage + ArchiveSpacePerThread();
}
virtual void PostGarbageCollection() { }
static void PostGarbageCollectionProcessing(Isolate* isolate);
- static int ArchiveSpacePerThread(Isolate* isolate);
+ static int ArchiveSpacePerThread();
static char* ArchiveState(Isolate* isolate, char* to);
static char* RestoreState(Isolate* isolate, char* from);
static void Iterate(Isolate* isolate, ObjectVisitor* v);
static void Iterate(ObjectVisitor* v, Relocatable* top);
- static char* Iterate(Isolate* isolate, ObjectVisitor* v, char* t);
+ static char* Iterate(ObjectVisitor* v, char* t);
private:
Isolate* isolate_;
}
-static int ArchiveSpacePerThread(Isolate* isolate) {
+static int ArchiveSpacePerThread() {
return HandleScopeImplementer::ArchiveSpacePerThread() +
Isolate::ArchiveSpacePerThread() +
#ifdef ENABLE_DEBUGGER_SUPPORT
StackGuard::ArchiveSpacePerThread() +
RegExpStack::ArchiveSpacePerThread() +
Bootstrapper::ArchiveSpacePerThread() +
- Relocatable::ArchiveSpacePerThread(isolate);
+ Relocatable::ArchiveSpacePerThread();
}
void ThreadState::AllocateSpace() {
- data_ = NewArray<char>(ArchiveSpacePerThread(Isolate::Current()));
+ data_ = NewArray<char>(ArchiveSpacePerThread());
}
char* data = state->data();
data = HandleScopeImplementer::Iterate(v, data);
data = isolate_->Iterate(v, data);
- data = Relocatable::Iterate(Isolate::Current(), v, data);
+ data = Relocatable::Iterate(v, data);
}
}