diff options
Diffstat (limited to 'chromium/v8/src/hydrogen.h')
-rw-r--r-- | chromium/v8/src/hydrogen.h | 320 |
1 files changed, 156 insertions, 164 deletions
diff --git a/chromium/v8/src/hydrogen.h b/chromium/v8/src/hydrogen.h index 20dc1a3e0ec..0ecbbca1bf6 100644 --- a/chromium/v8/src/hydrogen.h +++ b/chromium/v8/src/hydrogen.h @@ -53,10 +53,10 @@ class LChunk; class LiveRange; -class HBasicBlock: public ZoneObject { +class HBasicBlock V8_FINAL : public ZoneObject { public: explicit HBasicBlock(HGraph* graph); - virtual ~HBasicBlock() { } + ~HBasicBlock() { } // Simple accessors. int block_id() const { return block_id_; } @@ -220,7 +220,7 @@ class HBasicBlock: public ZoneObject { }; -class HPredecessorIterator BASE_EMBEDDED { +class HPredecessorIterator V8_FINAL BASE_EMBEDDED { public: explicit HPredecessorIterator(HBasicBlock* block) : predecessor_list_(block->predecessors()), current_(0) { } @@ -235,7 +235,7 @@ class HPredecessorIterator BASE_EMBEDDED { }; -class HInstructionIterator BASE_EMBEDDED { +class HInstructionIterator V8_FINAL BASE_EMBEDDED { public: explicit HInstructionIterator(HBasicBlock* block) : instr_(block->first()) { @@ -255,7 +255,7 @@ class HInstructionIterator BASE_EMBEDDED { }; -class HLoopInformation: public ZoneObject { +class HLoopInformation V8_FINAL : public ZoneObject { public: HLoopInformation(HBasicBlock* loop_header, Zone* zone) : back_edges_(4, zone), @@ -264,7 +264,7 @@ class HLoopInformation: public ZoneObject { stack_check_(NULL) { blocks_.Add(loop_header, zone); } - virtual ~HLoopInformation() {} + ~HLoopInformation() {} const ZoneList<HBasicBlock*>* back_edges() const { return &back_edges_; } const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } @@ -303,7 +303,7 @@ class HLoopInformation: public ZoneObject { class BoundsCheckTable; class InductionVariableBlocksTable; -class HGraph: public ZoneObject { +class HGraph V8_FINAL : public ZoneObject { public: explicit HGraph(CompilationInfo* info); @@ -320,7 +320,6 @@ class HGraph: public ZoneObject { bool ProcessArgumentsObject(); void OrderBlocks(); void AssignDominators(); - void SetupInformativeDefinitions(); void RestoreActualValues(); // Returns false if there are phi-uses of the arguments-object @@ -334,9 +333,9 @@ class HGraph: public ZoneObject { void CollectPhis(); void set_undefined_constant(HConstant* constant) { - undefined_constant_.set(constant); + constant_undefined_.set(constant); } - HConstant* GetConstantUndefined() const { return undefined_constant_.get(); } + HConstant* GetConstantUndefined() const { return constant_undefined_.get(); } HConstant* GetConstant0(); HConstant* GetConstant1(); HConstant* GetConstantMinus1(); @@ -346,6 +345,14 @@ class HGraph: public ZoneObject { HConstant* GetConstantNull(); HConstant* GetInvalidContext(); + bool IsConstantUndefined(HConstant* constant); + bool IsConstant0(HConstant* constant); + bool IsConstant1(HConstant* constant); + bool IsConstantMinus1(HConstant* constant); + bool IsConstantTrue(HConstant* constant); + bool IsConstantFalse(HConstant* constant); + bool IsConstantHole(HConstant* constant); + bool IsConstantNull(HConstant* constant); bool IsStandardConstant(HConstant* constant); HBasicBlock* CreateBasicBlock(); @@ -360,6 +367,7 @@ class HGraph: public ZoneObject { int GetMaximumValueID() const { return values_.length(); } int GetNextBlockID() { return next_block_id_++; } int GetNextValueID(HValue* value) { + ASSERT(!disallow_adding_new_values_); values_.Add(value, zone()); return values_.length() - 1; } @@ -367,8 +375,11 @@ class HGraph: public ZoneObject { if (id >= 0 && id < values_.length()) return values_[id]; return NULL; } + void DisallowAddingNewValues() { + disallow_adding_new_values_ = true; + } - bool Optimize(SmartArrayPointer<char>* bailout_reason); + bool Optimize(BailoutReason* bailout_reason); #ifdef DEBUG void Verify(bool do_full_verify) const; @@ -468,9 +479,6 @@ class HGraph: public ZoneObject { phase.Run(); } - void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor); - void SetupInformativeDefinitionsInBlock(HBasicBlock* block); - void SetupInformativeDefinitionsRecursively(HBasicBlock* block); void EliminateRedundantBoundsChecksUsingInductionVariables(); Isolate* isolate_; @@ -481,7 +489,7 @@ class HGraph: public ZoneObject { ZoneList<HValue*> values_; ZoneList<HPhi*>* phi_list_; ZoneList<HInstruction*>* uint32_instructions_; - SetOncePointer<HConstant> undefined_constant_; + SetOncePointer<HConstant> constant_undefined_; SetOncePointer<HConstant> constant_0_; SetOncePointer<HConstant> constant_1_; SetOncePointer<HConstant> constant_minus1_; @@ -504,6 +512,7 @@ class HGraph: public ZoneObject { int type_change_checksum_; int maximum_environment_size_; int no_side_effects_scope_count_; + bool disallow_adding_new_values_; DISALLOW_COPY_AND_ASSIGN(HGraph); }; @@ -523,7 +532,7 @@ enum FrameType { }; -class HEnvironment: public ZoneObject { +class HEnvironment V8_FINAL : public ZoneObject { public: HEnvironment(HEnvironment* outer, Scope* scope, @@ -557,9 +566,6 @@ class HEnvironment: public ZoneObject { void set_entry(HEnterInlined* entry) { entry_ = entry; } int length() const { return values_.length(); } - bool is_special_index(int i) const { - return i >= parameter_count() && i < parameter_count() + specials_count(); - } int first_expression_index() const { return parameter_count() + specials_count() + local_count(); @@ -678,8 +684,15 @@ class HEnvironment: public ZoneObject { } bool is_local_index(int i) const { - return i >= first_local_index() && - i < first_expression_index(); + return i >= first_local_index() && i < first_expression_index(); + } + + bool is_parameter_index(int i) const { + return i >= 0 && i < parameter_count(); + } + + bool is_special_index(int i) const { + return i >= parameter_count() && i < parameter_count() + specials_count(); } void PrintTo(StringStream* stream); @@ -793,33 +806,37 @@ class AstContext { }; -class EffectContext: public AstContext { +class EffectContext V8_FINAL : public AstContext { public: explicit EffectContext(HOptimizedGraphBuilder* owner) : AstContext(owner, Expression::kEffect) { } virtual ~EffectContext(); - virtual void ReturnValue(HValue* value); - virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); - virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); + virtual void ReturnValue(HValue* value) V8_OVERRIDE; + virtual void ReturnInstruction(HInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; + virtual void ReturnControl(HControlInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; virtual void ReturnContinuation(HIfContinuation* continuation, - BailoutId ast_id); + BailoutId ast_id) V8_OVERRIDE; }; -class ValueContext: public AstContext { +class ValueContext V8_FINAL : public AstContext { public: ValueContext(HOptimizedGraphBuilder* owner, ArgumentsAllowedFlag flag) : AstContext(owner, Expression::kValue), flag_(flag) { } virtual ~ValueContext(); - virtual void ReturnValue(HValue* value); - virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); - virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); + virtual void ReturnValue(HValue* value) V8_OVERRIDE; + virtual void ReturnInstruction(HInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; + virtual void ReturnControl(HControlInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; virtual void ReturnContinuation(HIfContinuation* continuation, - BailoutId ast_id); + BailoutId ast_id) V8_OVERRIDE; bool arguments_allowed() { return flag_ == ARGUMENTS_ALLOWED; } @@ -828,7 +845,7 @@ class ValueContext: public AstContext { }; -class TestContext: public AstContext { +class TestContext V8_FINAL : public AstContext { public: TestContext(HOptimizedGraphBuilder* owner, Expression* condition, @@ -840,11 +857,13 @@ class TestContext: public AstContext { if_false_(if_false) { } - virtual void ReturnValue(HValue* value); - virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); - virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); + virtual void ReturnValue(HValue* value) V8_OVERRIDE; + virtual void ReturnInstruction(HInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; + virtual void ReturnControl(HControlInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; virtual void ReturnContinuation(HIfContinuation* continuation, - BailoutId ast_id); + BailoutId ast_id) V8_OVERRIDE; static TestContext* cast(AstContext* context) { ASSERT(context->IsTest()); @@ -866,7 +885,7 @@ class TestContext: public AstContext { }; -class FunctionState { +class FunctionState V8_FINAL { public: FunctionState(HOptimizedGraphBuilder* owner, CompilationInfo* info, @@ -933,7 +952,7 @@ class FunctionState { }; -class HIfContinuation { +class HIfContinuation V8_FINAL { public: HIfContinuation() { continuation_captured_ = false; } ~HIfContinuation() { ASSERT(!continuation_captured_); } @@ -1056,7 +1075,7 @@ class HGraphBuilder { template<class I, class P1, class P2> I* Add(P1 p1, P2 p2) { - return static_cast<I*>(AddUncasted<I>(p1, p2)); + return I::cast(AddUncasted<I>(p1, p2)); } template<class I, class P1, class P2, class P3> @@ -1223,10 +1242,9 @@ class HGraphBuilder { bool is_jsarray); HInstruction* BuildUncheckedMonomorphicElementAccess( - HValue* object, + HValue* checked_object, HValue* key, HValue* val, - HCheckMaps* mapcheck, bool is_js_array, ElementsKind elements_kind, bool is_store, @@ -1251,13 +1269,10 @@ class HGraphBuilder { LoadKeyedHoleMode load_mode, KeyedAccessStoreMode store_mode); - HLoadNamedField* BuildLoadNamedField( - HValue* object, - HObjectAccess access, - HValue* typecheck); - HInstruction* BuildLoadStringLength(HValue* object, HValue* typecheck); - HStoreNamedField* AddStoreMapConstant(HValue *object, Handle<Map>); - HLoadNamedField* AddLoadElements(HValue *object, HValue *typecheck); + HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); + HInstruction* BuildLoadStringLength(HValue* object, HValue* checked_value); + HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map>); + HLoadNamedField* AddLoadElements(HValue* object); HLoadNamedField* AddLoadFixedArrayLength(HValue *object); HValue* AddLoadJSBuiltin(Builtins::JavaScript builtin); @@ -1266,12 +1281,13 @@ class HGraphBuilder { void PushAndAdd(HInstruction* instr); - void FinishExitWithHardDeoptimization(HBasicBlock* continuation); + void FinishExitWithHardDeoptimization(const char* reason, + HBasicBlock* continuation); void AddIncrementCounter(StatsCounter* counter, HValue* context); - class IfBuilder { + class IfBuilder V8_FINAL { public: explicit IfBuilder(HGraphBuilder* builder, int position = RelocInfo::kNoPosition); @@ -1370,10 +1386,10 @@ class HGraphBuilder { void Else(); void End(); - void Deopt(); - void ElseDeopt() { + void Deopt(const char* reason); + void ElseDeopt(const char* reason) { Else(); - Deopt(); + Deopt(reason); } void Return(HValue* value); @@ -1401,7 +1417,7 @@ class HGraphBuilder { HBasicBlock* merge_block_; }; - class LoopBuilder { + class LoopBuilder V8_FINAL { public: enum Direction { kPreIncrement, @@ -1413,6 +1429,11 @@ class HGraphBuilder { LoopBuilder(HGraphBuilder* builder, HValue* context, Direction direction); + LoopBuilder(HGraphBuilder* builder, + HValue* context, + Direction direction, + HValue* increment_amount); + ~LoopBuilder() { ASSERT(finished_); } @@ -1421,6 +1442,9 @@ class HGraphBuilder { HValue* initial, HValue* terminating, Token::Value token); + + void Break(); + void EndBody(); private: @@ -1428,11 +1452,13 @@ class HGraphBuilder { HGraphBuilder* builder_; HValue* context_; + HValue* increment_amount_; HInstruction* increment_; HPhi* phi_; HBasicBlock* header_block_; HBasicBlock* body_block_; HBasicBlock* exit_block_; + HBasicBlock* exit_trampoline_block_; Direction direction_; bool finished_; }; @@ -1442,7 +1468,7 @@ class HGraphBuilder { void BuildNewSpaceArrayCheck(HValue* length, ElementsKind kind); - class JSArrayBuilder { + class JSArrayBuilder V8_FINAL { public: JSArrayBuilder(HGraphBuilder* builder, ElementsKind kind, @@ -1532,9 +1558,6 @@ class HGraphBuilder { ElementsKind kind, int length); - HInstruction* BuildUnaryMathOp( - HValue* value, Handle<Type> type, Token::Value token); - void BuildCompareNil( HValue* value, Handle<Type> type, @@ -1545,6 +1568,11 @@ class HGraphBuilder { int previous_object_size, HValue* payload); + HInstruction* BuildConstantMapCheck(Handle<JSObject> constant, + CompilationInfo* info); + HInstruction* BuildCheckPrototypeMaps(Handle<JSObject> prototype, + Handle<JSObject> holder); + HInstruction* BuildGetNativeContext(); HInstruction* BuildGetArrayFunction(); @@ -1562,13 +1590,13 @@ class HGraphBuilder { template<> inline HInstruction* HGraphBuilder::AddUncasted<HDeoptimize>( - Deoptimizer::BailoutType type) { + const char* reason, Deoptimizer::BailoutType type) { if (type == Deoptimizer::SOFT) { isolate()->counters()->soft_deopts_requested()->Increment(); if (FLAG_always_opt) return NULL; } if (current_block()->IsDeoptimizing()) return NULL; - HDeoptimize* instr = New<HDeoptimize>(type); + HDeoptimize* instr = New<HDeoptimize>(reason, type); AddInstruction(instr); if (type == Deoptimizer::SOFT) { isolate()->counters()->soft_deopts_inserted()->Increment(); @@ -1581,8 +1609,8 @@ inline HInstruction* HGraphBuilder::AddUncasted<HDeoptimize>( template<> inline HDeoptimize* HGraphBuilder::Add<HDeoptimize>( - Deoptimizer::BailoutType type) { - return static_cast<HDeoptimize*>(AddUncasted<HDeoptimize>(type)); + const char* reason, Deoptimizer::BailoutType type) { + return static_cast<HDeoptimize*>(AddUncasted<HDeoptimize>(reason, type)); } @@ -1597,22 +1625,6 @@ inline HInstruction* HGraphBuilder::AddUncasted<HSimulate>( template<> -inline HInstruction* HGraphBuilder::NewUncasted<HLoadNamedField>( - HValue* object, HObjectAccess access) { - return NewUncasted<HLoadNamedField>(object, access, - static_cast<HValue*>(NULL)); -} - - -template<> -inline HInstruction* HGraphBuilder::AddUncasted<HLoadNamedField>( - HValue* object, HObjectAccess access) { - return AddUncasted<HLoadNamedField>(object, access, - static_cast<HValue*>(NULL)); -} - - -template<> inline HInstruction* HGraphBuilder::AddUncasted<HSimulate>(BailoutId id) { return AddUncasted<HSimulate>(id, FIXED_SIMULATE); } @@ -1640,12 +1652,13 @@ inline HInstruction* HGraphBuilder::NewUncasted<HContext>() { } -class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { +class HOptimizedGraphBuilder V8_FINAL + : public HGraphBuilder, public AstVisitor { public: // A class encapsulating (lazily-allocated) break and continue blocks for // a breakable statement. Separated from BreakAndContinueScope so that it // can have a separate lifetime. - class BreakAndContinueInfo BASE_EMBEDDED { + class BreakAndContinueInfo V8_FINAL BASE_EMBEDDED { public: explicit BreakAndContinueInfo(BreakableStatement* target, int drop_extra = 0) @@ -1671,7 +1684,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { // A helper class to maintain a stack of current BreakAndContinueInfo // structures mirroring BreakableStatement nesting. - class BreakAndContinueScope BASE_EMBEDDED { + class BreakAndContinueScope V8_FINAL BASE_EMBEDDED { public: BreakAndContinueScope(BreakAndContinueInfo* info, HOptimizedGraphBuilder* owner) @@ -1697,7 +1710,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { explicit HOptimizedGraphBuilder(CompilationInfo* info); - virtual bool BuildGraph(); + virtual bool BuildGraph() V8_OVERRIDE; // Simple accessors. BreakAndContinueScope* break_scope() const { return break_scope_; } @@ -1707,7 +1720,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { HValue* context() { return environment()->context(); } - void Bailout(const char* reason); + void Bailout(BailoutReason reason); HBasicBlock* CreateJoin(HBasicBlock* first, HBasicBlock* second, @@ -1788,8 +1801,6 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { void VisitDelete(UnaryOperation* expr); void VisitVoid(UnaryOperation* expr); void VisitTypeof(UnaryOperation* expr); - void VisitSub(UnaryOperation* expr); - void VisitBitNot(UnaryOperation* expr); void VisitNot(UnaryOperation* expr); void VisitComma(BinaryOperation* expr); @@ -1885,9 +1896,9 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { template <class Instruction> HInstruction* PreProcessCall(Instruction* call); void SetUpScope(Scope* scope); - virtual void VisitStatements(ZoneList<Statement*>* statements); + virtual void VisitStatements(ZoneList<Statement*>* statements) V8_OVERRIDE; -#define DECLARE_VISIT(type) virtual void Visit##type(type* node); +#define DECLARE_VISIT(type) virtual void Visit##type(type* node) V8_OVERRIDE; AST_NODE_LIST(DECLARE_VISIT) #undef DECLARE_VISIT @@ -1917,7 +1928,9 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { bool TryInlineCall(Call* expr, bool drop_extra = false); bool TryInlineConstruct(CallNew* expr, HValue* implicit_return_value); - bool TryInlineGetter(Handle<JSFunction> getter, Property* prop); + bool TryInlineGetter(Handle<JSFunction> getter, + BailoutId ast_id, + BailoutId return_id); bool TryInlineSetter(Handle<JSFunction> setter, BailoutId id, BailoutId assignment_id, @@ -1945,26 +1958,24 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { void HandlePropertyAssignment(Assignment* expr); void HandleCompoundAssignment(Assignment* expr); - void HandlePolymorphicLoadNamedField(Property* expr, + void HandlePolymorphicLoadNamedField(int position, + BailoutId return_id, HValue* object, SmallMapList* types, Handle<String> name); - HInstruction* TryLoadPolymorphicAsMonomorphic(Property* expr, - HValue* object, + HInstruction* TryLoadPolymorphicAsMonomorphic(HValue* object, SmallMapList* types, Handle<String> name); void HandlePolymorphicStoreNamedField(int position, BailoutId assignment_id, HValue* object, HValue* value, - HValue* result, SmallMapList* types, Handle<String> name); bool TryStorePolymorphicAsMonomorphic(int position, BailoutId assignment_id, HValue* object, HValue* value, - HValue* result, SmallMapList* types, Handle<String> name); void HandlePolymorphicCallNamed(Call* expr, @@ -1997,6 +2008,8 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { HValue* val, SmallMapList* maps); + LoadKeyedHoleMode BuildKeyedHoleMode(Handle<Map> map); + HInstruction* BuildMonomorphicElementAccess(HValue* object, HValue* key, HValue* val, @@ -2008,7 +2021,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { HValue* HandlePolymorphicElementAccess(HValue* object, HValue* key, HValue* val, - Expression* prop, + SmallMapList* maps, BailoutId ast_id, int position, bool is_store, @@ -2033,19 +2046,31 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { Handle<JSObject> holder); HInstruction* BuildLoadNamedMonomorphic(HValue* object, Handle<String> name, - Property* expr, Handle<Map> map); HCheckMaps* AddCheckMap(HValue* object, Handle<Map> map); - void BuildStoreNamed(Expression* expression, - BailoutId id, - int position, - BailoutId assignment_id, - Property* prop, - HValue* object, - HValue* store_value, - HValue* result_value); + void BuildLoad(Property* property, + int position, + BailoutId ast_id); + void PushLoad(Property* property, + HValue* object, + HValue* key, + int position); + + void BuildStoreForEffect(Expression* expression, + Property* prop, + BailoutId ast_id, + BailoutId return_id, + HValue* object, + HValue* key, + HValue* value); + + void BuildStore(Expression* expression, + Property* prop, + BailoutId ast_id, + BailoutId return_id, + bool is_uninitialized = false); HInstruction* BuildStoreNamedField(HValue* object, Handle<String> name, @@ -2067,60 +2092,31 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { HInstruction* BuildThisFunction(); - HInstruction* BuildFastLiteral(HValue* context, - Handle<JSObject> boilerplate_object, - Handle<JSObject> original_boilerplate_object, + HInstruction* BuildFastLiteral(Handle<JSObject> boilerplate_object, Handle<Object> allocation_site, - int data_size, - int pointer_size, AllocationSiteMode mode); - void BuildEmitDeepCopy(Handle<JSObject> boilerplat_object, - Handle<JSObject> object, - Handle<Object> allocation_site, - HInstruction* target, - int* offset, - HInstruction* data_target, - int* data_offset, - AllocationSiteMode mode); - - MUST_USE_RESULT HValue* BuildEmitObjectHeader( - Handle<JSObject> boilerplat_object, - HInstruction* target, - HInstruction* data_target, - int object_offset, - int elements_offset, - int elements_size); + void BuildEmitObjectHeader(Handle<JSObject> boilerplate_object, + HInstruction* object); + + void BuildInitElementsInObjectHeader(Handle<JSObject> boilerplate_object, + HInstruction* object, + HInstruction* object_elements); void BuildEmitInObjectProperties(Handle<JSObject> boilerplate_object, - Handle<JSObject> original_boilerplate_object, - HValue* object_properties, - HInstruction* target, - int* offset, - HInstruction* data_target, - int* data_offset); - - void BuildEmitElements(Handle<FixedArrayBase> elements, - Handle<FixedArrayBase> original_elements, - ElementsKind kind, - HValue* object_elements, - HInstruction* target, - int* offset, - HInstruction* data_target, - int* data_offset); + HInstruction* object); + + void BuildEmitElements(Handle<JSObject> boilerplate_object, + Handle<FixedArrayBase> elements, + HValue* object_elements); void BuildEmitFixedDoubleArray(Handle<FixedArrayBase> elements, ElementsKind kind, HValue* object_elements); void BuildEmitFixedArray(Handle<FixedArrayBase> elements, - Handle<FixedArrayBase> original_elements, ElementsKind kind, - HValue* object_elements, - HInstruction* target, - int* offset, - HInstruction* data_target, - int* data_offset); + HValue* object_elements); void AddCheckPrototypeMaps(Handle<JSObject> holder, Handle<Map> receiver_map); @@ -2166,44 +2162,40 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { Zone* AstContext::zone() const { return owner_->zone(); } -class HStatistics: public Malloced { +class HStatistics V8_FINAL: public Malloced { public: HStatistics() - : timing_(5), + : times_(5), names_(5), sizes_(5), - create_graph_(0), - optimize_graph_(0), - generate_code_(0), total_size_(0), - full_code_gen_(0), source_size_(0) { } void Initialize(CompilationInfo* info); void Print(); - void SaveTiming(const char* name, int64_t ticks, unsigned size); + void SaveTiming(const char* name, TimeDelta time, unsigned size); - void IncrementFullCodeGen(int64_t full_code_gen) { + void IncrementFullCodeGen(TimeDelta full_code_gen) { full_code_gen_ += full_code_gen; } - void IncrementSubtotals(int64_t create_graph, - int64_t optimize_graph, - int64_t generate_code) { + void IncrementSubtotals(TimeDelta create_graph, + TimeDelta optimize_graph, + TimeDelta generate_code) { create_graph_ += create_graph; optimize_graph_ += optimize_graph; generate_code_ += generate_code; } private: - List<int64_t> timing_; + List<TimeDelta> times_; List<const char*> names_; List<unsigned> sizes_; - int64_t create_graph_; - int64_t optimize_graph_; - int64_t generate_code_; + TimeDelta create_graph_; + TimeDelta optimize_graph_; + TimeDelta generate_code_; unsigned total_size_; - int64_t full_code_gen_; + TimeDelta full_code_gen_; double source_size_; }; @@ -2225,7 +2217,7 @@ class HPhase : public CompilationPhase { }; -class HTracer: public Malloced { +class HTracer V8_FINAL : public Malloced { public: explicit HTracer(int isolate_id) : trace_(&string_allocator_), indent_(0) { @@ -2246,7 +2238,7 @@ class HTracer: public Malloced { void TraceLiveRanges(const char* name, LAllocator* allocator); private: - class Tag BASE_EMBEDDED { + class Tag V8_FINAL BASE_EMBEDDED { public: Tag(HTracer* tracer, const char* name) { name_ = name; @@ -2311,7 +2303,7 @@ class HTracer: public Malloced { }; -class NoObservableSideEffectsScope { +class NoObservableSideEffectsScope V8_FINAL { public: explicit NoObservableSideEffectsScope(HGraphBuilder* builder) : builder_(builder) { |