[heap] Move IdentityMap data structure out of heap.
authormstarzinger <mstarzinger@chromium.org>
Fri, 28 Aug 2015 13:00:59 +0000 (06:00 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 28 Aug 2015 13:01:08 +0000 (13:01 +0000)
This data structure uses the public heap API only and is not specific
to any heap internals. It should be usable throughout V8 and inclusion
of the header file should not be restricted.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/1320503004

Cr-Commit-Position: refs/heads/master@{#30443}

BUILD.gn
src/identity-map.cc [moved from src/heap/identity-map.cc with 99% similarity]
src/identity-map.h [moved from src/heap/identity-map.h with 96% similarity]
test/cctest/test-identity-map.cc
tools/gyp/v8.gyp

index 8ebca30..445c0c8 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -954,8 +954,6 @@ source_set("v8_base") {
     "src/heap/heap-inl.h",
     "src/heap/heap.cc",
     "src/heap/heap.h",
-    "src/heap/identity-map.cc",
-    "src/heap/identity-map.h",
     "src/heap/incremental-marking.cc",
     "src/heap/incremental-marking.h",
     "src/heap/mark-compact-inl.h",
@@ -1043,6 +1041,8 @@ source_set("v8_base") {
     "src/ic/ic-compiler.h",
     "src/ic/stub-cache.cc",
     "src/ic/stub-cache.h",
+    "src/identity-map.cc",
+    "src/identity-map.h",
     "src/interface-descriptors.cc",
     "src/interface-descriptors.h",
     "src/interpreter/bytecodes.cc",
similarity index 99%
rename from src/heap/identity-map.cc
rename to src/identity-map.cc
index f901ac4..1d23af9 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/heap/identity-map.h"
+#include "src/identity-map.h"
 
 #include "src/heap/heap.h"
 #include "src/zone-containers.h"
similarity index 96%
rename from src/heap/identity-map.h
rename to src/identity-map.h
index 672ca5a..2143e24 100644 (file)
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef V8_HEAP_IDENTITY_MAP_H_
-#define V8_HEAP_IDENTITY_MAP_H_
+#ifndef V8_IDENTITY_MAP_H_
+#define V8_IDENTITY_MAP_H_
 
 #include "src/handles.h"
 
@@ -95,4 +95,4 @@ class IdentityMap : public IdentityMapBase {
 }
 }  // namespace v8::internal
 
-#endif  // V8_HEAP_IDENTITY_MAP_H_
+#endif  // V8_IDENTITY_MAP_H_
index 787fda7..ee64c4d 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "src/v8.h"
 
-#include "src/heap/identity-map.h"
+#include "src/identity-map.h"
 #include "src/zone.h"
 
 #include "test/cctest/cctest.h"
index 343bba1..5d50ec8 100644 (file)
         '../../src/heap/heap-inl.h',
         '../../src/heap/heap.cc',
         '../../src/heap/heap.h',
-        '../../src/heap/identity-map.cc',
-        '../../src/heap/identity-map.h',
         '../../src/heap/incremental-marking-inl.h',
         '../../src/heap/incremental-marking.cc',
         '../../src/heap/incremental-marking.h',
         '../../src/ic/ic.h',
         '../../src/ic/ic-compiler.cc',
         '../../src/ic/ic-compiler.h',
+        '../../src/identity-map.cc',
+        '../../src/identity-map.h',
         '../../src/interface-descriptors.cc',
         '../../src/interface-descriptors.h',
         '../../src/interpreter/bytecodes.cc',