OLD | NEW |
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 ExtraICState GetExtraICState() const { return state_; } | 250 ExtraICState GetExtraICState() const { return state_; } |
251 | 251 |
252 LanguageMode language_mode() const { | 252 LanguageMode language_mode() const { |
253 return LanguageModeState::decode(state_); | 253 return LanguageModeState::decode(state_); |
254 } | 254 } |
255 | 255 |
256 static LanguageMode GetLanguageMode(ExtraICState state) { | 256 static LanguageMode GetLanguageMode(ExtraICState state) { |
257 return StoreICState(state).language_mode(); | 257 return StoreICState(state).language_mode(); |
258 } | 258 } |
259 | 259 |
260 class LanguageModeState : public BitField<LanguageMode, 1, 1> {}; | 260 class LanguageModeState : public BitField<LanguageMode, 1, 2> {}; |
261 STATIC_ASSERT(i::LANGUAGE_END == 2); | 261 STATIC_ASSERT(i::LANGUAGE_END == 3); |
262 | 262 |
263 // For convenience, a statically declared encoding of strict mode extra | 263 // For convenience, a statically declared encoding of strict mode extra |
264 // IC state. | 264 // IC state. |
265 static const ExtraICState kStrictModeState = STRICT | 265 static const ExtraICState kStrictModeState = STRICT |
266 << LanguageModeState::kShift; | 266 << LanguageModeState::kShift; |
267 | 267 |
268 private: | 268 private: |
269 const ExtraICState state_; | 269 const ExtraICState state_; |
270 }; | 270 }; |
271 | 271 |
272 } // namespace internal | 272 } // namespace internal |
273 } // namespace v8 | 273 } // namespace v8 |
274 | 274 |
275 #endif // V8_IC_STATE_H_ | 275 #endif // V8_IC_STATE_H_ |
OLD | NEW |