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

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

Issue 24031003: remove most uses of Isolate::Current in arch specific files (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: nit Created 7 years, 3 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 | « src/objects-visiting-inl.h ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 441
442 442
443 Object** RelocInfo::call_object_address() { 443 Object** RelocInfo::call_object_address() {
444 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || 444 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
445 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); 445 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
446 return reinterpret_cast<Object**>( 446 return reinterpret_cast<Object**>(
447 pc_ + Assembler::kPatchReturnSequenceAddressOffset); 447 pc_ + Assembler::kPatchReturnSequenceAddressOffset);
448 } 448 }
449 449
450 450
451 void RelocInfo::Visit(ObjectVisitor* visitor) { 451 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
452 RelocInfo::Mode mode = rmode(); 452 RelocInfo::Mode mode = rmode();
453 if (mode == RelocInfo::EMBEDDED_OBJECT) { 453 if (mode == RelocInfo::EMBEDDED_OBJECT) {
454 visitor->VisitEmbeddedPointer(this); 454 visitor->VisitEmbeddedPointer(this);
455 CPU::FlushICache(pc_, sizeof(Address)); 455 CPU::FlushICache(pc_, sizeof(Address));
456 } else if (RelocInfo::IsCodeTarget(mode)) { 456 } else if (RelocInfo::IsCodeTarget(mode)) {
457 visitor->VisitCodeTarget(this); 457 visitor->VisitCodeTarget(this);
458 } else if (mode == RelocInfo::CELL) { 458 } else if (mode == RelocInfo::CELL) {
459 visitor->VisitCell(this); 459 visitor->VisitCell(this);
460 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 460 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
461 visitor->VisitExternalReference(this); 461 visitor->VisitExternalReference(this);
462 CPU::FlushICache(pc_, sizeof(Address)); 462 CPU::FlushICache(pc_, sizeof(Address));
463 } else if (RelocInfo::IsCodeAgeSequence(mode)) { 463 } else if (RelocInfo::IsCodeAgeSequence(mode)) {
464 visitor->VisitCodeAgeSequence(this); 464 visitor->VisitCodeAgeSequence(this);
465 #ifdef ENABLE_DEBUGGER_SUPPORT 465 #ifdef ENABLE_DEBUGGER_SUPPORT
466 // TODO(isolates): Get a cached isolate below.
467 } else if (((RelocInfo::IsJSReturn(mode) && 466 } else if (((RelocInfo::IsJSReturn(mode) &&
468 IsPatchedReturnSequence()) || 467 IsPatchedReturnSequence()) ||
469 (RelocInfo::IsDebugBreakSlot(mode) && 468 (RelocInfo::IsDebugBreakSlot(mode) &&
470 IsPatchedDebugBreakSlotSequence())) && 469 IsPatchedDebugBreakSlotSequence())) &&
471 Isolate::Current()->debug()->has_break_points()) { 470 isolate->debug()->has_break_points()) {
472 visitor->VisitDebugTarget(this); 471 visitor->VisitDebugTarget(this);
473 #endif 472 #endif
474 } else if (RelocInfo::IsRuntimeEntry(mode)) { 473 } else if (RelocInfo::IsRuntimeEntry(mode)) {
475 visitor->VisitRuntimeEntry(this); 474 visitor->VisitRuntimeEntry(this);
476 } 475 }
477 } 476 }
478 477
479 478
480 template<typename StaticVisitor> 479 template<typename StaticVisitor>
481 void RelocInfo::Visit(Heap* heap) { 480 void RelocInfo::Visit(Heap* heap) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 ASSERT(len_ == 1 || len_ == 2); 539 ASSERT(len_ == 1 || len_ == 2);
541 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); 540 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
542 *p = disp; 541 *p = disp;
543 len_ += sizeof(int32_t); 542 len_ += sizeof(int32_t);
544 } 543 }
545 544
546 545
547 } } // namespace v8::internal 546 } } // namespace v8::internal
548 547
549 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 548 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/objects-visiting-inl.h ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698