Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: src/crankshaft/hydrogen.h

Issue 1859763005: [crankshaft] Fix environment handling after leaving inlined tail call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_
6 #define V8_CRANKSHAFT_HYDROGEN_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_H_
7 7
8 #include "src/accessors.h" 8 #include "src/accessors.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 InliningKind inlining_kind, 618 InliningKind inlining_kind,
619 TailCallMode syntactic_tail_call_mode) const; 619 TailCallMode syntactic_tail_call_mode) const;
620 620
621 HEnvironment* DiscardInlined(bool drop_extra) { 621 HEnvironment* DiscardInlined(bool drop_extra) {
622 HEnvironment* outer = outer_; 622 HEnvironment* outer = outer_;
623 while (outer->frame_type() != JS_FUNCTION && 623 while (outer->frame_type() != JS_FUNCTION &&
624 outer->frame_type() != TAIL_CALLER_FUNCTION) { 624 outer->frame_type() != TAIL_CALLER_FUNCTION) {
625 outer = outer->outer_; 625 outer = outer->outer_;
626 } 626 }
627 if (drop_extra) outer->Drop(1); 627 if (drop_extra) outer->Drop(1);
628 if (outer->frame_type() == TAIL_CALLER_FUNCTION) {
629 outer->ClearTailCallerMark();
630 }
628 return outer; 631 return outer;
629 } 632 }
630 633
631 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other); 634 void AddIncomingEdge(HBasicBlock* block, HEnvironment* other);
632 635
633 void ClearHistory() { 636 void ClearHistory() {
634 pop_count_ = 0; 637 pop_count_ = 0;
635 push_count_ = 0; 638 push_count_ = 0;
636 assigned_variables_.Clear(); 639 assigned_variables_.Clear();
637 } 640 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 // Create an artificial stub environment (e.g. for argument adaptor or 681 // Create an artificial stub environment (e.g. for argument adaptor or
679 // constructor stub). 682 // constructor stub).
680 HEnvironment* CreateStubEnvironment(HEnvironment* outer, 683 HEnvironment* CreateStubEnvironment(HEnvironment* outer,
681 Handle<JSFunction> target, 684 Handle<JSFunction> target,
682 FrameType frame_type, 685 FrameType frame_type,
683 int arguments) const; 686 int arguments) const;
684 687
685 // Marks current environment as tail caller by setting frame type to 688 // Marks current environment as tail caller by setting frame type to
686 // TAIL_CALLER_FUNCTION. 689 // TAIL_CALLER_FUNCTION.
687 void MarkAsTailCaller(); 690 void MarkAsTailCaller();
691 void ClearTailCallerMark();
688 692
689 // True if index is included in the expression stack part of the environment. 693 // True if index is included in the expression stack part of the environment.
690 bool HasExpressionAt(int index) const; 694 bool HasExpressionAt(int index) const;
691 695
692 void Initialize(int parameter_count, int local_count, int stack_height); 696 void Initialize(int parameter_count, int local_count, int stack_height);
693 void Initialize(const HEnvironment* other); 697 void Initialize(const HEnvironment* other);
694 698
695 Handle<JSFunction> closure_; 699 Handle<JSFunction> closure_;
696 // Value array [parameters] [specials] [locals] [temporaries]. 700 // Value array [parameters] [specials] [locals] [temporaries].
697 ZoneList<HValue*> values_; 701 ZoneList<HValue*> values_;
(...skipping 2387 matching lines...) Expand 10 before | Expand all | Expand 10 after
3085 } 3089 }
3086 3090
3087 private: 3091 private:
3088 HOptimizedGraphBuilder* builder_; 3092 HOptimizedGraphBuilder* builder_;
3089 }; 3093 };
3090 3094
3091 } // namespace internal 3095 } // namespace internal
3092 } // namespace v8 3096 } // namespace v8
3093 3097
3094 #endif // V8_CRANKSHAFT_HYDROGEN_H_ 3098 #endif // V8_CRANKSHAFT_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698