diff options
author | Ben Murdoch <benm@google.com> | 2016-05-18 11:27:45 +0100 |
---|---|---|
committer | Zach Jang <zachjang@google.com> | 2017-02-02 21:40:59 +0000 |
commit | 77453e909510c777894d626bca81f4aa488c771a (patch) | |
tree | 79bf5b2d1246e60291de69b04c80eef46ff43ee1 /src/ast/modules.h | |
parent | d3b446638c1d2b8c67a9a434ba5c44eeba78f527 (diff) | |
download | v8-77453e909510c777894d626bca81f4aa488c771a.tar.gz |
Revert "Revert "Upgrade to 5.0.71.48"" DO NOT MERGE
This reverts commit f2e3994fa5148cc3d9946666f0b0596290192b0e,
and updates the x64 makefile properly so it doesn't break that
build.
b/29178923
Change-Id: Ib83e35bfbae6af627451c926a9650ec57c045605
(cherry picked from commit 109988c7ccb6f3fd1a58574fa3dfb88beaef6632)
Diffstat (limited to 'src/ast/modules.h')
-rw-r--r-- | src/ast/modules.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/ast/modules.h b/src/ast/modules.h index e3c66dce..1fdf526c 100644 --- a/src/ast/modules.h +++ b/src/ast/modules.h @@ -26,8 +26,7 @@ class ModuleDescriptor : public ZoneObject { // --------------------------------------------------------------------------- // Mutators. - // Add a name to the list of exports. If it already exists, or this descriptor - // is frozen, that's an error. + // Add a name to the list of exports. If it already exists, that's an error. void AddLocalExport(const AstRawString* export_name, const AstRawString* local_name, Zone* zone, bool* ok); @@ -35,30 +34,22 @@ class ModuleDescriptor : public ZoneObject { // if not already present. void AddModuleRequest(const AstRawString* module_specifier, Zone* zone); - // Do not allow any further refinements, directly or through unification. - void Freeze() { frozen_ = true; } - // Assign an index. void Allocate(int index) { - DCHECK(IsFrozen() && index_ == -1); + DCHECK_EQ(-1, index_); index_ = index; } // --------------------------------------------------------------------------- // Accessors. - // Check whether this is closed (i.e. fully determined). - bool IsFrozen() { return frozen_; } - int Length() { - DCHECK(IsFrozen()); ZoneHashMap* exports = exports_; return exports ? exports->occupancy() : 0; } // The context slot in the hosting script context pointing to this module. int Index() { - DCHECK(IsFrozen()); return index_; } @@ -104,12 +95,8 @@ class ModuleDescriptor : public ZoneObject { // Implementation. private: explicit ModuleDescriptor(Zone* zone) - : frozen_(false), - exports_(NULL), - requested_modules_(1, zone), - index_(-1) {} + : exports_(NULL), requested_modules_(1, zone), index_(-1) {} - bool frozen_; ZoneHashMap* exports_; // Module exports and their types (allocated lazily) ZoneList<const AstRawString*> requested_modules_; int index_; |