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

Side by Side Diff: src/ast.h

Issue 958053003: Removed funky Maybe constructor and made fields private. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/api-natives.cc ('k') | src/contexts.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_AST_H_ 5 #ifndef V8_AST_H_
6 #define V8_AST_H_ 6 #define V8_AST_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after
2069 static int num_ids() { return parent_num_ids() + 2; } 2069 static int num_ids() { return parent_num_ids() + 2; }
2070 BailoutId RightId() const { return BailoutId(local_id(0)); } 2070 BailoutId RightId() const { return BailoutId(local_id(0)); }
2071 2071
2072 TypeFeedbackId BinaryOperationFeedbackId() const { 2072 TypeFeedbackId BinaryOperationFeedbackId() const {
2073 return TypeFeedbackId(local_id(1)); 2073 return TypeFeedbackId(local_id(1));
2074 } 2074 }
2075 Maybe<int> fixed_right_arg() const { 2075 Maybe<int> fixed_right_arg() const {
2076 return has_fixed_right_arg_ ? Just(fixed_right_arg_value_) : Nothing<int>(); 2076 return has_fixed_right_arg_ ? Just(fixed_right_arg_value_) : Nothing<int>();
2077 } 2077 }
2078 void set_fixed_right_arg(Maybe<int> arg) { 2078 void set_fixed_right_arg(Maybe<int> arg) {
2079 has_fixed_right_arg_ = arg.has_value; 2079 has_fixed_right_arg_ = arg.IsJust();
2080 if (arg.has_value) fixed_right_arg_value_ = arg.value; 2080 if (arg.IsJust()) fixed_right_arg_value_ = arg.FromJust();
2081 } 2081 }
2082 2082
2083 virtual void RecordToBooleanTypeFeedback( 2083 virtual void RecordToBooleanTypeFeedback(
2084 TypeFeedbackOracle* oracle) OVERRIDE; 2084 TypeFeedbackOracle* oracle) OVERRIDE;
2085 2085
2086 protected: 2086 protected:
2087 BinaryOperation(Zone* zone, Token::Value op, Expression* left, 2087 BinaryOperation(Zone* zone, Token::Value op, Expression* left,
2088 Expression* right, int pos) 2088 Expression* right, int pos)
2089 : Expression(zone, pos), 2089 : Expression(zone, pos),
2090 op_(static_cast<byte>(op)), 2090 op_(static_cast<byte>(op)),
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
3509 3509
3510 private: 3510 private:
3511 Zone* zone_; 3511 Zone* zone_;
3512 AstValueFactory* ast_value_factory_; 3512 AstValueFactory* ast_value_factory_;
3513 }; 3513 };
3514 3514
3515 3515
3516 } } // namespace v8::internal 3516 } } // namespace v8::internal
3517 3517
3518 #endif // V8_AST_H_ 3518 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/api-natives.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698