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

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

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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/x64/assembler-x64.cc ('k') | src/x64/builtins-x64.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 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 359 }
360 360
361 361
362 void RelocInfo::Visit(ObjectVisitor* visitor) { 362 void RelocInfo::Visit(ObjectVisitor* visitor) {
363 RelocInfo::Mode mode = rmode(); 363 RelocInfo::Mode mode = rmode();
364 if (mode == RelocInfo::EMBEDDED_OBJECT) { 364 if (mode == RelocInfo::EMBEDDED_OBJECT) {
365 visitor->VisitPointer(target_object_address()); 365 visitor->VisitPointer(target_object_address());
366 CPU::FlushICache(pc_, sizeof(Address)); 366 CPU::FlushICache(pc_, sizeof(Address));
367 } else if (RelocInfo::IsCodeTarget(mode)) { 367 } else if (RelocInfo::IsCodeTarget(mode)) {
368 visitor->VisitCodeTarget(this); 368 visitor->VisitCodeTarget(this);
369 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
370 visitor->VisitGlobalPropertyCell(this);
369 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 371 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
370 visitor->VisitExternalReference(target_reference_address()); 372 visitor->VisitExternalReference(target_reference_address());
371 CPU::FlushICache(pc_, sizeof(Address)); 373 CPU::FlushICache(pc_, sizeof(Address));
372 #ifdef ENABLE_DEBUGGER_SUPPORT 374 #ifdef ENABLE_DEBUGGER_SUPPORT
373 // TODO(isolates): Get a cached isolate below. 375 // TODO(isolates): Get a cached isolate below.
374 } else if (((RelocInfo::IsJSReturn(mode) && 376 } else if (((RelocInfo::IsJSReturn(mode) &&
375 IsPatchedReturnSequence()) || 377 IsPatchedReturnSequence()) ||
376 (RelocInfo::IsDebugBreakSlot(mode) && 378 (RelocInfo::IsDebugBreakSlot(mode) &&
377 IsPatchedDebugBreakSlotSequence())) && 379 IsPatchedDebugBreakSlotSequence())) &&
378 Isolate::Current()->debug()->has_break_points()) { 380 Isolate::Current()->debug()->has_break_points()) {
379 visitor->VisitDebugTarget(this); 381 visitor->VisitDebugTarget(this);
380 #endif 382 #endif
381 } else if (mode == RelocInfo::RUNTIME_ENTRY) { 383 } else if (mode == RelocInfo::RUNTIME_ENTRY) {
382 visitor->VisitRuntimeEntry(this); 384 visitor->VisitRuntimeEntry(this);
383 } 385 }
384 } 386 }
385 387
386 388
387 template<typename StaticVisitor> 389 template<typename StaticVisitor>
388 void RelocInfo::Visit(Heap* heap) { 390 void RelocInfo::Visit(Heap* heap) {
389 RelocInfo::Mode mode = rmode(); 391 RelocInfo::Mode mode = rmode();
390 if (mode == RelocInfo::EMBEDDED_OBJECT) { 392 if (mode == RelocInfo::EMBEDDED_OBJECT) {
391 StaticVisitor::VisitPointer(heap, target_object_address()); 393 StaticVisitor::VisitPointer(heap, target_object_address());
392 CPU::FlushICache(pc_, sizeof(Address)); 394 CPU::FlushICache(pc_, sizeof(Address));
393 } else if (RelocInfo::IsCodeTarget(mode)) { 395 } else if (RelocInfo::IsCodeTarget(mode)) {
394 StaticVisitor::VisitCodeTarget(this); 396 StaticVisitor::VisitCodeTarget(this);
397 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
398 StaticVisitor::VisitGlobalPropertyCell(this);
395 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 399 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
396 StaticVisitor::VisitExternalReference(target_reference_address()); 400 StaticVisitor::VisitExternalReference(target_reference_address());
397 CPU::FlushICache(pc_, sizeof(Address)); 401 CPU::FlushICache(pc_, sizeof(Address));
398 #ifdef ENABLE_DEBUGGER_SUPPORT 402 #ifdef ENABLE_DEBUGGER_SUPPORT
399 } else if (heap->isolate()->debug()->has_break_points() && 403 } else if (heap->isolate()->debug()->has_break_points() &&
400 ((RelocInfo::IsJSReturn(mode) && 404 ((RelocInfo::IsJSReturn(mode) &&
401 IsPatchedReturnSequence()) || 405 IsPatchedReturnSequence()) ||
402 (RelocInfo::IsDebugBreakSlot(mode) && 406 (RelocInfo::IsDebugBreakSlot(mode) &&
403 IsPatchedDebugBreakSlotSequence()))) { 407 IsPatchedDebugBreakSlotSequence()))) {
404 StaticVisitor::VisitDebugTarget(this); 408 StaticVisitor::VisitDebugTarget(this);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 ASSERT(len_ == 1 || len_ == 2); 447 ASSERT(len_ == 1 || len_ == 2);
444 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); 448 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
445 *p = disp; 449 *p = disp;
446 len_ += sizeof(int32_t); 450 len_ += sizeof(int32_t);
447 } 451 }
448 452
449 453
450 } } // namespace v8::internal 454 } } // namespace v8::internal
451 455
452 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 456 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698