| Index: src/heap.cc
|
| ===================================================================
|
| --- src/heap.cc (revision 1540)
|
| +++ src/heap.cc (working copy)
|
| @@ -56,6 +56,8 @@
|
| SYMBOL_LIST(SYMBOL_ALLOCATION)
|
| #undef SYMBOL_ALLOCATION
|
|
|
| +String* Heap::hidden_symbol_;
|
| +
|
| NewSpace Heap::new_space_;
|
| OldSpace* Heap::old_pointer_space_ = NULL;
|
| OldSpace* Heap::old_data_space_ = NULL;
|
| @@ -1213,6 +1215,16 @@
|
| (name##_) = String::cast(obj);
|
| SYMBOL_LIST(SYMBOL_INITIALIZE)
|
| #undef SYMBOL_INITIALIZE
|
| +
|
| + // Allocate the hidden symbol which is used to identify the hidden properties
|
| + // in JSObjects. The hash code has a special value so that it will not match
|
| + // the empty string when searching for the property. It cannot be part of the
|
| + // SYMBOL_LIST because it needs to be allocated manually with the special
|
| + // hash code in place. The hash code for the hidden_symbol is zero to ensure
|
| + // that it will always be at the first entry in property descriptors.
|
| + obj = AllocateSymbol(CStrVector(""), 0, String::kHashComputedMask);
|
| + if (obj->IsFailure()) return false;
|
| + hidden_symbol_ = String::cast(obj);
|
|
|
| // Allocate the proxy for __proto__.
|
| obj = AllocateProxy((Address) &Accessors::ObjectPrototype);
|
| @@ -2641,6 +2653,7 @@
|
| v->VisitPointer(bit_cast<Object**, String**>(&name##_));
|
| SYMBOL_LIST(SYMBOL_ITERATE)
|
| #undef SYMBOL_ITERATE
|
| + v->VisitPointer(bit_cast<Object**, String**>(&hidden_symbol_));
|
| SYNCHRONIZE_TAG("symbol");
|
|
|
| Bootstrapper::Iterate(v);
|
|
|