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

Unified Diff: src/objects.h

Issue 10915260: Reduce space usage of simple transitions and descriptors holders. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 3 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 | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 5fa275ef25beec5ac6b406c66d1d26240cbd49df..86a70b043b5ae5db379894ca68f4fd7e4a8080eb 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -177,6 +177,13 @@ enum TransitionFlag {
OMIT_TRANSITION
};
Michael Starzinger 2012/09/19 09:34:55 Insert second empty newline here.
Toon Verwaest 2012/09/19 09:53:23 Done.
+// Indicates whether the transition is simple: it either adds a property to a
Michael Starzinger 2012/09/19 09:34:55 The comment is slightly confusing to me. Can we re
Toon Verwaest 2012/09/19 09:53:23 Done.
+// descriptor array; or it modifies the last added property.
+enum SimpleTransitionFlag {
+ SIMPLE_TRANSITION,
+ FULL_TRANSITION
+};
+
Michael Starzinger 2012/09/19 09:34:55 Insert second empty newline here.
Toon Verwaest 2012/09/19 09:53:23 Done.
// Indicates whether we are only interested in the descriptors of a particular
// map, or in all descriptors in the descriptor array.
enum DescriptorFlag {
@@ -4836,7 +4843,10 @@ class Map: public HeapObject {
Map* transitioned_map);
inline void SetTransition(int transition_index, Map* target);
inline Map* GetTransition(int transition_index);
- MUST_USE_RESULT inline MaybeObject* AddTransition(String* key, Map* target);
+ MUST_USE_RESULT inline MaybeObject* AddTransition(
+ String* key,
+ Map* target,
+ SimpleTransitionFlag flag = SIMPLE_TRANSITION);
Michael Starzinger 2012/09/19 09:34:55 The Google C++ Style Guide doesn't like default ar
Toon Verwaest 2012/09/19 09:53:23 Done.
DECL_ACCESSORS(transitions, TransitionArray)
inline void ClearTransitions(Heap* heap,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
@@ -4987,7 +4997,8 @@ class Map: public HeapObject {
MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors(
DescriptorArray* descriptors,
String* name,
- TransitionFlag flag);
+ TransitionFlag flag,
+ int descriptor_index = 0);
Michael Starzinger 2012/09/19 09:34:55 Likewise. Although there are more call-sites here.
Toon Verwaest 2012/09/19 09:53:23 Done.
MUST_USE_RESULT MaybeObject* ShareDescriptor(Descriptor* descriptor);
MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor,
TransitionFlag flag);
« no previous file with comments | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698