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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 7103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7114 | 7114 |
7115 // Indicates that code for this function cannot be flushed. | 7115 // Indicates that code for this function cannot be flushed. |
7116 DECL_BOOLEAN_ACCESSORS(dont_flush) | 7116 DECL_BOOLEAN_ACCESSORS(dont_flush) |
7117 | 7117 |
7118 // Indicates that this function is a generator. | 7118 // Indicates that this function is a generator. |
7119 DECL_BOOLEAN_ACCESSORS(is_generator) | 7119 DECL_BOOLEAN_ACCESSORS(is_generator) |
7120 | 7120 |
7121 // Indicates that this function is an arrow function. | 7121 // Indicates that this function is an arrow function. |
7122 DECL_BOOLEAN_ACCESSORS(is_arrow) | 7122 DECL_BOOLEAN_ACCESSORS(is_arrow) |
7123 | 7123 |
| 7124 // Indicates that this function is a concise method. |
| 7125 DECL_BOOLEAN_ACCESSORS(is_concise_method) |
| 7126 |
| 7127 inline FunctionKind kind(); |
| 7128 inline void set_kind(FunctionKind kind); |
| 7129 |
7124 // Indicates whether or not the code in the shared function support | 7130 // Indicates whether or not the code in the shared function support |
7125 // deoptimization. | 7131 // deoptimization. |
7126 inline bool has_deoptimization_support(); | 7132 inline bool has_deoptimization_support(); |
7127 | 7133 |
7128 // Enable deoptimization support through recompiled code. | 7134 // Enable deoptimization support through recompiled code. |
7129 void EnableDeoptimizationSupport(Code* recompiled); | 7135 void EnableDeoptimizationSupport(Code* recompiled); |
7130 | 7136 |
7131 // Disable (further) attempted optimization of all functions sharing this | 7137 // Disable (further) attempted optimization of all functions sharing this |
7132 // shared function info. | 7138 // shared function info. |
7133 void DisableOptimization(BailoutReason reason); | 7139 void DisableOptimization(BailoutReason reason); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7308 kUsesArguments, | 7314 kUsesArguments, |
7309 kHasDuplicateParameters, | 7315 kHasDuplicateParameters, |
7310 kNative, | 7316 kNative, |
7311 kInlineBuiltin, | 7317 kInlineBuiltin, |
7312 kBoundFunction, | 7318 kBoundFunction, |
7313 kIsAnonymous, | 7319 kIsAnonymous, |
7314 kNameShouldPrintAsAnonymous, | 7320 kNameShouldPrintAsAnonymous, |
7315 kIsFunction, | 7321 kIsFunction, |
7316 kDontCache, | 7322 kDontCache, |
7317 kDontFlush, | 7323 kDontFlush, |
| 7324 kIsArrow, |
7318 kIsGenerator, | 7325 kIsGenerator, |
7319 kIsArrow, | 7326 kIsConciseMethod, |
7320 kCompilerHintsCount // Pseudo entry | 7327 kCompilerHintsCount // Pseudo entry |
7321 }; | 7328 }; |
7322 | 7329 |
7323 class DeoptCountBits: public BitField<int, 0, 4> {}; | 7330 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 3> {}; |
7324 class OptReenableTriesBits: public BitField<int, 4, 18> {}; | |
7325 class ICAgeBits: public BitField<int, 22, 8> {}; | |
7326 | 7331 |
7327 class OptCountBits: public BitField<int, 0, 22> {}; | 7332 class DeoptCountBits : public BitField<int, 0, 4> {}; |
7328 class DisabledOptimizationReasonBits: public BitField<int, 22, 8> {}; | 7333 class OptReenableTriesBits : public BitField<int, 4, 18> {}; |
| 7334 class ICAgeBits : public BitField<int, 22, 8> {}; |
| 7335 |
| 7336 class OptCountBits : public BitField<int, 0, 22> {}; |
| 7337 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; |
7329 | 7338 |
7330 private: | 7339 private: |
7331 #if V8_HOST_ARCH_32_BIT | 7340 #if V8_HOST_ARCH_32_BIT |
7332 // On 32 bit platforms, compiler hints is a smi. | 7341 // On 32 bit platforms, compiler hints is a smi. |
7333 static const int kCompilerHintsSmiTagSize = kSmiTagSize; | 7342 static const int kCompilerHintsSmiTagSize = kSmiTagSize; |
7334 static const int kCompilerHintsSize = kPointerSize; | 7343 static const int kCompilerHintsSize = kPointerSize; |
7335 #else | 7344 #else |
7336 // On 64 bit platforms, compiler hints is not a smi, see comment above. | 7345 // On 64 bit platforms, compiler hints is not a smi, see comment above. |
7337 static const int kCompilerHintsSmiTagSize = 0; | 7346 static const int kCompilerHintsSmiTagSize = 0; |
7338 static const int kCompilerHintsSize = kIntSize; | 7347 static const int kCompilerHintsSize = kIntSize; |
(...skipping 3776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11115 } else { | 11124 } else { |
11116 value &= ~(1 << bit_position); | 11125 value &= ~(1 << bit_position); |
11117 } | 11126 } |
11118 return value; | 11127 return value; |
11119 } | 11128 } |
11120 }; | 11129 }; |
11121 | 11130 |
11122 } } // namespace v8::internal | 11131 } } // namespace v8::internal |
11123 | 11132 |
11124 #endif // V8_OBJECTS_H_ | 11133 #endif // V8_OBJECTS_H_ |
OLD | NEW |