Commit 0acbcf98 authored by rmcilroy@chromium.org's avatar rmcilroy@chromium.org
parent bd2397c9
......@@ -2795,6 +2795,19 @@ void Assembler::RecordConstPool(int size) {
}
MaybeObject* Assembler::AllocateConstantPool(Heap* heap) {
// No out-of-line constant pool support.
UNREACHABLE();
return NULL;
}
void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
// No out-of-line constant pool support.
UNREACHABLE();
}
} } // namespace v8::internal
#endif // V8_TARGET_ARCH_A64
......@@ -1790,6 +1790,11 @@ class Assembler : public AssemblerBase {
// Check if is time to emit a constant pool.
void CheckConstPool(bool force_emit, bool require_jump);
// Allocate a constant pool of the correct size for the generated code.
MaybeObject* AllocateConstantPool(Heap* heap);
// Generate the constant pool for the generated code.
void PopulateConstantPool(ConstantPoolArray* constant_pool);
// Returns true if we should emit a veneer as soon as possible for a branch
// which can at most reach to specified pc.
......
......@@ -109,14 +109,28 @@ Address RelocInfo::target_address_address() {
ASSERT(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)
|| rmode_ == EMBEDDED_OBJECT
|| rmode_ == EXTERNAL_REFERENCE);
return Assembler::target_pointer_address_at(pc_);
if (FLAG_enable_ool_constant_pool ||
Assembler::IsMovW(Memory::int32_at(pc_))) {
// We return the PC for ool constant pool since this function is used by the
// serializerer and expects the address to reside within the code object.
return reinterpret_cast<Address>(pc_);
} else {
ASSERT(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(pc_)));
return Assembler::target_pointer_address_at(pc_);
}
}
Address RelocInfo::constant_pool_entry_address() {
ASSERT(IsInConstantPool());
ASSERT(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(pc_)));
return Assembler::target_pointer_address_at(pc_);
if (FLAG_enable_ool_constant_pool) {
ASSERT(Assembler::IsLdrPpImmediateOffset(Memory::int32_at(pc_)));
return Assembler::target_constant_pool_address_at(pc_,
host_->constant_pool());
} else {
ASSERT(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(pc_)));
return Assembler::target_pointer_address_at(pc_);
}
}
......@@ -410,6 +424,16 @@ Address Assembler::target_pointer_address_at(Address pc) {
}
Address Assembler::target_constant_pool_address_at(
Address pc, ConstantPoolArray* constant_pool) {
ASSERT(constant_pool != NULL);
ASSERT(IsLdrPpImmediateOffset(Memory::int32_at(pc)));
Instr instr = Memory::int32_at(pc);
return reinterpret_cast<Address>(constant_pool) +
GetLdrRegisterImmediateOffset(instr);
}
Address Assembler::target_address_at(Address pc,
ConstantPoolArray* constant_pool) {
if (IsMovW(Memory::int32_at(pc))) {
......@@ -419,9 +443,14 @@ Address Assembler::target_address_at(Address pc,
return reinterpret_cast<Address>(
(next_instr->ImmedMovwMovtValue() << 16) |
instr->ImmedMovwMovtValue());
} else if (FLAG_enable_ool_constant_pool) {
ASSERT(IsLdrPpImmediateOffset(Memory::int32_at(pc)));
return Memory::Address_at(
target_constant_pool_address_at(pc, constant_pool));
} else {
ASSERT(IsLdrPcImmediateOffset(Memory::int32_at(pc)));
return Memory::Address_at(target_pointer_address_at(pc));
}
ASSERT(IsLdrPcImmediateOffset(Memory::int32_at(pc)));
return Memory::Address_at(target_pointer_address_at(pc));
}
......@@ -439,7 +468,8 @@ Address Assembler::target_address_from_return_address(Address pc) {
// @ return address
Address candidate = pc - 2 * Assembler::kInstrSize;
Instr candidate_instr(Memory::int32_at(candidate));
if (IsLdrPcImmediateOffset(candidate_instr)) {
if (IsLdrPcImmediateOffset(candidate_instr) |
IsLdrPpImmediateOffset(candidate_instr)) {
return candidate;
}
candidate = pc - 3 * Assembler::kInstrSize;
......@@ -450,7 +480,8 @@ Address Assembler::target_address_from_return_address(Address pc) {
Address Assembler::return_address_from_call_start(Address pc) {
if (IsLdrPcImmediateOffset(Memory::int32_at(pc))) {
if (IsLdrPcImmediateOffset(Memory::int32_at(pc)) |
IsLdrPpImmediateOffset(Memory::int32_at(pc))) {
return pc + kInstrSize * 2;
} else {
ASSERT(IsMovW(Memory::int32_at(pc)));
......@@ -462,7 +493,11 @@ Address Assembler::return_address_from_call_start(Address pc) {
void Assembler::deserialization_set_special_target_at(
Address constant_pool_entry, Code* code, Address target) {
Memory::Address_at(constant_pool_entry) = target;
if (FLAG_enable_ool_constant_pool) {
set_target_address_at(constant_pool_entry, code, target);
} else {
Memory::Address_at(constant_pool_entry) = target;
}
}
......@@ -490,6 +525,10 @@ void Assembler::set_target_address_at(Address pc,
ASSERT(IsMovW(Memory::int32_at(pc)));
ASSERT(IsMovT(Memory::int32_at(pc + kInstrSize)));
CPU::FlushICache(pc, 2 * kInstrSize);
} else if (FLAG_enable_ool_constant_pool) {
ASSERT(IsLdrPpImmediateOffset(Memory::int32_at(pc)));
Memory::Address_at(
target_constant_pool_address_at(pc, constant_pool)) = target;
} else {
ASSERT(IsLdrPcImmediateOffset(Memory::int32_at(pc)));
Memory::Address_at(target_pointer_address_at(pc)) = target;
......
This diff is collapsed.
......@@ -39,7 +39,10 @@
#ifndef V8_ARM_ASSEMBLER_ARM_H_
#define V8_ARM_ASSEMBLER_ARM_H_
#include <stdio.h>
#include <vector>
#include "assembler.h"
#include "constants-arm.h"
#include "serialize.h"
......@@ -702,9 +705,42 @@ class NeonListOperand BASE_EMBEDDED {
NeonListType type_;
};
// Class used to build a constant pool.
class ConstantPoolBuilder BASE_EMBEDDED {
public:
explicit ConstantPoolBuilder();
void AddEntry(Assembler* assm, const RelocInfo& rinfo);
void Relocate(int pc_delta);
bool IsEmpty();
MaybeObject* Allocate(Heap* heap);
void Populate(Assembler* assm, ConstantPoolArray* constant_pool);
inline int count_of_64bit() const { return count_of_64bit_; }
inline int count_of_code_ptr() const { return count_of_code_ptr_; }
inline int count_of_heap_ptr() const { return count_of_heap_ptr_; }
inline int count_of_32bit() const { return count_of_32bit_; }
private:
bool Is64BitEntry(RelocInfo::Mode rmode);
bool Is32BitEntry(RelocInfo::Mode rmode);
bool IsCodePtrEntry(RelocInfo::Mode rmode);
bool IsHeapPtrEntry(RelocInfo::Mode rmode);
std::vector<RelocInfo> entries_;
std::vector<int> merged_indexes_;
int count_of_64bit_;
int count_of_code_ptr_;
int count_of_heap_ptr_;
int count_of_32bit_;
};
extern const Instr kMovLrPc;
extern const Instr kLdrPCMask;
extern const Instr kLdrPCPattern;
extern const Instr kLdrPpMask;
extern const Instr kLdrPpPattern;
extern const Instr kBlxRegMask;
extern const Instr kBlxRegPattern;
extern const Instr kBlxIp;
......@@ -1413,6 +1449,8 @@ class Assembler : public AssemblerBase {
static int GetBranchOffset(Instr instr);
static bool IsLdrRegisterImmediate(Instr instr);
static bool IsVldrDRegisterImmediate(Instr instr);
static bool IsLdrPpImmediateOffset(Instr instr);
static bool IsVldrDPpImmediateOffset(Instr instr);
static int GetLdrRegisterImmediateOffset(Instr instr);
static int GetVldrDRegisterImmediateOffset(Instr instr);
static Instr SetLdrRegisterImmediateOffset(Instr instr, int offset);
......@@ -1458,6 +1496,12 @@ class Assembler : public AssemblerBase {
// Check if is time to emit a constant pool.
void CheckConstPool(bool force_emit, bool require_jump);
// Allocate a constant pool of the correct size for the generated code.
MaybeObject* AllocateConstantPool(Heap* heap);
// Generate the constant pool for the generated code.
void PopulateConstantPool(ConstantPoolArray* constant_pool);
bool can_use_constant_pool() const {
return is_constant_pool_available() && !constant_pool_full_;
}
......@@ -1584,6 +1628,8 @@ class Assembler : public AssemblerBase {
// Number of pending reloc info entries in the 64 bits buffer.
int num_pending_64_bit_reloc_info_;
ConstantPoolBuilder constant_pool_builder_;
// The bound position, before this we cannot do instruction elimination.
int last_bound_pos_;
......@@ -1622,10 +1668,9 @@ class Assembler : public AssemblerBase {
};
// Record reloc info for current pc_
void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0,
UseConstantPoolMode mode = USE_CONSTANT_POOL);
void RecordRelocInfo(double data);
void RecordRelocInfoConstantPoolEntryHelper(const RelocInfo& rinfo);
void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
void RecordRelocInfo(const RelocInfo& rinfo);
void ConstantPoolAddEntry(const RelocInfo& rinfo);
friend class RelocInfo;
friend class CodePatcher;
......
......@@ -962,20 +962,26 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
// Load deoptimization data from the code object.
// <deopt_data> = <code>[#deoptimization_data_offset]
__ ldr(r1, MemOperand(r0, Code::kDeoptimizationDataOffset - kHeapObjectTag));
__ ldr(r1, FieldMemOperand(r0, Code::kDeoptimizationDataOffset));
// Load the OSR entrypoint offset from the deoptimization data.
// <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset]
__ ldr(r1, MemOperand(r1, FixedArray::OffsetOfElementAt(
DeoptimizationInputData::kOsrPcOffsetIndex) - kHeapObjectTag));
{ ConstantPoolUnavailableScope constant_pool_unavailable(masm);
if (FLAG_enable_ool_constant_pool) {
__ ldr(pp, FieldMemOperand(r0, Code::kConstantPoolOffset));
}
// Compute the target address = code_obj + header_size + osr_offset
// <entry_addr> = <code_obj> + #header_size + <osr_offset>
__ add(r0, r0, Operand::SmiUntag(r1));
__ add(lr, r0, Operand(Code::kHeaderSize - kHeapObjectTag));
// Load the OSR entrypoint offset from the deoptimization data.
// <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset]
__ ldr(r1, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(
DeoptimizationInputData::kOsrPcOffsetIndex)));
// And "return" to the OSR entry point of the function.
__ Ret();
// Compute the target address = code_obj + header_size + osr_offset
// <entry_addr> = <code_obj> + #header_size + <osr_offset>
__ add(r0, r0, Operand::SmiUntag(r1));
__ add(lr, r0, Operand(Code::kHeaderSize - kHeapObjectTag));
// And "return" to the OSR entry point of the function.
__ Ret();
}
}
......
......@@ -1777,7 +1777,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
Isolate* isolate = masm->isolate();
int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY;
if (FLAG_enable_ool_constant_pool) {
__ mov(r8, Operand(Smi::FromInt(marker)));
__ mov(r8, Operand(isolate->factory()->empty_constant_pool_array()));
}
__ mov(r7, Operand(Smi::FromInt(marker)));
__ mov(r6, Operand(Smi::FromInt(marker)));
......
......@@ -4835,8 +4835,7 @@ static Address GetInterruptImmediateLoadAddress(Address pc) {
load_address -= Assembler::kInstrSize;
ASSERT(Assembler::IsMovW(Memory::int32_at(load_address)));
} else {
// TODO(rmcilroy): uncomment when IsLdrPpImmediateOffset lands.
// ASSERT(IsLdrPpImmediateOffset(Memory::int32_at(load_address)));
ASSERT(Assembler::IsLdrPpImmediateOffset(Memory::int32_at(load_address)));
}
return load_address;
}
......
......@@ -133,6 +133,12 @@ void MacroAssembler::Call(Address target,
set_predictable_code_size(true);
}
#ifdef DEBUG
// Check the expected size before generating code to ensure we assume the same
// constant pool availability (e.g., whether constant pool is full or not).
int expected_size = CallSize(target, rmode, cond);
#endif
// Call sequence on V7 or later may be :
// movw ip, #... @ call address low 16
// movt ip, #... @ call address high 16
......@@ -153,7 +159,7 @@ void MacroAssembler::Call(Address target,
mov(ip, Operand(reinterpret_cast<int32_t>(target), rmode));
blx(ip, cond);
ASSERT_EQ(CallSize(target, rmode, cond), SizeOfCodeGeneratedSince(&start));
ASSERT_EQ(expected_size, SizeOfCodeGeneratedSince(&start));
if (mode == NEVER_INLINE_TARGET_ADDRESS) {
set_predictable_code_size(old_predictable_code_size);
}
......@@ -1054,6 +1060,8 @@ int MacroAssembler::ActivationFrameAlignment() {
void MacroAssembler::LeaveExitFrame(bool save_doubles,
Register argument_count,
bool restore_context) {
ConstantPoolUnavailableScope constant_pool_unavailable(this);
// Optionally restore all double registers.
if (save_doubles) {
// Calculate the stack location of the saved doubles and restore them.
......@@ -1068,7 +1076,6 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles,
mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
str(r3, MemOperand(ip));
// Restore current context from top and clear it in debug mode.
if (restore_context) {
mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
......@@ -1375,6 +1382,11 @@ void MacroAssembler::JumpToHandlerEntry() {
// Compute the handler entry address and jump to it. The handler table is
// a fixed array of (smi-tagged) code offsets.
// r0 = exception, r1 = code object, r2 = state.
ConstantPoolUnavailableScope constant_pool_unavailable(this);
if (FLAG_enable_ool_constant_pool) {
ldr(pp, FieldMemOperand(r1, Code::kConstantPoolOffset)); // Constant pool.
}
ldr(r3, FieldMemOperand(r1, Code::kHandlerTableOffset)); // Handler table.
add(r3, r3, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
mov(r2, Operand(r2, LSR, StackHandler::kKindWidth)); // Handler index.
......@@ -3555,22 +3567,31 @@ void MacroAssembler::CallCFunctionHelper(Register function,
void MacroAssembler::GetRelocatedValueLocation(Register ldr_location,
Register result) {
Register result) {
const uint32_t kLdrOffsetMask = (1 << 12) - 1;
const int32_t kPCRegOffset = 2 * kPointerSize;
ldr(result, MemOperand(ldr_location));
if (emit_debug_code()) {
// Check that the instruction is a ldr reg, [pc + offset] .
and_(result, result, Operand(kLdrPCPattern));
cmp(result, Operand(kLdrPCPattern));
Check(eq, kTheInstructionToPatchShouldBeALoadFromPc);
// Check that the instruction is a ldr reg, [<pc or pp> + offset] .
if (FLAG_enable_ool_constant_pool) {
and_(result, result, Operand(kLdrPpPattern));
cmp(result, Operand(kLdrPpPattern));
Check(eq, kTheInstructionToPatchShouldBeALoadFromPp);
} else {
and_(result, result, Operand(kLdrPCPattern));
cmp(result, Operand(kLdrPCPattern));
Check(eq, kTheInstructionToPatchShouldBeALoadFromPc);
}
// Result was clobbered. Restore it.
ldr(result, MemOperand(ldr_location));
}
// Get the address of the constant.
and_(result, result, Operand(kLdrOffsetMask));
add(result, ldr_location, Operand(result));
add(result, result, Operand(kPCRegOffset));
if (FLAG_enable_ool_constant_pool) {
add(result, pp, Operand(result));
} else {
add(result, ldr_location, Operand(result));
add(result, result, Operand(Instruction::kPCReadOffset));
}
}
......
......@@ -375,6 +375,15 @@ class RelocInfo BASE_EMBEDDED {
}
static inline int ModeMask(Mode mode) { return 1 << mode; }
// Returns true if the first RelocInfo has the same mode and raw data as the
// second one.
static inline bool IsEqual(RelocInfo first, RelocInfo second) {
return first.rmode() == second.rmode() &&
(first.rmode() == RelocInfo::NONE64 ?
first.raw_data64() == second.raw_data64() :
first.data() == second.data());
}
// Accessors
byte* pc() const { return pc_; }
void set_pc(byte* pc) { pc_ = pc; }
......
......@@ -4047,12 +4047,20 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc,
bool immovable,
bool crankshafted,
int prologue_offset) {
// Allocate ByteArray before the Code object, so that we do not risk
// leaving uninitialized Code object (and breaking the heap).
// Allocate ByteArray and ConstantPoolArray before the Code object, so that we
// do not risk leaving uninitialized Code object (and breaking the heap).
ByteArray* reloc_info;
MaybeObject* maybe_reloc_info = AllocateByteArray(desc.reloc_size, TENURED);
if (!maybe_reloc_info->To(&reloc_info)) return maybe_reloc_info;
ConstantPoolArray* constant_pool;
if (FLAG_enable_ool_constant_pool) {
MaybeObject* maybe_constant_pool = desc.origin->AllocateConstantPool(this);
if (!maybe_constant_pool->To(&constant_pool)) return maybe_constant_pool;
} else {
constant_pool = empty_constant_pool_array();
}
// Compute size.
int body_size = RoundUp(desc.instr_size, kObjectAlignment);
int obj_size = Code::SizeFor(body_size);
......@@ -4099,7 +4107,11 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc,
if (code->kind() == Code::OPTIMIZED_FUNCTION) {
code->set_marked_for_deoptimization(false);
}
code->set_constant_pool(empty_constant_pool_array());
if (FLAG_enable_ool_constant_pool) {
desc.origin->PopulateConstantPool(constant_pool);
}
code->set_constant_pool(constant_pool);
#ifdef ENABLE_DEBUGGER_SUPPORT
if (code->kind() == Code::FUNCTION) {
......@@ -4130,9 +4142,20 @@ MaybeObject* Heap::CreateCode(const CodeDesc& desc,
MaybeObject* Heap::CopyCode(Code* code) {
MaybeObject* maybe_result;
Object* new_constant_pool;
if (FLAG_enable_ool_constant_pool &&
code->constant_pool() != empty_constant_pool_array()) {
// Copy the constant pool, since edits to the copied code may modify
// the constant pool.
maybe_result = CopyConstantPoolArray(code->constant_pool());
if (!maybe_result->ToObject(&new_constant_pool)) return maybe_result;
} else {
new_constant_pool = empty_constant_pool_array();
}
// Allocate an object the same size as the code object.
int obj_size = code->Size();
MaybeObject* maybe_result;
if (obj_size > code_space()->AreaSize()) {
maybe_result = lo_space_->AllocateRaw(obj_size, EXECUTABLE);
} else {
......@@ -4146,8 +4169,12 @@ MaybeObject* Heap::CopyCode(Code* code) {
Address old_addr = code->address();
Address new_addr = reinterpret_cast<HeapObject*>(result)->address();
CopyBlock(new_addr, old_addr, obj_size);
// Relocate the copy.
Code* new_code = Code::cast(result);
// Update the constant pool.
new_code->set_constant_pool(new_constant_pool);
// Relocate the copy.
ASSERT(!isolate_->code_range()->exists() ||
isolate_->code_range()->contains(code->address()));
new_code->Relocate(new_addr - old_addr);
......@@ -4156,8 +4183,8 @@ MaybeObject* Heap::CopyCode(Code* code) {
MaybeObject* Heap::CopyCode(Code* code, Vector<byte> reloc_info) {
// Allocate ByteArray before the Code object, so that we do not risk
// leaving uninitialized Code object (and breaking the heap).
// Allocate ByteArray and ConstantPoolArray before the Code object, so that we
// do not risk leaving uninitialized Code object (and breaking the heap).
Object* reloc_info_array;
{ MaybeObject* maybe_reloc_info_array =
AllocateByteArray(reloc_info.length(), TENURED);
......@@ -4165,6 +4192,18 @@ MaybeObject* Heap::CopyCode(Code* code, Vector<byte> reloc_info) {
return maybe_reloc_info_array;
}
}
Object* new_constant_pool;
if (FLAG_enable_ool_constant_pool &&
code->constant_pool() != empty_constant_pool_array()) {
// Copy the constant pool, since edits to the copied code may modify
// the constant pool.
MaybeObject* maybe_constant_pool =
CopyConstantPoolArray(code->constant_pool());
if (!maybe_constant_pool->ToObject(&new_constant_pool))
return maybe_constant_pool;
} else {
new_constant_pool = empty_constant_pool_array();
}
int new_body_size = RoundUp(code->instruction_size(), kObjectAlignment);
......@@ -4194,6 +4233,9 @@ MaybeObject* Heap::CopyCode(Code* code, Vector<byte> reloc_info) {
Code* new_code = Code::cast(result);
new_code->set_relocation_info(ByteArray::cast(reloc_info_array));
// Update constant pool.
new_code->set_constant_pool(new_constant_pool);
// Copy patched rinfo.
CopyBytes(new_code->relocation_start(),
reloc_info.start(),
......@@ -5310,7 +5352,7 @@ MaybeObject* Heap::AllocateConstantPoolArray(int number_of_int64_entries,
}
if (number_of_heap_ptr_entries > 0) {
int offset =
constant_pool->OffsetOfElementAt(constant_pool->first_code_ptr_index());
constant_pool->OffsetOfElementAt(constant_pool->first_heap_ptr_index());
MemsetPointer(
HeapObject::RawField(constant_pool, offset),
undefined_value(),
......
......@@ -2717,6 +2717,19 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
}
MaybeObject* Assembler::AllocateConstantPool(Heap* heap) {
// No out-of-line constant pool support.
UNREACHABLE();
return NULL;
}
void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
// No out-of-line constant pool support.
UNREACHABLE();
}
#ifdef GENERATED_CODE_COVERAGE
static FILE* coverage_log = NULL;
......
......@@ -1189,6 +1189,12 @@ class Assembler : public AssemblerBase {
byte byte_at(int pos) { return buffer_[pos]; }
void set_byte_at(int pos, byte value) { buffer_[pos] = value; }
// Allocate a constant pool of the correct size for the generated code.
MaybeObject* AllocateConstantPool(Heap* heap);
// Generate the constant pool for the generated code.
void PopulateConstantPool(ConstantPoolArray* constant_pool);
protected:
void emit_sse_operand(XMMRegister reg, const Operand& adr);
void emit_sse_operand(XMMRegister dst, XMMRegister src);
......
......@@ -1326,6 +1326,8 @@ class MaybeObject BASE_EMBEDDED {
V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \
V(kTheInstructionToPatchShouldBeALoadFromPc, \
"The instruction to patch should be a load from pc") \
V(kTheInstructionToPatchShouldBeALoadFromPp, \
"The instruction to patch should be a load from pp") \
V(kTheInstructionToPatchShouldBeAnLdrLiteral, \
"The instruction to patch should be a ldr literal") \
V(kTheInstructionToPatchShouldBeALui, \
......
......@@ -3199,6 +3199,19 @@ void Assembler::RecordComment(const char* msg, bool force) {
}
MaybeObject* Assembler::AllocateConstantPool(Heap* heap) {
// No out-of-line constant pool support.
UNREACHABLE();
return NULL;
}
void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
// No out-of-line constant pool support.
UNREACHABLE();
}
const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask |
1 << RelocInfo::RUNTIME_ENTRY |
1 << RelocInfo::INTERNAL_REFERENCE |
......
......@@ -1462,6 +1462,12 @@ class Assembler : public AssemblerBase {
// Use --code-comments to enable.
void RecordComment(const char* msg, bool force = false);
// Allocate a constant pool of the correct size for the generated code.
MaybeObject* AllocateConstantPool(Heap* heap);
// Generate the constant pool for the generated code.
void PopulateConstantPool(ConstantPoolArray* constant_pool);
// Writes a single word of data in the code stream.
// Used for inline tables, e.g., jump-tables.
void db(uint8_t data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment