Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1260)

Unified Diff: src/zone.h

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/cctest/SConscript » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone.h
diff --git a/src/zone.h b/src/zone.h
index 9b38a6f5b92c0c3108dae0e054e355509e2e88f1..922cf8429e0ab50781a6ea587d9c3a75b4bbc477 100644
--- a/src/zone.h
+++ b/src/zone.h
@@ -177,19 +177,17 @@ class ZoneList: public List<T, ZoneListAllocationPolicy> {
// always zero. The capacity must be non-negative.
explicit ZoneList(int capacity)
: List<T, ZoneListAllocationPolicy>(capacity) { }
+
+ // Construct a new ZoneList by copying the elements of the given ZoneList.
+ explicit ZoneList(const ZoneList<T>& other)
+ : List<T, ZoneListAllocationPolicy>(other.length()) {
+ AddAll(other);
+ }
};
-// A zone splay tree. The config type parameter encapsulates the
-// different configurations of a concrete splay tree (see splay-tree.h).
-// The tree itself and all its elements are allocated in the Zone.
-template <typename Config>
-class ZoneSplayTree: public SplayTree<Config, ZoneListAllocationPolicy> {
- public:
- ZoneSplayTree()
- : SplayTree<Config, ZoneListAllocationPolicy>() {}
- ~ZoneSplayTree();
-};
+// Introduce a convenience type for zone lists of map handles.
+typedef ZoneList<Handle<Map> > ZoneMapList;
// ZoneScopes keep track of the current parsing and compilation
@@ -197,6 +195,7 @@ class ZoneSplayTree: public SplayTree<Config, ZoneListAllocationPolicy> {
// outer-most scope.
class ZoneScope BASE_EMBEDDED {
public:
+ // TODO(isolates): pass isolate pointer here.
inline explicit ZoneScope(ZoneScopeMode mode);
virtual ~ZoneScope();
@@ -217,6 +216,18 @@ class ZoneScope BASE_EMBEDDED {
};
+// A zone splay tree. The config type parameter encapsulates the
+// different configurations of a concrete splay tree (see splay-tree.h).
+// The tree itself and all its elements are allocated in the Zone.
+template <typename Config>
+class ZoneSplayTree: public SplayTree<Config, ZoneListAllocationPolicy> {
+ public:
+ ZoneSplayTree()
+ : SplayTree<Config, ZoneListAllocationPolicy>() {}
+ ~ZoneSplayTree();
+};
+
+
} } // namespace v8::internal
#endif // V8_ZONE_H_
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/cctest/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698