remove ISOLATE
R=svenpanne@chromium.org BUG= Review URL: https://codereview.chromium.org/23480067 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
cc2257b92a
commit
afabbe177d
@ -2695,7 +2695,7 @@ bool CEntryStub::NeedsImmovableCode() {
|
||||
|
||||
|
||||
bool CEntryStub::IsPregenerated() {
|
||||
return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
|
||||
return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
|
||||
result_size_ == 1;
|
||||
}
|
||||
|
||||
|
@ -4431,7 +4431,7 @@ bool CEntryStub::NeedsImmovableCode() {
|
||||
|
||||
|
||||
bool CEntryStub::IsPregenerated() {
|
||||
return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
|
||||
return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
|
||||
result_size_ == 1;
|
||||
}
|
||||
|
||||
|
@ -1518,11 +1518,6 @@ class PostponeInterruptsScope BASE_EMBEDDED {
|
||||
};
|
||||
|
||||
|
||||
// Temporary macros for accessing current isolate and its subobjects.
|
||||
// They provide better readability, especially when used a lot in the code.
|
||||
#define ISOLATE (v8::internal::Isolate::Current())
|
||||
|
||||
|
||||
// Tells whether the native context is marked with out of memory.
|
||||
inline bool Context::has_out_of_memory() {
|
||||
return native_context()->out_of_memory()->IsTrue();
|
||||
|
@ -5834,7 +5834,7 @@ void TextNode::FillInBMInfo(int initial_offset,
|
||||
if (bm->compiler()->ignore_case()) {
|
||||
unibrow::uchar chars[unibrow::Ecma262UnCanonicalize::kMaxWidth];
|
||||
int length = GetCaseIndependentLetters(
|
||||
ISOLATE,
|
||||
Isolate::Current(),
|
||||
character,
|
||||
bm->max_char() == String::kMaxOneByteCharCode,
|
||||
chars);
|
||||
|
@ -686,7 +686,7 @@ void Profiler::Disengage() {
|
||||
Insert(&sample);
|
||||
Join();
|
||||
|
||||
LOG(ISOLATE, UncheckedStringEvent("profiler", "end"));
|
||||
LOG(isolate_, UncheckedStringEvent("profiler", "end"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -2724,7 +2724,7 @@ bool CEntryStub::NeedsImmovableCode() {
|
||||
|
||||
|
||||
bool CEntryStub::IsPregenerated() {
|
||||
return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
|
||||
return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
|
||||
result_size_ == 1;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ void* OS::Allocate(const size_t requested,
|
||||
int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
|
||||
void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
if (mbase == MAP_FAILED) {
|
||||
LOG(ISOLATE, StringEvent("OS::Allocate", "mmap failed"));
|
||||
LOG(Isolate::Current(), StringEvent("OS::Allocate", "mmap failed"));
|
||||
return NULL;
|
||||
}
|
||||
*allocated = msize;
|
||||
@ -152,7 +152,7 @@ void OS::LogSharedLibraryAddresses() {
|
||||
const int kLibNameLen = FILENAME_MAX + 1;
|
||||
char* lib_name = reinterpret_cast<char*>(malloc(kLibNameLen));
|
||||
|
||||
i::Isolate* isolate = ISOLATE;
|
||||
i::Isolate* isolate = Isolate::Current();
|
||||
// This loop will terminate once the scanning hits an EOF.
|
||||
while (true) {
|
||||
uintptr_t start, end;
|
||||
|
@ -89,7 +89,7 @@ void* OS::Allocate(const size_t requested,
|
||||
void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
|
||||
if (mbase == MAP_FAILED) {
|
||||
LOG(ISOLATE, StringEvent("OS::Allocate", "mmap failed"));
|
||||
LOG(Isolate::Current(), StringEvent("OS::Allocate", "mmap failed"));
|
||||
return NULL;
|
||||
}
|
||||
*allocated = msize;
|
||||
|
@ -231,7 +231,7 @@ void OS::LogSharedLibraryAddresses() {
|
||||
const int kLibNameLen = FILENAME_MAX + 1;
|
||||
char* lib_name = reinterpret_cast<char*>(malloc(kLibNameLen));
|
||||
|
||||
i::Isolate* isolate = ISOLATE;
|
||||
i::Isolate* isolate = Isolate::Current();
|
||||
// This loop will terminate once the scanning hits an EOF.
|
||||
while (true) {
|
||||
uintptr_t start, end;
|
||||
|
@ -160,7 +160,7 @@ void OS::LogSharedLibraryAddresses() {
|
||||
const int kLibNameLen = FILENAME_MAX + 1;
|
||||
char* lib_name = reinterpret_cast<char*>(malloc(kLibNameLen));
|
||||
|
||||
i::Isolate* isolate = ISOLATE;
|
||||
i::Isolate* isolate = Isolate::Current();
|
||||
// This loop will terminate once the scanning hits an EOF.
|
||||
while (true) {
|
||||
uintptr_t start, end;
|
||||
|
@ -104,7 +104,7 @@ void* OS::Allocate(const size_t requested,
|
||||
void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
|
||||
|
||||
if (mbase == MAP_FAILED) {
|
||||
LOG(ISOLATE, StringEvent("OS::Allocate", "mmap failed"));
|
||||
LOG(Isolate::Current(), StringEvent("OS::Allocate", "mmap failed"));
|
||||
return NULL;
|
||||
}
|
||||
*allocated = msize;
|
||||
|
@ -829,7 +829,7 @@ void* OS::Allocate(const size_t requested,
|
||||
prot);
|
||||
|
||||
if (mbase == NULL) {
|
||||
LOG(ISOLATE, StringEvent("OS::Allocate", "VirtualAlloc failed"));
|
||||
LOG(Isolate::Current(), StringEvent("OS::Allocate", "VirtualAlloc failed"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1950,7 +1950,7 @@ void NewSpace::ReportStatistics() {
|
||||
#endif // DEBUG
|
||||
|
||||
if (FLAG_log_gc) {
|
||||
Isolate* isolate = ISOLATE;
|
||||
Isolate* isolate = heap()->isolate();
|
||||
DoReportStatistics(isolate, allocated_histogram_, "allocated");
|
||||
DoReportStatistics(isolate, promoted_histogram_, "promoted");
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ SmartArrayPointer<const char> StringStream::ToCString() const {
|
||||
|
||||
|
||||
void StringStream::Log() {
|
||||
LOG(ISOLATE, StringEvent("StackDump", buffer_));
|
||||
LOG(Isolate::Current(), StringEvent("StackDump", buffer_));
|
||||
}
|
||||
|
||||
|
||||
|
@ -998,7 +998,7 @@ Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) {
|
||||
|
||||
CodeDesc code_desc;
|
||||
masm_.GetCode(&code_desc);
|
||||
Isolate* isolate = ISOLATE;
|
||||
Isolate* isolate = this->isolate();
|
||||
Handle<Code> code = isolate->factory()->NewCode(
|
||||
code_desc, Code::ComputeFlags(Code::REGEXP),
|
||||
masm_.CodeObject());
|
||||
|
@ -90,7 +90,7 @@ static MaybeObject* AllocateAfterFailures() {
|
||||
|
||||
|
||||
static Handle<Object> Test() {
|
||||
CALL_HEAP_FUNCTION(ISOLATE, AllocateAfterFailures(), Object);
|
||||
CALL_HEAP_FUNCTION(Isolate::Current(), AllocateAfterFailures(), Object);
|
||||
}
|
||||
|
||||
|
||||
|
@ -13401,7 +13401,7 @@ TEST(SetJitCodeEventHandler) {
|
||||
v8::Utils::OpenHandle(*env->Global()->Get(v8_str("foo"))))->code());
|
||||
|
||||
// Clear the compilation cache to get more wastage.
|
||||
ISOLATE->compilation_cache()->Clear();
|
||||
reinterpret_cast<i::Isolate*>(isolate)->compilation_cache()->Clear();
|
||||
}
|
||||
|
||||
// Force code movement.
|
||||
@ -19735,19 +19735,20 @@ TEST(StaticGetters) {
|
||||
|
||||
TEST(IsolateEmbedderData) {
|
||||
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
||||
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
||||
CHECK_EQ(NULL, isolate->GetData());
|
||||
CHECK_EQ(NULL, ISOLATE->GetData());
|
||||
CHECK_EQ(NULL, i_isolate->GetData());
|
||||
static void* data1 = reinterpret_cast<void*>(0xacce55ed);
|
||||
isolate->SetData(data1);
|
||||
CHECK_EQ(data1, isolate->GetData());
|
||||
CHECK_EQ(data1, ISOLATE->GetData());
|
||||
CHECK_EQ(data1, i_isolate->GetData());
|
||||
static void* data2 = reinterpret_cast<void*>(0xdecea5ed);
|
||||
ISOLATE->SetData(data2);
|
||||
i_isolate->SetData(data2);
|
||||
CHECK_EQ(data2, isolate->GetData());
|
||||
CHECK_EQ(data2, ISOLATE->GetData());
|
||||
ISOLATE->TearDown();
|
||||
CHECK_EQ(data2, i_isolate->GetData());
|
||||
i_isolate->TearDown();
|
||||
CHECK_EQ(data2, isolate->GetData());
|
||||
CHECK_EQ(data2, ISOLATE->GetData());
|
||||
CHECK_EQ(data2, i_isolate->GetData());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user