Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: src/objects.h

Issue 2376563002: [modules] Don't throw when detecting cycle while processing star exports. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7971 matching lines...) Expand 10 before | Expand all | Expand 10 after
7982 static const int kSize = kEmbedderDataOffset + kPointerSize; 7982 static const int kSize = kEmbedderDataOffset + kPointerSize;
7983 7983
7984 private: 7984 private:
7985 enum { kEvaluatedBit }; 7985 enum { kEvaluatedBit };
7986 7986
7987 static void CreateExport(Handle<Module> module, Handle<FixedArray> names); 7987 static void CreateExport(Handle<Module> module, Handle<FixedArray> names);
7988 static void CreateIndirectExport(Handle<Module> module, Handle<String> name, 7988 static void CreateIndirectExport(Handle<Module> module, Handle<String> name,
7989 Handle<ModuleInfoEntry> entry); 7989 Handle<ModuleInfoEntry> entry);
7990 7990
7991 // The [must_resolve] argument indicates whether or not an exception should be 7991 // The [must_resolve] argument indicates whether or not an exception should be
7992 // thrown if the module does not provide an export named [name]. 7992 // thrown in case the module does not provide an export named [name]
7993 // (including when a cycle is detected). An exception is always thrown in the
7994 // case of conflicting star exports.
7993 // 7995 //
7994 // If [must_resolve] is true, a null result indicates an exception. If 7996 // If [must_resolve] is true, a null result indicates an exception. If
7995 // [must_resolve] is false, a null result does not necessarily indicate an 7997 // [must_resolve] is false, a null result may or may not indicate an
7996 // exception, but there may be one pending. 7998 // exception (so check manually!).
7997 //
7998 // Currently, an exception is always thrown in the case of a cycle and in the
7999 // case of conflicting star exports. TODO(neis): Make that spec-compliant.
8000 class ResolveSet; 7999 class ResolveSet;
8001 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport( 8000 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport(
8002 Handle<Module> module, Handle<String> name, bool must_resolve, 8001 Handle<Module> module, Handle<String> name, bool must_resolve,
8003 ResolveSet* resolve_set); 8002 ResolveSet* resolve_set);
8004 static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport( 8003 static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport(
8005 Handle<Module> module, Handle<String> name, int module_request, 8004 Handle<Module> module, Handle<String> name, int module_request,
8006 bool must_resolve, ResolveSet* resolve_set); 8005 bool must_resolve, ResolveSet* resolve_set);
8007 8006
8008 // Helper for ResolveExport. 8007 // Helper for ResolveExport.
8009 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExportUsingStarExports( 8008 static MUST_USE_RESULT MaybeHandle<Cell> ResolveExportUsingStarExports(
(...skipping 3439 matching lines...) Expand 10 before | Expand all | Expand 10 after
11449 } 11448 }
11450 return value; 11449 return value;
11451 } 11450 }
11452 }; 11451 };
11453 11452
11454 11453
11455 } // NOLINT, false-positive due to second-order macros. 11454 } // NOLINT, false-positive due to second-order macros.
11456 } // NOLINT, false-positive due to second-order macros. 11455 } // NOLINT, false-positive due to second-order macros.
11457 11456
11458 #endif // V8_OBJECTS_H_ 11457 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698