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

Unified Diff: src/assembler.h

Issue 2218002: The way reloc entries are visited by the ObjectVisitor is architecture... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
===================================================================
--- src/assembler.h (revision 4713)
+++ src/assembler.h (working copy)
@@ -38,6 +38,7 @@
#include "runtime.h"
#include "top.h"
#include "token.h"
+#include "objects.h"
namespace v8 {
namespace internal {
@@ -199,9 +200,23 @@
INLINE(Object** target_object_address());
INLINE(void set_target_object(Object* target));
- // Read the address of the word containing the target_address. Can only
- // be called if IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY.
+ // Read the address of the word containing the target_address in an
+ // instruction stream. What this means exactly is architecture-independent.
+ // The only architecture-independent user of this function is the serializer.
+ // The serializer uses it to find out how many raw bytes of instruction to
+ // output before the next target. Architecture-independent code shouldn't
+ // dereference the pointer it gets back from this.
INLINE(Address target_address_address());
+ // This indicates how much space a target takes up when deserializing a code
+ // stream. For most architectures this is just the size of a pointer. For
+ // an instruction like movw/movt where the target bits are mixed into the
+ // instruction bits the size of the target will be zero, indicating that the
+ // serializer should not step forwards in memory after a target is resolved
+ // and written. In this case the target_address_address function above
+ // should return the end of the instructions to be patched, allowing the
+ // deserializer to deserialize the instructions as raw bytes and put them in
+ // place, ready to be patched with the target.
+ INLINE(int target_address_size());
// Read/modify the reference in the instruction this relocation
// applies to; can only be called if rmode_ is external_reference
@@ -216,6 +231,8 @@
INLINE(Object** call_object_address());
INLINE(void set_call_object(Object* target));
+ inline void Visit(ObjectVisitor* v);
+
// Patch the code with some other code.
void PatchCode(byte* instructions, int instruction_count);
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698