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

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

Issue 16858003: MIPS: Separate Cell and PropertyCell spaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed nits. Created 7 years, 6 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
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.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 1
2 // Copyright (c) 1994-2006 Sun Microsystems Inc. 2 // Copyright (c) 1994-2006 Sun Microsystems Inc.
3 // All Rights Reserved. 3 // All Rights Reserved.
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // - Redistributions of source code must retain the above copyright notice, 9 // - Redistributions of source code must retain the above copyright notice,
10 // this list of conditions and the following disclaimer. 10 // this list of conditions and the following disclaimer.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 227
228 void RelocInfo::set_target_runtime_entry(Address target, 228 void RelocInfo::set_target_runtime_entry(Address target,
229 WriteBarrierMode mode) { 229 WriteBarrierMode mode) {
230 ASSERT(IsRuntimeEntry(rmode_)); 230 ASSERT(IsRuntimeEntry(rmode_));
231 if (target_address() != target) set_target_address(target, mode); 231 if (target_address() != target) set_target_address(target, mode);
232 } 232 }
233 233
234 234
235 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { 235 Handle<Cell> RelocInfo::target_cell_handle() {
236 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); 236 ASSERT(rmode_ == RelocInfo::CELL);
237 Address address = Memory::Address_at(pc_); 237 Address address = Memory::Address_at(pc_);
238 return Handle<JSGlobalPropertyCell>( 238 return Handle<Cell>(reinterpret_cast<Cell**>(address));
239 reinterpret_cast<JSGlobalPropertyCell**>(address));
240 } 239 }
241 240
242 241
243 JSGlobalPropertyCell* RelocInfo::target_cell() { 242 Cell* RelocInfo::target_cell() {
244 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); 243 ASSERT(rmode_ == RelocInfo::CELL);
245 return JSGlobalPropertyCell::FromValueAddress(Memory::Address_at(pc_)); 244 return Cell::FromValueAddress(Memory::Address_at(pc_));
246 } 245 }
247 246
248 247
249 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, 248 void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode mode) {
250 WriteBarrierMode mode) { 249 ASSERT(rmode_ == RelocInfo::CELL);
251 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); 250 Address address = cell->address() + Cell::kValueOffset;
252 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset;
253 Memory::Address_at(pc_) = address; 251 Memory::Address_at(pc_) = address;
254 if (mode == UPDATE_WRITE_BARRIER && host() != NULL) { 252 if (mode == UPDATE_WRITE_BARRIER && host() != NULL) {
255 // TODO(1550) We are passing NULL as a slot because cell can never be on 253 // TODO(1550) We are passing NULL as a slot because cell can never be on
256 // evacuation candidate. 254 // evacuation candidate.
257 host()->GetHeap()->incremental_marking()->RecordWrite( 255 host()->GetHeap()->incremental_marking()->RecordWrite(
258 host(), NULL, cell); 256 host(), NULL, cell);
259 } 257 }
260 } 258 }
261 259
262 260
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 return !Assembler::IsNop(current_instr, Assembler::DEBUG_BREAK_NOP); 336 return !Assembler::IsNop(current_instr, Assembler::DEBUG_BREAK_NOP);
339 } 337 }
340 338
341 339
342 void RelocInfo::Visit(ObjectVisitor* visitor) { 340 void RelocInfo::Visit(ObjectVisitor* visitor) {
343 RelocInfo::Mode mode = rmode(); 341 RelocInfo::Mode mode = rmode();
344 if (mode == RelocInfo::EMBEDDED_OBJECT) { 342 if (mode == RelocInfo::EMBEDDED_OBJECT) {
345 visitor->VisitEmbeddedPointer(this); 343 visitor->VisitEmbeddedPointer(this);
346 } else if (RelocInfo::IsCodeTarget(mode)) { 344 } else if (RelocInfo::IsCodeTarget(mode)) {
347 visitor->VisitCodeTarget(this); 345 visitor->VisitCodeTarget(this);
348 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { 346 } else if (mode == RelocInfo::CELL) {
349 visitor->VisitGlobalPropertyCell(this); 347 visitor->VisitCell(this);
350 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 348 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
351 visitor->VisitExternalReference(this); 349 visitor->VisitExternalReference(this);
352 } else if (RelocInfo::IsCodeAgeSequence(mode)) { 350 } else if (RelocInfo::IsCodeAgeSequence(mode)) {
353 visitor->VisitCodeAgeSequence(this); 351 visitor->VisitCodeAgeSequence(this);
354 #ifdef ENABLE_DEBUGGER_SUPPORT 352 #ifdef ENABLE_DEBUGGER_SUPPORT
355 // TODO(isolates): Get a cached isolate below. 353 // TODO(isolates): Get a cached isolate below.
356 } else if (((RelocInfo::IsJSReturn(mode) && 354 } else if (((RelocInfo::IsJSReturn(mode) &&
357 IsPatchedReturnSequence()) || 355 IsPatchedReturnSequence()) ||
358 (RelocInfo::IsDebugBreakSlot(mode) && 356 (RelocInfo::IsDebugBreakSlot(mode) &&
359 IsPatchedDebugBreakSlotSequence())) && 357 IsPatchedDebugBreakSlotSequence())) &&
360 Isolate::Current()->debug()->has_break_points()) { 358 Isolate::Current()->debug()->has_break_points()) {
361 visitor->VisitDebugTarget(this); 359 visitor->VisitDebugTarget(this);
362 #endif 360 #endif
363 } else if (RelocInfo::IsRuntimeEntry(mode)) { 361 } else if (RelocInfo::IsRuntimeEntry(mode)) {
364 visitor->VisitRuntimeEntry(this); 362 visitor->VisitRuntimeEntry(this);
365 } 363 }
366 } 364 }
367 365
368 366
369 template<typename StaticVisitor> 367 template<typename StaticVisitor>
370 void RelocInfo::Visit(Heap* heap) { 368 void RelocInfo::Visit(Heap* heap) {
371 RelocInfo::Mode mode = rmode(); 369 RelocInfo::Mode mode = rmode();
372 if (mode == RelocInfo::EMBEDDED_OBJECT) { 370 if (mode == RelocInfo::EMBEDDED_OBJECT) {
373 StaticVisitor::VisitEmbeddedPointer(heap, this); 371 StaticVisitor::VisitEmbeddedPointer(heap, this);
374 } else if (RelocInfo::IsCodeTarget(mode)) { 372 } else if (RelocInfo::IsCodeTarget(mode)) {
375 StaticVisitor::VisitCodeTarget(heap, this); 373 StaticVisitor::VisitCodeTarget(heap, this);
376 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { 374 } else if (mode == RelocInfo::CELL) {
377 StaticVisitor::VisitGlobalPropertyCell(heap, this); 375 StaticVisitor::VisitCell(heap, this);
378 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 376 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
379 StaticVisitor::VisitExternalReference(this); 377 StaticVisitor::VisitExternalReference(this);
380 } else if (RelocInfo::IsCodeAgeSequence(mode)) { 378 } else if (RelocInfo::IsCodeAgeSequence(mode)) {
381 StaticVisitor::VisitCodeAgeSequence(heap, this); 379 StaticVisitor::VisitCodeAgeSequence(heap, this);
382 #ifdef ENABLE_DEBUGGER_SUPPORT 380 #ifdef ENABLE_DEBUGGER_SUPPORT
383 } else if (heap->isolate()->debug()->has_break_points() && 381 } else if (heap->isolate()->debug()->has_break_points() &&
384 ((RelocInfo::IsJSReturn(mode) && 382 ((RelocInfo::IsJSReturn(mode) &&
385 IsPatchedReturnSequence()) || 383 IsPatchedReturnSequence()) ||
386 (RelocInfo::IsDebugBreakSlot(mode) && 384 (RelocInfo::IsDebugBreakSlot(mode) &&
387 IsPatchedDebugBreakSlotSequence()))) { 385 IsPatchedDebugBreakSlotSequence()))) {
(...skipping 29 matching lines...) Expand all
417 } 415 }
418 *reinterpret_cast<Instr*>(pc_) = x; 416 *reinterpret_cast<Instr*>(pc_) = x;
419 pc_ += kInstrSize; 417 pc_ += kInstrSize;
420 CheckTrampolinePoolQuick(); 418 CheckTrampolinePoolQuick();
421 } 419 }
422 420
423 421
424 } } // namespace v8::internal 422 } } // namespace v8::internal
425 423
426 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ 424 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698