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

Side by Side Diff: src/objects.h

Issue 593073002: Stores and compound assignments for named super properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased for landing Created 6 years, 2 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
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 "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) 1000 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL)
1001 #undef IS_TYPE_FUNCTION_DECL 1001 #undef IS_TYPE_FUNCTION_DECL
1002 1002
1003 // A non-keyed store is of the form a.x = foo or a["x"] = foo whereas 1003 // A non-keyed store is of the form a.x = foo or a["x"] = foo whereas
1004 // a keyed store is of the form a[expression] = foo. 1004 // a keyed store is of the form a[expression] = foo.
1005 enum StoreFromKeyed { 1005 enum StoreFromKeyed {
1006 MAY_BE_STORE_FROM_KEYED, 1006 MAY_BE_STORE_FROM_KEYED,
1007 CERTAINLY_NOT_STORE_FROM_KEYED 1007 CERTAINLY_NOT_STORE_FROM_KEYED
1008 }; 1008 };
1009 1009
1010 enum StorePropertyMode { NORMAL_PROPERTY, SUPER_PROPERTY };
1011
1010 INLINE(bool IsFixedArrayBase() const); 1012 INLINE(bool IsFixedArrayBase() const);
1011 INLINE(bool IsExternal() const); 1013 INLINE(bool IsExternal() const);
1012 INLINE(bool IsAccessorInfo() const); 1014 INLINE(bool IsAccessorInfo() const);
1013 1015
1014 INLINE(bool IsStruct() const); 1016 INLINE(bool IsStruct() const);
1015 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) \ 1017 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) \
1016 INLINE(bool Is##Name() const); 1018 INLINE(bool Is##Name() const);
1017 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) 1019 STRUCT_LIST(DECLARE_STRUCT_PREDICATE)
1018 #undef DECLARE_STRUCT_PREDICATE 1020 #undef DECLARE_STRUCT_PREDICATE
1019 1021
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 MUST_USE_RESULT static MaybeHandle<Object> GetProperty(LookupIterator* it); 1111 MUST_USE_RESULT static MaybeHandle<Object> GetProperty(LookupIterator* it);
1110 1112
1111 // Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5. 1113 // Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5.
1112 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( 1114 MUST_USE_RESULT static MaybeHandle<Object> SetProperty(
1113 Handle<Object> object, Handle<Name> key, Handle<Object> value, 1115 Handle<Object> object, Handle<Name> key, Handle<Object> value,
1114 StrictMode strict_mode, 1116 StrictMode strict_mode,
1115 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); 1117 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
1116 1118
1117 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( 1119 MUST_USE_RESULT static MaybeHandle<Object> SetProperty(
1118 LookupIterator* it, Handle<Object> value, StrictMode strict_mode, 1120 LookupIterator* it, Handle<Object> value, StrictMode strict_mode,
1119 StoreFromKeyed store_mode); 1121 StoreFromKeyed store_mode,
1122 StorePropertyMode data_store_mode = NORMAL_PROPERTY);
1120 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty( 1123 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty(
1121 LookupIterator* it, Handle<Object> value, StrictMode strict_mode); 1124 LookupIterator* it, Handle<Object> value, StrictMode strict_mode);
1122 static Handle<Object> SetDataProperty(LookupIterator* it, 1125 static Handle<Object> SetDataProperty(LookupIterator* it,
1123 Handle<Object> value); 1126 Handle<Object> value);
1124 MUST_USE_RESULT static MaybeHandle<Object> AddDataProperty( 1127 MUST_USE_RESULT static MaybeHandle<Object> AddDataProperty(
1125 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, 1128 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
1126 StrictMode strict_mode, StoreFromKeyed store_mode); 1129 StrictMode strict_mode, StoreFromKeyed store_mode);
1127 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( 1130 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
1128 Handle<Object> object, 1131 Handle<Object> object,
1129 Handle<Name> key); 1132 Handle<Name> key);
(...skipping 9673 matching lines...) Expand 10 before | Expand all | Expand 10 after
10803 } else { 10806 } else {
10804 value &= ~(1 << bit_position); 10807 value &= ~(1 << bit_position);
10805 } 10808 }
10806 return value; 10809 return value;
10807 } 10810 }
10808 }; 10811 };
10809 10812
10810 } } // namespace v8::internal 10813 } } // namespace v8::internal
10811 10814
10812 #endif // V8_OBJECTS_H_ 10815 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698