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

Unified Diff: src/objects.h

Issue 760883002: Add interceptor support for symbols (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 6 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/ic/ic.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 746f88d1c4c0c10083e63263a005f79ec4378b9d..a26d53e1138bf742be9d917ed3b3ac051c9a0c45 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2456,10 +2456,12 @@ class FixedArray: public FixedArrayBase {
int new_length,
PretenureFlag pretenure = NOT_TENURED);
+ enum KeyFilter { ALL_KEYS, NON_SYMBOL_KEYS };
+
// Add the elements of a JSArray to this FixedArray.
MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromArrayLike(
- Handle<FixedArray> content,
- Handle<JSObject> array);
+ Handle<FixedArray> content, Handle<JSObject> array,
+ KeyFilter filter = ALL_KEYS);
// Computes the union of keys and return the result.
// Used for implementing "for (n in object) { }"
@@ -10556,6 +10558,10 @@ class InterceptorInfo: public Struct {
DECL_ACCESSORS(deleter, Object)
DECL_ACCESSORS(enumerator, Object)
DECL_ACCESSORS(data, Object)
+ DECL_BOOLEAN_ACCESSORS(can_intercept_symbols)
+
+ inline int flags() const;
+ inline void set_flags(int flags);
DECLARE_CAST(InterceptorInfo)
@@ -10569,7 +10575,10 @@ class InterceptorInfo: public Struct {
static const int kDeleterOffset = kQueryOffset + kPointerSize;
static const int kEnumeratorOffset = kDeleterOffset + kPointerSize;
static const int kDataOffset = kEnumeratorOffset + kPointerSize;
- static const int kSize = kDataOffset + kPointerSize;
+ static const int kFlagsOffset = kDataOffset + kPointerSize;
+ static const int kSize = kFlagsOffset + kPointerSize;
+
+ static const int kCanInterceptSymbolsBit = 0;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(InterceptorInfo);
« no previous file with comments | « src/ic/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698