| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 HEnvironment* CopyWithoutHistory() const; | 633 HEnvironment* CopyWithoutHistory() const; |
| 634 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; | 634 HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const; |
| 635 | 635 |
| 636 // Create an "inlined version" of this environment, where the original | 636 // Create an "inlined version" of this environment, where the original |
| 637 // environment is the outer environment but the top expression stack | 637 // environment is the outer environment but the top expression stack |
| 638 // elements are moved to an inner environment as parameters. | 638 // elements are moved to an inner environment as parameters. |
| 639 HEnvironment* CopyForInlining(Handle<JSFunction> target, | 639 HEnvironment* CopyForInlining(Handle<JSFunction> target, |
| 640 int arguments, | 640 int arguments, |
| 641 FunctionLiteral* function, | 641 FunctionLiteral* function, |
| 642 HConstant* undefined, | 642 HConstant* undefined, |
| 643 InliningKind inlining_kind, | 643 InliningKind inlining_kind) const; |
| 644 bool undefined_receiver) const; | |
| 645 | |
| 646 static bool UseUndefinedReceiver(Handle<JSFunction> closure, | |
| 647 FunctionLiteral* function, | |
| 648 CallKind call_kind, | |
| 649 InliningKind inlining_kind) { | |
| 650 return (closure->shared()->native() || !function->is_classic_mode()) && | |
| 651 call_kind == CALL_AS_FUNCTION && inlining_kind != CONSTRUCT_CALL_RETURN; | |
| 652 } | |
| 653 | 644 |
| 654 HEnvironment* DiscardInlined(bool drop_extra) { | 645 HEnvironment* DiscardInlined(bool drop_extra) { |
| 655 HEnvironment* outer = outer_; | 646 HEnvironment* outer = outer_; |
| 656 while (outer->frame_type() != JS_FUNCTION) outer = outer->outer_; | 647 while (outer->frame_type() != JS_FUNCTION) outer = outer->outer_; |
| 657 if (drop_extra) outer->Drop(1); | 648 if (drop_extra) outer->Drop(1); |
| 658 return outer; | 649 return outer; |
| 659 } | 650 } |
| 660 | 651 |
| 661 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); | 652 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); |
| 662 | 653 |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 | 1758 |
| 1768 void BuildCreateAllocationMemento(HValue* previous_object, | 1759 void BuildCreateAllocationMemento(HValue* previous_object, |
| 1769 HValue* previous_object_size, | 1760 HValue* previous_object_size, |
| 1770 HValue* payload); | 1761 HValue* payload); |
| 1771 | 1762 |
| 1772 HInstruction* BuildConstantMapCheck(Handle<JSObject> constant, | 1763 HInstruction* BuildConstantMapCheck(Handle<JSObject> constant, |
| 1773 CompilationInfo* info); | 1764 CompilationInfo* info); |
| 1774 HInstruction* BuildCheckPrototypeMaps(Handle<JSObject> prototype, | 1765 HInstruction* BuildCheckPrototypeMaps(Handle<JSObject> prototype, |
| 1775 Handle<JSObject> holder); | 1766 Handle<JSObject> holder); |
| 1776 | 1767 |
| 1768 HInstruction* BuildGetNativeContext(HValue* closure); |
| 1777 HInstruction* BuildGetNativeContext(); | 1769 HInstruction* BuildGetNativeContext(); |
| 1778 HInstruction* BuildGetArrayFunction(); | 1770 HInstruction* BuildGetArrayFunction(); |
| 1779 | 1771 |
| 1780 protected: | 1772 protected: |
| 1781 void SetSourcePosition(int position) { | 1773 void SetSourcePosition(int position) { |
| 1782 ASSERT(position != RelocInfo::kNoPosition); | 1774 ASSERT(position != RelocInfo::kNoPosition); |
| 1783 position_ = position; | 1775 position_ = position; |
| 1784 } | 1776 } |
| 1785 | 1777 |
| 1786 template <typename ViewClass> | 1778 template <typename ViewClass> |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 GlobalPropertyAccess LookupGlobalProperty(Variable* var, | 2187 GlobalPropertyAccess LookupGlobalProperty(Variable* var, |
| 2196 LookupResult* lookup, | 2188 LookupResult* lookup, |
| 2197 bool is_store); | 2189 bool is_store); |
| 2198 | 2190 |
| 2199 void EnsureArgumentsArePushedForAccess(); | 2191 void EnsureArgumentsArePushedForAccess(); |
| 2200 bool TryArgumentsAccess(Property* expr); | 2192 bool TryArgumentsAccess(Property* expr); |
| 2201 | 2193 |
| 2202 // Try to optimize fun.apply(receiver, arguments) pattern. | 2194 // Try to optimize fun.apply(receiver, arguments) pattern. |
| 2203 bool TryCallApply(Call* expr); | 2195 bool TryCallApply(Call* expr); |
| 2204 | 2196 |
| 2197 HValue* ImplicitReceiverFor(HValue* function, |
| 2198 Handle<JSFunction> target); |
| 2199 |
| 2205 int InliningAstSize(Handle<JSFunction> target); | 2200 int InliningAstSize(Handle<JSFunction> target); |
| 2206 bool TryInline(CallKind call_kind, | 2201 bool TryInline(CallKind call_kind, |
| 2207 Handle<JSFunction> target, | 2202 Handle<JSFunction> target, |
| 2208 int arguments_count, | 2203 int arguments_count, |
| 2209 HValue* implicit_return_value, | 2204 HValue* implicit_return_value, |
| 2210 BailoutId ast_id, | 2205 BailoutId ast_id, |
| 2211 BailoutId return_id, | 2206 BailoutId return_id, |
| 2212 InliningKind inlining_kind); | 2207 InliningKind inlining_kind); |
| 2213 | 2208 |
| 2214 bool TryInlineCall(Call* expr, bool drop_extra = false); | 2209 bool TryInlineCall(Call* expr, bool drop_extra = false); |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2686 } | 2681 } |
| 2687 | 2682 |
| 2688 private: | 2683 private: |
| 2689 HGraphBuilder* builder_; | 2684 HGraphBuilder* builder_; |
| 2690 }; | 2685 }; |
| 2691 | 2686 |
| 2692 | 2687 |
| 2693 } } // namespace v8::internal | 2688 } } // namespace v8::internal |
| 2694 | 2689 |
| 2695 #endif // V8_HYDROGEN_H_ | 2690 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |