| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_INTERPRETER_BYTECODE_FLAGS_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_FLAGS_H_ |
| 6 #define V8_INTERPRETER_BYTECODE_FLAGS_H_ | 6 #define V8_INTERPRETER_BYTECODE_FLAGS_H_ |
| 7 | 7 |
| 8 #include "src/utils.h" | 8 #include "src/utils.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 | 12 |
| 13 // Forward declarations. | 13 // Forward declarations. |
| 14 class Literal; | 14 class Literal; |
| 15 class AstStringConstants; | 15 class AstStringConstants; |
| 16 | 16 |
| 17 namespace interpreter { | 17 namespace interpreter { |
| 18 | 18 |
| 19 class CreateArrayLiteralFlags { | 19 class CreateArrayLiteralFlags { |
| 20 public: | 20 public: |
| 21 class FlagsBits : public BitField8<int, 0, 3> {}; | 21 class FlagsBits : public BitField8<int, 0, 4> {}; |
| 22 class FastShallowCloneBit : public BitField8<bool, FlagsBits::kNext, 1> {}; | 22 class FastShallowCloneBit : public BitField8<bool, FlagsBits::kNext, 1> {}; |
| 23 | 23 |
| 24 static uint8_t Encode(bool use_fast_shallow_clone, int runtime_flags); | 24 static uint8_t Encode(bool use_fast_shallow_clone, int runtime_flags); |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 DISALLOW_IMPLICIT_CONSTRUCTORS(CreateArrayLiteralFlags); | 27 DISALLOW_IMPLICIT_CONSTRUCTORS(CreateArrayLiteralFlags); |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 class CreateObjectLiteralFlags { | 30 class CreateObjectLiteralFlags { |
| 31 public: | 31 public: |
| 32 class FlagsBits : public BitField8<int, 0, 3> {}; | 32 class FlagsBits : public BitField8<int, 0, 4> {}; |
| 33 class FastClonePropertiesCountBits | 33 class FastClonePropertiesCountBits |
| 34 : public BitField8<int, FlagsBits::kNext, 3> {}; | 34 : public BitField8<int, FlagsBits::kNext, 3> {}; |
| 35 | 35 |
| 36 static uint8_t Encode(bool fast_clone_supported, int properties_count, | 36 static uint8_t Encode(bool fast_clone_supported, int properties_count, |
| 37 int runtime_flags); | 37 int runtime_flags); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 DISALLOW_IMPLICIT_CONSTRUCTORS(CreateObjectLiteralFlags); | 40 DISALLOW_IMPLICIT_CONSTRUCTORS(CreateObjectLiteralFlags); |
| 41 }; | 41 }; |
| 42 | 42 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 DISALLOW_IMPLICIT_CONSTRUCTORS(SuspendGeneratorBytecodeFlags); | 91 DISALLOW_IMPLICIT_CONSTRUCTORS(SuspendGeneratorBytecodeFlags); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace interpreter | 94 } // namespace interpreter |
| 95 } // namespace internal | 95 } // namespace internal |
| 96 } // namespace v8 | 96 } // namespace v8 |
| 97 | 97 |
| 98 #endif // V8_INTERPRETER_BYTECODE_FLAGS_H_ | 98 #endif // V8_INTERPRETER_BYTECODE_FLAGS_H_ |
| OLD | NEW |