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

Side by Side Diff: src/mips/assembler-mips-inl.h

Issue 10824084: Fix deserializer to understand direct pointers from code to cell payloads. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 4 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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { 201 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() {
202 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); 202 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
203 Address address = Memory::Address_at(pc_); 203 Address address = Memory::Address_at(pc_);
204 return Handle<JSGlobalPropertyCell>( 204 return Handle<JSGlobalPropertyCell>(
205 reinterpret_cast<JSGlobalPropertyCell**>(address)); 205 reinterpret_cast<JSGlobalPropertyCell**>(address));
206 } 206 }
207 207
208 208
209 JSGlobalPropertyCell* RelocInfo::target_cell() { 209 JSGlobalPropertyCell* RelocInfo::target_cell() {
210 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); 210 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
211 Address address = Memory::Address_at(pc_); 211 return JSGlobalPropertyCell::FromValueAddress(Memory::Address_at(pc_));
212 Object* object = HeapObject::FromAddress(
213 address - JSGlobalPropertyCell::kValueOffset);
214 return reinterpret_cast<JSGlobalPropertyCell*>(object);
215 } 212 }
216 213
217 214
218 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, 215 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell,
219 WriteBarrierMode mode) { 216 WriteBarrierMode mode) {
220 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); 217 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
221 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; 218 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset;
222 Memory::Address_at(pc_) = address; 219 Memory::Address_at(pc_) = address;
223 if (mode == UPDATE_WRITE_BARRIER && host() != NULL) { 220 if (mode == UPDATE_WRITE_BARRIER && host() != NULL) {
224 // TODO(1550) We are passing NULL as a slot because cell can never be on 221 // TODO(1550) We are passing NULL as a slot because cell can never be on
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 361 }
365 *reinterpret_cast<Instr*>(pc_) = x; 362 *reinterpret_cast<Instr*>(pc_) = x;
366 pc_ += kInstrSize; 363 pc_ += kInstrSize;
367 CheckTrampolinePoolQuick(); 364 CheckTrampolinePoolQuick();
368 } 365 }
369 366
370 367
371 } } // namespace v8::internal 368 } } // namespace v8::internal
372 369
373 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ 370 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698