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

Side by Side Diff: src/objects.h

Issue 12422019: ES6 symbols: prevent reflection and proxy APIs from leaking symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Deal with Object.observe as well Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/object-observe.js ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 void LookupRealNamedPropertyInPrototypes(Name* name, LookupResult* result); 2050 void LookupRealNamedPropertyInPrototypes(Name* name, LookupResult* result);
2051 MUST_USE_RESULT MaybeObject* SetElementWithCallbackSetterInPrototypes( 2051 MUST_USE_RESULT MaybeObject* SetElementWithCallbackSetterInPrototypes(
2052 uint32_t index, Object* value, bool* found, StrictModeFlag strict_mode); 2052 uint32_t index, Object* value, bool* found, StrictModeFlag strict_mode);
2053 void LookupCallbackProperty(Name* name, LookupResult* result); 2053 void LookupCallbackProperty(Name* name, LookupResult* result);
2054 2054
2055 // Returns the number of properties on this object filtering out properties 2055 // Returns the number of properties on this object filtering out properties
2056 // with the specified attributes (ignoring interceptors). 2056 // with the specified attributes (ignoring interceptors).
2057 int NumberOfLocalProperties(PropertyAttributes filter = NONE); 2057 int NumberOfLocalProperties(PropertyAttributes filter = NONE);
2058 // Fill in details for properties into storage starting at the specified 2058 // Fill in details for properties into storage starting at the specified
2059 // index. 2059 // index.
2060 void GetLocalPropertyNames(FixedArray* storage, int index); 2060 void GetLocalPropertyNames(
2061 FixedArray* storage, int index, PropertyAttributes filter = NONE);
2061 2062
2062 // Returns the number of properties on this object filtering out properties 2063 // Returns the number of properties on this object filtering out properties
2063 // with the specified attributes (ignoring interceptors). 2064 // with the specified attributes (ignoring interceptors).
2064 int NumberOfLocalElements(PropertyAttributes filter); 2065 int NumberOfLocalElements(PropertyAttributes filter);
2065 // Returns the number of enumerable elements (ignoring interceptors). 2066 // Returns the number of enumerable elements (ignoring interceptors).
2066 int NumberOfEnumElements(); 2067 int NumberOfEnumElements();
2067 // Returns the number of elements on this object filtering out elements 2068 // Returns the number of elements on this object filtering out elements
2068 // with the specified attributes (ignoring interceptors). 2069 // with the specified attributes (ignoring interceptors).
2069 int GetLocalElementKeys(FixedArray* storage, PropertyAttributes filter); 2070 int GetLocalElementKeys(FixedArray* storage, PropertyAttributes filter);
2070 // Count and fill in the enumerable elements into storage. 2071 // Count and fill in the enumerable elements into storage.
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3248 3249
3249 // Returns the number of enumerable elements in the dictionary. 3250 // Returns the number of enumerable elements in the dictionary.
3250 int NumberOfEnumElements(); 3251 int NumberOfEnumElements();
3251 3252
3252 enum SortMode { UNSORTED, SORTED }; 3253 enum SortMode { UNSORTED, SORTED };
3253 // Copies keys to preallocated fixed array. 3254 // Copies keys to preallocated fixed array.
3254 void CopyKeysTo(FixedArray* storage, 3255 void CopyKeysTo(FixedArray* storage,
3255 PropertyAttributes filter, 3256 PropertyAttributes filter,
3256 SortMode sort_mode); 3257 SortMode sort_mode);
3257 // Fill in details for properties into storage. 3258 // Fill in details for properties into storage.
3258 void CopyKeysTo(FixedArray* storage, int index, SortMode sort_mode); 3259 void CopyKeysTo(FixedArray* storage,
3260 int index,
3261 PropertyAttributes filter,
3262 SortMode sort_mode);
3259 3263
3260 // Accessors for next enumeration index. 3264 // Accessors for next enumeration index.
3261 void SetNextEnumerationIndex(int index) { 3265 void SetNextEnumerationIndex(int index) {
3262 ASSERT(index != 0); 3266 ASSERT(index != 0);
3263 this->set(kNextEnumerationIndexIndex, Smi::FromInt(index)); 3267 this->set(kNextEnumerationIndexIndex, Smi::FromInt(index));
3264 } 3268 }
3265 3269
3266 int NextEnumerationIndex() { 3270 int NextEnumerationIndex() {
3267 return Smi::cast(FixedArray::get(kNextEnumerationIndexIndex))->value(); 3271 return Smi::cast(FixedArray::get(kNextEnumerationIndexIndex))->value();
3268 } 3272 }
(...skipping 5995 matching lines...) Expand 10 before | Expand all | Expand 10 after
9264 } else { 9268 } else {
9265 value &= ~(1 << bit_position); 9269 value &= ~(1 << bit_position);
9266 } 9270 }
9267 return value; 9271 return value;
9268 } 9272 }
9269 }; 9273 };
9270 9274
9271 } } // namespace v8::internal 9275 } } // namespace v8::internal
9272 9276
9273 #endif // V8_OBJECTS_H_ 9277 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/object-observe.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698