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

Unified Diff: src/ast.h

Issue 10690043: Implement proper module linking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 2ebf7f94fd0c20c89355577e22ab1135ea02b7f6..953cf35bb2b30345d5260101808fd951e5474783 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -165,7 +165,8 @@ enum AstPropertiesFlag {
kDontInline,
kDontOptimize,
kDontSelfOptimize,
- kDontSoftInline
+ kDontSoftInline,
+ kDontCache
};
@@ -586,10 +587,8 @@ class ExportDeclaration: public Declaration {
protected:
template<class> friend class AstNodeFactory;
- ExportDeclaration(VariableProxy* proxy,
- Scope* scope)
- : Declaration(proxy, LET, scope) {
- }
+ ExportDeclaration(VariableProxy* proxy, Scope* scope) :
Michael Starzinger 2012/07/06 10:53:22 The colon should be on the next line.
rossberg 2012/07/06 15:39:28 Done.
+ Declaration(proxy, LET, scope) {}
};
@@ -597,12 +596,19 @@ class Module: public AstNode {
public:
Interface* interface() const { return interface_; }
Michael Starzinger 2012/07/06 10:53:22 For consistency we should drop this empty newline.
rossberg 2012/07/06 15:39:28 Done.
+ Block* body() const { return body_; }
+
protected:
- explicit Module(Zone* zone) : interface_(Interface::NewModule(zone)) {}
- explicit Module(Interface* interface) : interface_(interface) {}
+ explicit Module(Zone* zone) :
Michael Starzinger 2012/07/06 10:53:22 The colon should be on the next line.
rossberg 2012/07/06 15:39:28 Done.
+ interface_(Interface::NewModule(zone)),
+ body_(NULL) {}
+ explicit Module(Interface* interface, Block* body = NULL) :
Michael Starzinger 2012/07/06 10:53:22 The colon should be on the next line.
rossberg 2012/07/06 15:39:28 Done.
+ interface_(interface),
+ body_(body) {}
private:
Interface* interface_;
+ Block* body_;
};
@@ -610,20 +616,10 @@ class ModuleLiteral: public Module {
public:
DECLARE_NODE_TYPE(ModuleLiteral)
- Block* body() const { return body_; }
- Handle<Context> context() const { return context_; }
-
protected:
template<class> friend class AstNodeFactory;
- ModuleLiteral(Block* body, Interface* interface)
- : Module(interface),
- body_(body) {
- }
-
- private:
- Block* body_;
- Handle<Context> context_;
+ ModuleLiteral(Block* body, Interface* interface) : Module(interface, body) {}
};

Powered by Google App Engine
This is Rietveld 408576698