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

Side by Side Diff: src/ic/ic-state.h

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use Number() instead of OrderedNumber() to include NaN 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/ic/ic.cc ('k') | src/parser.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_IC_STATE_H_ 5 #ifndef V8_IC_STATE_H_
6 #define V8_IC_STATE_H_ 6 #define V8_IC_STATE_H_
7 7
8 #include "src/macro-assembler.h" 8 #include "src/macro-assembler.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return Max(left_kind_, right_kind_) == GENERIC; 105 return Max(left_kind_, right_kind_) == GENERIC;
106 } 106 }
107 107
108 // Returns true if the IC should enable the inline smi code (i.e. if either 108 // Returns true if the IC should enable the inline smi code (i.e. if either
109 // parameter may be a smi). 109 // parameter may be a smi).
110 bool UseInlinedSmiCode() const { 110 bool UseInlinedSmiCode() const {
111 return KindMaybeSmi(left_kind_) || KindMaybeSmi(right_kind_); 111 return KindMaybeSmi(left_kind_) || KindMaybeSmi(right_kind_);
112 } 112 }
113 113
114 static const int FIRST_TOKEN = Token::BIT_OR; 114 static const int FIRST_TOKEN = Token::BIT_OR;
115 static const int LAST_TOKEN = Token::MOD; 115 static const int LAST_TOKEN = Token::EXP;
116 116
117 Token::Value op() const { return op_; } 117 Token::Value op() const { return op_; }
118 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; } 118 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; }
119 119
120 Type* GetLeftType(Zone* zone) const { return KindToType(left_kind_, zone); } 120 Type* GetLeftType(Zone* zone) const { return KindToType(left_kind_, zone); }
121 Type* GetRightType(Zone* zone) const { return KindToType(right_kind_, zone); } 121 Type* GetRightType(Zone* zone) const { return KindToType(right_kind_, zone); }
122 Type* GetResultType(Zone* zone) const; 122 Type* GetResultType(Zone* zone) const;
123 123
124 void Update(Handle<Object> left, Handle<Object> right, Handle<Object> result); 124 void Update(Handle<Object> left, Handle<Object> right, Handle<Object> result);
125 125
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 private: 214 private:
215 class ContextualModeBits : public BitField<ContextualMode, 0, 1> {}; 215 class ContextualModeBits : public BitField<ContextualMode, 0, 1> {};
216 STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0); 216 STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0);
217 217
218 const ExtraICState state_; 218 const ExtraICState state_;
219 }; 219 };
220 } 220 }
221 } 221 }
222 222
223 #endif // V8_IC_STATE_H_ 223 #endif // V8_IC_STATE_H_
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698