Revision: 4776
Author: lukezarko
Date: Wed Jun  2 00:51:31 2010
Log: - Continue removing [static] qualifier from methods on StubCache

Review URL: http://codereview.chromium.org/2473001
http://code.google.com/p/v8/source/detail?r=4776

Modified:
 /branches/experimental/isolates/src/debug.cc
 /branches/experimental/isolates/src/heap-inl.h
 /branches/experimental/isolates/src/ic.cc
 /branches/experimental/isolates/src/isolate.cc
 /branches/experimental/isolates/src/mark-compact.cc
 /branches/experimental/isolates/src/stub-cache.cc
 /branches/experimental/isolates/src/stub-cache.h
 /branches/experimental/isolates/test/cctest/test-debug.cc

=======================================
--- /branches/experimental/isolates/src/debug.cc        Wed Jun  2 00:42:37 2010
+++ /branches/experimental/isolates/src/debug.cc        Wed Jun  2 00:51:31 2010
@@ -63,12 +63,16 @@


 static Handle<Code> ComputeCallDebugBreak(int argc) {
-  CALL_HEAP_FUNCTION(StubCache::ComputeCallDebugBreak(argc), Code);
+  CALL_HEAP_FUNCTION(
+      Isolate::Current()->stub_cache()->ComputeCallDebugBreak(argc),
+      Code);
 }


 static Handle<Code> ComputeCallDebugPrepareStepIn(int argc) {
-  CALL_HEAP_FUNCTION(StubCache::ComputeCallDebugPrepareStepIn(argc), Code);
+  CALL_HEAP_FUNCTION(
+ Isolate::Current()->stub_cache()->ComputeCallDebugPrepareStepIn(argc),
+      Code);
 }


=======================================
--- /branches/experimental/isolates/src/heap-inl.h      Tue Jun  1 03:51:42 2010
+++ /branches/experimental/isolates/src/heap-inl.h      Wed Jun  2 00:51:31 2010
@@ -416,6 +416,8 @@
   } while (false)


+// TODO(isolates): cache isolate: either accept as a parameter or
+//                 set to some known symbol (__CUR_ISOLATE__?)
 #define CALL_HEAP_FUNCTION(FUNCTION_CALL, TYPE)                \
   CALL_AND_RETRY(FUNCTION_CALL,                                \
                  return Handle<TYPE>(TYPE::cast(__object__)),  \
=======================================
--- /branches/experimental/isolates/src/ic.cc   Tue Jun  1 09:15:26 2010
+++ /branches/experimental/isolates/src/ic.cc   Wed Jun  2 00:51:31 2010
@@ -236,7 +236,9 @@
   InLoopFlag in_loop = target->ic_in_loop();
   if (state == UNINITIALIZED) return;
   Code* code =
-      StubCache::FindCallInitialize(target->arguments_count(), in_loop);
+      Isolate::Current()->stub_cache()->FindCallInitialize(
+          target->arguments_count(),
+          in_loop);
   SetTargetAtAddress(address, code);
 }

@@ -499,7 +501,8 @@
     // setting the monomorphic state.
     code = StubCache::ComputeCallPreMonomorphic(argc, in_loop);
   } else if (state == MONOMORPHIC) {
-    code = StubCache::ComputeCallMegamorphic(argc, in_loop);
+    code = Isolate::Current()->stub_cache()->ComputeCallMegamorphic(argc,
+ in_loop);
   } else {
     // Compute monomorphic stub.
     switch (lookup->type()) {
=======================================
--- /branches/experimental/isolates/src/isolate.cc      Wed Jun  2 00:42:37 2010
+++ /branches/experimental/isolates/src/isolate.cc      Wed Jun  2 00:51:31 2010
@@ -137,7 +137,7 @@
   // If we are deserializing, read the state into the now-empty heap.
   if (des != NULL) {
     des->Deserialize();
-    StubCache::Clear();
+    stub_cache_->Clear();
   }

   // Deserializing may put strange things in the root array's copy of the
=======================================
--- /branches/experimental/isolates/src/mark-compact.cc Tue Jun 1 03:51:42 2010 +++ /branches/experimental/isolates/src/mark-compact.cc Wed Jun 2 00:51:31 2010
@@ -146,7 +146,7 @@
   // force lazy re-initialization of it. This must be done after the
   // GC, because it relies on the new address of certain old space
   // objects (empty string, illegal builtin).
-  StubCache::Clear();
+  Isolate::Current()->stub_cache()->Clear();

   ExternalStringTable::CleanUp();

=======================================
--- /branches/experimental/isolates/src/stub-cache.cc Tue Jun 1 06:31:05 2010 +++ /branches/experimental/isolates/src/stub-cache.cc Wed Jun 2 00:51:31 2010
@@ -763,7 +763,9 @@

 // Support function for computing call IC miss stubs.
 Handle<Code> ComputeCallMiss(int argc) {
-  CALL_HEAP_FUNCTION(StubCache::ComputeCallMiss(argc), Code);
+  CALL_HEAP_FUNCTION(
+      Isolate::Current()->stub_cache()->ComputeCallMiss(argc),
+      Code);
 }


=======================================
--- /branches/experimental/isolates/src/stub-cache.h Tue Jun 1 09:15:26 2010 +++ /branches/experimental/isolates/src/stub-cache.h Wed Jun 2 00:51:31 2010
@@ -176,16 +176,16 @@

   static Object* ComputeCallInitialize(int argc, InLoopFlag in_loop);
   static Object* ComputeCallPreMonomorphic(int argc, InLoopFlag in_loop);
-  static Object* ComputeCallNormal(int argc, InLoopFlag in_loop);
-  static Object* ComputeCallMegamorphic(int argc, InLoopFlag in_loop);
-  static Object* ComputeCallMiss(int argc);
+  Object* ComputeCallNormal(int argc, InLoopFlag in_loop);
+  Object* ComputeCallMegamorphic(int argc, InLoopFlag in_loop);
+  Object* ComputeCallMiss(int argc);

   // Finds the Code object stored in the Heap::non_monomorphic_cache().
-  static Code* FindCallInitialize(int argc, InLoopFlag in_loop);
+  Code* FindCallInitialize(int argc, InLoopFlag in_loop);

 #ifdef ENABLE_DEBUGGER_SUPPORT
-  static Object* ComputeCallDebugBreak(int argc);
-  static Object* ComputeCallDebugPrepareStepIn(int argc);
+  Object* ComputeCallDebugBreak(int argc);
+  Object* ComputeCallDebugPrepareStepIn(int argc);
 #endif

   static Object* ComputeLazyCompile(int argc);
@@ -195,7 +195,7 @@
   static Code* Set(String* name, Map* map, Code* code);

   // Clear the lookup table (@ mark compact collection).
-  static void Clear();
+  void Clear();

   // Functions for generating stubs at startup.
   static void GenerateMiss(MacroAssembler* masm);
=======================================
--- /branches/experimental/isolates/test/cctest/test-debug.cc Thu May 20 10:15:46 2010 +++ /branches/experimental/isolates/test/cctest/test-debug.cc Wed Jun 2 00:51:31 2010
@@ -395,8 +395,10 @@


 static Handle<Code> ComputeCallDebugBreak(int argc) {
-  CALL_HEAP_FUNCTION(v8::internal::StubCache::ComputeCallDebugBreak(argc),
-                     Code);
+  CALL_HEAP_FUNCTION(
+ v8::internal::Isolate::Current()->stub_cache()->ComputeCallDebugBreak(
+          argc),
+      Code);
 }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to