OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 inline MaybeObject* AllocateNewStorageFor(Heap* heap, | 1429 inline MaybeObject* AllocateNewStorageFor(Heap* heap, |
1430 Representation representation, | 1430 Representation representation, |
1431 PretenureFlag tenure = NOT_TENURED); | 1431 PretenureFlag tenure = NOT_TENURED); |
1432 | 1432 |
1433 // Returns true if the object is of the correct type to be used as a | 1433 // Returns true if the object is of the correct type to be used as a |
1434 // implementation of a JSObject's elements. | 1434 // implementation of a JSObject's elements. |
1435 inline bool HasValidElements(); | 1435 inline bool HasValidElements(); |
1436 | 1436 |
1437 inline bool HasSpecificClassOf(String* name); | 1437 inline bool HasSpecificClassOf(String* name); |
1438 | 1438 |
1439 MUST_USE_RESULT MaybeObject* ToObject(); // ECMA-262 9.9. | 1439 MUST_USE_RESULT MaybeObject* ToObject(Isolate* isolate); // ECMA-262 9.9. |
1440 bool BooleanValue(); // ECMA-262 9.2. | 1440 bool BooleanValue(); // ECMA-262 9.2. |
1441 | 1441 |
1442 // Convert to a JSObject if needed. | 1442 // Convert to a JSObject if needed. |
1443 // native_context is used when creating wrapper object. | 1443 // native_context is used when creating wrapper object. |
1444 MUST_USE_RESULT MaybeObject* ToObject(Context* native_context); | 1444 MUST_USE_RESULT MaybeObject* ToObject(Context* native_context); |
1445 | 1445 |
1446 // Converts this to a Smi if possible. | 1446 // Converts this to a Smi if possible. |
1447 // Failure is returned otherwise. | 1447 // Failure is returned otherwise. |
1448 MUST_USE_RESULT inline MaybeObject* ToSmi(); | 1448 MUST_USE_RESULT inline MaybeObject* ToSmi(); |
1449 | 1449 |
1450 void Lookup(Name* name, LookupResult* result); | 1450 void Lookup(Name* name, LookupResult* result); |
1451 | 1451 |
1452 // Property access. | 1452 // Property access. |
1453 MUST_USE_RESULT inline MaybeObject* GetProperty(Name* key); | 1453 MUST_USE_RESULT inline MaybeObject* GetProperty(Name* key); |
1454 MUST_USE_RESULT inline MaybeObject* GetProperty( | 1454 MUST_USE_RESULT inline MaybeObject* GetProperty( |
1455 Name* key, | 1455 Name* key, |
1456 PropertyAttributes* attributes); | 1456 PropertyAttributes* attributes); |
1457 MUST_USE_RESULT MaybeObject* GetPropertyWithReceiver( | 1457 MUST_USE_RESULT MaybeObject* GetPropertyWithReceiver( |
1458 Object* receiver, | 1458 Object* receiver, |
1459 Name* key, | 1459 Name* key, |
1460 PropertyAttributes* attributes); | 1460 PropertyAttributes* attributes); |
1461 | 1461 |
1462 static Handle<Object> GetProperty(Handle<Object> object, Handle<Name> key); | 1462 static Handle<Object> GetProperty(Isolate* isolate, |
| 1463 Handle<Object> object, |
| 1464 Handle<Name> key); |
1463 static Handle<Object> GetProperty(Handle<Object> object, | 1465 static Handle<Object> GetProperty(Handle<Object> object, |
1464 Handle<Object> receiver, | 1466 Handle<Object> receiver, |
1465 LookupResult* result, | 1467 LookupResult* result, |
1466 Handle<Name> key, | 1468 Handle<Name> key, |
1467 PropertyAttributes* attributes); | 1469 PropertyAttributes* attributes); |
1468 | 1470 |
1469 MUST_USE_RESULT static MaybeObject* GetPropertyOrFail( | 1471 MUST_USE_RESULT static MaybeObject* GetPropertyOrFail( |
1470 Handle<Object> object, | 1472 Handle<Object> object, |
1471 Handle<Object> receiver, | 1473 Handle<Object> receiver, |
1472 LookupResult* result, | 1474 LookupResult* result, |
1473 Handle<Name> key, | 1475 Handle<Name> key, |
1474 PropertyAttributes* attributes); | 1476 PropertyAttributes* attributes); |
1475 | 1477 |
1476 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, | 1478 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, |
1477 LookupResult* result, | 1479 LookupResult* result, |
1478 Name* key, | 1480 Name* key, |
1479 PropertyAttributes* attributes); | 1481 PropertyAttributes* attributes); |
1480 | 1482 |
1481 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, | 1483 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, |
1482 JSReceiver* getter); | 1484 JSReceiver* getter); |
1483 | 1485 |
1484 static Handle<Object> GetElement(Handle<Object> object, uint32_t index); | 1486 static Handle<Object> GetElement(Isolate* isolate, |
1485 MUST_USE_RESULT inline MaybeObject* GetElement(uint32_t index); | 1487 Handle<Object> object, |
| 1488 uint32_t index); |
| 1489 MUST_USE_RESULT inline MaybeObject* GetElement(Isolate* isolate, |
| 1490 uint32_t index); |
1486 // For use when we know that no exception can be thrown. | 1491 // For use when we know that no exception can be thrown. |
1487 inline Object* GetElementNoExceptionThrown(uint32_t index); | 1492 inline Object* GetElementNoExceptionThrown(Isolate* isolate, uint32_t index); |
1488 MUST_USE_RESULT MaybeObject* GetElementWithReceiver(Object* receiver, | 1493 MUST_USE_RESULT MaybeObject* GetElementWithReceiver(Isolate* isolate, |
| 1494 Object* receiver, |
1489 uint32_t index); | 1495 uint32_t index); |
1490 | 1496 |
1491 // Return the object's prototype (might be Heap::null_value()). | 1497 // Return the object's prototype (might be Heap::null_value()). |
1492 Object* GetPrototype(Isolate* isolate); | 1498 Object* GetPrototype(Isolate* isolate); |
1493 | 1499 |
1494 // Returns the permanent hash code associated with this object depending on | 1500 // Returns the permanent hash code associated with this object depending on |
1495 // the actual object type. Might return a failure in case no hash was | 1501 // the actual object type. Might return a failure in case no hash was |
1496 // created yet or GC was caused by creation. | 1502 // created yet or GC was caused by creation. |
1497 MUST_USE_RESULT MaybeObject* GetHash(CreationFlag flag); | 1503 MUST_USE_RESULT MaybeObject* GetHash(CreationFlag flag); |
1498 | 1504 |
(...skipping 8661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10160 } else { | 10166 } else { |
10161 value &= ~(1 << bit_position); | 10167 value &= ~(1 << bit_position); |
10162 } | 10168 } |
10163 return value; | 10169 return value; |
10164 } | 10170 } |
10165 }; | 10171 }; |
10166 | 10172 |
10167 } } // namespace v8::internal | 10173 } } // namespace v8::internal |
10168 | 10174 |
10169 #endif // V8_OBJECTS_H_ | 10175 #endif // V8_OBJECTS_H_ |
OLD | NEW |