Rename memory.h to v8memory.h
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 22 Mar 2011 11:50:39 +0000 (11:50 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 22 Mar 2011 11:50:39 +0000 (11:50 +0000)
This is to avoid name collision with system include file named memory.h causing problems on some platforms.
Review URL: http://codereview.chromium.org/6716020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

15 files changed:
src/arm/frames-arm.h
src/frames-inl.h
src/ia32/frames-ia32.h
src/liveedit.cc
src/memory.h [deleted file]
src/objects-inl.h
src/spaces-inl.h
src/v8memory.h [new file with mode: 0644]
src/x64/assembler-x64-inl.h
src/x64/frames-x64.h
tools/gyp/v8.gyp
tools/v8.xcodeproj/project.pbxproj
tools/visual_studio/v8_base.vcproj
tools/visual_studio/v8_base_arm.vcproj
tools/visual_studio/v8_base_x64.vcproj

index 152172300bd83efec5a5390b8b2dbe9300d58771..4aa8d6aa9ac1340237b7317a0d94c837c7c947cb 100644 (file)
@@ -28,8 +28,6 @@
 #ifndef V8_ARM_FRAMES_ARM_H_
 #define V8_ARM_FRAMES_ARM_H_
 
-#include "memory.h"
-
 namespace v8 {
 namespace internal {
 
index f708f857ece943d7db637a2f282e7073ed6f5892..e6eaec0e0ce518591370193e2e5edcf35ee3176b 100644 (file)
@@ -29,8 +29,8 @@
 #define V8_FRAMES_INL_H_
 
 #include "frames.h"
-
 #include "isolate.h"
+#include "v8memory.h"
 
 #if V8_TARGET_ARCH_IA32
 #include "ia32/frames-ia32.h"
index 69f9a007212f27df0e953322d0fab4b9d29c50cf..80846949a0d67960c07394fcfc6c8cb2b493806c 100644 (file)
@@ -28,8 +28,6 @@
 #ifndef V8_IA32_FRAMES_IA32_H_
 #define V8_IA32_FRAMES_IA32_H_
 
-#include "memory.h"
-
 namespace v8 {
 namespace internal {
 
index 4d44bf861cef1b0a1fc0a9e345082e2e197455c7..555e082a33bfdc1f36974c10745a3a346a841a9e 100644 (file)
 #include "debug.h"
 #include "deoptimizer.h"
 #include "global-handles.h"
-#include "memory.h"
 #include "parser.h"
 #include "scopeinfo.h"
 #include "scopes.h"
+#include "v8memory.h"
 
 namespace v8 {
 namespace internal {
diff --git a/src/memory.h b/src/memory.h
deleted file mode 100644 (file)
index 901e78d..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-//       notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-//       copyright notice, this list of conditions and the following
-//       disclaimer in the documentation and/or other materials provided
-//       with the distribution.
-//     * Neither the name of Google Inc. nor the names of its
-//       contributors may be used to endorse or promote products derived
-//       from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef V8_MEMORY_H_
-#define V8_MEMORY_H_
-
-namespace v8 {
-namespace internal {
-
-// Memory provides an interface to 'raw' memory. It encapsulates the casts
-// that typically are needed when incompatible pointer types are used.
-
-class Memory {
- public:
-  static uint8_t& uint8_at(Address addr) {
-    return *reinterpret_cast<uint8_t*>(addr);
-  }
-
-  static uint16_t& uint16_at(Address addr)  {
-    return *reinterpret_cast<uint16_t*>(addr);
-  }
-
-  static uint32_t& uint32_at(Address addr)  {
-    return *reinterpret_cast<uint32_t*>(addr);
-  }
-
-  static int32_t& int32_at(Address addr)  {
-    return *reinterpret_cast<int32_t*>(addr);
-  }
-
-  static uint64_t& uint64_at(Address addr)  {
-    return *reinterpret_cast<uint64_t*>(addr);
-  }
-
-  static int& int_at(Address addr)  {
-    return *reinterpret_cast<int*>(addr);
-  }
-
-  static double& double_at(Address addr)  {
-    return *reinterpret_cast<double*>(addr);
-  }
-
-  static Address& Address_at(Address addr)  {
-    return *reinterpret_cast<Address*>(addr);
-  }
-
-  static Object*& Object_at(Address addr)  {
-    return *reinterpret_cast<Object**>(addr);
-  }
-
-  static Handle<Object>& Object_Handle_at(Address addr)  {
-    return *reinterpret_cast<Handle<Object>*>(addr);
-  }
-};
-
-} }  // namespace v8::internal
-
-#endif  // V8_MEMORY_H_
index e39474dc8f4b7a47f9858b0d60f4831ded617536..ca065902c3c84bcd7a666f68ca445646f5ac857d 100644 (file)
 #include "contexts.h"
 #include "conversions-inl.h"
 #include "heap.h"
-#include "memory.h"
 #include "isolate.h"
 #include "property.h"
 #include "spaces.h"
+#include "v8memory.h"
 
 namespace v8 {
 namespace internal {
index 4afd80eee1b17f5029ab6f21ed8e7a9d3cee1e00..070f97057710e669fcf9ca2e96f21b3702a87423 100644 (file)
@@ -29,8 +29,8 @@
 #define V8_SPACES_INL_H_
 
 #include "isolate.h"
-#include "memory.h"
 #include "spaces.h"
+#include "v8memory.h"
 
 namespace v8 {
 namespace internal {
diff --git a/src/v8memory.h b/src/v8memory.h
new file mode 100644 (file)
index 0000000..901e78d
--- /dev/null
@@ -0,0 +1,82 @@
+// Copyright 2006-2008 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+//       copyright notice, this list of conditions and the following
+//       disclaimer in the documentation and/or other materials provided
+//       with the distribution.
+//     * Neither the name of Google Inc. nor the names of its
+//       contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#ifndef V8_MEMORY_H_
+#define V8_MEMORY_H_
+
+namespace v8 {
+namespace internal {
+
+// Memory provides an interface to 'raw' memory. It encapsulates the casts
+// that typically are needed when incompatible pointer types are used.
+
+class Memory {
+ public:
+  static uint8_t& uint8_at(Address addr) {
+    return *reinterpret_cast<uint8_t*>(addr);
+  }
+
+  static uint16_t& uint16_at(Address addr)  {
+    return *reinterpret_cast<uint16_t*>(addr);
+  }
+
+  static uint32_t& uint32_at(Address addr)  {
+    return *reinterpret_cast<uint32_t*>(addr);
+  }
+
+  static int32_t& int32_at(Address addr)  {
+    return *reinterpret_cast<int32_t*>(addr);
+  }
+
+  static uint64_t& uint64_at(Address addr)  {
+    return *reinterpret_cast<uint64_t*>(addr);
+  }
+
+  static int& int_at(Address addr)  {
+    return *reinterpret_cast<int*>(addr);
+  }
+
+  static double& double_at(Address addr)  {
+    return *reinterpret_cast<double*>(addr);
+  }
+
+  static Address& Address_at(Address addr)  {
+    return *reinterpret_cast<Address*>(addr);
+  }
+
+  static Object*& Object_at(Address addr)  {
+    return *reinterpret_cast<Object**>(addr);
+  }
+
+  static Handle<Object>& Object_Handle_at(Address addr)  {
+    return *reinterpret_cast<Handle<Object>*>(addr);
+  }
+};
+
+} }  // namespace v8::internal
+
+#endif  // V8_MEMORY_H_
index af9f7cf029ea8bc265d2f021bba06e3a6020317e..439236a9b684979efb4f5e1cc4d43fcb8b169b42 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "cpu.h"
 #include "debug.h"
-#include "memory.h"
+#include "v8memory.h"
 
 namespace v8 {
 namespace internal {
index 6a605d8b06d8bce0d7c9ba759f7e7e98fb410ad1..81be8191962eaa9ab617fccd0effac3163d8cb58 100644 (file)
@@ -28,8 +28,6 @@
 #ifndef V8_X64_FRAMES_X64_H_
 #define V8_X64_FRAMES_X64_H_
 
-#include "memory.h"
-
 namespace v8 {
 namespace internal {
 
index cf40e4f24f981bceec888052b9cd5a43f3f21da6..e82b098682784fd53a887e6a237d569a409299ce 100644 (file)
             '../../src/macro-assembler.h',
             '../../src/mark-compact.cc',
             '../../src/mark-compact.h',
-            '../../src/memory.h',
             '../../src/messages.cc',
             '../../src/messages.h',
             '../../src/natives.h',
             '../../src/v8.h',
             '../../src/v8checks.h',
             '../../src/v8globals.h',
+            '../../src/v8memory.h',
             '../../src/v8threads.cc',
             '../../src/v8threads.h',
             '../../src/v8utils.h',
index 3204dbf60be8fb6f67d770af4a1d3e5d56595c8d..f7eafbd1ee329b21dc3620a046042f0405a84f27 100644 (file)
                897FF1580E719B8F00D62E90 /* macro-assembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "macro-assembler.h"; sourceTree = "<group>"; };
                897FF1590E719B8F00D62E90 /* mark-compact.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "mark-compact.cc"; sourceTree = "<group>"; };
                897FF15A0E719B8F00D62E90 /* mark-compact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "mark-compact.h"; sourceTree = "<group>"; };
-               897FF15B0E719B8F00D62E90 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = "<group>"; };
+               897FF15B0E719B8F00D62E90 /* v8memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = v8memory.h; sourceTree = "<group>"; };
                897FF15C0E719B8F00D62E90 /* messages.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = messages.cc; sourceTree = "<group>"; };
                897FF15D0E719B8F00D62E90 /* messages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = messages.h; sourceTree = "<group>"; };
                897FF15E0E719B8F00D62E90 /* mksnapshot.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mksnapshot.cc; sourceTree = "<group>"; };
                                897FF1580E719B8F00D62E90 /* macro-assembler.h */,
                                897FF1590E719B8F00D62E90 /* mark-compact.cc */,
                                897FF15A0E719B8F00D62E90 /* mark-compact.h */,
-                               897FF15B0E719B8F00D62E90 /* memory.h */,
+                               897FF15B0E719B8F00D62E90 /* v8memory.h */,
                                897FF15C0E719B8F00D62E90 /* messages.cc */,
                                897FF15D0E719B8F00D62E90 /* messages.h */,
                                897FF15E0E719B8F00D62E90 /* mksnapshot.cc */,
index 5f76069d3d15544b59daf57c9d27b077295364e0..01566167606565e7fde8b5bff5cb1c1efbb7c7a2 100644 (file)
         >
       </File>
       <File
-        RelativePath="..\..\src\memory.h"
+        RelativePath="..\..\src\v8memory.h"
         >
       </File>
       <File
index feb7e6c62283f9c67d44a3ca9935c0878ff7ab94..6ae962c6d1c52066ed8456463521a961aa875ea8 100644 (file)
         >
       </File>
       <File
-        RelativePath="..\..\src\memory.h"
+        RelativePath="..\..\src\v8memory.h"
         >
       </File>
       <File
index 14ed77e04ef398df4e84718b39fe40e7cf8907b9..dc2167bffceb16d9b05ed3a84846682bfa249813 100644 (file)
         >
       </File>
       <File
-        RelativePath="..\..\src\memory.h"
+        RelativePath="..\..\src\v8memory.h"
         >
       </File>
       <File