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

Side by Side Diff: src/objects.h

Issue 390020: Make accessors for hidden properties object not touch interceptors (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month 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/handles.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 Object* GetPropertyWithFailedAccessCheck(Object* receiver, 1400 Object* GetPropertyWithFailedAccessCheck(Object* receiver,
1401 LookupResult* result, 1401 LookupResult* result,
1402 String* name, 1402 String* name,
1403 PropertyAttributes* attributes); 1403 PropertyAttributes* attributes);
1404 Object* GetPropertyWithInterceptor(JSObject* receiver, 1404 Object* GetPropertyWithInterceptor(JSObject* receiver,
1405 String* name, 1405 String* name,
1406 PropertyAttributes* attributes); 1406 PropertyAttributes* attributes);
1407 Object* GetPropertyPostInterceptor(JSObject* receiver, 1407 Object* GetPropertyPostInterceptor(JSObject* receiver,
1408 String* name, 1408 String* name,
1409 PropertyAttributes* attributes); 1409 PropertyAttributes* attributes);
1410 Object* GetLocalPropertyPostInterceptor(JSObject* receiver,
1411 String* name,
1412 PropertyAttributes* attributes);
1410 Object* GetLazyProperty(Object* receiver, 1413 Object* GetLazyProperty(Object* receiver,
1411 LookupResult* result, 1414 LookupResult* result,
1412 String* name, 1415 String* name,
1413 PropertyAttributes* attributes); 1416 PropertyAttributes* attributes);
1414 1417
1415 // Tells whether this object needs to be loaded. 1418 // Tells whether this object needs to be loaded.
1416 inline bool IsLoaded(); 1419 inline bool IsLoaded();
1417 1420
1418 // Returns true if this is an instance of an api function and has 1421 // Returns true if this is an instance of an api function and has
1419 // been modified since it was created. May give false positives. 1422 // been modified since it was created. May give false positives.
1420 bool IsDirty(); 1423 bool IsDirty();
1421 1424
1422 bool HasProperty(String* name) { 1425 bool HasProperty(String* name) {
1423 return GetPropertyAttribute(name) != ABSENT; 1426 return GetPropertyAttribute(name) != ABSENT;
1424 } 1427 }
1425 1428
1426 // Can cause a GC if it hits an interceptor. 1429 // Can cause a GC if it hits an interceptor.
1427 bool HasLocalProperty(String* name) { 1430 bool HasLocalProperty(String* name) {
1428 return GetLocalPropertyAttribute(name) != ABSENT; 1431 return GetLocalPropertyAttribute(name) != ABSENT;
1429 } 1432 }
1430 1433
1434 // If the receiver is a JSGlobalProxy this method will return its prototype,
1435 // otherwise the result is the receiver itself.
1436 inline Object* BypassGlobalProxy();
1437
1438 // Accessors for hidden properties object.
1439 //
1440 // Hidden properties are not local properties of the object itself.
1441 // Instead they are stored on an auxiliary JSObject stored as a local
1442 // property with a special name Heap::hidden_symbol(). But if the
1443 // receiver is a JSGlobalProxy then the auxiliary object is a property
1444 // of its prototype.
1445 //
1446 // Has/Get/SetHiddenPropertiesObject methods don't allow the holder to be
1447 // a JSGlobalProxy. Use BypassGlobalProxy method above to get to the real
1448 // holder.
1449 //
1450 // These accessors do not touch interceptors or accessors.
1451 inline bool HasHiddenPropertiesObject();
1452 inline Object* GetHiddenPropertiesObject();
1453 inline Object* SetHiddenPropertiesObject(Object* hidden_obj);
1454
1431 Object* DeleteProperty(String* name, DeleteMode mode); 1455 Object* DeleteProperty(String* name, DeleteMode mode);
1432 Object* DeleteElement(uint32_t index, DeleteMode mode); 1456 Object* DeleteElement(uint32_t index, DeleteMode mode);
1433 Object* DeleteLazyProperty(LookupResult* result, 1457 Object* DeleteLazyProperty(LookupResult* result,
1434 String* name, 1458 String* name,
1435 DeleteMode mode); 1459 DeleteMode mode);
1436 1460
1437 // Tests for the fast common case for property enumeration. 1461 // Tests for the fast common case for property enumeration.
1438 bool IsSimpleEnum(); 1462 bool IsSimpleEnum();
1439 1463
1440 // Do we want to keep the elements in fast case when increasing the 1464 // Do we want to keep the elements in fast case when increasing the
(...skipping 3586 matching lines...) Expand 10 before | Expand all | Expand 10 after
5027 } else { 5051 } else {
5028 value &= ~(1 << bit_position); 5052 value &= ~(1 << bit_position);
5029 } 5053 }
5030 return value; 5054 return value;
5031 } 5055 }
5032 }; 5056 };
5033 5057
5034 } } // namespace v8::internal 5058 } } // namespace v8::internal
5035 5059
5036 #endif // V8_OBJECTS_H_ 5060 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698