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 291153005: Consistently say 'own' property (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add new files Created 6 years, 7 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/mirror-debugger.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 // 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 "allocation.h" 8 #include "allocation.h"
9 #include "assert-scope.h" 9 #include "assert-scope.h"
10 #include "builtins.h" 10 #include "builtins.h"
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); 1909 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
1910 MUST_USE_RESULT static MaybeHandle<Object> SetElement( 1910 MUST_USE_RESULT static MaybeHandle<Object> SetElement(
1911 Handle<JSReceiver> object, 1911 Handle<JSReceiver> object,
1912 uint32_t index, 1912 uint32_t index,
1913 Handle<Object> value, 1913 Handle<Object> value,
1914 PropertyAttributes attributes, 1914 PropertyAttributes attributes,
1915 StrictMode strict_mode); 1915 StrictMode strict_mode);
1916 1916
1917 // Implementation of [[HasProperty]], ECMA-262 5th edition, section 8.12.6. 1917 // Implementation of [[HasProperty]], ECMA-262 5th edition, section 8.12.6.
1918 static inline bool HasProperty(Handle<JSReceiver> object, Handle<Name> name); 1918 static inline bool HasProperty(Handle<JSReceiver> object, Handle<Name> name);
1919 static inline bool HasLocalProperty(Handle<JSReceiver>, Handle<Name> name); 1919 static inline bool HasOwnProperty(Handle<JSReceiver>, Handle<Name> name);
1920 static inline bool HasElement(Handle<JSReceiver> object, uint32_t index); 1920 static inline bool HasElement(Handle<JSReceiver> object, uint32_t index);
1921 static inline bool HasLocalElement(Handle<JSReceiver> object, uint32_t index); 1921 static inline bool HasOwnElement(Handle<JSReceiver> object, uint32_t index);
1922 1922
1923 // Implementation of [[Delete]], ECMA-262 5th edition, section 8.12.7. 1923 // Implementation of [[Delete]], ECMA-262 5th edition, section 8.12.7.
1924 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty( 1924 MUST_USE_RESULT static MaybeHandle<Object> DeleteProperty(
1925 Handle<JSReceiver> object, 1925 Handle<JSReceiver> object,
1926 Handle<Name> name, 1926 Handle<Name> name,
1927 DeleteMode mode = NORMAL_DELETION); 1927 DeleteMode mode = NORMAL_DELETION);
1928 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement( 1928 MUST_USE_RESULT static MaybeHandle<Object> DeleteElement(
1929 Handle<JSReceiver> object, 1929 Handle<JSReceiver> object,
1930 uint32_t index, 1930 uint32_t index,
1931 DeleteMode mode = NORMAL_DELETION); 1931 DeleteMode mode = NORMAL_DELETION);
1932 1932
1933 // Tests for the fast common case for property enumeration. 1933 // Tests for the fast common case for property enumeration.
1934 bool IsSimpleEnum(); 1934 bool IsSimpleEnum();
1935 1935
1936 // Returns the class name ([[Class]] property in the specification). 1936 // Returns the class name ([[Class]] property in the specification).
1937 String* class_name(); 1937 String* class_name();
1938 1938
1939 // Returns the constructor name (the name (possibly, inferred name) of the 1939 // Returns the constructor name (the name (possibly, inferred name) of the
1940 // function that was used to instantiate the object). 1940 // function that was used to instantiate the object).
1941 String* constructor_name(); 1941 String* constructor_name();
1942 1942
1943 static inline PropertyAttributes GetPropertyAttribute( 1943 static inline PropertyAttributes GetPropertyAttribute(
1944 Handle<JSReceiver> object, 1944 Handle<JSReceiver> object,
1945 Handle<Name> name); 1945 Handle<Name> name);
1946 static PropertyAttributes GetPropertyAttributeWithReceiver( 1946 static PropertyAttributes GetPropertyAttributeWithReceiver(
1947 Handle<JSReceiver> object, 1947 Handle<JSReceiver> object,
1948 Handle<JSReceiver> receiver, 1948 Handle<JSReceiver> receiver,
1949 Handle<Name> name); 1949 Handle<Name> name);
1950 static PropertyAttributes GetLocalPropertyAttribute( 1950 static PropertyAttributes GetOwnPropertyAttribute(
1951 Handle<JSReceiver> object, 1951 Handle<JSReceiver> object,
1952 Handle<Name> name); 1952 Handle<Name> name);
1953 1953
1954 static inline PropertyAttributes GetElementAttribute( 1954 static inline PropertyAttributes GetElementAttribute(
1955 Handle<JSReceiver> object, 1955 Handle<JSReceiver> object,
1956 uint32_t index); 1956 uint32_t index);
1957 static inline PropertyAttributes GetLocalElementAttribute( 1957 static inline PropertyAttributes GetOwnElementAttribute(
1958 Handle<JSReceiver> object, 1958 Handle<JSReceiver> object,
1959 uint32_t index); 1959 uint32_t index);
1960 1960
1961 // Return the object's prototype (might be Heap::null_value()). 1961 // Return the object's prototype (might be Heap::null_value()).
1962 inline Object* GetPrototype(); 1962 inline Object* GetPrototype();
1963 1963
1964 // Return the constructor function (may be Heap::null_value()). 1964 // Return the constructor function (may be Heap::null_value()).
1965 inline Object* GetConstructor(); 1965 inline Object* GetConstructor();
1966 1966
1967 // Retrieves a permanent object identity hash code. The undefined value might 1967 // Retrieves a permanent object identity hash code. The undefined value might
1968 // be returned in case no hash was created yet. 1968 // be returned in case no hash was created yet.
1969 inline Object* GetIdentityHash(); 1969 inline Object* GetIdentityHash();
1970 1970
1971 // Retrieves a permanent object identity hash code. May create and store a 1971 // Retrieves a permanent object identity hash code. May create and store a
1972 // hash code if needed and none exists. 1972 // hash code if needed and none exists.
1973 inline static Handle<Smi> GetOrCreateIdentityHash( 1973 inline static Handle<Smi> GetOrCreateIdentityHash(
1974 Handle<JSReceiver> object); 1974 Handle<JSReceiver> object);
1975 1975
1976 // Lookup a property. If found, the result is valid and has 1976 // Lookup a property. If found, the result is valid and has
1977 // detailed information. 1977 // detailed information.
1978 void LocalLookup(Handle<Name> name, LookupResult* result, 1978 void LookupOwn(Handle<Name> name, LookupResult* result,
1979 bool search_hidden_prototypes = false); 1979 bool search_hidden_prototypes = false);
1980 void Lookup(Handle<Name> name, LookupResult* result); 1980 void Lookup(Handle<Name> name, LookupResult* result);
1981 1981
1982 enum KeyCollectionType { LOCAL_ONLY, INCLUDE_PROTOS }; 1982 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS };
1983 1983
1984 // Computes the enumerable keys for a JSObject. Used for implementing 1984 // Computes the enumerable keys for a JSObject. Used for implementing
1985 // "for (n in object) { }". 1985 // "for (n in object) { }".
1986 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys( 1986 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys(
1987 Handle<JSReceiver> object, 1987 Handle<JSReceiver> object,
1988 KeyCollectionType type); 1988 KeyCollectionType type);
1989 1989
1990 protected: 1990 protected:
1991 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithDefinedSetter( 1991 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyWithDefinedSetter(
1992 Handle<JSReceiver> object, 1992 Handle<JSReceiver> object,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 2144
2145 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyForResult( 2145 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyForResult(
2146 Handle<JSObject> object, 2146 Handle<JSObject> object,
2147 LookupResult* result, 2147 LookupResult* result,
2148 Handle<Name> name, 2148 Handle<Name> name,
2149 Handle<Object> value, 2149 Handle<Object> value,
2150 PropertyAttributes attributes, 2150 PropertyAttributes attributes,
2151 StrictMode strict_mode, 2151 StrictMode strict_mode,
2152 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); 2152 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
2153 2153
2154 MUST_USE_RESULT static MaybeHandle<Object> SetLocalPropertyIgnoreAttributes( 2154 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes(
2155 Handle<JSObject> object, 2155 Handle<JSObject> object,
2156 Handle<Name> key, 2156 Handle<Name> key,
2157 Handle<Object> value, 2157 Handle<Object> value,
2158 PropertyAttributes attributes, 2158 PropertyAttributes attributes,
2159 ValueType value_type = OPTIMAL_REPRESENTATION, 2159 ValueType value_type = OPTIMAL_REPRESENTATION,
2160 StoreMode mode = ALLOW_AS_CONSTANT, 2160 StoreMode mode = ALLOW_AS_CONSTANT,
2161 ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK, 2161 ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK,
2162 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); 2162 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
2163 2163
2164 static inline Handle<String> ExpectedTransitionKey(Handle<Map> map); 2164 static inline Handle<String> ExpectedTransitionKey(Handle<Map> map);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 Handle<Object> receiver, 2260 Handle<Object> receiver,
2261 Handle<Name> name, 2261 Handle<Name> name,
2262 PropertyAttributes* attributes); 2262 PropertyAttributes* attributes);
2263 2263
2264 // Returns true if this is an instance of an api function and has 2264 // Returns true if this is an instance of an api function and has
2265 // been modified since it was created. May give false positives. 2265 // been modified since it was created. May give false positives.
2266 bool IsDirty(); 2266 bool IsDirty();
2267 2267
2268 // Accessors for hidden properties object. 2268 // Accessors for hidden properties object.
2269 // 2269 //
2270 // Hidden properties are not local properties of the object itself. 2270 // Hidden properties are not own properties of the object itself.
2271 // Instead they are stored in an auxiliary structure kept as a local 2271 // Instead they are stored in an auxiliary structure kept as an own
2272 // property with a special name Heap::hidden_string(). But if the 2272 // property with a special name Heap::hidden_string(). But if the
2273 // receiver is a JSGlobalProxy then the auxiliary object is a property 2273 // receiver is a JSGlobalProxy then the auxiliary object is a property
2274 // of its prototype, and if it's a detached proxy, then you can't have 2274 // of its prototype, and if it's a detached proxy, then you can't have
2275 // hidden properties. 2275 // hidden properties.
2276 2276
2277 // Sets a hidden property on this object. Returns this object if successful, 2277 // Sets a hidden property on this object. Returns this object if successful,
2278 // undefined if called on a detached proxy. 2278 // undefined if called on a detached proxy.
2279 static Handle<Object> SetHiddenProperty(Handle<JSObject> object, 2279 static Handle<Object> SetHiddenProperty(Handle<JSObject> object,
2280 Handle<Name> key, 2280 Handle<Name> key,
2281 Handle<Object> value); 2281 Handle<Object> value);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2331 // be represented as a double and not a Smi. 2331 // be represented as a double and not a Smi.
2332 bool ShouldConvertToFastDoubleElements(bool* has_smi_only_elements); 2332 bool ShouldConvertToFastDoubleElements(bool* has_smi_only_elements);
2333 2333
2334 // Computes the new capacity when expanding the elements of a JSObject. 2334 // Computes the new capacity when expanding the elements of a JSObject.
2335 static int NewElementsCapacity(int old_capacity) { 2335 static int NewElementsCapacity(int old_capacity) {
2336 // (old_capacity + 50%) + 16 2336 // (old_capacity + 50%) + 16
2337 return old_capacity + (old_capacity >> 1) + 16; 2337 return old_capacity + (old_capacity >> 1) + 16;
2338 } 2338 }
2339 2339
2340 // These methods do not perform access checks! 2340 // These methods do not perform access checks!
2341 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetLocalPropertyAccessorPair( 2341 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetOwnPropertyAccessorPair(
2342 Handle<JSObject> object, 2342 Handle<JSObject> object,
2343 Handle<Name> name); 2343 Handle<Name> name);
2344 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetLocalElementAccessorPair( 2344 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetOwnElementAccessorPair(
2345 Handle<JSObject> object, 2345 Handle<JSObject> object,
2346 uint32_t index); 2346 uint32_t index);
2347 2347
2348 MUST_USE_RESULT static MaybeHandle<Object> SetFastElement( 2348 MUST_USE_RESULT static MaybeHandle<Object> SetFastElement(
2349 Handle<JSObject> object, 2349 Handle<JSObject> object,
2350 uint32_t index, 2350 uint32_t index,
2351 Handle<Object> value, 2351 Handle<Object> value,
2352 StrictMode strict_mode, 2352 StrictMode strict_mode,
2353 bool check_prototype); 2353 bool check_prototype);
2354 2354
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 // internal fields as well as the number of internal fields. 2419 // internal fields as well as the number of internal fields.
2420 inline int GetHeaderSize(); 2420 inline int GetHeaderSize();
2421 2421
2422 inline int GetInternalFieldCount(); 2422 inline int GetInternalFieldCount();
2423 inline int GetInternalFieldOffset(int index); 2423 inline int GetInternalFieldOffset(int index);
2424 inline Object* GetInternalField(int index); 2424 inline Object* GetInternalField(int index);
2425 inline void SetInternalField(int index, Object* value); 2425 inline void SetInternalField(int index, Object* value);
2426 inline void SetInternalField(int index, Smi* value); 2426 inline void SetInternalField(int index, Smi* value);
2427 2427
2428 // The following lookup functions skip interceptors. 2428 // The following lookup functions skip interceptors.
2429 void LocalLookupRealNamedProperty(Handle<Name> name, LookupResult* result); 2429 void LookupOwnRealNamedProperty(Handle<Name> name, LookupResult* result);
2430 void LookupRealNamedProperty(Handle<Name> name, LookupResult* result); 2430 void LookupRealNamedProperty(Handle<Name> name, LookupResult* result);
2431 void LookupRealNamedPropertyInPrototypes(Handle<Name> name, 2431 void LookupRealNamedPropertyInPrototypes(Handle<Name> name,
2432 LookupResult* result); 2432 LookupResult* result);
2433 void LookupCallbackProperty(Handle<Name> name, LookupResult* result); 2433 void LookupCallbackProperty(Handle<Name> name, LookupResult* result);
2434 2434
2435 // Returns the number of properties on this object filtering out properties 2435 // Returns the number of properties on this object filtering out properties
2436 // with the specified attributes (ignoring interceptors). 2436 // with the specified attributes (ignoring interceptors).
2437 int NumberOfLocalProperties(PropertyAttributes filter = NONE); 2437 int NumberOfOwnProperties(PropertyAttributes filter = NONE);
2438 // Fill in details for properties into storage starting at the specified 2438 // Fill in details for properties into storage starting at the specified
2439 // index. 2439 // index.
2440 void GetLocalPropertyNames( 2440 void GetOwnPropertyNames(
2441 FixedArray* storage, int index, PropertyAttributes filter = NONE); 2441 FixedArray* storage, int index, PropertyAttributes filter = NONE);
2442 2442
2443 // Returns the number of properties on this object filtering out properties 2443 // Returns the number of properties on this object filtering out properties
2444 // with the specified attributes (ignoring interceptors). 2444 // with the specified attributes (ignoring interceptors).
2445 int NumberOfLocalElements(PropertyAttributes filter); 2445 int NumberOfOwnElements(PropertyAttributes filter);
2446 // Returns the number of enumerable elements (ignoring interceptors). 2446 // Returns the number of enumerable elements (ignoring interceptors).
2447 int NumberOfEnumElements(); 2447 int NumberOfEnumElements();
2448 // Returns the number of elements on this object filtering out elements 2448 // Returns the number of elements on this object filtering out elements
2449 // with the specified attributes (ignoring interceptors). 2449 // with the specified attributes (ignoring interceptors).
2450 int GetLocalElementKeys(FixedArray* storage, PropertyAttributes filter); 2450 int GetOwnElementKeys(FixedArray* storage, PropertyAttributes filter);
2451 // Count and fill in the enumerable elements into storage. 2451 // Count and fill in the enumerable elements into storage.
2452 // (storage->length() == NumberOfEnumElements()). 2452 // (storage->length() == NumberOfEnumElements()).
2453 // If storage is NULL, will count the elements without adding 2453 // If storage is NULL, will count the elements without adding
2454 // them to any storage. 2454 // them to any storage.
2455 // Returns the number of enumerable elements. 2455 // Returns the number of enumerable elements.
2456 int GetEnumElementKeys(FixedArray* storage); 2456 int GetEnumElementKeys(FixedArray* storage);
2457 2457
2458 // Returns a new map with all transitions dropped from the object's current 2458 // Returns a new map with all transitions dropped from the object's current
2459 // map and the ElementsKind set. 2459 // map and the ElementsKind set.
2460 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, 2460 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object,
2461 ElementsKind to_kind); 2461 ElementsKind to_kind);
2462 static void TransitionElementsKind(Handle<JSObject> object, 2462 static void TransitionElementsKind(Handle<JSObject> object,
2463 ElementsKind to_kind); 2463 ElementsKind to_kind);
2464 2464
2465 // TODO(mstarzinger): Both public because of ConvertAnsSetLocalProperty(). 2465 // TODO(mstarzinger): Both public because of ConvertAndSetOwnProperty().
2466 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map); 2466 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map);
2467 static void GeneralizeFieldRepresentation(Handle<JSObject> object, 2467 static void GeneralizeFieldRepresentation(Handle<JSObject> object,
2468 int modify_index, 2468 int modify_index,
2469 Representation new_representation, 2469 Representation new_representation,
2470 Handle<HeapType> new_field_type, 2470 Handle<HeapType> new_field_type,
2471 StoreMode store_mode); 2471 StoreMode store_mode);
2472 2472
2473 // Convert the object to use the canonical dictionary 2473 // Convert the object to use the canonical dictionary
2474 // representation. If the object is expected to have additional properties 2474 // representation. If the object is expected to have additional properties
2475 // added this number can be indicated to have the backing store allocated to 2475 // added this number can be indicated to have the backing store allocated to
(...skipping 5400 matching lines...) Expand 10 before | Expand all | Expand 10 after
7876 DECL_ACCESSORS(day, Object) 7876 DECL_ACCESSORS(day, Object)
7877 // [weekday]: caches day of week. Either undefined, smi, or NaN. 7877 // [weekday]: caches day of week. Either undefined, smi, or NaN.
7878 DECL_ACCESSORS(weekday, Object) 7878 DECL_ACCESSORS(weekday, Object)
7879 // [hour]: caches hours. Either undefined, smi, or NaN. 7879 // [hour]: caches hours. Either undefined, smi, or NaN.
7880 DECL_ACCESSORS(hour, Object) 7880 DECL_ACCESSORS(hour, Object)
7881 // [min]: caches minutes. Either undefined, smi, or NaN. 7881 // [min]: caches minutes. Either undefined, smi, or NaN.
7882 DECL_ACCESSORS(min, Object) 7882 DECL_ACCESSORS(min, Object)
7883 // [sec]: caches seconds. Either undefined, smi, or NaN. 7883 // [sec]: caches seconds. Either undefined, smi, or NaN.
7884 DECL_ACCESSORS(sec, Object) 7884 DECL_ACCESSORS(sec, Object)
7885 // [cache stamp]: sample of the date cache stamp at the 7885 // [cache stamp]: sample of the date cache stamp at the
7886 // moment when local fields were cached. 7886 // moment when chached fields were cached.
7887 DECL_ACCESSORS(cache_stamp, Object) 7887 DECL_ACCESSORS(cache_stamp, Object)
7888 7888
7889 // Casting. 7889 // Casting.
7890 static inline JSDate* cast(Object* obj); 7890 static inline JSDate* cast(Object* obj);
7891 7891
7892 // Returns the date field with the specified index. 7892 // Returns the date field with the specified index.
7893 // See FieldIndex for the list of date fields. 7893 // See FieldIndex for the list of date fields.
7894 static Object* GetField(Object* date, Smi* index); 7894 static Object* GetField(Object* date, Smi* index);
7895 7895
7896 void SetValue(Object* value, bool is_value_nan); 7896 void SetValue(Object* value, bool is_value_nan);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
7940 static const int kSecOffset = kMinOffset + kPointerSize; 7940 static const int kSecOffset = kMinOffset + kPointerSize;
7941 static const int kCacheStampOffset = kSecOffset + kPointerSize; 7941 static const int kCacheStampOffset = kSecOffset + kPointerSize;
7942 static const int kSize = kCacheStampOffset + kPointerSize; 7942 static const int kSize = kCacheStampOffset + kPointerSize;
7943 7943
7944 private: 7944 private:
7945 inline Object* DoGetField(FieldIndex index); 7945 inline Object* DoGetField(FieldIndex index);
7946 7946
7947 Object* GetUTCField(FieldIndex index, double value, DateCache* date_cache); 7947 Object* GetUTCField(FieldIndex index, double value, DateCache* date_cache);
7948 7948
7949 // Computes and caches the cacheable fields of the date. 7949 // Computes and caches the cacheable fields of the date.
7950 inline void SetLocalFields(int64_t local_time_ms, DateCache* date_cache); 7950 inline void SetCachedFields(int64_t local_time_ms, DateCache* date_cache);
7951 7951
7952 7952
7953 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDate); 7953 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDate);
7954 }; 7954 };
7955 7955
7956 7956
7957 // Representation of message objects used for error reporting through 7957 // Representation of message objects used for error reporting through
7958 // the API. The messages are formatted in JavaScript so this object is 7958 // the API. The messages are formatted in JavaScript so this object is
7959 // a real JavaScript object. The information used for formatting the 7959 // a real JavaScript object. The information used for formatting the
7960 // error messages are not directly accessible from JavaScript to 7960 // error messages are not directly accessible from JavaScript to
(...skipping 2602 matching lines...) Expand 10 before | Expand all | Expand 10 after
10563 }; 10563 };
10564 10564
10565 10565
10566 // An accessor must have a getter, but can have no setter. 10566 // An accessor must have a getter, but can have no setter.
10567 // 10567 //
10568 // When setting a property, V8 searches accessors in prototypes. 10568 // When setting a property, V8 searches accessors in prototypes.
10569 // If an accessor was found and it does not have a setter, 10569 // If an accessor was found and it does not have a setter,
10570 // the request is ignored. 10570 // the request is ignored.
10571 // 10571 //
10572 // If the accessor in the prototype has the READ_ONLY property attribute, then 10572 // If the accessor in the prototype has the READ_ONLY property attribute, then
10573 // a new value is added to the local object when the property is set. 10573 // a new value is added to the derived object when the property is set.
10574 // This shadows the accessor in the prototype. 10574 // This shadows the accessor in the prototype.
10575 class ExecutableAccessorInfo: public AccessorInfo { 10575 class ExecutableAccessorInfo: public AccessorInfo {
10576 public: 10576 public:
10577 DECL_ACCESSORS(getter, Object) 10577 DECL_ACCESSORS(getter, Object)
10578 DECL_ACCESSORS(setter, Object) 10578 DECL_ACCESSORS(setter, Object)
10579 DECL_ACCESSORS(data, Object) 10579 DECL_ACCESSORS(data, Object)
10580 10580
10581 static inline ExecutableAccessorInfo* cast(Object* obj); 10581 static inline ExecutableAccessorInfo* cast(Object* obj);
10582 10582
10583 // Dispatched behavior. 10583 // Dispatched behavior.
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
11117 } else { 11117 } else {
11118 value &= ~(1 << bit_position); 11118 value &= ~(1 << bit_position);
11119 } 11119 }
11120 return value; 11120 return value;
11121 } 11121 }
11122 }; 11122 };
11123 11123
11124 } } // namespace v8::internal 11124 } } // namespace v8::internal
11125 11125
11126 #endif // V8_OBJECTS_H_ 11126 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mirror-debugger.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698