Revision: 16632
Author:   [email protected]
Date:     Wed Sep 11 07:28:47 2013 UTC
Log:      remove ISOLATE

[email protected]
BUG=

Review URL: https://codereview.chromium.org/23480067
http://code.google.com/p/v8/source/detail?r=16632

Modified:
 /branches/bleeding_edge/src/arm/code-stubs-arm.cc
 /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
 /branches/bleeding_edge/src/isolate.h
 /branches/bleeding_edge/src/jsregexp.cc
 /branches/bleeding_edge/src/log.cc
 /branches/bleeding_edge/src/mips/code-stubs-mips.cc
 /branches/bleeding_edge/src/platform-cygwin.cc
 /branches/bleeding_edge/src/platform-freebsd.cc
 /branches/bleeding_edge/src/platform-linux.cc
 /branches/bleeding_edge/src/platform-openbsd.cc
 /branches/bleeding_edge/src/platform-solaris.cc
 /branches/bleeding_edge/src/platform-win32.cc
 /branches/bleeding_edge/src/spaces.cc
 /branches/bleeding_edge/src/string-stream.cc
 /branches/bleeding_edge/src/x64/regexp-macro-assembler-x64.cc
 /branches/bleeding_edge/test/cctest/test-alloc.cc
 /branches/bleeding_edge/test/cctest/test-api.cc

=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Wed Sep 11 06:56:47 2013 UTC +++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Wed Sep 11 07:28:47 2013 UTC
@@ -2695,7 +2695,7 @@


 bool CEntryStub::IsPregenerated() {
-  return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
+  return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
           result_size_ == 1;
 }

=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Mon Sep 2 09:30:54 2013 UTC +++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Wed Sep 11 07:28:47 2013 UTC
@@ -4431,7 +4431,7 @@


 bool CEntryStub::IsPregenerated() {
-  return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
+  return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
           result_size_ == 1;
 }

=======================================
--- /branches/bleeding_edge/src/isolate.h       Wed Sep 11 07:14:41 2013 UTC
+++ /branches/bleeding_edge/src/isolate.h       Wed Sep 11 07:28:47 2013 UTC
@@ -1518,11 +1518,6 @@
 };


-// 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();
=======================================
--- /branches/bleeding_edge/src/jsregexp.cc     Wed Sep  4 10:34:42 2013 UTC
+++ /branches/bleeding_edge/src/jsregexp.cc     Wed Sep 11 07:28:47 2013 UTC
@@ -5834,7 +5834,7 @@
         if (bm->compiler()->ignore_case()) {
           unibrow::uchar chars[unibrow::Ecma262UnCanonicalize::kMaxWidth];
           int length = GetCaseIndependentLetters(
-              ISOLATE,
+              Isolate::Current(),
               character,
               bm->max_char() == String::kMaxOneByteCharCode,
               chars);
=======================================
--- /branches/bleeding_edge/src/log.cc  Wed Sep  4 10:34:42 2013 UTC
+++ /branches/bleeding_edge/src/log.cc  Wed Sep 11 07:28:47 2013 UTC
@@ -686,7 +686,7 @@
   Insert(&sample);
   Join();

-  LOG(ISOLATE, UncheckedStringEvent("profiler", "end"));
+  LOG(isolate_, UncheckedStringEvent("profiler", "end"));
 }


=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Sep 3 11:39:19 2013 UTC +++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Wed Sep 11 07:28:47 2013 UTC
@@ -2724,7 +2724,7 @@


 bool CEntryStub::IsPregenerated() {
-  return (!save_doubles_ || ISOLATE->fp_stubs_generated()) &&
+  return (!save_doubles_ || Isolate::Current()->fp_stubs_generated()) &&
           result_size_ == 1;
 }

=======================================
--- /branches/bleeding_edge/src/platform-cygwin.cc Tue Sep 10 11:13:55 2013 UTC +++ /branches/bleeding_edge/src/platform-cygwin.cc Wed Sep 11 07:28:47 2013 UTC
@@ -80,7 +80,7 @@
   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 @@
   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;
=======================================
--- /branches/bleeding_edge/src/platform-freebsd.cc Tue Sep 10 11:13:55 2013 UTC +++ /branches/bleeding_edge/src/platform-freebsd.cc Wed Sep 11 07:28:47 2013 UTC
@@ -89,7 +89,7 @@
   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;
=======================================
--- /branches/bleeding_edge/src/platform-linux.cc Tue Sep 10 11:13:55 2013 UTC +++ /branches/bleeding_edge/src/platform-linux.cc Wed Sep 11 07:28:47 2013 UTC
@@ -231,7 +231,7 @@
   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;
=======================================
--- /branches/bleeding_edge/src/platform-openbsd.cc Tue Sep 10 11:13:55 2013 UTC +++ /branches/bleeding_edge/src/platform-openbsd.cc Wed Sep 11 07:28:47 2013 UTC
@@ -160,7 +160,7 @@
   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;
=======================================
--- /branches/bleeding_edge/src/platform-solaris.cc Tue Sep 10 11:13:55 2013 UTC +++ /branches/bleeding_edge/src/platform-solaris.cc Wed Sep 11 07:28:47 2013 UTC
@@ -104,7 +104,7 @@
   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;
=======================================
--- /branches/bleeding_edge/src/platform-win32.cc Tue Sep 10 11:13:55 2013 UTC +++ /branches/bleeding_edge/src/platform-win32.cc Wed Sep 11 07:28:47 2013 UTC
@@ -829,7 +829,7 @@
                                         prot);

   if (mbase == NULL) {
-    LOG(ISOLATE, StringEvent("OS::Allocate", "VirtualAlloc failed"));
+ LOG(Isolate::Current(), StringEvent("OS::Allocate", "VirtualAlloc failed"));
     return NULL;
   }

=======================================
--- /branches/bleeding_edge/src/spaces.cc       Thu Sep  5 08:17:57 2013 UTC
+++ /branches/bleeding_edge/src/spaces.cc       Wed Sep 11 07:28:47 2013 UTC
@@ -1950,7 +1950,7 @@
 #endif  // DEBUG

   if (FLAG_log_gc) {
-    Isolate* isolate = ISOLATE;
+    Isolate* isolate = heap()->isolate();
     DoReportStatistics(isolate, allocated_histogram_, "allocated");
     DoReportStatistics(isolate, promoted_histogram_, "promoted");
   }
=======================================
--- /branches/bleeding_edge/src/string-stream.cc Wed Sep 11 07:14:41 2013 UTC +++ /branches/bleeding_edge/src/string-stream.cc Wed Sep 11 07:28:47 2013 UTC
@@ -270,7 +270,7 @@


 void StringStream::Log() {
-  LOG(ISOLATE, StringEvent("StackDump", buffer_));
+  LOG(Isolate::Current(), StringEvent("StackDump", buffer_));
 }


=======================================
--- /branches/bleeding_edge/src/x64/regexp-macro-assembler-x64.cc Wed Aug 28 08:35:04 2013 UTC +++ /branches/bleeding_edge/src/x64/regexp-macro-assembler-x64.cc Wed Sep 11 07:28:47 2013 UTC
@@ -998,7 +998,7 @@

   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());
=======================================
--- /branches/bleeding_edge/test/cctest/test-alloc.cc Thu Sep 5 08:17:57 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-alloc.cc Wed Sep 11 07:28:47 2013 UTC
@@ -90,7 +90,7 @@


 static Handle<Object> Test() {
-  CALL_HEAP_FUNCTION(ISOLATE, AllocateAfterFailures(), Object);
+  CALL_HEAP_FUNCTION(Isolate::Current(), AllocateAfterFailures(), Object);
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Tue Sep 10 09:24:53 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-api.cc Wed Sep 11 07:28:47 2013 UTC
@@ -13401,7 +13401,7 @@
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(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());
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to