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/builtins.h" | 10 #include "src/builtins.h" |
(...skipping 7182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7193 | 7193 |
7194 // Indicates that code for this function cannot be flushed. | 7194 // Indicates that code for this function cannot be flushed. |
7195 DECL_BOOLEAN_ACCESSORS(dont_flush) | 7195 DECL_BOOLEAN_ACCESSORS(dont_flush) |
7196 | 7196 |
7197 // Indicates that this function is a generator. | 7197 // Indicates that this function is a generator. |
7198 DECL_BOOLEAN_ACCESSORS(is_generator) | 7198 DECL_BOOLEAN_ACCESSORS(is_generator) |
7199 | 7199 |
7200 // Indicates that this function is an arrow function. | 7200 // Indicates that this function is an arrow function. |
7201 DECL_BOOLEAN_ACCESSORS(is_arrow) | 7201 DECL_BOOLEAN_ACCESSORS(is_arrow) |
7202 | 7202 |
| 7203 // Indicates that this function is a concise method. |
| 7204 DECL_BOOLEAN_ACCESSORS(is_concise_method) |
| 7205 |
| 7206 inline FunctionKind kind(); |
| 7207 inline void set_kind(FunctionKind kind); |
| 7208 |
7203 // Indicates whether or not the code in the shared function support | 7209 // Indicates whether or not the code in the shared function support |
7204 // deoptimization. | 7210 // deoptimization. |
7205 inline bool has_deoptimization_support(); | 7211 inline bool has_deoptimization_support(); |
7206 | 7212 |
7207 // Enable deoptimization support through recompiled code. | 7213 // Enable deoptimization support through recompiled code. |
7208 void EnableDeoptimizationSupport(Code* recompiled); | 7214 void EnableDeoptimizationSupport(Code* recompiled); |
7209 | 7215 |
7210 // Disable (further) attempted optimization of all functions sharing this | 7216 // Disable (further) attempted optimization of all functions sharing this |
7211 // shared function info. | 7217 // shared function info. |
7212 void DisableOptimization(BailoutReason reason); | 7218 void DisableOptimization(BailoutReason reason); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7387 kUsesArguments, | 7393 kUsesArguments, |
7388 kHasDuplicateParameters, | 7394 kHasDuplicateParameters, |
7389 kNative, | 7395 kNative, |
7390 kInlineBuiltin, | 7396 kInlineBuiltin, |
7391 kBoundFunction, | 7397 kBoundFunction, |
7392 kIsAnonymous, | 7398 kIsAnonymous, |
7393 kNameShouldPrintAsAnonymous, | 7399 kNameShouldPrintAsAnonymous, |
7394 kIsFunction, | 7400 kIsFunction, |
7395 kDontCache, | 7401 kDontCache, |
7396 kDontFlush, | 7402 kDontFlush, |
| 7403 kIsArrow, |
7397 kIsGenerator, | 7404 kIsGenerator, |
7398 kIsArrow, | 7405 kIsConciseMethod, |
7399 kCompilerHintsCount // Pseudo entry | 7406 kCompilerHintsCount // Pseudo entry |
7400 }; | 7407 }; |
7401 | 7408 |
7402 class DeoptCountBits: public BitField<int, 0, 4> {}; | 7409 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 3> {}; |
7403 class OptReenableTriesBits: public BitField<int, 4, 18> {}; | |
7404 class ICAgeBits: public BitField<int, 22, 8> {}; | |
7405 | 7410 |
7406 class OptCountBits: public BitField<int, 0, 22> {}; | 7411 class DeoptCountBits : public BitField<int, 0, 4> {}; |
7407 class DisabledOptimizationReasonBits: public BitField<int, 22, 8> {}; | 7412 class OptReenableTriesBits : public BitField<int, 4, 18> {}; |
| 7413 class ICAgeBits : public BitField<int, 22, 8> {}; |
| 7414 |
| 7415 class OptCountBits : public BitField<int, 0, 22> {}; |
| 7416 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; |
7408 | 7417 |
7409 private: | 7418 private: |
7410 #if V8_HOST_ARCH_32_BIT | 7419 #if V8_HOST_ARCH_32_BIT |
7411 // On 32 bit platforms, compiler hints is a smi. | 7420 // On 32 bit platforms, compiler hints is a smi. |
7412 static const int kCompilerHintsSmiTagSize = kSmiTagSize; | 7421 static const int kCompilerHintsSmiTagSize = kSmiTagSize; |
7413 static const int kCompilerHintsSize = kPointerSize; | 7422 static const int kCompilerHintsSize = kPointerSize; |
7414 #else | 7423 #else |
7415 // On 64 bit platforms, compiler hints is not a smi, see comment above. | 7424 // On 64 bit platforms, compiler hints is not a smi, see comment above. |
7416 static const int kCompilerHintsSmiTagSize = 0; | 7425 static const int kCompilerHintsSmiTagSize = 0; |
7417 static const int kCompilerHintsSize = kIntSize; | 7426 static const int kCompilerHintsSize = kIntSize; |
(...skipping 3772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11190 } else { | 11199 } else { |
11191 value &= ~(1 << bit_position); | 11200 value &= ~(1 << bit_position); |
11192 } | 11201 } |
11193 return value; | 11202 return value; |
11194 } | 11203 } |
11195 }; | 11204 }; |
11196 | 11205 |
11197 } } // namespace v8::internal | 11206 } } // namespace v8::internal |
11198 | 11207 |
11199 #endif // V8_OBJECTS_H_ | 11208 #endif // V8_OBJECTS_H_ |
OLD | NEW |