Index: src/property.h |
=================================================================== |
--- src/property.h (revision 9808) |
+++ src/property.h (working copy) |
@@ -164,11 +164,21 @@ |
class LookupResult BASE_EMBEDDED { |
public: |
- LookupResult() |
- : lookup_type_(NOT_FOUND), |
+ explicit LookupResult(Isolate* isolate) |
+ : isolate_(isolate), |
+ next_(isolate->top_lookup_result()), |
+ lookup_type_(NOT_FOUND), |
+ holder_(NULL), |
cacheable_(true), |
- details_(NONE, NORMAL) {} |
+ details_(NONE, NORMAL) { |
+ isolate->SetTopLookupResult(this); |
+ } |
+ ~LookupResult() { |
+ ASSERT(isolate_->top_lookup_result() == this); |
+ isolate_->SetTopLookupResult(next_); |
+ } |
+ |
void DescriptorResult(JSObject* holder, PropertyDetails details, int number) { |
lookup_type_ = DESCRIPTOR_TYPE; |
holder_ = holder; |
@@ -215,6 +225,7 @@ |
void NotFound() { |
lookup_type_ = NOT_FOUND; |
+ holder_ = NULL; |
} |
JSObject* holder() { |
@@ -346,7 +357,12 @@ |
return holder()->GetNormalizedProperty(this); |
} |
+ void Iterate(ObjectVisitor* visitor); |
+ |
private: |
+ Isolate* isolate_; |
+ LookupResult* next_; |
+ |
// Where did we find the result; |
enum { |
NOT_FOUND, |