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 7930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7941 // [[Evaluated]]: Whether this module has been evaluated. Modules | 7941 // [[Evaluated]]: Whether this module has been evaluated. Modules |
7942 // are only evaluated a single time. | 7942 // are only evaluated a single time. |
7943 DECL_BOOLEAN_ACCESSORS(evaluated) | 7943 DECL_BOOLEAN_ACCESSORS(evaluated) |
7944 | 7944 |
7945 // Storage for [[Evaluated]] | 7945 // Storage for [[Evaluated]] |
7946 DECL_INT_ACCESSORS(flags) | 7946 DECL_INT_ACCESSORS(flags) |
7947 | 7947 |
7948 // Embedder-specified data | 7948 // Embedder-specified data |
7949 DECL_ACCESSORS(embedder_data, Object) | 7949 DECL_ACCESSORS(embedder_data, Object) |
7950 | 7950 |
7951 // Returns the SharedFunctionInfo associated with the code. | |
7952 inline SharedFunctionInfo* shared() const; | |
7953 | |
neis
2016/09/26 21:06:28
s/Returns/Get/ for consistency
adamk
2016/09/26 21:20:46
Done.
| |
7951 // Get the ModuleInfo associated with the code. | 7954 // Get the ModuleInfo associated with the code. |
7952 inline ModuleInfo* info() const; | 7955 inline ModuleInfo* info() const; |
7953 | 7956 |
7957 // Compute a hash code for this object. | |
7958 inline uint32_t Hash() const; | |
neis
2016/09/26 21:06:28
s/code //
adamk
2016/09/26 21:20:46
Done.
| |
7959 | |
7954 static void CreateExport(Handle<Module> module, Handle<FixedArray> names); | 7960 static void CreateExport(Handle<Module> module, Handle<FixedArray> names); |
7955 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); | 7961 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); |
7956 static void StoreExport(Handle<Module> module, Handle<String> name, | 7962 static void StoreExport(Handle<Module> module, Handle<String> name, |
7957 Handle<Object> value); | 7963 Handle<Object> value); |
7958 | 7964 |
7959 static void CreateIndirectExport(Handle<Module> module, Handle<String> name, | 7965 static void CreateIndirectExport(Handle<Module> module, Handle<String> name, |
7960 Handle<ModuleInfoEntry> entry); | 7966 Handle<ModuleInfoEntry> entry); |
7961 | 7967 |
7962 static Handle<Object> LoadImport(Handle<Module> module, Handle<String> name, | 7968 static Handle<Object> LoadImport(Handle<Module> module, Handle<String> name, |
7963 int module_request); | 7969 int module_request); |
7964 | 7970 |
7965 static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport(Handle<Module> module, | 7971 class ResolveSet; |
7966 Handle<String> name, | 7972 static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport( |
7967 int module_request); | 7973 Handle<Module> module, Handle<String> name, int module_request, |
7968 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport(Handle<Module> module, | 7974 ResolveSet* resolve_set, Zone* zone); |
7969 Handle<String> name); | 7975 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport( |
7976 Handle<Module> module, Handle<String> name, ResolveSet* resolve_set, | |
7977 Zone* zone); | |
7970 | 7978 |
7971 static const int kCodeOffset = HeapObject::kHeaderSize; | 7979 static const int kCodeOffset = HeapObject::kHeaderSize; |
7972 static const int kExportsOffset = kCodeOffset + kPointerSize; | 7980 static const int kExportsOffset = kCodeOffset + kPointerSize; |
7973 static const int kRequestedModulesOffset = kExportsOffset + kPointerSize; | 7981 static const int kRequestedModulesOffset = kExportsOffset + kPointerSize; |
7974 static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize; | 7982 static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize; |
7975 static const int kEmbedderDataOffset = kFlagsOffset + kPointerSize; | 7983 static const int kEmbedderDataOffset = kFlagsOffset + kPointerSize; |
7976 static const int kSize = kEmbedderDataOffset + kPointerSize; | 7984 static const int kSize = kEmbedderDataOffset + kPointerSize; |
7977 | 7985 |
7978 private: | 7986 private: |
7979 enum { kEvaluatedBit }; | 7987 enum { kEvaluatedBit }; |
7980 | 7988 |
7989 class UnorderedStringSet; | |
7990 struct ModuleHandleEqual; | |
7991 struct StringHandleEqual; | |
7992 template <typename T> | |
7993 struct HandleValueHash; | |
7994 | |
7981 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); | 7995 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); |
7982 }; | 7996 }; |
7983 | 7997 |
7984 // JSBoundFunction describes a bound function exotic object. | 7998 // JSBoundFunction describes a bound function exotic object. |
7985 class JSBoundFunction : public JSObject { | 7999 class JSBoundFunction : public JSObject { |
7986 public: | 8000 public: |
7987 // [bound_target_function]: The wrapped function object. | 8001 // [bound_target_function]: The wrapped function object. |
7988 DECL_ACCESSORS(bound_target_function, JSReceiver) | 8002 DECL_ACCESSORS(bound_target_function, JSReceiver) |
7989 | 8003 |
7990 // [bound_this]: The value that is always passed as the this value when | 8004 // [bound_this]: The value that is always passed as the this value when |
(...skipping 3426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11417 } | 11431 } |
11418 return value; | 11432 return value; |
11419 } | 11433 } |
11420 }; | 11434 }; |
11421 | 11435 |
11422 | 11436 |
11423 } // NOLINT, false-positive due to second-order macros. | 11437 } // NOLINT, false-positive due to second-order macros. |
11424 } // NOLINT, false-positive due to second-order macros. | 11438 } // NOLINT, false-positive due to second-order macros. |
11425 | 11439 |
11426 #endif // V8_OBJECTS_H_ | 11440 #endif // V8_OBJECTS_H_ |
OLD | NEW |