Index: src/ppc/assembler-ppc.h |
diff --git a/src/ppc/assembler-ppc.h b/src/ppc/assembler-ppc.h |
index 24119a27505819493889cf3626d85b3e1a206902..dde441e8439decf9c521d05eeecbcbc0ed929af8 100644 |
--- a/src/ppc/assembler-ppc.h |
+++ b/src/ppc/assembler-ppc.h |
@@ -397,7 +397,9 @@ class Assembler : public AssemblerBase { |
// for code generation and assumes its size to be buffer_size. If the buffer |
// is too small, a fatal error occurs. No deallocation of the buffer is done |
// upon destruction of the assembler. |
- Assembler(Isolate* isolate, void* buffer, int buffer_size); |
+ Assembler(Isolate* isolate, void* buffer, int buffer_size) |
+ : Assembler(IsolateData(isolate), buffer, buffer_size) {} |
+ Assembler(IsolateData isolate_data, void* buffer, int buffer_size); |
virtual ~Assembler() {} |
// GetCode emits any pending (non-emitted) code and fills the descriptor |
@@ -462,6 +464,7 @@ class Assembler : public AssemblerBase { |
ConstantPoolEntry::Type type)); |
// Read/Modify the code target address in the branch/call instruction at pc. |
+ // The isolate argument is unused (and may be nullptr) when skipping flushing. |
INLINE(static Address target_address_at(Address pc, Address constant_pool)); |
INLINE(static void set_target_address_at( |
Isolate* isolate, Address pc, Address constant_pool, Address target, |
@@ -1369,7 +1372,6 @@ class Assembler : public AssemblerBase { |
bool is_trampoline_emitted() const { return trampoline_emitted_; } |
- private: |
// Code generation |
// The relocation writer's position is at least kGap bytes below the end of |
// the generated instructions. This is so that multi-instruction sequences do |
@@ -1377,6 +1379,9 @@ class Assembler : public AssemblerBase { |
// relocation info entries. |
static constexpr int kGap = 32; |
+ RelocInfoWriter reloc_info_writer; |
+ |
+ private: |
// Repeated checking whether the trampoline pool should be emitted is rather |
// expensive. By default we only check again once a number of instructions |
// has been generated. |
@@ -1392,7 +1397,6 @@ class Assembler : public AssemblerBase { |
// Relocation info generation |
// Each relocation is encoded as a variable size value |
static constexpr int kMaxRelocSize = RelocInfoWriter::kMaxSize; |
- RelocInfoWriter reloc_info_writer; |
std::vector<DeferredRelocInfo> relocations_; |
// The bound position, before this we cannot do instruction elimination. |
@@ -1489,6 +1493,15 @@ class EnsureSpace BASE_EMBEDDED { |
public: |
explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } |
}; |
+ |
+class PatchingAssembler : public Assembler { |
+ public: |
+ PatchingAssembler(IsolateData isolate_data, byte* address, int instructions); |
+ ~PatchingAssembler(); |
+ |
+ void FlushICache(Isolate* isolate); |
+}; |
+ |
} // namespace internal |
} // namespace v8 |