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

Side by Side Diff: src/assembler.cc

Issue 19785004: Move FindCodeObject from Heap to Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/deoptimizer.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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 #endif 842 #endif
843 case CONSTRUCT_CALL: 843 case CONSTRUCT_CALL:
844 case CODE_TARGET_CONTEXT: 844 case CODE_TARGET_CONTEXT:
845 case CODE_TARGET_WITH_ID: 845 case CODE_TARGET_WITH_ID:
846 case CODE_TARGET: { 846 case CODE_TARGET: {
847 // convert inline target address to code object 847 // convert inline target address to code object
848 Address addr = target_address(); 848 Address addr = target_address();
849 CHECK(addr != NULL); 849 CHECK(addr != NULL);
850 // Check that we can find the right code object. 850 // Check that we can find the right code object.
851 Code* code = Code::GetCodeFromTargetAddress(addr); 851 Code* code = Code::GetCodeFromTargetAddress(addr);
852 Object* found = HEAP->FindCodeObject(addr); 852 Object* found = code->GetIsolate()->FindCodeObject(addr);
853 CHECK(found->IsCode()); 853 CHECK(found->IsCode());
854 CHECK(code->address() == HeapObject::cast(found)->address()); 854 CHECK(code->address() == HeapObject::cast(found)->address());
855 break; 855 break;
856 } 856 }
857 case RUNTIME_ENTRY: 857 case RUNTIME_ENTRY:
858 case JS_RETURN: 858 case JS_RETURN:
859 case COMMENT: 859 case COMMENT:
860 case POSITION: 860 case POSITION:
861 case STATEMENT_POSITION: 861 case STATEMENT_POSITION:
862 case EXTERNAL_REFERENCE: 862 case EXTERNAL_REFERENCE:
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1677 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1678 state_.written_position = state_.current_position; 1678 state_.written_position = state_.current_position;
1679 written = true; 1679 written = true;
1680 } 1680 }
1681 1681
1682 // Return whether something was written. 1682 // Return whether something was written.
1683 return written; 1683 return written;
1684 } 1684 }
1685 1685
1686 } } // namespace v8::internal 1686 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698