diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-10-27 00:48:23 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-10-27 00:48:23 -0700 |
commit | 92f5a5d3caf01f382f90c235e9057590a5e76870 (patch) | |
tree | edf52631145345943dc82e1b783de81ba89208af /deps/v8/src/hydrogen.h | |
parent | 528c28587f11b64616ffa22b5cf3f53bea831792 (diff) | |
download | node-new-92f5a5d3caf01f382f90c235e9057590a5e76870.tar.gz |
Upgrade V8 to 3.7.1
Diffstat (limited to 'deps/v8/src/hydrogen.h')
-rw-r--r-- | deps/v8/src/hydrogen.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/deps/v8/src/hydrogen.h b/deps/v8/src/hydrogen.h index b66042c2cb..2d08dc8e79 100644 --- a/deps/v8/src/hydrogen.h +++ b/deps/v8/src/hydrogen.h @@ -121,7 +121,7 @@ class HBasicBlock: public ZoneObject { void Finish(HControlInstruction* last); void FinishExit(HControlInstruction* instruction); - void Goto(HBasicBlock* block); + void Goto(HBasicBlock* block, bool drop_extra = false); int PredecessorIndexOf(HBasicBlock* predecessor) const; void AddSimulate(int ast_id) { AddInstruction(CreateSimulate(ast_id)); } @@ -133,7 +133,9 @@ class HBasicBlock: public ZoneObject { // Add the inlined function exit sequence, adding an HLeaveInlined // instruction and updating the bailout environment. - void AddLeaveInlined(HValue* return_value, HBasicBlock* target); + void AddLeaveInlined(HValue* return_value, + HBasicBlock* target, + bool drop_extra = false); // If a target block is tagged as an inline function return, all // predecessors should contain the inlined exit sequence: @@ -603,16 +605,18 @@ class TestContext: public AstContext { }; -class FunctionState BASE_EMBEDDED { +class FunctionState { public: FunctionState(HGraphBuilder* owner, CompilationInfo* info, - TypeFeedbackOracle* oracle); + TypeFeedbackOracle* oracle, + bool drop_extra); ~FunctionState(); CompilationInfo* compilation_info() { return compilation_info_; } TypeFeedbackOracle* oracle() { return oracle_; } AstContext* call_context() { return call_context_; } + bool drop_extra() { return drop_extra_; } HBasicBlock* function_return() { return function_return_; } TestContext* test_context() { return test_context_; } void ClearInlinedTestContext() { @@ -632,6 +636,10 @@ class FunctionState BASE_EMBEDDED { // inlined. NULL when not inlining. AstContext* call_context_; + // Indicate if we have to drop an extra value from the environment on + // return from inlined functions. + bool drop_extra_; + // When inlining in an effect of value context, this is the return block. // It is NULL otherwise. When inlining in a test context, there are a // pair of return blocks in the context. When not inlining, there is no @@ -728,6 +736,8 @@ class HGraphBuilder: public AstVisitor { TypeFeedbackOracle* oracle() const { return function_state()->oracle(); } + FunctionState* function_state() const { return function_state_; } + private: // Type of a member function that generates inline code for a native function. typedef void (HGraphBuilder::*InlineFunctionGenerator)(CallRuntime* call); @@ -746,7 +756,6 @@ class HGraphBuilder: public AstVisitor { static const int kMaxSourceSize = 600; // Simple accessors. - FunctionState* function_state() const { return function_state_; } void set_function_state(FunctionState* state) { function_state_ = state; } AstContext* ast_context() const { return ast_context_; } @@ -769,8 +778,8 @@ class HGraphBuilder: public AstVisitor { void ClearInlinedTestContext() { function_state()->ClearInlinedTestContext(); } - bool function_strict_mode() { - return function_state()->compilation_info()->is_strict_mode(); + StrictModeFlag function_strict_mode_flag() { + return function_state()->compilation_info()->strict_mode_flag(); } // Generators for inline runtime functions. @@ -883,7 +892,7 @@ class HGraphBuilder: public AstVisitor { // Try to optimize fun.apply(receiver, arguments) pattern. bool TryCallApply(Call* expr); - bool TryInline(Call* expr); + bool TryInline(Call* expr, bool drop_extra = false); bool TryInlineBuiltinFunction(Call* expr, HValue* receiver, Handle<Map> receiver_map, @@ -912,12 +921,11 @@ class HGraphBuilder: public AstVisitor { HValue* receiver, SmallMapList* types, Handle<String> name); - bool TryLiteralCompare(CompareOperation* expr); void HandleLiteralCompareTypeof(CompareOperation* expr, - Expression* sub_expr, + HTypeof* typeof_expr, Handle<String> check); void HandleLiteralCompareNil(CompareOperation* expr, - Expression* sub_expr, + HValue* value, NilValue nil); HStringCharCodeAt* BuildStringCharCodeAt(HValue* context, @@ -951,7 +959,7 @@ class HGraphBuilder: public AstVisitor { HInstruction* BuildMonomorphicElementAccess(HValue* object, HValue* key, HValue* val, - Expression* expr, + Handle<Map> map, bool is_store); HValue* HandlePolymorphicElementAccess(HValue* object, HValue* key, |