Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 377 Code* host() const { return host_; } | 377 Code* host() const { return host_; } |
| 378 | 378 |
| 379 // Apply a relocation by delta bytes | 379 // Apply a relocation by delta bytes |
| 380 INLINE(void apply(intptr_t delta)); | 380 INLINE(void apply(intptr_t delta)); |
| 381 | 381 |
| 382 // Is the pointer this relocation info refers to coded like a plain pointer | 382 // Is the pointer this relocation info refers to coded like a plain pointer |
| 383 // or is it strange in some way (e.g. relative or patched into a series of | 383 // or is it strange in some way (e.g. relative or patched into a series of |
| 384 // instructions). | 384 // instructions). |
| 385 bool IsCodedSpecially(); | 385 bool IsCodedSpecially(); |
| 386 | 386 |
| 387 // If true, the pointer this relocation info refers to is an entry in the | |
| 388 // constant pool, otherwise the pointer is embedded in the instruction stream. | |
| 389 bool IsInConstantPool(); | |
| 390 | |
| 387 // Read/modify the code target in the branch/call instruction | 391 // Read/modify the code target in the branch/call instruction |
| 388 // this relocation applies to; | 392 // this relocation applies to; |
| 389 // can only be called if IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) | 393 // can only be called if IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) |
| 390 INLINE(Address target_address()); | 394 INLINE(Address target_address()); |
| 391 INLINE(void set_target_address(Address target, | 395 INLINE(void set_target_address(Address target, |
| 392 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); | 396 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
| 393 INLINE(Object* target_object()); | 397 INLINE(Object* target_object()); |
| 394 INLINE(Handle<Object> target_object_handle(Assembler* origin)); | 398 INLINE(Handle<Object> target_object_handle(Assembler* origin)); |
| 395 INLINE(void set_target_object(Object* target, | 399 INLINE(void set_target_object(Object* target, |
| 396 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); | 400 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
| 397 INLINE(Address target_runtime_entry(Assembler* origin)); | 401 INLINE(Address target_runtime_entry(Assembler* origin)); |
| 398 INLINE(void set_target_runtime_entry(Address target, | 402 INLINE(void set_target_runtime_entry(Address target, |
| 399 WriteBarrierMode mode = | 403 WriteBarrierMode mode = |
| 400 UPDATE_WRITE_BARRIER)); | 404 UPDATE_WRITE_BARRIER)); |
| 401 INLINE(Cell* target_cell()); | 405 INLINE(Cell* target_cell()); |
| 402 INLINE(Handle<Cell> target_cell_handle()); | 406 INLINE(Handle<Cell> target_cell_handle()); |
| 403 INLINE(void set_target_cell(Cell* cell, | 407 INLINE(void set_target_cell(Cell* cell, |
| 404 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); | 408 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
| 405 INLINE(Handle<Object> code_age_stub_handle(Assembler* origin)); | 409 INLINE(Handle<Object> code_age_stub_handle(Assembler* origin)); |
| 406 INLINE(Code* code_age_stub()); | 410 INLINE(Code* code_age_stub()); |
| 407 INLINE(void set_code_age_stub(Code* stub)); | 411 INLINE(void set_code_age_stub(Code* stub)); |
| 408 | 412 |
| 413 // Returns the address of the constant pool entry where the target address | |
| 414 // is held. This should only be called if IsInConstantPool returns true. | |
| 415 INLINE(Address constant_pool_entry_address()); | |
|
Michael Starzinger
2014/03/07 14:36:59
nit: Let's add an empty newline for readability af
rmcilroy
2014/03/10 12:25:23
Done (also for target_address_address declaration
| |
| 409 // Read the address of the word containing the target_address in an | 416 // Read the address of the word containing the target_address in an |
| 410 // instruction stream. What this means exactly is architecture-independent. | 417 // instruction stream. What this means exactly is architecture-independent. |
| 411 // The only architecture-independent user of this function is the serializer. | 418 // The only architecture-independent user of this function is the serializer. |
| 412 // The serializer uses it to find out how many raw bytes of instruction to | 419 // The serializer uses it to find out how many raw bytes of instruction to |
| 413 // output before the next target. Architecture-independent code shouldn't | 420 // output before the next target. Architecture-independent code shouldn't |
| 414 // dereference the pointer it gets back from this. | 421 // dereference the pointer it gets back from this. |
| 415 INLINE(Address target_address_address()); | 422 INLINE(Address target_address_address()); |
| 416 // This indicates how much space a target takes up when deserializing a code | 423 // This indicates how much space a target takes up when deserializing a code |
| 417 // stream. For most architectures this is just the size of a pointer. For | 424 // stream. For most architectures this is just the size of a pointer. For |
| 418 // an instruction like movw/movt where the target bits are mixed into the | 425 // an instruction like movw/movt where the target bits are mixed into the |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1035 public: | 1042 public: |
| 1036 NullCallWrapper() { } | 1043 NullCallWrapper() { } |
| 1037 virtual ~NullCallWrapper() { } | 1044 virtual ~NullCallWrapper() { } |
| 1038 virtual void BeforeCall(int call_size) const { } | 1045 virtual void BeforeCall(int call_size) const { } |
| 1039 virtual void AfterCall() const { } | 1046 virtual void AfterCall() const { } |
| 1040 }; | 1047 }; |
| 1041 | 1048 |
| 1042 } } // namespace v8::internal | 1049 } } // namespace v8::internal |
| 1043 | 1050 |
| 1044 #endif // V8_ASSEMBLER_H_ | 1051 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |