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

Side by Side Diff: src/assembler.cc

Issue 6062002: Merge 6006:6095 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 10 years 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/assembler.h ('k') | src/ast.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 (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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 #endif 461 #endif
462 return "debug break slot"; 462 return "debug break slot";
463 case RelocInfo::NUMBER_OF_MODES: 463 case RelocInfo::NUMBER_OF_MODES:
464 UNREACHABLE(); 464 UNREACHABLE();
465 return "number_of_modes"; 465 return "number_of_modes";
466 } 466 }
467 return "unknown relocation type"; 467 return "unknown relocation type";
468 } 468 }
469 469
470 470
471 void RelocInfo::Print() { 471 void RelocInfo::Print(FILE* out) {
472 PrintF("%p %s", pc_, RelocModeName(rmode_)); 472 PrintF(out, "%p %s", pc_, RelocModeName(rmode_));
473 if (IsComment(rmode_)) { 473 if (IsComment(rmode_)) {
474 PrintF(" (%s)", reinterpret_cast<char*>(data_)); 474 PrintF(out, " (%s)", reinterpret_cast<char*>(data_));
475 } else if (rmode_ == EMBEDDED_OBJECT) { 475 } else if (rmode_ == EMBEDDED_OBJECT) {
476 PrintF(" ("); 476 PrintF(out, " (");
477 target_object()->ShortPrint(); 477 target_object()->ShortPrint(out);
478 PrintF(")"); 478 PrintF(out, ")");
479 } else if (rmode_ == EXTERNAL_REFERENCE) { 479 } else if (rmode_ == EXTERNAL_REFERENCE) {
480 ExternalReferenceEncoder ref_encoder; 480 ExternalReferenceEncoder ref_encoder;
481 PrintF(" (%s) (%p)", 481 PrintF(out, " (%s) (%p)",
482 ref_encoder.NameOfAddress(*target_reference_address()), 482 ref_encoder.NameOfAddress(*target_reference_address()),
483 *target_reference_address()); 483 *target_reference_address());
484 } else if (IsCodeTarget(rmode_)) { 484 } else if (IsCodeTarget(rmode_)) {
485 Code* code = Code::GetCodeFromTargetAddress(target_address()); 485 Code* code = Code::GetCodeFromTargetAddress(target_address());
486 PrintF(" (%s) (%p)", Code::Kind2String(code->kind()), target_address()); 486 PrintF(out, " (%s) (%p)", Code::Kind2String(code->kind()),
487 target_address());
487 } else if (IsPosition(rmode_)) { 488 } else if (IsPosition(rmode_)) {
488 PrintF(" (%" V8_PTR_PREFIX "d)", data()); 489 PrintF(out, " (%" V8_PTR_PREFIX "d)", data());
489 } else if (rmode_ == RelocInfo::RUNTIME_ENTRY) { 490 } else if (rmode_ == RelocInfo::RUNTIME_ENTRY) {
490 // Depotimization bailouts are stored as runtime entries. 491 // Depotimization bailouts are stored as runtime entries.
491 int id = Deoptimizer::GetDeoptimizationId( 492 int id = Deoptimizer::GetDeoptimizationId(
492 target_address(), Deoptimizer::EAGER); 493 target_address(), Deoptimizer::EAGER);
493 if (id != Deoptimizer::kNotDeoptimizationEntry) { 494 if (id != Deoptimizer::kNotDeoptimizationEntry) {
494 PrintF(" (deoptimization bailout %d)", id); 495 PrintF(out, " (deoptimization bailout %d)", id);
495 } 496 }
496 } 497 }
497 498
498 PrintF("\n"); 499 PrintF(out, "\n");
499 } 500 }
500 #endif // ENABLE_DISASSEMBLER 501 #endif // ENABLE_DISASSEMBLER
501 502
502 503
503 #ifdef DEBUG 504 #ifdef DEBUG
504 void RelocInfo::Verify() { 505 void RelocInfo::Verify() {
505 switch (rmode_) { 506 switch (rmode_) {
506 case EMBEDDED_OBJECT: 507 case EMBEDDED_OBJECT:
507 Object::VerifyPointer(target_object()); 508 Object::VerifyPointer(target_object());
508 break; 509 break;
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 942 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
942 state_.written_position = state_.current_position; 943 state_.written_position = state_.current_position;
943 written = true; 944 written = true;
944 } 945 }
945 946
946 // Return whether something was written. 947 // Return whether something was written.
947 return written; 948 return written;
948 } 949 }
949 950
950 } } // namespace v8::internal 951 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698