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

Unified Diff: src/objects.h

Issue 2405213002: V8 support for cached accessors. (Closed)
Patch Set: Centralized lookup in LookupIterator::TryLookupCacheProperty. Also rebase. Created 4 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 0f77fdf2225b88ede69682728803575a4402f78f..d014cf6a1859880c1ec568b8ec194e59c3adb706 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -11432,6 +11432,8 @@ class FunctionTemplateInfo: public TemplateInfo {
DECL_BOOLEAN_ACCESSORS(do_not_cache)
DECL_BOOLEAN_ACCESSORS(accept_any_receiver)
+ DECL_ACCESSORS(cache_property, Object)
+
DECLARE_CAST(FunctionTemplateInfo)
// Dispatched behavior.
@@ -11458,7 +11460,8 @@ class FunctionTemplateInfo: public TemplateInfo {
kAccessCheckInfoOffset + kPointerSize;
static const int kFlagOffset = kSharedFunctionInfoOffset + kPointerSize;
static const int kLengthOffset = kFlagOffset + kPointerSize;
- static const int kSize = kLengthOffset + kPointerSize;
+ static const int kCachePropertyOffset = kLengthOffset + kPointerSize;
+ static const int kSize = kCachePropertyOffset + kPointerSize;
static Handle<SharedFunctionInfo> GetOrCreateSharedFunctionInfo(
Isolate* isolate, Handle<FunctionTemplateInfo> info);
@@ -11469,6 +11472,10 @@ class FunctionTemplateInfo: public TemplateInfo {
bool IsTemplateFor(Map* map);
inline bool instantiated();
+ // Helper function for cached accessors.
+ static MaybeHandle<Name> TryGetCachePropertyName(Isolate* isolate,
+ Handle<Object> getter);
+
private:
// Bit position in the flag, from least significant bit position.
static const int kHiddenPrototypeBit = 0;

Powered by Google App Engine
This is Rietveld 408576698