| Index: src/ia32/assembler-ia32-inl.h
|
| diff --git a/src/ia32/assembler-ia32-inl.h b/src/ia32/assembler-ia32-inl.h
|
| index cc24413e54343fa9f4021afeed041f56be271dc9..ab8660c8d51e09b99faf6126d39b7ade570dfc0e 100644
|
| --- a/src/ia32/assembler-ia32-inl.h
|
| +++ b/src/ia32/assembler-ia32-inl.h
|
| @@ -120,6 +120,30 @@ Address* RelocInfo::target_reference_address() {
|
| }
|
|
|
|
|
| +Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() {
|
| + ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
|
| + Address address = Memory::Address_at(pc_);
|
| + return Handle<JSGlobalPropertyCell>(
|
| + reinterpret_cast<JSGlobalPropertyCell**>(address));
|
| +}
|
| +
|
| +
|
| +JSGlobalPropertyCell* RelocInfo::target_cell() {
|
| + ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
|
| + Address address = Memory::Address_at(pc_);
|
| + Object* object = HeapObject::FromAddress(
|
| + address - JSGlobalPropertyCell::kValueOffset);
|
| + return reinterpret_cast<JSGlobalPropertyCell*>(object);
|
| +}
|
| +
|
| +
|
| +void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell) {
|
| + ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
|
| + Address address = cell->address() + JSGlobalPropertyCell::kValueOffset;
|
| + Memory::Address_at(pc_) = address;
|
| +}
|
| +
|
| +
|
| Address RelocInfo::call_address() {
|
| ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
|
| (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
|
| @@ -167,6 +191,8 @@ void RelocInfo::Visit(ObjectVisitor* visitor) {
|
| visitor->VisitPointer(target_object_address());
|
| } else if (RelocInfo::IsCodeTarget(mode)) {
|
| visitor->VisitCodeTarget(this);
|
| + } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
|
| + visitor->VisitGlobalPropertyCell(this);
|
| } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
|
| visitor->VisitExternalReference(target_reference_address());
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| @@ -191,6 +217,8 @@ void RelocInfo::Visit(Heap* heap) {
|
| StaticVisitor::VisitPointer(heap, target_object_address());
|
| } else if (RelocInfo::IsCodeTarget(mode)) {
|
| StaticVisitor::VisitCodeTarget(this);
|
| + } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
|
| + StaticVisitor::VisitGlobalPropertyCell(this);
|
| } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
|
| StaticVisitor::VisitExternalReference(target_reference_address());
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| @@ -247,6 +275,12 @@ Immediate::Immediate(Smi* value) {
|
| }
|
|
|
|
|
| +Immediate::Immediate(Address addr) {
|
| + x_ = reinterpret_cast<int32_t>(addr);
|
| + rmode_ = RelocInfo::NONE;
|
| +}
|
| +
|
| +
|
| void Assembler::emit(uint32_t x) {
|
| *reinterpret_cast<uint32_t*>(pc_) = x;
|
| pc_ += sizeof(uint32_t);
|
|
|