5 #ifndef V8_MIPS_LITHIUM_CODEGEN_MIPS_H_
6 #define V8_MIPS_LITHIUM_CODEGEN_MIPS_H_
21 class SafepointGenerator;
44 return chunk()->LookupDestination(block_id);
53 info()->is_non_deferred_calling() ||
55 info()->requires_frame();
90 bool IsSmi(LConstantOperand* op)
const;
132 bool key_is_constant,
142 #define DECLARE_DO(type) void Do##type(L##type* node);
222 int formal_parameter_count,
231 Safepoint::DeoptMode
mode);
237 const char* detail,
Register src1 = zero_reg,
241 Translation* translation,
245 int* object_index_pointer,
246 int* dematerialized_index_pointer);
263 Safepoint::Kind kind,
265 Safepoint::DeoptMode
mode);
270 Safepoint::DeoptMode
mode);
278 template<
class InstrType>
283 template<
class InstrType>
288 template<
class InstrType>
293 template<
class InstrType>
320 Label* is_not_object,
328 Label* is_not_string,
387 : codegen_(codegen) {
388 DCHECK(codegen_->info()->is_calling());
389 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
390 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters;
393 codegen_->masm_->push(ra);
394 codegen_->masm_->CallStub(&stub);
398 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kWithRegisters);
400 codegen_->masm_->push(ra);
401 codegen_->masm_->CallStub(&stub);
402 codegen_->expected_safepoint_kind_ = Safepoint::kSimple;
#define kLithiumScratchReg2
#define kLithiumScratchReg
#define kLithiumScratchDouble
Source to read snapshot and builtins files from.
~PushSafepointRegistersScope()
PushSafepointRegistersScope(LCodeGen *codegen)
bool IsNextEmittedBlock(int block_id) const
Register ToRegister(int index) const
void RestoreCallerDoubles()
void DoStoreKeyedFixedArray(LStoreKeyed *instr)
void AddDeferredCode(LDeferredCode *code)
DoubleRegister ToDoubleRegister(LOperand *op) const
void RecordSafepointWithRegisters(LPointerMap *pointers, int arguments, Safepoint::DeoptMode mode)
@ RECORD_SIMPLE_SAFEPOINT
@ RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS
void EmitBranchF(InstrType instr, Condition condition, FPURegister src1, FPURegister src2)
void EmitDeepCopy(Handle< JSObject > object, Register result, Register source, int *offset, AllocationSiteMode mode)
int inlined_function_count_
bool IsSmi(LConstantOperand *op) const
friend class SafepointGenerator
TranslationBuffer translations_
MemOperand BuildSeqStringOperand(Register string, LOperand *index, String::Encoding encoding)
Condition EmitIsString(Register input, Register temp1, Label *is_not_string, SmiCheck check_needed)
void DoDeferredStackCheck(LStackCheck *instr)
Condition EmitTypeofIs(Label *true_label, Label *false_label, Register input, Handle< String > type_name, Register *cmp1, Operand *cmp2)
SafepointTableBuilder safepoints_
LInstruction * GetNextInstruction()
void EmitVectorLoadICRegisters(T *instr)
void EmitFalseBranch(InstrType instr, Condition condition, Register src1, const Operand &src2)
ZoneList< Handle< Object > > deoptimization_literals_
void RecordSafepoint(Safepoint::DeoptMode mode)
MemOperand PrepareKeyedOperand(Register key, Register base, bool key_is_constant, int constant_key, int element_size, int shift_size, int base_offset)
void PopulateDeoptimizationLiteralsWithInlinedFunctions()
void AddToTranslation(LEnvironment *environment, Translation *translation, LOperand *op, bool is_tagged, bool is_uint32, int *object_index_pointer, int *dematerialized_index_pointer)
ZoneList< LEnvironment * > deoptimizations_
DISALLOW_COPY_AND_ASSIGN(LCodeGen)
void EmitIntegerMathAbs(LMathAbs *instr)
void EmitBranch(InstrType instr, Condition condition, Register src1, const Operand &src2)
void CallRuntimeFromDeferred(Runtime::FunctionId id, int argc, LInstruction *instr, LOperand *context)
void EmitIsConstructCall(Register temp1, Register temp2)
int32_t ToRepresentation_donotuse(LConstantOperand *op, const Representation &r) const
void EmitFalseBranchF(InstrType instr, Condition condition, FPURegister src1, FPURegister src2)
DoubleRegister double_scratch0()
int32_t ToInteger32(LConstantOperand *op) const
LPlatformChunk * chunk() const
friend class LGapResolver
void FinishCode(Handle< Code > code)
Handle< Object > ToHandle(LConstantOperand *op) const
DoubleRegister EmitLoadDoubleRegister(LOperand *op, FloatRegister flt_scratch, DoubleRegister dbl_scratch)
int LookupDestination(int block_id) const
void DoDeferredAllocate(LAllocate *instr)
void RecordSafepoint(LPointerMap *pointers, Safepoint::Kind kind, int arguments, Safepoint::DeoptMode mode)
void DoDeferredTaggedToI(LTaggedToI *instr)
void DoDeferredStringCharCodeAt(LStringCharCodeAt *instr)
Safepoint::Kind expected_safepoint_kind_
ZoneList< LDeferredCode * > deferred_
DoubleRegister ToDoubleRegister(int index) const
bool GenerateDeferredCode()
void RecordSafepoint(LPointerMap *pointers, Safepoint::DeoptMode mode)
void DoDeferredNumberTagIU(LInstruction *instr, LOperand *value, LOperand *temp1, LOperand *temp2, IntegerSignedness signedness)
bool NeedsEagerFrame() const
StrictMode strict_mode() const
Condition EmitIsObject(Register input, Register temp1, Register temp2, Label *is_not_object, Label *is_object)
void RegisterEnvironmentForDeoptimization(LEnvironment *environment, Safepoint::DeoptMode mode)
void LoadContextFromDeferred(LOperand *context)
void CallCodeGeneric(Handle< Code > code, RelocInfo::Mode mode, LInstruction *instr, SafepointMode safepoint_mode)
void GenerateOsrPrologue()
void EmitSignedIntegerDivisionByConstant(Register result, Register dividend, int32_t divisor, Register remainder, Register scratch, LEnvironment *environment)
void CallKnownFunction(Handle< JSFunction > function, int formal_parameter_count, int arity, LInstruction *instr, A1State a1_state)
bool NeedsDeferredFrame() const
void DoDeferredInstanceMigration(LCheckMaps *instr, Register object)
void DoDeferredLoadMutableDouble(LLoadFieldByIndex *instr, Register result, Register object, Register index)
int DefineDeoptimizationLiteral(Handle< Object > literal)
int GetStackSlotCount() const
void WriteTranslation(LEnvironment *environment, Translation *translation)
void DoDeferredMathAbsTaggedHeapNumber(LMathAbs *instr)
void DoLoadKeyedFixedDoubleArray(LLoadKeyed *instr)
bool GenerateSafepointTable()
static Condition TokenToCondition(Token::Value op, bool is_unsigned)
Operand ToOperand(LOperand *op)
Register EmitLoadRegister(LOperand *op, Register scratch)
void EmitClassOfTest(Label *if_true, Label *if_false, Handle< String > class_name, Register input, Register temporary, Register temporary2)
void DoLoadKeyedExternalArray(LLoadKeyed *instr)
double ToDouble(LConstantOperand *op) const
Register ToRegister(LOperand *op) const
void DeoptimizeIf(Condition condition, LInstruction *instr, const char *detail, Register src1=zero_reg, const Operand &src2=Operand(zero_reg))
void CallRuntime(Runtime::FunctionId id, int num_arguments, LInstruction *instr)
void DoStoreKeyedExternalArray(LStoreKeyed *instr)
void RecordAndWritePosition(int position) OVERRIDE
bool IsInteger32(LConstantOperand *op) const
void PopulateDeoptimizationData(Handle< Code > code)
void DoParallelMove(LParallelMove *move)
void CallRuntime(const Runtime::Function *function, int num_arguments, LInstruction *instr, SaveFPRegsMode save_doubles=kDontSaveFPRegs)
void CallCode(Handle< Code > code, RelocInfo::Mode mode, LInstruction *instr)
void DoDeferredStringCharFromCode(LStringCharFromCode *instr)
void EmitCmpI(LOperand *left, LOperand *right)
ZoneList< Deoptimizer::JumpTableEntry > jump_table_
void EnsureSpaceForLazyDeopt(int space_needed) OVERRIDE
MemOperand ToMemOperand(LOperand *op) const
void GenerateBodyInstructionPre(LInstruction *instr) OVERRIDE
void DeoptimizeIf(Condition condition, LInstruction *instr, Deoptimizer::BailoutType bailout_type, const char *detail, Register src1=zero_reg, const Operand &src2=Operand(zero_reg))
MemOperand ToHighMemOperand(LOperand *op) const
void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal *instr, Label *map_check)
void RecordSafepointWithLazyDeopt(LInstruction *instr, SafepointMode safepoint_mode)
RAStatus GetRAState() const
void DoLoadKeyedFixedArray(LLoadKeyed *instr)
Smi * ToSmi(LConstantOperand *op) const
LCodeGen(LChunk *chunk, MacroAssembler *assembler, CompilationInfo *info)
void DoDeferredNumberTagD(LNumberTagD *instr)
void DoStoreKeyedFixedDoubleArray(LStoreKeyed *instr)
friend class LEnvironment
void EmitNumberUntagD(LNumberUntagD *instr, Register input, DoubleRegister result, NumberUntagDMode mode)
MacroAssembler * masm() const
virtual void Generate()=0
LDeferredCode(LCodeGen *codegen)
LCodeGen * codegen() const
int instruction_index() const
void SetExit(Label *exit)
virtual LInstruction * instr()=0
static const Function * FunctionForId(FunctionId id)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
#define DCHECK(condition)
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)