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

Unified Diff: src/objects.h

Issue 2405213002: V8 support for cached accessors. (Closed)
Patch Set: Toon's feedback. Created 4 years, 1 month 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/lookup.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 08e1e568a2fb3f1c689e44c57fb05b6e566f115c..dbfe2e93ad6c3a728687cef1dba9b845cd6864af 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -11470,6 +11470,8 @@ class FunctionTemplateInfo: public TemplateInfo {
DECL_BOOLEAN_ACCESSORS(do_not_cache)
DECL_BOOLEAN_ACCESSORS(accept_any_receiver)
+ DECL_ACCESSORS(cached_property_name, Object)
+
DECLARE_CAST(FunctionTemplateInfo)
// Dispatched behavior.
@@ -11496,7 +11498,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 kCachedPropertyNameOffset = kLengthOffset + kPointerSize;
+ static const int kSize = kCachedPropertyNameOffset + kPointerSize;
static Handle<SharedFunctionInfo> GetOrCreateSharedFunctionInfo(
Isolate* isolate, Handle<FunctionTemplateInfo> info);
@@ -11507,6 +11510,10 @@ class FunctionTemplateInfo: public TemplateInfo {
bool IsTemplateFor(Map* map);
inline bool instantiated();
+ // Helper function for cached accessors.
+ static MaybeHandle<Name> TryGetCachedPropertyName(Isolate* isolate,
+ Handle<Object> getter);
+
private:
// Bit position in the flag, from least significant bit position.
static const int kHiddenPrototypeBit = 0;
« no previous file with comments | « src/lookup.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698