diff options
Diffstat (limited to 'src/3rdparty/v8/src/x64/lithium-codegen-x64.h')
-rw-r--r-- | src/3rdparty/v8/src/x64/lithium-codegen-x64.h | 52 |
1 files changed, 39 insertions, 13 deletions
diff --git a/src/3rdparty/v8/src/x64/lithium-codegen-x64.h b/src/3rdparty/v8/src/x64/lithium-codegen-x64.h index 73e1a9b..0f8a62a 100644 --- a/src/3rdparty/v8/src/x64/lithium-codegen-x64.h +++ b/src/3rdparty/v8/src/x64/lithium-codegen-x64.h @@ -46,21 +46,24 @@ class SafepointGenerator; class LCodeGen BASE_EMBEDDED { public: LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) - : chunk_(chunk), + : zone_(info->zone()), + chunk_(static_cast<LPlatformChunk*>(chunk)), masm_(assembler), info_(info), current_block_(-1), current_instruction_(-1), instructions_(chunk->instructions()), - deoptimizations_(4), - jump_table_(4), - deoptimization_literals_(8), + deoptimizations_(4, info->zone()), + jump_table_(4, info->zone()), + deoptimization_literals_(8, info->zone()), inlined_function_count_(0), scope_(info->scope()), status_(UNUSED), - deferred_(8), + translations_(info->zone()), + deferred_(8, info->zone()), osr_pc_offset_(-1), last_lazy_deopt_pc_(0), + safepoints_(info->zone()), resolver_(this), expected_safepoint_kind_(Safepoint::kSimple) { PopulateDeoptimizationLiteralsWithInlinedFunctions(); @@ -72,6 +75,7 @@ class LCodeGen BASE_EMBEDDED { Isolate* isolate() const { return info_->isolate(); } Factory* factory() const { return isolate()->factory(); } Heap* heap() const { return isolate()->heap(); } + Zone* zone() const { return zone_; } // Support for converting LOperands to assembler types. Register ToRegister(LOperand* op) const; @@ -94,6 +98,7 @@ class LCodeGen BASE_EMBEDDED { // Deferred code support. void DoDeferredNumberTagD(LNumberTagD* instr); + void DoDeferredNumberTagU(LNumberTagU* instr); void DoDeferredTaggedToI(LTaggedToI* instr); void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); void DoDeferredStackCheck(LStackCheck* instr); @@ -112,7 +117,10 @@ class LCodeGen BASE_EMBEDDED { void DoGap(LGap* instr); // Emit frame translation commands for an environment. - void WriteTranslation(LEnvironment* environment, Translation* translation); + void WriteTranslation(LEnvironment* environment, + Translation* translation, + int* arguments_index, + int* arguments_count); // Declare methods that deal with the individual node types. #define DECLARE_DO(type) void Do##type(L##type* node); @@ -136,7 +144,7 @@ class LCodeGen BASE_EMBEDDED { return info()->is_classic_mode() ? kNonStrictMode : kStrictMode; } - LChunk* chunk() const { return chunk_; } + LPlatformChunk* chunk() const { return chunk_; } Scope* scope() const { return scope_; } HGraph* graph() const { return chunk_->graph(); } @@ -152,10 +160,10 @@ class LCodeGen BASE_EMBEDDED { int GetStackSlotCount() const { return chunk()->spill_slot_count(); } int GetParameterCount() const { return scope()->num_parameters(); } - void Abort(const char* format, ...); + void Abort(const char* reason); void Comment(const char* format, ...); - void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code); } + void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } // Code generation passes. Returns true if code generation should // continue. @@ -219,7 +227,10 @@ class LCodeGen BASE_EMBEDDED { void AddToTranslation(Translation* translation, LOperand* op, - bool is_tagged); + bool is_tagged, + bool is_uint32, + int arguments_index, + int arguments_count); void PopulateDeoptimizationData(Handle<Code> code); int DefineDeoptimizationLiteral(Handle<Object> literal); @@ -267,6 +278,11 @@ class LCodeGen BASE_EMBEDDED { bool deoptimize_on_minus_zero, LEnvironment* env); + + void DeoptIfTaggedButNotSmi(LEnvironment* environment, + HValue* value, + LOperand* operand); + // Emits optimized code for typeof x == "y". Modifies input register. // Returns the condition on which a final split to // true and false label should be made, to optimize fallthrough. @@ -296,7 +312,8 @@ class LCodeGen BASE_EMBEDDED { void EmitLoadFieldOrConstantFunction(Register result, Register object, Handle<Map> type, - Handle<String> name); + Handle<String> name, + LEnvironment* env); // Emits code for pushing either a tagged constant, a (non-double) // register, or a stack slot operand. @@ -318,8 +335,17 @@ class LCodeGen BASE_EMBEDDED { }; void EnsureSpaceForLazyDeopt(int space_needed); - - LChunk* const chunk_; + void DoLoadKeyedExternalArray(LLoadKeyed* instr); + void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr); + void DoLoadKeyedFixedArray(LLoadKeyed* instr); + void DoStoreKeyedExternalArray(LStoreKeyed* instr); + void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); + void DoStoreKeyedFixedArray(LStoreKeyed* instr); + template <class T> + void PrepareKeyForKeyedOp(T* hydrogen_instr, LOperand* key); + + Zone* zone_; + LPlatformChunk* const chunk_; MacroAssembler* const masm_; CompilationInfo* const info_; |