Small cleanup of the code generator: make the static code gen

functions and the ones defined on the AST nodes take a code generator,
rather than a macro assembler and (sometimes) scope.

Uniformly use the __ macro for masm_/masm in the codegen*.cc files.
Review URL: http://codereview.chromium.org/5663

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d7599384
...@@ -159,8 +159,7 @@ class Expression: public Node { ...@@ -159,8 +159,7 @@ class Expression: public Node {
// the expression stack, and a reference containing the expression // the expression stack, and a reference containing the expression
// immediately below that. This function is overridden for expression // immediately below that. This function is overridden for expression
// types that can be stored into. // types that can be stored into.
virtual void GenerateStoreCode(MacroAssembler* masm, virtual void GenerateStoreCode(CodeGenerator* cgen,
Scope* scope,
Reference* ref, Reference* ref,
InitState init_state) { InitState init_state) {
UNREACHABLE(); UNREACHABLE();
...@@ -763,8 +762,7 @@ class VariableProxy: public Expression { ...@@ -763,8 +762,7 @@ class VariableProxy: public Expression {
// side of an assignment. The code will expect the stored value on top of // side of an assignment. The code will expect the stored value on top of
// the expression stack, and a reference containing the expression // the expression stack, and a reference containing the expression
// immediately below that. // immediately below that.
virtual void GenerateStoreCode(MacroAssembler* masm, virtual void GenerateStoreCode(CodeGenerator* cgen,
Scope* scope,
Reference* ref, Reference* ref,
InitState init_state); InitState init_state);
protected: protected:
...@@ -846,8 +844,7 @@ class Slot: public Expression { ...@@ -846,8 +844,7 @@ class Slot: public Expression {
// side of an assignment. The code will expect the stored value on top of // side of an assignment. The code will expect the stored value on top of
// the expression stack, and a reference containing the expression // the expression stack, and a reference containing the expression
// immediately below that. // immediately below that.
virtual void GenerateStoreCode(MacroAssembler* masm, virtual void GenerateStoreCode(CodeGenerator* cgen,
Scope* scope,
Reference* ref, Reference* ref,
InitState init_state); InitState init_state);
private: private:
...@@ -881,8 +878,7 @@ class Property: public Expression { ...@@ -881,8 +878,7 @@ class Property: public Expression {
// side of an assignment. The code will expect the stored value on top of // side of an assignment. The code will expect the stored value on top of
// the expression stack, and a reference containing the expression // the expression stack, and a reference containing the expression
// immediately below that. // immediately below that.
virtual void GenerateStoreCode(MacroAssembler* masm, virtual void GenerateStoreCode(CodeGenerator* cgen,
Scope* scope,
Reference* ref, Reference* ref,
InitState init_state); InitState init_state);
private: private:
......
This diff is collapsed.
This diff is collapsed.
...@@ -123,6 +123,7 @@ class CodeGenerator: public Visitor { ...@@ -123,6 +123,7 @@ class CodeGenerator: public Visitor {
virtual MacroAssembler* masm() = 0; virtual MacroAssembler* masm() = 0;
virtual Scope* scope() const = 0;
void AddDeferred(DeferredCode* code) { deferred_.Add(code); } void AddDeferred(DeferredCode* code) { deferred_.Add(code); }
void ProcessDeferred(); void ProcessDeferred();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment