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

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

Issue 3066044: Generalize virtually dispatched scavenger to virtually dispatched specialized visitors. (Closed)
Patch Set: cleanup Created 10 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
« no previous file with comments | « src/serialize.cc ('k') | tools/gc-nvp-trace-processor.py » ('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 2009 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 (RelocInfo::IsDebugBreakSlot(mode) && 343 (RelocInfo::IsDebugBreakSlot(mode) &&
344 IsPatchedDebugBreakSlotSequence()))) { 344 IsPatchedDebugBreakSlotSequence()))) {
345 visitor->VisitDebugTarget(this); 345 visitor->VisitDebugTarget(this);
346 #endif 346 #endif
347 } else if (mode == RelocInfo::RUNTIME_ENTRY) { 347 } else if (mode == RelocInfo::RUNTIME_ENTRY) {
348 visitor->VisitRuntimeEntry(this); 348 visitor->VisitRuntimeEntry(this);
349 } 349 }
350 } 350 }
351 351
352 352
353 template<typename StaticVisitor>
354 void RelocInfo::Visit() {
355 RelocInfo::Mode mode = rmode();
356 if (mode == RelocInfo::EMBEDDED_OBJECT) {
357 StaticVisitor::VisitPointer(target_object_address());
358 } else if (RelocInfo::IsCodeTarget(mode)) {
359 StaticVisitor::VisitCodeTarget(this);
360 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
361 StaticVisitor::VisitExternalReference(target_reference_address());
362 #ifdef ENABLE_DEBUGGER_SUPPORT
363 } else if (Debug::has_break_points() &&
364 ((RelocInfo::IsJSReturn(mode) &&
365 IsPatchedReturnSequence()) ||
366 (RelocInfo::IsDebugBreakSlot(mode) &&
367 IsPatchedDebugBreakSlotSequence()))) {
368 StaticVisitor::VisitDebugTarget(this);
369 #endif
370 } else if (mode == RelocInfo::RUNTIME_ENTRY) {
371 StaticVisitor::VisitRuntimeEntry(this);
372 }
373 }
374
375
353 // ----------------------------------------------------------------------------- 376 // -----------------------------------------------------------------------------
354 // Implementation of Operand 377 // Implementation of Operand
355 378
356 void Operand::set_modrm(int mod, Register rm_reg) { 379 void Operand::set_modrm(int mod, Register rm_reg) {
357 ASSERT(is_uint2(mod)); 380 ASSERT(is_uint2(mod));
358 buf_[0] = mod << 6 | rm_reg.low_bits(); 381 buf_[0] = mod << 6 | rm_reg.low_bits();
359 // Set REX.B to the high bit of rm.code(). 382 // Set REX.B to the high bit of rm.code().
360 rex_ |= rm_reg.high_bit(); 383 rex_ |= rm_reg.high_bit();
361 } 384 }
362 385
(...skipping 21 matching lines...) Expand all
384 ASSERT(len_ == 1 || len_ == 2); 407 ASSERT(len_ == 1 || len_ == 2);
385 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); 408 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
386 *p = disp; 409 *p = disp;
387 len_ += sizeof(int32_t); 410 len_ += sizeof(int32_t);
388 } 411 }
389 412
390 413
391 } } // namespace v8::internal 414 } } // namespace v8::internal
392 415
393 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 416 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | tools/gc-nvp-trace-processor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698