| 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 4545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4556 return result; | 4556 return result; |
| 4557 } | 4557 } |
| 4558 | 4558 |
| 4559 | 4559 |
| 4560 Object* Code::GetObjectFromEntryAddress(Address location_of_address) { | 4560 Object* Code::GetObjectFromEntryAddress(Address location_of_address) { |
| 4561 return HeapObject:: | 4561 return HeapObject:: |
| 4562 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); | 4562 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); |
| 4563 } | 4563 } |
| 4564 | 4564 |
| 4565 | 4565 |
| 4566 bool Code::IsWeakObjectInOptimizedCode(Object* object) { |
| 4567 ASSERT(is_optimized_code()); |
| 4568 if (object->IsMap()) { |
| 4569 return Map::cast(object)->CanTransition() && |
| 4570 FLAG_collect_maps && |
| 4571 FLAG_weak_embedded_maps_in_optimized_code; |
| 4572 } |
| 4573 if (object->IsJSObject() || |
| 4574 (object->IsCell() && Cell::cast(object)->value()->IsJSObject())) { |
| 4575 return FLAG_weak_embedded_objects_in_optimized_code; |
| 4576 } |
| 4577 return false; |
| 4578 } |
| 4579 |
| 4580 |
| 4566 Object* Map::prototype() { | 4581 Object* Map::prototype() { |
| 4567 return READ_FIELD(this, kPrototypeOffset); | 4582 return READ_FIELD(this, kPrototypeOffset); |
| 4568 } | 4583 } |
| 4569 | 4584 |
| 4570 | 4585 |
| 4571 void Map::set_prototype(Object* value, WriteBarrierMode mode) { | 4586 void Map::set_prototype(Object* value, WriteBarrierMode mode) { |
| 4572 ASSERT(value->IsNull() || value->IsJSReceiver()); | 4587 ASSERT(value->IsNull() || value->IsJSReceiver()); |
| 4573 WRITE_FIELD(this, kPrototypeOffset, value); | 4588 WRITE_FIELD(this, kPrototypeOffset, value); |
| 4574 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kPrototypeOffset, value, mode); | 4589 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kPrototypeOffset, value, mode); |
| 4575 } | 4590 } |
| (...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6750 #undef READ_UINT32_FIELD | 6765 #undef READ_UINT32_FIELD |
| 6751 #undef WRITE_UINT32_FIELD | 6766 #undef WRITE_UINT32_FIELD |
| 6752 #undef READ_SHORT_FIELD | 6767 #undef READ_SHORT_FIELD |
| 6753 #undef WRITE_SHORT_FIELD | 6768 #undef WRITE_SHORT_FIELD |
| 6754 #undef READ_BYTE_FIELD | 6769 #undef READ_BYTE_FIELD |
| 6755 #undef WRITE_BYTE_FIELD | 6770 #undef WRITE_BYTE_FIELD |
| 6756 | 6771 |
| 6757 } } // namespace v8::internal | 6772 } } // namespace v8::internal |
| 6758 | 6773 |
| 6759 #endif // V8_OBJECTS_INL_H_ | 6774 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |