| OLD | NEW |
| 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 "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
| 10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
| (...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 | 2119 |
| 2120 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyForResult( | 2120 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyForResult( |
| 2121 Handle<JSObject> object, | 2121 Handle<JSObject> object, |
| 2122 LookupResult* result, | 2122 LookupResult* result, |
| 2123 Handle<Name> name, | 2123 Handle<Name> name, |
| 2124 Handle<Object> value, | 2124 Handle<Object> value, |
| 2125 PropertyAttributes attributes, | 2125 PropertyAttributes attributes, |
| 2126 StrictMode strict_mode, | 2126 StrictMode strict_mode, |
| 2127 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); | 2127 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); |
| 2128 | 2128 |
| 2129 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to | |
| 2130 // grant an exemption to ExecutableAccessor callbacks in some cases. | |
| 2131 enum ExecutableAccessorInfoHandling { | |
| 2132 DEFAULT_HANDLING, | |
| 2133 DONT_FORCE_FIELD | |
| 2134 }; | |
| 2135 | |
| 2136 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( | 2129 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( |
| 2137 Handle<JSObject> object, | 2130 Handle<JSObject> object, |
| 2138 Handle<Name> key, | 2131 Handle<Name> key, |
| 2139 Handle<Object> value, | 2132 Handle<Object> value, |
| 2140 PropertyAttributes attributes, | 2133 PropertyAttributes attributes, |
| 2141 StoreMode mode = ALLOW_AS_CONSTANT, | 2134 StoreMode mode = ALLOW_AS_CONSTANT, |
| 2142 ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK, | 2135 ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK, |
| 2143 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED, | 2136 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); |
| 2144 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); | |
| 2145 | 2137 |
| 2146 static void AddProperty(Handle<JSObject> object, | 2138 static void AddProperty(Handle<JSObject> object, |
| 2147 Handle<Name> key, | 2139 Handle<Name> key, |
| 2148 Handle<Object> value, | 2140 Handle<Object> value, |
| 2149 PropertyAttributes attributes, | 2141 PropertyAttributes attributes, |
| 2150 StoreMode mode = ALLOW_AS_CONSTANT); | 2142 StoreMode mode = ALLOW_AS_CONSTANT); |
| 2151 | 2143 |
| 2152 // Extend the receiver with a single fast property appeared first in the | 2144 // Extend the receiver with a single fast property appeared first in the |
| 2153 // passed map. This also extends the property backing store if necessary. | 2145 // passed map. This also extends the property backing store if necessary. |
| 2154 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map); | 2146 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map); |
| (...skipping 9007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11162 } else { | 11154 } else { |
| 11163 value &= ~(1 << bit_position); | 11155 value &= ~(1 << bit_position); |
| 11164 } | 11156 } |
| 11165 return value; | 11157 return value; |
| 11166 } | 11158 } |
| 11167 }; | 11159 }; |
| 11168 | 11160 |
| 11169 } } // namespace v8::internal | 11161 } } // namespace v8::internal |
| 11170 | 11162 |
| 11171 #endif // V8_OBJECTS_H_ | 11163 #endif // V8_OBJECTS_H_ |
| OLD | NEW |