OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3670 // is stored in a compressed form in ScopeInfo objects and is used | 3670 // is stored in a compressed form in ScopeInfo objects and is used |
3671 // at runtime (stack dumps, deoptimization, etc.). | 3671 // at runtime (stack dumps, deoptimization, etc.). |
3672 | 3672 |
3673 // This object provides quick access to scope info details for runtime | 3673 // This object provides quick access to scope info details for runtime |
3674 // routines. | 3674 // routines. |
3675 class ScopeInfo : public FixedArray { | 3675 class ScopeInfo : public FixedArray { |
3676 public: | 3676 public: |
3677 static inline ScopeInfo* cast(Object* object); | 3677 static inline ScopeInfo* cast(Object* object); |
3678 | 3678 |
3679 // Return the type of this scope. | 3679 // Return the type of this scope. |
3680 ScopeType Type(); | 3680 ScopeType scope_type(); |
3681 | 3681 |
3682 // Does this scope call eval? | 3682 // Does this scope call eval? |
3683 bool CallsEval(); | 3683 bool CallsEval(); |
3684 | 3684 |
3685 // Return the language mode of this scope. | 3685 // Return the language mode of this scope. |
3686 LanguageMode language_mode(); | 3686 LanguageMode language_mode(); |
3687 | 3687 |
3688 // Does this scope make a non-strict eval call? | 3688 // Does this scope make a non-strict eval call? |
3689 bool CallsNonStrictEval() { | 3689 bool CallsNonStrictEval() { |
3690 return CallsEval() && (language_mode() == CLASSIC_MODE); | 3690 return CallsEval() && (language_mode() == CLASSIC_MODE); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3853 | 3853 |
3854 // Location of the function variable for named function expressions. | 3854 // Location of the function variable for named function expressions. |
3855 enum FunctionVariableInfo { | 3855 enum FunctionVariableInfo { |
3856 NONE, // No function name present. | 3856 NONE, // No function name present. |
3857 STACK, // Function | 3857 STACK, // Function |
3858 CONTEXT, | 3858 CONTEXT, |
3859 UNUSED | 3859 UNUSED |
3860 }; | 3860 }; |
3861 | 3861 |
3862 // Properties of scopes. | 3862 // Properties of scopes. |
3863 class TypeField: public BitField<ScopeType, 0, 3> {}; | 3863 class ScopeTypeField: public BitField<ScopeType, 0, 3> {}; |
3864 class CallsEvalField: public BitField<bool, 3, 1> {}; | 3864 class CallsEvalField: public BitField<bool, 3, 1> {}; |
3865 class LanguageModeField: public BitField<LanguageMode, 4, 2> {}; | 3865 class LanguageModeField: public BitField<LanguageMode, 4, 2> {}; |
3866 class FunctionVariableField: public BitField<FunctionVariableInfo, 6, 2> {}; | 3866 class FunctionVariableField: public BitField<FunctionVariableInfo, 6, 2> {}; |
3867 class FunctionVariableMode: public BitField<VariableMode, 8, 3> {}; | 3867 class FunctionVariableMode: public BitField<VariableMode, 8, 3> {}; |
3868 | 3868 |
3869 // BitFields representing the encoded information for context locals in the | 3869 // BitFields representing the encoded information for context locals in the |
3870 // ContextLocalInfoEntries part. | 3870 // ContextLocalInfoEntries part. |
3871 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; | 3871 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; |
3872 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; | 3872 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; |
3873 }; | 3873 }; |
(...skipping 5727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9601 } else { | 9601 } else { |
9602 value &= ~(1 << bit_position); | 9602 value &= ~(1 << bit_position); |
9603 } | 9603 } |
9604 return value; | 9604 return value; |
9605 } | 9605 } |
9606 }; | 9606 }; |
9607 | 9607 |
9608 } } // namespace v8::internal | 9608 } } // namespace v8::internal |
9609 | 9609 |
9610 #endif // V8_OBJECTS_H_ | 9610 #endif // V8_OBJECTS_H_ |
OLD | NEW |