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

Side by Side Diff: src/hydrogen.h

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 5 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 | « src/full-codegen.cc ('k') | src/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_HYDROGEN_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 // expressions. 751 // expressions.
752 virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id) = 0; 752 virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id) = 0;
753 753
754 // Finishes the current basic block and materialize a boolean for 754 // Finishes the current basic block and materialize a boolean for
755 // value context, nothing for effect, generate a branch for test context. 755 // value context, nothing for effect, generate a branch for test context.
756 // Call this function in tail position in the Visit functions for 756 // Call this function in tail position in the Visit functions for
757 // expressions that use an IfBuilder. 757 // expressions that use an IfBuilder.
758 virtual void ReturnContinuation(HIfContinuation* continuation, 758 virtual void ReturnContinuation(HIfContinuation* continuation,
759 BailoutId ast_id) = 0; 759 BailoutId ast_id) = 0;
760 760
761 void set_for_typeof(bool for_typeof) { for_typeof_ = for_typeof; } 761 void set_typeof_mode(TypeofMode typeof_mode) { typeof_mode_ = typeof_mode; }
762 bool is_for_typeof() { return for_typeof_; } 762 TypeofMode typeof_mode() { return typeof_mode_; }
763 763
764 protected: 764 protected:
765 AstContext(HOptimizedGraphBuilder* owner, Expression::Context kind); 765 AstContext(HOptimizedGraphBuilder* owner, Expression::Context kind);
766 virtual ~AstContext(); 766 virtual ~AstContext();
767 767
768 HOptimizedGraphBuilder* owner() const { return owner_; } 768 HOptimizedGraphBuilder* owner() const { return owner_; }
769 769
770 inline Zone* zone() const; 770 inline Zone* zone() const;
771 771
772 // We want to be able to assert, in a context-specific way, that the stack 772 // We want to be able to assert, in a context-specific way, that the stack
773 // height makes sense when the context is filled. 773 // height makes sense when the context is filled.
774 #ifdef DEBUG 774 #ifdef DEBUG
775 int original_length_; 775 int original_length_;
776 #endif 776 #endif
777 777
778 private: 778 private:
779 HOptimizedGraphBuilder* owner_; 779 HOptimizedGraphBuilder* owner_;
780 Expression::Context kind_; 780 Expression::Context kind_;
781 AstContext* outer_; 781 AstContext* outer_;
782 bool for_typeof_; 782 TypeofMode typeof_mode_;
783 }; 783 };
784 784
785 785
786 class EffectContext final : public AstContext { 786 class EffectContext final : public AstContext {
787 public: 787 public:
788 explicit EffectContext(HOptimizedGraphBuilder* owner) 788 explicit EffectContext(HOptimizedGraphBuilder* owner)
789 : AstContext(owner, Expression::kEffect) { 789 : AstContext(owner, Expression::kEffect) {
790 } 790 }
791 virtual ~EffectContext(); 791 virtual ~EffectContext();
792 792
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3055 } 3055 }
3056 3056
3057 private: 3057 private:
3058 HGraphBuilder* builder_; 3058 HGraphBuilder* builder_;
3059 }; 3059 };
3060 3060
3061 3061
3062 } } // namespace v8::internal 3062 } } // namespace v8::internal
3063 3063
3064 #endif // V8_HYDROGEN_H_ 3064 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698