Chromium Code Reviews| 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); |