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 5855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5866 // [compilation_type]: how the the script was compiled. Encoded in the | 5866 // [compilation_type]: how the the script was compiled. Encoded in the |
5867 // 'flags' field. | 5867 // 'flags' field. |
5868 inline CompilationType compilation_type(); | 5868 inline CompilationType compilation_type(); |
5869 inline void set_compilation_type(CompilationType type); | 5869 inline void set_compilation_type(CompilationType type); |
5870 | 5870 |
5871 // [compilation_state]: determines whether the script has already been | 5871 // [compilation_state]: determines whether the script has already been |
5872 // compiled. Encoded in the 'flags' field. | 5872 // compiled. Encoded in the 'flags' field. |
5873 inline CompilationState compilation_state(); | 5873 inline CompilationState compilation_state(); |
5874 inline void set_compilation_state(CompilationState state); | 5874 inline void set_compilation_state(CompilationState state); |
5875 | 5875 |
| 5876 // [passed_access_check]: did the script pass access control checks (CORS) |
| 5877 // when loaded? Encodedin the 'flags' field. |
| 5878 DECL_BOOLEAN_ACCESSORS(passed_access_check) |
| 5879 |
5876 static inline Script* cast(Object* obj); | 5880 static inline Script* cast(Object* obj); |
5877 | 5881 |
5878 // If script source is an external string, check that the underlying | 5882 // If script source is an external string, check that the underlying |
5879 // resource is accessible. Otherwise, always return true. | 5883 // resource is accessible. Otherwise, always return true. |
5880 inline bool HasValidSource(); | 5884 inline bool HasValidSource(); |
5881 | 5885 |
5882 // Dispatched behavior. | 5886 // Dispatched behavior. |
5883 DECLARE_PRINTER(Script) | 5887 DECLARE_PRINTER(Script) |
5884 DECLARE_VERIFIER(Script) | 5888 DECLARE_VERIFIER(Script) |
5885 | 5889 |
(...skipping 11 matching lines...) Expand all Loading... |
5897 static const int kEvalFrominstructionsOffsetOffset = | 5901 static const int kEvalFrominstructionsOffsetOffset = |
5898 kEvalFromSharedOffset + kPointerSize; | 5902 kEvalFromSharedOffset + kPointerSize; |
5899 static const int kFlagsOffset = | 5903 static const int kFlagsOffset = |
5900 kEvalFrominstructionsOffsetOffset + kPointerSize; | 5904 kEvalFrominstructionsOffsetOffset + kPointerSize; |
5901 static const int kSize = kFlagsOffset + kPointerSize; | 5905 static const int kSize = kFlagsOffset + kPointerSize; |
5902 | 5906 |
5903 private: | 5907 private: |
5904 // Bit positions in the flags field. | 5908 // Bit positions in the flags field. |
5905 static const int kCompilationTypeBit = 0; | 5909 static const int kCompilationTypeBit = 0; |
5906 static const int kCompilationStateBit = 1; | 5910 static const int kCompilationStateBit = 1; |
| 5911 static const int kPassedAccessCheckBit = 2; |
5907 | 5912 |
5908 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); | 5913 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
5909 }; | 5914 }; |
5910 | 5915 |
5911 | 5916 |
5912 // List of builtin functions we want to identify to improve code | 5917 // List of builtin functions we want to identify to improve code |
5913 // generation. | 5918 // generation. |
5914 // | 5919 // |
5915 // Each entry has a name of a global object property holding an object | 5920 // Each entry has a name of a global object property holding an object |
5916 // optionally followed by ".prototype", a name of a builtin function | 5921 // optionally followed by ".prototype", a name of a builtin function |
(...skipping 3972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9889 } else { | 9894 } else { |
9890 value &= ~(1 << bit_position); | 9895 value &= ~(1 << bit_position); |
9891 } | 9896 } |
9892 return value; | 9897 return value; |
9893 } | 9898 } |
9894 }; | 9899 }; |
9895 | 9900 |
9896 } } // namespace v8::internal | 9901 } } // namespace v8::internal |
9897 | 9902 |
9898 #endif // V8_OBJECTS_H_ | 9903 #endif // V8_OBJECTS_H_ |
OLD | NEW |