summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/v8/src/hydrogen.h
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2012-06-13 09:21:17 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-13 09:55:50 +0200
commitd47c4a1dad750d278bcf00b630af69c4b8bdb97f (patch)
tree289865bd448633ffec5e8d7e85436b6c0a8a6cad /src/3rdparty/v8/src/hydrogen.h
parent28017b45db578180d0d54e67aea209ad95f73b9f (diff)
Updated V8 from git://github.com/v8/v8.git to 3e6ec7e018bbf2c63ef04b85ff688198ea204c04
Update V8 source to version 3.11.4 * Performance and stability improvements on all platforms. * Fixed native ARM build (issues 1744, 539) * Fixed several bugs in heap profiles (including issue 2078). * Throw syntax errors on illegal escape sequences. * Made handling of const more consistent when combined with 'eval' and 'with'. * Fixed V8 on MinGW-x64 (issue 2026). * Put new global var semantics behind a flag until WebKit tests are cleaned up. * Enabled inlining some V8 API functions. * Enabled MIPS cross-compilation. * Implemented clearing of CompareICs (issue 2102). * Fixed python deprecations. (issue 1391) * Fixed GCC 4.7 (C++11) compilation. (issue 2136) Change-Id: I72594bd22356391dd55e315c022d0c9f3fd5b451 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/3rdparty/v8/src/hydrogen.h')
-rw-r--r--src/3rdparty/v8/src/hydrogen.h68
1 files changed, 53 insertions, 15 deletions
diff --git a/src/3rdparty/v8/src/hydrogen.h b/src/3rdparty/v8/src/hydrogen.h
index bc9bc9d..b56a5af 100644
--- a/src/3rdparty/v8/src/hydrogen.h
+++ b/src/3rdparty/v8/src/hydrogen.h
@@ -42,6 +42,7 @@ namespace internal {
// Forward declarations.
class BitVector;
+class FunctionState;
class HEnvironment;
class HGraph;
class HLoopInformation;
@@ -121,7 +122,7 @@ class HBasicBlock: public ZoneObject {
void Finish(HControlInstruction* last);
void FinishExit(HControlInstruction* instruction);
- void Goto(HBasicBlock* block, bool drop_extra = false);
+ void Goto(HBasicBlock* block, FunctionState* state = NULL);
int PredecessorIndexOf(HBasicBlock* predecessor) const;
void AddSimulate(int ast_id) { AddInstruction(CreateSimulate(ast_id)); }
@@ -136,7 +137,7 @@ class HBasicBlock: public ZoneObject {
// instruction and updating the bailout environment.
void AddLeaveInlined(HValue* return_value,
HBasicBlock* target,
- bool drop_extra = false);
+ FunctionState* state = NULL);
// If a target block is tagged as an inline function return, all
// predecessors should contain the inlined exit sequence:
@@ -240,7 +241,7 @@ class HLoopInformation: public ZoneObject {
HStackCheck* stack_check_;
};
-
+class BoundsCheckTable;
class HGraph: public ZoneObject {
public:
explicit HGraph(CompilationInfo* info);
@@ -265,6 +266,8 @@ class HGraph: public ZoneObject {
void OrderBlocks();
void AssignDominators();
void ReplaceCheckedValues();
+ void EliminateRedundantBoundsChecks();
+ void DehoistSimpleArrayIndexComputations();
void PropagateDeoptimizingMark();
// Returns false if there are phi-uses of the arguments-object
@@ -357,6 +360,7 @@ class HGraph: public ZoneObject {
void InferTypes(ZoneList<HValue*>* worklist);
void InitializeInferredTypes(int from_inclusive, int to_inclusive);
void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor);
+ void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table);
Isolate* isolate_;
int next_block_id_;
@@ -715,6 +719,16 @@ class FunctionState {
FunctionState* outer() { return outer_; }
+ HEnterInlined* entry() { return entry_; }
+ void set_entry(HEnterInlined* entry) { entry_ = entry; }
+
+ HArgumentsElements* arguments_elements() { return arguments_elements_; }
+ void set_arguments_elements(HArgumentsElements* arguments_elements) {
+ arguments_elements_ = arguments_elements;
+ }
+
+ bool arguments_pushed() { return arguments_elements() != NULL; }
+
private:
HGraphBuilder* owner_;
@@ -741,6 +755,12 @@ class FunctionState {
// return blocks. NULL in all other cases.
TestContext* test_context_;
+ // When inlining HEnterInlined instruction corresponding to the function
+ // entry.
+ HEnterInlined* entry_;
+
+ HArgumentsElements* arguments_elements_;
+
FunctionState* outer_;
};
@@ -851,15 +871,11 @@ class HGraphBuilder: public AstVisitor {
static const int kMaxLoadPolymorphism = 4;
static const int kMaxStorePolymorphism = 4;
- static const int kMaxInlinedNodes = 196;
- static const int kMaxInlinedSize = 196;
- static const int kMaxSourceSize = 600;
-
// Even in the 'unlimited' case we have to have some limit in order not to
// overflow the stack.
- static const int kUnlimitedMaxInlinedNodes = 1000;
- static const int kUnlimitedMaxInlinedSize = 1000;
- static const int kUnlimitedMaxSourceSize = 600;
+ static const int kUnlimitedMaxInlinedSourceSize = 100000;
+ static const int kUnlimitedMaxInlinedNodes = 10000;
+ static const int kUnlimitedMaxInlinedNodesCumulative = 10000;
// Simple accessors.
void set_function_state(FunctionState* state) { function_state_ = state; }
@@ -896,11 +912,6 @@ class HGraphBuilder: public AstVisitor {
INLINE_RUNTIME_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION)
#undef INLINE_FUNCTION_GENERATOR_DECLARATION
- void HandleDeclaration(VariableProxy* proxy,
- VariableMode mode,
- FunctionLiteral* function,
- int* global_count);
-
void VisitDelete(UnaryOperation* expr);
void VisitVoid(UnaryOperation* expr);
void VisitTypeof(UnaryOperation* expr);
@@ -994,11 +1005,13 @@ class HGraphBuilder: public AstVisitor {
LookupResult* lookup,
bool is_store);
+ void EnsureArgumentsArePushedForAccess();
bool TryArgumentsAccess(Property* expr);
// Try to optimize fun.apply(receiver, arguments) pattern.
bool TryCallApply(Call* expr);
+ int InliningAstSize(Handle<JSFunction> target);
bool TryInline(CallKind call_kind,
Handle<JSFunction> target,
ZoneList<Expression*>* arguments,
@@ -1149,6 +1162,7 @@ class HGraphBuilder: public AstVisitor {
HBasicBlock* current_block_;
int inlined_count_;
+ ZoneList<Handle<Object> > globals_;
Zone* zone_;
@@ -1223,6 +1237,30 @@ class HValueMap: public ZoneObject {
};
+class HSideEffectMap BASE_EMBEDDED {
+ public:
+ HSideEffectMap();
+ explicit HSideEffectMap(HSideEffectMap* other);
+
+ void Kill(GVNFlagSet flags);
+
+ void Store(GVNFlagSet flags, HInstruction* instr);
+
+ bool IsEmpty() const { return count_ == 0; }
+
+ inline HInstruction* operator[](int i) const {
+ ASSERT(0 <= i);
+ ASSERT(i < kNumberOfTrackedSideEffects);
+ return data_[i];
+ }
+ inline HInstruction* at(int i) const { return operator[](i); }
+
+ private:
+ int count_;
+ HInstruction* data_[kNumberOfTrackedSideEffects];
+};
+
+
class HStatistics: public Malloced {
public:
void Initialize(CompilationInfo* info);