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

Side by Side Diff: src/ast/scopeinfo.cc

Issue 2081733004: Rip out most of our outdated modules implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 5 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 | « src/ast/scopeinfo.h ('k') | src/ast/scopes.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #include "src/ast/scopeinfo.h" 5 #include "src/ast/scopeinfo.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 PrintList("context slots", Context::MIN_CONTEXT_SLOTS, 751 PrintList("context slots", Context::MIN_CONTEXT_SLOTS,
752 ContextLocalNameEntriesIndex(), 752 ContextLocalNameEntriesIndex(),
753 ContextLocalNameEntriesIndex() + ContextLocalCount(), this); 753 ContextLocalNameEntriesIndex() + ContextLocalCount(), this);
754 } 754 }
755 755
756 PrintF("}\n"); 756 PrintF("}\n");
757 } 757 }
758 #endif // DEBUG 758 #endif // DEBUG
759 759
760 760
761 //---------------------------------------------------------------------------
762 // ModuleInfo.
763
764 Handle<ModuleInfo> ModuleInfo::Create(Isolate* isolate,
765 ModuleDescriptor* descriptor,
766 Scope* scope) {
767 Handle<ModuleInfo> info = Allocate(isolate, descriptor->Length());
768 info->set_host_index(descriptor->Index());
769 int i = 0;
770 for (ModuleDescriptor::Iterator it = descriptor->iterator(); !it.done();
771 it.Advance(), ++i) {
772 Variable* var = scope->LookupLocal(it.local_name());
773 info->set_name(i, *(it.export_name()->string()));
774 info->set_mode(i, var->mode());
775 DCHECK(var->index() >= 0);
776 info->set_index(i, var->index());
777 }
778 DCHECK(i == info->length());
779 return info;
780 }
781
782 } // namespace internal 761 } // namespace internal
783 } // namespace v8 762 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/scopeinfo.h ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698