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

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

Issue 1192383003: Fix overlapping KeyedLoadIC bitfield. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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.h ('k') | no next file » | 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 static State TargetState(State old_state, State old_left, State old_right, 197 static State TargetState(State old_state, State old_left, State old_right,
198 Token::Value op, bool has_inlined_smi_code, 198 Token::Value op, bool has_inlined_smi_code,
199 Handle<Object> x, Handle<Object> y); 199 Handle<Object> x, Handle<Object> y);
200 }; 200 };
201 201
202 202
203 class LoadICState final BASE_EMBEDDED { 203 class LoadICState final BASE_EMBEDDED {
204 private: 204 private:
205 class ContextualModeBits : public BitField<ContextualMode, 0, 1> {}; 205 class ContextualModeBits : public BitField<ContextualMode, 0, 1> {};
206 class LanguageModeBits : public BitField<LanguageMode, 1, 2> {}; 206 class LanguageModeBits
207 : public BitField<LanguageMode, ContextualModeBits::kNext, 2> {};
207 STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0); 208 STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0);
208 const ExtraICState state_; 209 const ExtraICState state_;
209 210
210 public: 211 public:
212 static const uint32_t kNextBitFieldOffset = LanguageModeBits::kNext;
213
211 static const ExtraICState kStrongModeState = STRONG 214 static const ExtraICState kStrongModeState = STRONG
212 << LanguageModeBits::kShift; 215 << LanguageModeBits::kShift;
213 216
214 explicit LoadICState(ExtraICState extra_ic_state) : state_(extra_ic_state) {} 217 explicit LoadICState(ExtraICState extra_ic_state) : state_(extra_ic_state) {}
215 218
216 explicit LoadICState(ContextualMode mode, LanguageMode language_mode) 219 explicit LoadICState(ContextualMode mode, LanguageMode language_mode)
217 : state_(ContextualModeBits::encode(mode) | 220 : state_(ContextualModeBits::encode(mode) |
218 LanguageModeBits::encode(language_mode)) {} 221 LanguageModeBits::encode(language_mode)) {}
219 222
220 ExtraICState GetExtraICState() const { return state_; } 223 ExtraICState GetExtraICState() const { return state_; }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 static const ExtraICState kStrictModeState = STRICT 265 static const ExtraICState kStrictModeState = STRICT
263 << LanguageModeState::kShift; 266 << LanguageModeState::kShift;
264 267
265 private: 268 private:
266 const ExtraICState state_; 269 const ExtraICState state_;
267 }; 270 };
268 } 271 }
269 } 272 }
270 273
271 #endif // V8_IC_STATE_H_ 274 #endif // V8_IC_STATE_H_
OLDNEW
« no previous file with comments | « src/ic/ic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698