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

Unified Diff: src/full-codegen.h

Issue 11093074: Get rid of static module allocation, do it in code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed last comments; added other back-ends Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/contexts.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.h
diff --git a/src/full-codegen.h b/src/full-codegen.h
index 89b51f9582b2a3520af96155f3817ca12831ac91..cfa7da3c741663f63a66f5b4ce21f4e16d2279e1 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -396,9 +396,15 @@ class FullCodeGenerator: public AstVisitor {
void VisitInDuplicateContext(Expression* expr);
void VisitDeclarations(ZoneList<Declaration*>* declarations);
+ void DeclareModules(Handle<FixedArray> descriptions);
void DeclareGlobals(Handle<FixedArray> pairs);
int DeclareGlobalsFlags();
+ // Generate code to allocate all (including nested) modules and contexts.
+ // Because of recursive linking and the presence of module alias declarations,
+ // this has to be a separate pass _before_ populating or executing any module.
+ void AllocateModules(ZoneList<Declaration*>* declarations);
+
// Try to perform a comparison as a fast inlined literal compare if
// the operands allow it. Returns true if the compare operations
// has been matched and all code generated; false otherwise.
@@ -804,6 +810,8 @@ class FullCodeGenerator: public AstVisitor {
NestedStatement* nesting_stack_;
int loop_depth_;
ZoneList<Handle<Object> >* globals_;
+ Handle<FixedArray> modules_;
+ int module_index_;
const ExpressionContext* context_;
ZoneList<BailoutEntry> bailout_entries_;
ZoneList<BailoutEntry> stack_checks_;
« no previous file with comments | « src/contexts.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698