bool CEntryStub::IsPregenerated() {
- return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
+ return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
result_size_ == 1;
}
bool CEntryStub::IsPregenerated() {
- return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
+ return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
result_size_ == 1;
}
};
-// 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();
if (bm->compiler()->ignore_case()) {
unibrow::uchar chars[unibrow::Ecma262UnCanonicalize::kMaxWidth];
int length = GetCaseIndependentLetters(
- ISOLATE,
+ Isolate::Current(),
character,
bm->max_char() == String::kMaxOneByteCharCode,
chars);
Insert(&sample);
Join();
- LOG(ISOLATE, UncheckedStringEvent("profiler", "end"));
+ LOG(isolate_, UncheckedStringEvent("profiler", "end"));
}
bool CEntryStub::IsPregenerated() {
- return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
+ return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
result_size_ == 1;
}
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;
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;
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;
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;
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;
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;
prot);
if (mbase == NULL) {
- LOG(ISOLATE, StringEvent("OS::Allocate", "VirtualAlloc failed"));
+ LOG(Isolate::Current(), StringEvent("OS::Allocate", "VirtualAlloc failed"));
return NULL;
}
#endif // DEBUG
if (FLAG_log_gc) {
- Isolate* isolate = ISOLATE;
+ Isolate* isolate = heap()->isolate();
DoReportStatistics(isolate, allocated_histogram_, "allocated");
DoReportStatistics(isolate, promoted_histogram_, "promoted");
}
void StringStream::Log() {
- LOG(ISOLATE, StringEvent("StackDump", buffer_));
+ LOG(Isolate::Current(), StringEvent("StackDump", buffer_));
}
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());
static Handle<Object> Test() {
- CALL_HEAP_FUNCTION(ISOLATE, AllocateAfterFailures(), Object);
+ CALL_HEAP_FUNCTION(Isolate::Current(), AllocateAfterFailures(), Object);
}
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.
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());
}