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

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: CR feedback 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/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL) 1328 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL)
1329 #undef IS_TYPE_FUNCTION_DECL 1329 #undef IS_TYPE_FUNCTION_DECL
1330 1330
1331 // A non-keyed store is of the form a.x = foo or a["x"] = foo whereas 1331 // A non-keyed store is of the form a.x = foo or a["x"] = foo whereas
1332 // a keyed store is of the form a[expression] = foo. 1332 // a keyed store is of the form a[expression] = foo.
1333 enum StoreFromKeyed { 1333 enum StoreFromKeyed {
1334 MAY_BE_STORE_FROM_KEYED, 1334 MAY_BE_STORE_FROM_KEYED,
1335 CERTAINLY_NOT_STORE_FROM_KEYED 1335 CERTAINLY_NOT_STORE_FROM_KEYED
1336 }; 1336 };
1337 1337
1338 enum StorePropertyMode { NORMAL_PROPERTY, SUPER_PROPERTY };
1339
1338 INLINE(bool IsFixedArrayBase() const); 1340 INLINE(bool IsFixedArrayBase() const);
1339 INLINE(bool IsExternal() const); 1341 INLINE(bool IsExternal() const);
1340 INLINE(bool IsAccessorInfo() const); 1342 INLINE(bool IsAccessorInfo() const);
1341 1343
1342 INLINE(bool IsStruct() const); 1344 INLINE(bool IsStruct() const);
1343 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) \ 1345 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) \
1344 INLINE(bool Is##Name() const); 1346 INLINE(bool Is##Name() const);
1345 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) 1347 STRUCT_LIST(DECLARE_STRUCT_PREDICATE)
1346 #undef DECLARE_STRUCT_PREDICATE 1348 #undef DECLARE_STRUCT_PREDICATE
1347 1349
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 MUST_USE_RESULT static MaybeHandle<Object> GetProperty(LookupIterator* it); 1439 MUST_USE_RESULT static MaybeHandle<Object> GetProperty(LookupIterator* it);
1438 1440
1439 // Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5. 1441 // Implementation of [[Put]], ECMA-262 5th edition, section 8.12.5.
1440 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( 1442 MUST_USE_RESULT static MaybeHandle<Object> SetProperty(
1441 Handle<Object> object, Handle<Name> key, Handle<Object> value, 1443 Handle<Object> object, Handle<Name> key, Handle<Object> value,
1442 StrictMode strict_mode, 1444 StrictMode strict_mode,
1443 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); 1445 StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
1444 1446
1445 MUST_USE_RESULT static MaybeHandle<Object> SetProperty( 1447 MUST_USE_RESULT static MaybeHandle<Object> SetProperty(
1446 LookupIterator* it, Handle<Object> value, StrictMode strict_mode, 1448 LookupIterator* it, Handle<Object> value, StrictMode strict_mode,
1447 StoreFromKeyed store_mode); 1449 StoreFromKeyed store_mode,
1450 StorePropertyMode data_store_mode = NORMAL_PROPERTY);
1448 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty( 1451 MUST_USE_RESULT static MaybeHandle<Object> WriteToReadOnlyProperty(
1449 LookupIterator* it, Handle<Object> value, StrictMode strict_mode); 1452 LookupIterator* it, Handle<Object> value, StrictMode strict_mode);
1450 static Handle<Object> SetDataProperty(LookupIterator* it, 1453 static Handle<Object> SetDataProperty(LookupIterator* it,
1451 Handle<Object> value); 1454 Handle<Object> value);
1452 MUST_USE_RESULT static MaybeHandle<Object> AddDataProperty( 1455 MUST_USE_RESULT static MaybeHandle<Object> AddDataProperty(
1453 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes, 1456 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
1454 StrictMode strict_mode, StoreFromKeyed store_mode); 1457 StrictMode strict_mode, StoreFromKeyed store_mode);
1455 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( 1458 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
1456 Handle<Object> object, 1459 Handle<Object> object,
1457 Handle<Name> key); 1460 Handle<Name> key);
(...skipping 9673 matching lines...) Expand 10 before | Expand all | Expand 10 after
11131 } else { 11134 } else {
11132 value &= ~(1 << bit_position); 11135 value &= ~(1 << bit_position);
11133 } 11136 }
11134 return value; 11137 return value;
11135 } 11138 }
11136 }; 11139 };
11137 11140
11138 } } // namespace v8::internal 11141 } } // namespace v8::internal
11139 11142
11140 #endif // V8_OBJECTS_H_ 11143 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/objects.cc » ('j') | test/mjsunit/harmony/super.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698