| 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 6562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6573 // [compilation_type]: how the the script was compiled. Encoded in the | 6573 // [compilation_type]: how the the script was compiled. Encoded in the |
| 6574 // 'flags' field. | 6574 // 'flags' field. |
| 6575 inline CompilationType compilation_type(); | 6575 inline CompilationType compilation_type(); |
| 6576 inline void set_compilation_type(CompilationType type); | 6576 inline void set_compilation_type(CompilationType type); |
| 6577 | 6577 |
| 6578 // [compilation_state]: determines whether the script has already been | 6578 // [compilation_state]: determines whether the script has already been |
| 6579 // compiled. Encoded in the 'flags' field. | 6579 // compiled. Encoded in the 'flags' field. |
| 6580 inline CompilationState compilation_state(); | 6580 inline CompilationState compilation_state(); |
| 6581 inline void set_compilation_state(CompilationState state); | 6581 inline void set_compilation_state(CompilationState state); |
| 6582 | 6582 |
| 6583 // [is_internal_script]: An opaque boolean set by the embedder via |
| 6584 // ScriptOrigin, and used by the embedder to make decisions about the |
| 6585 // script's origin. V8 just passes this through. Encoded in |
| 6586 // the 'flags' field. |
| 6587 DECL_BOOLEAN_ACCESSORS(is_internal_script) |
| 6588 |
| 6583 // [is_shared_cross_origin]: An opaque boolean set by the embedder via | 6589 // [is_shared_cross_origin]: An opaque boolean set by the embedder via |
| 6584 // ScriptOrigin, and used by the embedder to make decisions about the | 6590 // ScriptOrigin, and used by the embedder to make decisions about the |
| 6585 // script's level of privilege. V8 just passes this through. Encoded in | 6591 // script's level of privilege. V8 just passes this through. Encoded in |
| 6586 // the 'flags' field. | 6592 // the 'flags' field. |
| 6587 DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin) | 6593 DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin) |
| 6588 | 6594 |
| 6589 DECLARE_CAST(Script) | 6595 DECLARE_CAST(Script) |
| 6590 | 6596 |
| 6591 // If script source is an external string, check that the underlying | 6597 // If script source is an external string, check that the underlying |
| 6592 // resource is accessible. Otherwise, always return true. | 6598 // resource is accessible. Otherwise, always return true. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6629 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; | 6635 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; |
| 6630 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; | 6636 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; |
| 6631 static const int kSize = kSourceMappingUrlOffset + kPointerSize; | 6637 static const int kSize = kSourceMappingUrlOffset + kPointerSize; |
| 6632 | 6638 |
| 6633 private: | 6639 private: |
| 6634 int GetLineNumberWithArray(int code_pos); | 6640 int GetLineNumberWithArray(int code_pos); |
| 6635 | 6641 |
| 6636 // Bit positions in the flags field. | 6642 // Bit positions in the flags field. |
| 6637 static const int kCompilationTypeBit = 0; | 6643 static const int kCompilationTypeBit = 0; |
| 6638 static const int kCompilationStateBit = 1; | 6644 static const int kCompilationStateBit = 1; |
| 6639 static const int kIsSharedCrossOriginBit = 2; | 6645 static const int kIsInternalScriptBit = 2; |
| 6646 static const int kIsSharedCrossOriginBit = 3; |
| 6640 | 6647 |
| 6641 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); | 6648 DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
| 6642 }; | 6649 }; |
| 6643 | 6650 |
| 6644 | 6651 |
| 6645 // List of builtin functions we want to identify to improve code | 6652 // List of builtin functions we want to identify to improve code |
| 6646 // generation. | 6653 // generation. |
| 6647 // | 6654 // |
| 6648 // Each entry has a name of a global object property holding an object | 6655 // Each entry has a name of a global object property holding an object |
| 6649 // optionally followed by ".prototype", a name of a builtin function | 6656 // optionally followed by ".prototype", a name of a builtin function |
| (...skipping 4278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10928 } else { | 10935 } else { |
| 10929 value &= ~(1 << bit_position); | 10936 value &= ~(1 << bit_position); |
| 10930 } | 10937 } |
| 10931 return value; | 10938 return value; |
| 10932 } | 10939 } |
| 10933 }; | 10940 }; |
| 10934 | 10941 |
| 10935 } } // namespace v8::internal | 10942 } } // namespace v8::internal |
| 10936 | 10943 |
| 10937 #endif // V8_OBJECTS_H_ | 10944 #endif // V8_OBJECTS_H_ |
| OLD | NEW |