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 <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 3983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3994 // no contexts are allocated for this scope ContextLength returns 0. | 3994 // no contexts are allocated for this scope ContextLength returns 0. |
3995 int ContextLength(); | 3995 int ContextLength(); |
3996 | 3996 |
3997 // Does this scope declare a "this" binding? | 3997 // Does this scope declare a "this" binding? |
3998 bool HasReceiver(); | 3998 bool HasReceiver(); |
3999 | 3999 |
4000 // Does this scope declare a "this" binding, and the "this" binding is stack- | 4000 // Does this scope declare a "this" binding, and the "this" binding is stack- |
4001 // or context-allocated? | 4001 // or context-allocated? |
4002 bool HasAllocatedReceiver(); | 4002 bool HasAllocatedReceiver(); |
4003 | 4003 |
| 4004 // Does this scope declare a "new.target" binding? |
| 4005 bool HasNewTarget(); |
| 4006 |
4004 // Is this scope the scope of a named function expression? | 4007 // Is this scope the scope of a named function expression? |
4005 bool HasFunctionName(); | 4008 bool HasFunctionName(); |
4006 | 4009 |
4007 // Return if this has context allocated locals. | 4010 // Return if this has context allocated locals. |
4008 bool HasHeapAllocatedLocals(); | 4011 bool HasHeapAllocatedLocals(); |
4009 | 4012 |
4010 // Return if contexts are allocated for this scope. | 4013 // Return if contexts are allocated for this scope. |
4011 bool HasContext(); | 4014 bool HasContext(); |
4012 | 4015 |
4013 // Return if this is a function scope with "use asm". | 4016 // Return if this is a function scope with "use asm". |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4202 class ScopeTypeField : public BitField<ScopeType, 0, 4> {}; | 4205 class ScopeTypeField : public BitField<ScopeType, 0, 4> {}; |
4203 class CallsEvalField : public BitField<bool, ScopeTypeField::kNext, 1> {}; | 4206 class CallsEvalField : public BitField<bool, ScopeTypeField::kNext, 1> {}; |
4204 STATIC_ASSERT(LANGUAGE_END == 3); | 4207 STATIC_ASSERT(LANGUAGE_END == 3); |
4205 class LanguageModeField | 4208 class LanguageModeField |
4206 : public BitField<LanguageMode, CallsEvalField::kNext, 2> {}; | 4209 : public BitField<LanguageMode, CallsEvalField::kNext, 2> {}; |
4207 class DeclarationScopeField | 4210 class DeclarationScopeField |
4208 : public BitField<bool, LanguageModeField::kNext, 1> {}; | 4211 : public BitField<bool, LanguageModeField::kNext, 1> {}; |
4209 class ReceiverVariableField | 4212 class ReceiverVariableField |
4210 : public BitField<VariableAllocationInfo, DeclarationScopeField::kNext, | 4213 : public BitField<VariableAllocationInfo, DeclarationScopeField::kNext, |
4211 2> {}; | 4214 2> {}; |
| 4215 class HasNewTargetField |
| 4216 : public BitField<bool, ReceiverVariableField::kNext, 1> {}; |
4212 class FunctionVariableField | 4217 class FunctionVariableField |
4213 : public BitField<VariableAllocationInfo, ReceiverVariableField::kNext, | 4218 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; |
4214 2> {}; | |
4215 class FunctionVariableMode | 4219 class FunctionVariableMode |
4216 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; | 4220 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; |
4217 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { | 4221 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { |
4218 }; | 4222 }; |
4219 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; | 4223 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; |
4220 class HasSimpleParametersField | 4224 class HasSimpleParametersField |
4221 : public BitField<bool, AsmFunctionField::kNext, 1> {}; | 4225 : public BitField<bool, AsmFunctionField::kNext, 1> {}; |
4222 class FunctionKindField | 4226 class FunctionKindField |
4223 : public BitField<FunctionKind, HasSimpleParametersField::kNext, 8> {}; | 4227 : public BitField<FunctionKind, HasSimpleParametersField::kNext, 8> {}; |
4224 | 4228 |
(...skipping 6483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10708 } | 10712 } |
10709 return value; | 10713 return value; |
10710 } | 10714 } |
10711 }; | 10715 }; |
10712 | 10716 |
10713 | 10717 |
10714 } // NOLINT, false-positive due to second-order macros. | 10718 } // NOLINT, false-positive due to second-order macros. |
10715 } // NOLINT, false-positive due to second-order macros. | 10719 } // NOLINT, false-positive due to second-order macros. |
10716 | 10720 |
10717 #endif // V8_OBJECTS_H_ | 10721 #endif // V8_OBJECTS_H_ |
OLD | NEW |