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

Side by Side 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 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 unified diff | Download patch
« no previous file with comments | « src/ic/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 2438 matching lines...) Expand 10 before | Expand all | Expand 10 after
2449 inline void FillWithHoles(int from, int to); 2449 inline void FillWithHoles(int from, int to);
2450 2450
2451 // Shrink length and insert filler objects. 2451 // Shrink length and insert filler objects.
2452 void Shrink(int length); 2452 void Shrink(int length);
2453 2453
2454 // Copy operation. 2454 // Copy operation.
2455 static Handle<FixedArray> CopySize(Handle<FixedArray> array, 2455 static Handle<FixedArray> CopySize(Handle<FixedArray> array,
2456 int new_length, 2456 int new_length,
2457 PretenureFlag pretenure = NOT_TENURED); 2457 PretenureFlag pretenure = NOT_TENURED);
2458 2458
2459 enum KeyFilter { ALL_KEYS, NON_SYMBOL_KEYS };
2460
2459 // Add the elements of a JSArray to this FixedArray. 2461 // Add the elements of a JSArray to this FixedArray.
2460 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromArrayLike( 2462 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromArrayLike(
2461 Handle<FixedArray> content, 2463 Handle<FixedArray> content, Handle<JSObject> array,
2462 Handle<JSObject> array); 2464 KeyFilter filter = ALL_KEYS);
2463 2465
2464 // Computes the union of keys and return the result. 2466 // Computes the union of keys and return the result.
2465 // Used for implementing "for (n in object) { }" 2467 // Used for implementing "for (n in object) { }"
2466 MUST_USE_RESULT static MaybeHandle<FixedArray> UnionOfKeys( 2468 MUST_USE_RESULT static MaybeHandle<FixedArray> UnionOfKeys(
2467 Handle<FixedArray> first, 2469 Handle<FixedArray> first,
2468 Handle<FixedArray> second); 2470 Handle<FixedArray> second);
2469 2471
2470 // Copy a sub array from the receiver to dest. 2472 // Copy a sub array from the receiver to dest.
2471 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); 2473 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len);
2472 2474
(...skipping 8076 matching lines...) Expand 10 before | Expand all | Expand 10 after
10549 10551
10550 10552
10551 class InterceptorInfo: public Struct { 10553 class InterceptorInfo: public Struct {
10552 public: 10554 public:
10553 DECL_ACCESSORS(getter, Object) 10555 DECL_ACCESSORS(getter, Object)
10554 DECL_ACCESSORS(setter, Object) 10556 DECL_ACCESSORS(setter, Object)
10555 DECL_ACCESSORS(query, Object) 10557 DECL_ACCESSORS(query, Object)
10556 DECL_ACCESSORS(deleter, Object) 10558 DECL_ACCESSORS(deleter, Object)
10557 DECL_ACCESSORS(enumerator, Object) 10559 DECL_ACCESSORS(enumerator, Object)
10558 DECL_ACCESSORS(data, Object) 10560 DECL_ACCESSORS(data, Object)
10561 DECL_BOOLEAN_ACCESSORS(can_intercept_symbols)
10562
10563 inline int flags() const;
10564 inline void set_flags(int flags);
10559 10565
10560 DECLARE_CAST(InterceptorInfo) 10566 DECLARE_CAST(InterceptorInfo)
10561 10567
10562 // Dispatched behavior. 10568 // Dispatched behavior.
10563 DECLARE_PRINTER(InterceptorInfo) 10569 DECLARE_PRINTER(InterceptorInfo)
10564 DECLARE_VERIFIER(InterceptorInfo) 10570 DECLARE_VERIFIER(InterceptorInfo)
10565 10571
10566 static const int kGetterOffset = HeapObject::kHeaderSize; 10572 static const int kGetterOffset = HeapObject::kHeaderSize;
10567 static const int kSetterOffset = kGetterOffset + kPointerSize; 10573 static const int kSetterOffset = kGetterOffset + kPointerSize;
10568 static const int kQueryOffset = kSetterOffset + kPointerSize; 10574 static const int kQueryOffset = kSetterOffset + kPointerSize;
10569 static const int kDeleterOffset = kQueryOffset + kPointerSize; 10575 static const int kDeleterOffset = kQueryOffset + kPointerSize;
10570 static const int kEnumeratorOffset = kDeleterOffset + kPointerSize; 10576 static const int kEnumeratorOffset = kDeleterOffset + kPointerSize;
10571 static const int kDataOffset = kEnumeratorOffset + kPointerSize; 10577 static const int kDataOffset = kEnumeratorOffset + kPointerSize;
10572 static const int kSize = kDataOffset + kPointerSize; 10578 static const int kFlagsOffset = kDataOffset + kPointerSize;
10579 static const int kSize = kFlagsOffset + kPointerSize;
10580
10581 static const int kCanInterceptSymbolsBit = 0;
10573 10582
10574 private: 10583 private:
10575 DISALLOW_IMPLICIT_CONSTRUCTORS(InterceptorInfo); 10584 DISALLOW_IMPLICIT_CONSTRUCTORS(InterceptorInfo);
10576 }; 10585 };
10577 10586
10578 10587
10579 class CallHandlerInfo: public Struct { 10588 class CallHandlerInfo: public Struct {
10580 public: 10589 public:
10581 DECL_ACCESSORS(callback, Object) 10590 DECL_ACCESSORS(callback, Object)
10582 DECL_ACCESSORS(data, Object) 10591 DECL_ACCESSORS(data, Object)
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
10977 } else { 10986 } else {
10978 value &= ~(1 << bit_position); 10987 value &= ~(1 << bit_position);
10979 } 10988 }
10980 return value; 10989 return value;
10981 } 10990 }
10982 }; 10991 };
10983 10992
10984 } } // namespace v8::internal 10993 } } // namespace v8::internal
10985 10994
10986 #endif // V8_OBJECTS_H_ 10995 #endif // V8_OBJECTS_H_
OLDNEW
« 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