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 6578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6589 // [compilation_type]: how the the script was compiled. Encoded in the | 6589 // [compilation_type]: how the the script was compiled. Encoded in the |
6590 // 'flags' field. | 6590 // 'flags' field. |
6591 inline CompilationType compilation_type(); | 6591 inline CompilationType compilation_type(); |
6592 inline void set_compilation_type(CompilationType type); | 6592 inline void set_compilation_type(CompilationType type); |
6593 | 6593 |
6594 // [compilation_state]: determines whether the script has already been | 6594 // [compilation_state]: determines whether the script has already been |
6595 // compiled. Encoded in the 'flags' field. | 6595 // compiled. Encoded in the 'flags' field. |
6596 inline CompilationState compilation_state(); | 6596 inline CompilationState compilation_state(); |
6597 inline void set_compilation_state(CompilationState state); | 6597 inline void set_compilation_state(CompilationState state); |
6598 | 6598 |
| 6599 // [is_embedder_debug_script]: An opaque boolean set by the embedder via |
| 6600 // ScriptOrigin, and used by the embedder to make decisions about the |
| 6601 // script's origin. V8 just passes this through. Encoded in |
| 6602 // the 'flags' field. |
| 6603 DECL_BOOLEAN_ACCESSORS(is_embedder_debug_script) |
| 6604 |
6599 // [is_shared_cross_origin]: An opaque boolean set by the embedder via | 6605 // [is_shared_cross_origin]: An opaque boolean set by the embedder via |
6600 // ScriptOrigin, and used by the embedder to make decisions about the | 6606 // ScriptOrigin, and used by the embedder to make decisions about the |
6601 // script's level of privilege. V8 just passes this through. Encoded in | 6607 // script's level of privilege. V8 just passes this through. Encoded in |
6602 // the 'flags' field. | 6608 // the 'flags' field. |
6603 DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin) | 6609 DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin) |
6604 | 6610 |
6605 DECLARE_CAST(Script) | 6611 DECLARE_CAST(Script) |
6606 | 6612 |
6607 // If script source is an external string, check that the underlying | 6613 // If script source is an external string, check that the underlying |
6608 // resource is accessible. Otherwise, always return true. | 6614 // resource is accessible. Otherwise, always return true. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6645 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; | 6651 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; |
6646 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; | 6652 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; |
6647 static const int kSize = kSourceMappingUrlOffset + kPointerSize; | 6653 static const int kSize = kSourceMappingUrlOffset + kPointerSize; |
6648 | 6654 |
6649 private: | 6655 private: |
6650 int GetLineNumberWithArray(int code_pos); | 6656 int GetLineNumberWithArray(int code_pos); |
6651 | 6657 |
6652 // Bit positions in the flags field. | 6658 // Bit positions in the flags field. |
6653 static const int kCompilationTypeBit = 0; | 6659 static const int kCompilationTypeBit = 0; |
6654 static const int kCompilationStateBit = 1; | 6660 static const int kCompilationStateBit = 1; |
6655 static const int kIsSharedCrossOriginBit = 2; | 6661 static const int kIsEmbedderDebugScriptBit = 2; |
| 6662 static const int kIsSharedCrossOriginBit = 3; |
6656 | 6663 |
6657 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); | 6664 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
6658 }; | 6665 }; |
6659 | 6666 |
6660 | 6667 |
6661 // List of builtin functions we want to identify to improve code | 6668 // List of builtin functions we want to identify to improve code |
6662 // generation. | 6669 // generation. |
6663 // | 6670 // |
6664 // Each entry has a name of a global object property holding an object | 6671 // Each entry has a name of a global object property holding an object |
6665 // optionally followed by ".prototype", a name of a builtin function | 6672 // optionally followed by ".prototype", a name of a builtin function |
(...skipping 4278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10944 } else { | 10951 } else { |
10945 value &= ~(1 << bit_position); | 10952 value &= ~(1 << bit_position); |
10946 } | 10953 } |
10947 return value; | 10954 return value; |
10948 } | 10955 } |
10949 }; | 10956 }; |
10950 | 10957 |
10951 } } // namespace v8::internal | 10958 } } // namespace v8::internal |
10952 | 10959 |
10953 #endif // V8_OBJECTS_H_ | 10960 #endif // V8_OBJECTS_H_ |
OLD | NEW |