Revision: 3975
Author: [email protected]
Date: Fri Feb 26 06:02:29 2010
Log: Make another small virtual frame function inlined.

Move a constructor to the platform-independent -inl.h file.

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

Modified:
 /branches/bleeding_edge/src/arm/virtual-frame-arm.cc
 /branches/bleeding_edge/src/arm/virtual-frame-arm.h
 /branches/bleeding_edge/src/ia32/virtual-frame-ia32.cc
 /branches/bleeding_edge/src/ia32/virtual-frame-ia32.h
 /branches/bleeding_edge/src/virtual-frame-inl.h
 /branches/bleeding_edge/src/x64/virtual-frame-x64.cc
 /branches/bleeding_edge/src/x64/virtual-frame-x64.h

=======================================
--- /branches/bleeding_edge/src/arm/virtual-frame-arm.cc Fri Feb 26 01:32:48 2010 +++ /branches/bleeding_edge/src/arm/virtual-frame-arm.cc Fri Feb 26 06:02:29 2010
@@ -35,27 +35,8 @@
 namespace v8 {
 namespace internal {

-// -------------------------------------------------------------------------
-// VirtualFrame implementation.
-
 #define __ ACCESS_MASM(masm())

-
-// On entry to a function, the virtual frame already contains the
-// receiver and the parameters.  All initial frame elements are in
-// memory.
-VirtualFrame::VirtualFrame()
-    : elements_(parameter_count() + local_count() + kPreallocatedElements),
-      stack_pointer_(parameter_count()) {  // 0-based index of TOS.
-  for (int i = 0; i <= stack_pointer_; i++) {
-    elements_.Add(FrameElement::MemoryElement(NumberInfo::kUnknown));
-  }
-  for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) {
-    register_locations_[i] = kIllegalIndex;
-  }
-}
-
-
 void VirtualFrame::SyncElementBelowStackPointer(int index) {
   UNREACHABLE();
 }
=======================================
--- /branches/bleeding_edge/src/arm/virtual-frame-arm.h Fri Feb 26 01:32:48 2010 +++ /branches/bleeding_edge/src/arm/virtual-frame-arm.h Fri Feb 26 06:02:29 2010
@@ -59,7 +59,7 @@
   static const int kIllegalIndex = -1;

   // Construct an initial virtual frame on entry to a JS function.
-  VirtualFrame();
+  inline VirtualFrame();

   // Construct a virtual frame as a clone of an existing one.
   explicit inline VirtualFrame(VirtualFrame* original);
=======================================
--- /branches/bleeding_edge/src/ia32/virtual-frame-ia32.cc Fri Feb 26 01:32:48 2010 +++ /branches/bleeding_edge/src/ia32/virtual-frame-ia32.cc Fri Feb 26 06:02:29 2010
@@ -37,23 +37,6 @@

 #define __ ACCESS_MASM(masm())

-// -------------------------------------------------------------------------
-// VirtualFrame implementation.
-
-// On entry to a function, the virtual frame already contains the receiver,
-// the parameters, and a return address.  All frame elements are in memory.
-VirtualFrame::VirtualFrame()
-    : elements_(parameter_count() + local_count() + kPreallocatedElements),
-      stack_pointer_(parameter_count() + 1) {  // 0-based index of TOS.
-  for (int i = 0; i <= stack_pointer_; i++) {
-    elements_.Add(FrameElement::MemoryElement(NumberInfo::kUnknown));
-  }
-  for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) {
-    register_locations_[i] = kIllegalIndex;
-  }
-}
-
-
 void VirtualFrame::SyncElementBelowStackPointer(int index) {
   // Emit code to write elements below the stack pointer to their
   // (already allocated) stack address.
=======================================
--- /branches/bleeding_edge/src/ia32/virtual-frame-ia32.h Fri Feb 26 01:32:48 2010 +++ /branches/bleeding_edge/src/ia32/virtual-frame-ia32.h Fri Feb 26 06:02:29 2010
@@ -73,7 +73,7 @@
   static const int kIllegalIndex = -1;

   // Construct an initial virtual frame on entry to a JS function.
-  VirtualFrame();
+  inline VirtualFrame();

   // Construct a virtual frame as a clone of an existing one.
   explicit inline VirtualFrame(VirtualFrame* original);
=======================================
--- /branches/bleeding_edge/src/virtual-frame-inl.h     Fri Feb 26 01:32:48 2010
+++ /branches/bleeding_edge/src/virtual-frame-inl.h     Fri Feb 26 06:02:29 2010
@@ -33,6 +33,21 @@
 namespace v8 {
 namespace internal {

+
+// On entry to a function, the virtual frame already contains the receiver,
+// the parameters, and a return address.  All frame elements are in memory.
+VirtualFrame::VirtualFrame()
+    : elements_(parameter_count() + local_count() + kPreallocatedElements),
+      stack_pointer_(parameter_count() + 1) {  // 0-based index of TOS.
+  for (int i = 0; i <= stack_pointer_; i++) {
+    elements_.Add(FrameElement::MemoryElement(NumberInfo::kUnknown));
+  }
+  for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) {
+    register_locations_[i] = kIllegalIndex;
+  }
+}
+
+
 // When cloned, a frame is a deep copy of the original.
 VirtualFrame::VirtualFrame(VirtualFrame* original)
     : elements_(original->element_count()),
=======================================
--- /branches/bleeding_edge/src/x64/virtual-frame-x64.cc Fri Feb 26 01:32:48 2010 +++ /branches/bleeding_edge/src/x64/virtual-frame-x64.cc Fri Feb 26 06:02:29 2010
@@ -37,23 +37,6 @@

 #define __ ACCESS_MASM(masm())

-// -------------------------------------------------------------------------
-// VirtualFrame implementation.
-
-// On entry to a function, the virtual frame already contains the receiver,
-// the parameters, and a return address.  All frame elements are in memory.
-VirtualFrame::VirtualFrame()
-    : elements_(parameter_count() + local_count() + kPreallocatedElements),
-      stack_pointer_(parameter_count() + 1) {  // 0-based index of TOS.
-  for (int i = 0; i <= stack_pointer_; i++) {
-    elements_.Add(FrameElement::MemoryElement(NumberInfo::kUnknown));
-  }
-  for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) {
-    register_locations_[i] = kIllegalIndex;
-  }
-}
-
-
 void VirtualFrame::Enter() {
   // Registers live on entry to a JS frame:
   //   rsp: stack pointer, points to return address from this function.
=======================================
--- /branches/bleeding_edge/src/x64/virtual-frame-x64.h Fri Feb 26 01:32:48 2010 +++ /branches/bleeding_edge/src/x64/virtual-frame-x64.h Fri Feb 26 06:02:29 2010
@@ -73,7 +73,7 @@
   static const int kIllegalIndex = -1;

   // Construct an initial virtual frame on entry to a JS function.
-  VirtualFrame();
+  inline VirtualFrame();

   // Construct a virtual frame as a clone of an existing one.
   explicit inline VirtualFrame(VirtualFrame* original);

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

Reply via email to