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

Unified Diff: src/property.h

Issue 8404030: Version 3.7.1 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 2 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/profile-generator.cc ('k') | src/property.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/profile-generator.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698