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

Side by Side Diff: src/assembler.cc

Issue 193111: Use GetCodeFromTargetAddress everywhere, uniformly. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 | « no previous file | src/mark-compact.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 (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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 case EMBEDDED_OBJECT: 487 case EMBEDDED_OBJECT:
488 Object::VerifyPointer(target_object()); 488 Object::VerifyPointer(target_object());
489 break; 489 break;
490 case CONSTRUCT_CALL: 490 case CONSTRUCT_CALL:
491 case CODE_TARGET_CONTEXT: 491 case CODE_TARGET_CONTEXT:
492 case CODE_TARGET: { 492 case CODE_TARGET: {
493 // convert inline target address to code object 493 // convert inline target address to code object
494 Address addr = target_address(); 494 Address addr = target_address();
495 ASSERT(addr != NULL); 495 ASSERT(addr != NULL);
496 // Check that we can find the right code object. 496 // Check that we can find the right code object.
497 HeapObject* code = HeapObject::FromAddress(addr - Code::kHeaderSize); 497 Code* code = Code::GetCodeFromTargetAddress(addr);
498 Object* found = Heap::FindCodeObject(addr); 498 Object* found = Heap::FindCodeObject(addr);
499 ASSERT(found->IsCode()); 499 ASSERT(found->IsCode());
500 ASSERT(code->address() == HeapObject::cast(found)->address()); 500 ASSERT(code->address() == HeapObject::cast(found)->address());
501 break; 501 break;
502 } 502 }
503 case RelocInfo::EMBEDDED_STRING: 503 case RelocInfo::EMBEDDED_STRING:
504 case RUNTIME_ENTRY: 504 case RUNTIME_ENTRY:
505 case JS_RETURN: 505 case JS_RETURN:
506 case COMMENT: 506 case COMMENT:
507 case POSITION: 507 case POSITION:
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); 713 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break)));
714 } 714 }
715 715
716 716
717 ExternalReference ExternalReference::debug_step_in_fp_address() { 717 ExternalReference ExternalReference::debug_step_in_fp_address() {
718 return ExternalReference(Debug::step_in_fp_addr()); 718 return ExternalReference(Debug::step_in_fp_addr());
719 } 719 }
720 #endif 720 #endif
721 721
722 } } // namespace v8::internal 722 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698