| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 7876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7887 // on whether it's been instantiated. | 7887 // on whether it's been instantiated. |
| 7888 DECL_ACCESSORS(code, Object) | 7888 DECL_ACCESSORS(code, Object) |
| 7889 | 7889 |
| 7890 DECL_ACCESSORS(exports, ObjectHashTable) | 7890 DECL_ACCESSORS(exports, ObjectHashTable) |
| 7891 | 7891 |
| 7892 // [[RequestedModules]]: Modules imported or re-exported by this module. | 7892 // [[RequestedModules]]: Modules imported or re-exported by this module. |
| 7893 // Corresponds 1-to-1 to the module specifier strings in | 7893 // Corresponds 1-to-1 to the module specifier strings in |
| 7894 // ModuleInfo::module_requests. | 7894 // ModuleInfo::module_requests. |
| 7895 DECL_ACCESSORS(requested_modules, FixedArray) | 7895 DECL_ACCESSORS(requested_modules, FixedArray) |
| 7896 | 7896 |
| 7897 // [[Evaluated]]: Whether this module has been evaluated. Modules |
| 7898 // are only evaluated a single time. |
| 7899 DECL_BOOLEAN_ACCESSORS(evaluated) |
| 7900 |
| 7901 // Storage for [[Evaluated]] |
| 7902 DECL_INT_ACCESSORS(flags) |
| 7903 |
| 7897 static void CreateExport(Handle<Module> module, Handle<String> name); | 7904 static void CreateExport(Handle<Module> module, Handle<String> name); |
| 7898 static void StoreExport(Handle<Module> module, Handle<String> name, | 7905 static void StoreExport(Handle<Module> module, Handle<String> name, |
| 7899 Handle<Object> value); | 7906 Handle<Object> value); |
| 7900 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); | 7907 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); |
| 7901 | 7908 |
| 7902 static const int kCodeOffset = HeapObject::kHeaderSize; | 7909 static const int kCodeOffset = HeapObject::kHeaderSize; |
| 7903 static const int kExportsOffset = kCodeOffset + kPointerSize; | 7910 static const int kExportsOffset = kCodeOffset + kPointerSize; |
| 7904 static const int kRequestedModulesOffset = kExportsOffset + kPointerSize; | 7911 static const int kRequestedModulesOffset = kExportsOffset + kPointerSize; |
| 7905 static const int kSize = kRequestedModulesOffset + kPointerSize; | 7912 static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize; |
| 7913 static const int kSize = kFlagsOffset + kPointerSize; |
| 7906 | 7914 |
| 7907 private: | 7915 private: |
| 7916 enum { kEvaluatedBit }; |
| 7917 |
| 7908 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); | 7918 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); |
| 7909 }; | 7919 }; |
| 7910 | 7920 |
| 7911 // JSBoundFunction describes a bound function exotic object. | 7921 // JSBoundFunction describes a bound function exotic object. |
| 7912 class JSBoundFunction : public JSObject { | 7922 class JSBoundFunction : public JSObject { |
| 7913 public: | 7923 public: |
| 7914 // [bound_target_function]: The wrapped function object. | 7924 // [bound_target_function]: The wrapped function object. |
| 7915 DECL_ACCESSORS(bound_target_function, JSReceiver) | 7925 DECL_ACCESSORS(bound_target_function, JSReceiver) |
| 7916 | 7926 |
| 7917 // [bound_this]: The value that is always passed as the this value when | 7927 // [bound_this]: The value that is always passed as the this value when |
| (...skipping 3404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11322 } | 11332 } |
| 11323 return value; | 11333 return value; |
| 11324 } | 11334 } |
| 11325 }; | 11335 }; |
| 11326 | 11336 |
| 11327 | 11337 |
| 11328 } // NOLINT, false-positive due to second-order macros. | 11338 } // NOLINT, false-positive due to second-order macros. |
| 11329 } // NOLINT, false-positive due to second-order macros. | 11339 } // NOLINT, false-positive due to second-order macros. |
| 11330 | 11340 |
| 11331 #endif // V8_OBJECTS_H_ | 11341 #endif // V8_OBJECTS_H_ |
| OLD | NEW |