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

Unified Diff: src/objects.h

Issue 14425011: api: Object::CachedProperty Base URL: gh:v8/v8.git@master
Patch Set: globalize reference Created 7 years, 8 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/handles.cc ('k') | src/objects.cc » ('j') | no next file with comments »
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 a87ad63173c415587c72be73f9b538d6723aaa9a..b7faa9379f5e8506bc56a9772357078364493f7b 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -150,6 +150,9 @@
namespace v8 {
namespace internal {
+// Forward declarations
+class LookupCacheEntry;
+
enum CompareMapMode {
REQUIRE_EXACT_MAP,
ALLOW_ELEMENT_TRANSITION_MAPS
@@ -9527,6 +9530,32 @@ class BooleanBit : public AllStatic {
}
};
+
+class LookupCache {
+ public:
+ explicit LookupCache(Isolate* isolate);
+ ~LookupCache();
+
+ void Lookup(Handle<Object> obj,
+ Handle<Name> name,
+ LookupResult* result,
+ bool set_property = false);
+ MUST_USE_RESULT MaybeObject* GetProperty(Handle<Object> obj,
+ Handle<Name> name);
+ MUST_USE_RESULT MaybeObject* SetProperty(Handle<Object> obj,
+ Handle<Name> name,
+ Handle<Object> value);
+
+ private:
+ static const int kCacheEntryCount = 7;
+
+ Isolate* isolate_;
+ int count_;
+ LookupCacheEntry* entries_[kCacheEntryCount];
+ int hidden_count_;
+ LookupCacheEntry* hidden_entries_[kCacheEntryCount];
+};
+
} } // namespace v8::internal
#endif // V8_OBJECTS_H_
« no previous file with comments | « src/handles.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698