[phc-internals] [phc commit] r1185 - in trunk: . src/codegen
codesite-noreply at google.com
codesite-noreply at google.com
Tue Apr 22 14:26:08 IST 2008
Author: paul.biggar
Date: Tue Apr 22 06:25:52 2008
New Revision: 1185
Modified:
trunk/Makefile.am
trunk/Makefile.in
trunk/src/codegen/Clarify.cpp
trunk/src/codegen/Clarify.h
Log:
Clarify didnt use its .cpp file, and had all its code in the header,
despite the .cpp file being in the repository. Fixed.
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Tue Apr 22 06:25:52 2008
@@ -71,6 +71,7 @@
src/ast_to_hir/Tidy_print.h \
src/ast_to_hir/Translate_empty.cpp \
src/ast_to_hir/Translate_empty.h \
+ src/codegen/Clarify.cpp \
src/codegen/Clarify.h \
src/codegen/Compile_C.cpp \
src/codegen/Compile_C.h \
Modified: trunk/Makefile.in
==============================================================================
--- trunk/Makefile.in (original)
+++ trunk/Makefile.in Tue Apr 22 06:25:52 2008
@@ -287,10 +287,10 @@
Pre_post_op_shredder.$(OBJEXT) \
Split_multiple_arguments.$(OBJEXT) Split_unset_isset.$(OBJEXT) \
Strip_comments.$(OBJEXT) Tidy_print.$(OBJEXT) \
- Translate_empty.$(OBJEXT) Compile_C.$(OBJEXT) \
- Copy_propagation.$(OBJEXT) Dead_code_elimination.$(OBJEXT) \
- Fix_point.$(OBJEXT) Generate_C.$(OBJEXT) \
- Lift_functions_and_classes.$(OBJEXT) \
+ Translate_empty.$(OBJEXT) Clarify.$(OBJEXT) \
+ Compile_C.$(OBJEXT) Copy_propagation.$(OBJEXT) \
+ Dead_code_elimination.$(OBJEXT) Fix_point.$(OBJEXT) \
+ Generate_C.$(OBJEXT) Lift_functions_and_classes.$(OBJEXT) \
Prune_symbol_table.$(OBJEXT) Use_def_counter.$(OBJEXT) \
embed.$(OBJEXT) AST.$(OBJEXT) AST_factory.$(OBJEXT) \
AST_transform.$(OBJEXT) AST_visitor.$(OBJEXT) \
@@ -607,6 +607,7 @@
src/ast_to_hir/Tidy_print.h \
src/ast_to_hir/Translate_empty.cpp \
src/ast_to_hir/Translate_empty.h \
+ src/codegen/Clarify.cpp \
src/codegen/Clarify.h \
src/codegen/Compile_C.cpp \
src/codegen/Compile_C.h \
@@ -1162,6 +1163,7 @@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/AST_visitor.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/AttrMap.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Boolean.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Clarify.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Clone_blank_mixins.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Comment_ifs.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Compile_C.Po at am__quote@
@@ -1693,6 +1695,20 @@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@
source='src/ast_to_hir/Translate_empty.cpp'
object='Translate_empty.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE)
$(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o
Translate_empty.obj `if test -f 'src/ast_to_hir/Translate_empty.cpp';
then $(CYGPATH_W) 'src/ast_to_hir/Translate_empty.cpp'; else
$(CYGPATH_W) '$(srcdir)/src/ast_to_hir/Translate_empty.cpp'; fi`
+
+Clarify.o: src/codegen/Clarify.cpp
+ at am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Clarify.o -MD
-MP -MF $(DEPDIR)/Clarify.Tpo -c -o Clarify.o `test
-f 'src/codegen/Clarify.cpp' || echo '$(srcdir)/'`src/codegen/Clarify.cpp
+ at am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/Clarify.Tpo $(DEPDIR)/Clarify.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/codegen/Clarify.cpp'
object='Clarify.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE)
$(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Clarify.o
`test -f 'src/codegen/Clarify.cpp' || echo '$(srcdir)/'`src/codegen/Clarify.cpp
+
+Clarify.obj: src/codegen/Clarify.cpp
+ at am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Clarify.obj
-MD -MP -MF $(DEPDIR)/Clarify.Tpo -c -o Clarify.obj `if test
-f 'src/codegen/Clarify.cpp'; then
$(CYGPATH_W) 'src/codegen/Clarify.cpp'; else
$(CYGPATH_W) '$(srcdir)/src/codegen/Clarify.cpp'; fi`
+ at am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/Clarify.Tpo $(DEPDIR)/Clarify.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/codegen/Clarify.cpp'
object='Clarify.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE)
$(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Clarify.obj
`if test -f 'src/codegen/Clarify.cpp'; then
$(CYGPATH_W) 'src/codegen/Clarify.cpp'; else
$(CYGPATH_W) '$(srcdir)/src/codegen/Clarify.cpp'; fi`
Compile_C.o: src/codegen/Compile_C.cpp
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Compile_C.o
-MD -MP -MF $(DEPDIR)/Compile_C.Tpo -c -o Compile_C.o `test
-f 'src/codegen/Compile_C.cpp' || echo '$(srcdir)/'`src/codegen/Compile_C.cpp
Modified: trunk/src/codegen/Clarify.cpp
==============================================================================
--- trunk/src/codegen/Clarify.cpp (original)
+++ trunk/src/codegen/Clarify.cpp Tue Apr 22 06:25:52 2008
@@ -7,7 +7,7 @@
#include "Clarify.h"
-using namespace AST;
+using namespace MIR;
// TODO: deal with all superglobals
// TODO: _ENV
@@ -22,16 +22,16 @@
// TODO: HTTP_POST_FILES
// TODO: _REQUEST
-void post_method (Method* in)
+
+void Clarify::post_method (MIR::Method* in)
{
- Global* global =
- new Global (
- new List<Variable_name*> (
- new VARIABLE_NAME (
- new String ("GLOBALS"))));
+ MIR::Global* global =
+ new MIR::Global (
+ new MIR::VARIABLE_NAME (
+ new String ("GLOBALS")));
if (in->statements)
in->statements->push_front (global);
else
- in->statements = new List<Statement*> (global);
+ in->statements = new List<MIR::Statement*> (global);
}
Modified: trunk/src/codegen/Clarify.h
==============================================================================
--- trunk/src/codegen/Clarify.h (original)
+++ trunk/src/codegen/Clarify.h Tue Apr 22 06:25:52 2008
@@ -12,31 +12,7 @@
class Clarify : public MIR::Visitor
{
- // TODO: deal with all superglobals
- // TODO: _ENV
- // TODO: HTTP_ENV_VARS
- // TODO: _POST
- // TODO: HTTP_POST_VARS
- // TODO: _GET
- // TODO: HTTP_GET_VARS
- // TODO: _COOKIE
- // TODO: HTTP_COOKIE_VARS
- // TODO: _FILES
- // TODO: HTTP_POST_FILES
- // TODO: _REQUEST
-
- void post_method (MIR::Method* in)
- {
- MIR::Global* global =
- new MIR::Global (
- new MIR::VARIABLE_NAME (
- new String ("GLOBALS")));
-
- if (in->statements)
- in->statements->push_front (global);
- else
- in->statements = new List<MIR::Statement*> (global);
- }
+ void post_method (MIR::Method* in);
};
More information about the phc-internals
mailing list