Commit f7b0853d authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[handles] Remove singleton eternal handles

This is currently dead code as intl no longer uses this to reset the
cache. Intl will use a different caching strategy in the future.

Bug: v8:5751
Change-Id: I343fa8afe5069cb7228106b3cd355d004aed199f
Reviewed-on: https://chromium-review.googlesource.com/c/1319766Reviewed-by: 's avatarFrank Tang <ftang@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57311}
parent 541e3df5
......@@ -6844,17 +6844,6 @@ void v8::Date::DateTimeConfigurationChangeNotification(Isolate* isolate) {
LOG_API(i_isolate, Date, DateTimeConfigurationChangeNotification);
ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate);
i_isolate->date_cache()->ResetDateCache();
if (!i_isolate->eternal_handles()->Exists(
i::EternalHandles::DATE_CACHE_VERSION)) {
return;
}
i::Handle<i::FixedArray> date_cache_version =
i::Handle<i::FixedArray>::cast(i_isolate->eternal_handles()->GetSingleton(
i::EternalHandles::DATE_CACHE_VERSION));
DCHECK_EQ(1, date_cache_version->length());
CHECK(date_cache_version->get(0)->IsSmi());
date_cache_version->set(
0, i::Smi::FromInt(i::Smi::ToInt(date_cache_version->get(0)) + 1));
}
......
......@@ -1079,12 +1079,7 @@ void GlobalHandles::Print() {
void GlobalHandles::TearDown() {}
EternalHandles::EternalHandles() : size_(0) {
for (unsigned i = 0; i < arraysize(singleton_handles_); i++) {
singleton_handles_[i] = kInvalidIndex;
}
}
EternalHandles::EternalHandles() : size_(0) {}
EternalHandles::~EternalHandles() {
for (Address* block : blocks_) delete[] block;
......
......@@ -257,12 +257,6 @@ class GlobalHandles::PendingPhantomCallback {
class EternalHandles {
public:
enum SingletonHandle {
DATE_CACHE_VERSION,
NUMBER_OF_SINGLETON_HANDLES
};
EternalHandles();
~EternalHandles();
......@@ -276,25 +270,6 @@ class EternalHandles {
return Handle<Object>(GetLocation(index));
}
// Grab the handle for an existing SingletonHandle.
inline Handle<Object> GetSingleton(SingletonHandle singleton) {
DCHECK(Exists(singleton));
return Get(singleton_handles_[singleton]);
}
// Checks whether a SingletonHandle has been assigned.
inline bool Exists(SingletonHandle singleton) {
return singleton_handles_[singleton] != kInvalidIndex;
}
// Assign a SingletonHandle to an empty slot and returns the handle.
Handle<Object> CreateSingleton(Isolate* isolate,
Object* object,
SingletonHandle singleton) {
Create(isolate, object, &singleton_handles_[singleton]);
return Get(singleton_handles_[singleton]);
}
// Iterates over all handles.
void IterateAllRoots(RootVisitor* visitor);
// Iterates over all handles which might be in new space.
......@@ -318,7 +293,6 @@ class EternalHandles {
int size_;
std::vector<Address*> blocks_;
std::vector<int> new_space_indices_;
int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES];
DISALLOW_COPY_AND_ASSIGN(EternalHandles);
};
......
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