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

Side by Side Diff: src/objects.h

Issue 262053011: Confusion on changing data property callback attributes (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 6 years, 6 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/accessors.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 "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 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 2147
2148 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyForResult( 2148 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyForResult(
2149 Handle<JSObject> object, 2149 Handle<JSObject> object,
2150 LookupResult* result, 2150 LookupResult* result,
2151 Handle<Name> name, 2151 Handle<Name> name,
2152 Handle<Object> value, 2152 Handle<Object> value,
2153 PropertyAttributes attributes, 2153 PropertyAttributes attributes,
2154 StrictMode strict_mode, 2154 StrictMode strict_mode,
2155 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); 2155 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
2156 2156
2157 // SetLocalPropertyIgnoreAttributes converts callbacks to fields. We need to
2158 // grant an exemption to ExecutableAccessor callbacks in some cases.
2159 enum ExecutableAccessorInfoHandling {
2160 DEFAULT_HANDLING,
2161 DONT_FORCE_FIELD
2162 };
2163
2157 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes( 2164 MUST_USE_RESULT static MaybeHandle<Object> SetOwnPropertyIgnoreAttributes(
2158 Handle<JSObject> object, 2165 Handle<JSObject> object,
2159 Handle<Name> key, 2166 Handle<Name> key,
2160 Handle<Object> value, 2167 Handle<Object> value,
2161 PropertyAttributes attributes, 2168 PropertyAttributes attributes,
2162 ValueType value_type = OPTIMAL_REPRESENTATION, 2169 ValueType value_type = OPTIMAL_REPRESENTATION,
2163 StoreMode mode = ALLOW_AS_CONSTANT, 2170 StoreMode mode = ALLOW_AS_CONSTANT,
2164 ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK, 2171 ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK,
2165 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); 2172 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED,
2173 ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING);
2166 2174
2167 static inline Handle<String> ExpectedTransitionKey(Handle<Map> map); 2175 static inline Handle<String> ExpectedTransitionKey(Handle<Map> map);
2168 static inline Handle<Map> ExpectedTransitionTarget(Handle<Map> map); 2176 static inline Handle<Map> ExpectedTransitionTarget(Handle<Map> map);
2169 2177
2170 // Try to follow an existing transition to a field with attributes NONE. The 2178 // Try to follow an existing transition to a field with attributes NONE. The
2171 // return value indicates whether the transition was successful. 2179 // return value indicates whether the transition was successful.
2172 static inline Handle<Map> FindTransitionToField(Handle<Map> map, 2180 static inline Handle<Map> FindTransitionToField(Handle<Map> map,
2173 Handle<Name> key); 2181 Handle<Name> key);
2174 2182
2175 // Extend the receiver with a single fast property appeared first in the 2183 // Extend the receiver with a single fast property appeared first in the
(...skipping 8353 matching lines...) Expand 10 before | Expand all | Expand 10 after
10529 10537
10530 // Dispatched behavior. 10538 // Dispatched behavior.
10531 DECLARE_PRINTER(ExecutableAccessorInfo) 10539 DECLARE_PRINTER(ExecutableAccessorInfo)
10532 DECLARE_VERIFIER(ExecutableAccessorInfo) 10540 DECLARE_VERIFIER(ExecutableAccessorInfo)
10533 10541
10534 static const int kGetterOffset = AccessorInfo::kSize; 10542 static const int kGetterOffset = AccessorInfo::kSize;
10535 static const int kSetterOffset = kGetterOffset + kPointerSize; 10543 static const int kSetterOffset = kGetterOffset + kPointerSize;
10536 static const int kDataOffset = kSetterOffset + kPointerSize; 10544 static const int kDataOffset = kSetterOffset + kPointerSize;
10537 static const int kSize = kDataOffset + kPointerSize; 10545 static const int kSize = kDataOffset + kPointerSize;
10538 10546
10547 inline void clear_setter();
10548
10539 private: 10549 private:
10540 DISALLOW_IMPLICIT_CONSTRUCTORS(ExecutableAccessorInfo); 10550 DISALLOW_IMPLICIT_CONSTRUCTORS(ExecutableAccessorInfo);
10541 }; 10551 };
10542 10552
10543 10553
10544 // Support for JavaScript accessors: A pair of a getter and a setter. Each 10554 // Support for JavaScript accessors: A pair of a getter and a setter. Each
10545 // accessor can either be 10555 // accessor can either be
10546 // * a pointer to a JavaScript function or proxy: a real accessor 10556 // * a pointer to a JavaScript function or proxy: a real accessor
10547 // * undefined: considered an accessor by the spec, too, strangely enough 10557 // * undefined: considered an accessor by the spec, too, strangely enough
10548 // * the hole: an accessor which has not been set 10558 // * the hole: an accessor which has not been set
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
11064 } else { 11074 } else {
11065 value &= ~(1 << bit_position); 11075 value &= ~(1 << bit_position);
11066 } 11076 }
11067 return value; 11077 return value;
11068 } 11078 }
11069 }; 11079 };
11070 11080
11071 } } // namespace v8::internal 11081 } } // namespace v8::internal
11072 11082
11073 #endif // V8_OBJECTS_H_ 11083 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698