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

Unified Diff: src/elements.cc

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/elements.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index abb046725c8a0923e2ccd45aaf9826ebb9eb0453..0d4e2cb76fcbb956ba81f45ca6f5e5e0549b6551 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -766,10 +766,9 @@ class ElementsAccessorBase : public ElementsAccessor {
}
virtual MaybeHandle<FixedArray> AddElementsToFixedArray(
- Handle<Object> receiver,
- Handle<JSObject> holder,
- Handle<FixedArray> to,
- Handle<FixedArrayBase> from) FINAL OVERRIDE {
+ Handle<Object> receiver, Handle<JSObject> holder, Handle<FixedArray> to,
+ Handle<FixedArrayBase> from,
+ FixedArray::KeyFilter filter) FINAL OVERRIDE {
int len0 = to->length();
#ifdef ENABLE_SLOW_DCHECKS
if (FLAG_enable_slow_asserts) {
@@ -799,6 +798,9 @@ class ElementsAccessorBase : public ElementsAccessor {
FixedArray);
DCHECK(!value->IsTheHole());
+ if (filter == FixedArray::NON_SYMBOL_KEYS && value->IsSymbol()) {
+ continue;
+ }
if (!HasKey(to, value)) {
extra++;
}
@@ -832,6 +834,9 @@ class ElementsAccessorBase : public ElementsAccessor {
isolate, value,
ElementsAccessorSubclass::GetImpl(receiver, holder, key, from),
FixedArray);
+ if (filter == FixedArray::NON_SYMBOL_KEYS && value->IsSymbol()) {
+ continue;
+ }
if (!value->IsTheHole() && !HasKey(to, value)) {
result->set(len0 + index, *value);
index++;
« no previous file with comments | « src/elements.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698