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 4722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4733 friend class ScopeIterator; | 4733 friend class ScopeIterator; |
4734 }; | 4734 }; |
4735 | 4735 |
4736 class ModuleInfoEntry : public FixedArray { | 4736 class ModuleInfoEntry : public FixedArray { |
4737 public: | 4737 public: |
4738 DECLARE_CAST(ModuleInfoEntry) | 4738 DECLARE_CAST(ModuleInfoEntry) |
4739 static Handle<ModuleInfoEntry> New(Isolate* isolate, | 4739 static Handle<ModuleInfoEntry> New(Isolate* isolate, |
4740 Handle<Object> export_name, | 4740 Handle<Object> export_name, |
4741 Handle<Object> local_name, | 4741 Handle<Object> local_name, |
4742 Handle<Object> import_name, | 4742 Handle<Object> import_name, |
4743 Handle<Object> module_request); | 4743 Handle<Object> module_request, int beg_pos, |
| 4744 int end_pos); |
4744 inline Object* export_name() const; | 4745 inline Object* export_name() const; |
4745 inline Object* local_name() const; | 4746 inline Object* local_name() const; |
4746 inline Object* import_name() const; | 4747 inline Object* import_name() const; |
4747 inline Object* module_request() const; | 4748 inline Object* module_request() const; |
| 4749 inline int beg_pos() const; |
| 4750 inline int end_pos() const; |
4748 | 4751 |
4749 private: | 4752 private: |
4750 friend class Factory; | 4753 friend class Factory; |
4751 enum { | 4754 enum { |
4752 kExportNameIndex, | 4755 kExportNameIndex, |
4753 kLocalNameIndex, | 4756 kLocalNameIndex, |
4754 kImportNameIndex, | 4757 kImportNameIndex, |
4755 kModuleRequestIndex, | 4758 kModuleRequestIndex, |
| 4759 kBegPosIndex, |
| 4760 kEndPosIndex, |
4756 kLength | 4761 kLength |
4757 }; | 4762 }; |
4758 }; | 4763 }; |
4759 | 4764 |
4760 // ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope. | 4765 // ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope. |
4761 class ModuleInfo : public FixedArray { | 4766 class ModuleInfo : public FixedArray { |
4762 public: | 4767 public: |
4763 DECLARE_CAST(ModuleInfo) | 4768 DECLARE_CAST(ModuleInfo) |
4764 | 4769 |
4765 static Handle<ModuleInfo> New(Isolate* isolate, Zone* zone, | 4770 static Handle<ModuleInfo> New(Isolate* isolate, Zone* zone, |
(...skipping 3450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8216 // The [must_resolve] argument indicates whether or not an exception should be | 8221 // The [must_resolve] argument indicates whether or not an exception should be |
8217 // thrown in case the module does not provide an export named [name] | 8222 // thrown in case the module does not provide an export named [name] |
8218 // (including when a cycle is detected). An exception is always thrown in the | 8223 // (including when a cycle is detected). An exception is always thrown in the |
8219 // case of conflicting star exports. | 8224 // case of conflicting star exports. |
8220 // | 8225 // |
8221 // If [must_resolve] is true, a null result indicates an exception. If | 8226 // If [must_resolve] is true, a null result indicates an exception. If |
8222 // [must_resolve] is false, a null result may or may not indicate an | 8227 // [must_resolve] is false, a null result may or may not indicate an |
8223 // exception (so check manually!). | 8228 // exception (so check manually!). |
8224 class ResolveSet; | 8229 class ResolveSet; |
8225 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport( | 8230 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport( |
8226 Handle<Module> module, Handle<String> name, bool must_resolve, | 8231 Handle<Module> module, Handle<String> name, MessageLocation loc, |
8227 ResolveSet* resolve_set); | 8232 bool must_resolve, ResolveSet* resolve_set); |
8228 static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport( | 8233 static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport( |
8229 Handle<Module> module, Handle<String> name, int module_request, | 8234 Handle<Module> module, Handle<String> name, int module_request, |
8230 bool must_resolve, ResolveSet* resolve_set); | 8235 MessageLocation loc, bool must_resolve, ResolveSet* resolve_set); |
8231 | 8236 |
8232 // Helper for ResolveExport. | 8237 // Helper for ResolveExport. |
8233 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExportUsingStarExports( | 8238 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExportUsingStarExports( |
8234 Handle<Module> module, Handle<String> name, bool must_resolve, | 8239 Handle<Module> module, Handle<String> name, MessageLocation loc, |
8235 ResolveSet* resolve_set); | 8240 bool must_resolve, ResolveSet* resolve_set); |
8236 | 8241 |
8237 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); | 8242 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); |
8238 }; | 8243 }; |
8239 | 8244 |
8240 // JSBoundFunction describes a bound function exotic object. | 8245 // JSBoundFunction describes a bound function exotic object. |
8241 class JSBoundFunction : public JSObject { | 8246 class JSBoundFunction : public JSObject { |
8242 public: | 8247 public: |
8243 // [bound_target_function]: The wrapped function object. | 8248 // [bound_target_function]: The wrapped function object. |
8244 DECL_ACCESSORS(bound_target_function, JSReceiver) | 8249 DECL_ACCESSORS(bound_target_function, JSReceiver) |
8245 | 8250 |
(...skipping 3510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11756 } | 11761 } |
11757 return value; | 11762 return value; |
11758 } | 11763 } |
11759 }; | 11764 }; |
11760 | 11765 |
11761 | 11766 |
11762 } // NOLINT, false-positive due to second-order macros. | 11767 } // NOLINT, false-positive due to second-order macros. |
11763 } // NOLINT, false-positive due to second-order macros. | 11768 } // NOLINT, false-positive due to second-order macros. |
11764 | 11769 |
11765 #endif // V8_OBJECTS_H_ | 11770 #endif // V8_OBJECTS_H_ |
OLD | NEW |