Commit ab222035 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

2005-12-27 Benoît Perrot <benoit@lrde.epita.fr>

	print is still a python keyword

	* src/misc/table.hh,
	* src/inst/register.hh,
	* src/inst/exp.hh, src/inst/exp.cc,
	* src/inst/op_exp.hh, src/inst/op_exp.cc,
	* src/inst/label_exp.hh, src/inst/label_exp.cc,
	* src/inst/section.hh,
	* src/inst/data_section.hh, src/inst/data_section.cc,
	* src/inst/text_section.hh, src/inst/text_section.cc,
	* src/inst/program.hh,
	* src/vm/cpu.hh, src/vm/cpu.cc,
	* src/vm/virtual_machine.hh:
	(print) Rename as...
	(write).
parent 9e40ce78
2005-12-27 Benot Perrot <benoit@lrde.epita.fr>
print is still a python keyword
* src/misc/table.hh,
* src/inst/register.hh,
* src/inst/exp.hh, src/inst/exp.cc,
* src/inst/op_exp.hh, src/inst/op_exp.cc,
* src/inst/label_exp.hh, src/inst/label_exp.cc,
* src/inst/section.hh,
* src/inst/data_section.hh, src/inst/data_section.cc,
* src/inst/text_section.hh, src/inst/text_section.cc,
* src/inst/program.hh,
* src/vm/cpu.hh, src/vm/cpu.cc,
* src/vm/virtual_machine.hh:
(print) Rename as...
(write).
2005-12-27 Benot Perrot <benoit@lrde.epita.fr>
print is a python keyword
......
......@@ -44,7 +44,7 @@ namespace inst
// --------------------------------------------------------------------------
void
DataSection::print(std::ostream& ostr) const
DataSection::write(std::ostream& ostr) const
{
if (0 < size())
{
......
......@@ -85,7 +85,7 @@ namespace inst
public:
virtual void print(std::ostream& ostr) const;
virtual void write(std::ostream& ostr) const;
protected:
std::vector<const Label*> labels_;
......
......@@ -26,7 +26,7 @@ namespace inst
}
void
Exp::print(std::ostream& ostr) const
Exp::write(std::ostream& ostr) const
{
ostr << immediate_;
}
......
......@@ -41,10 +41,10 @@ namespace inst
virtual ~Exp();
public:
virtual void print(std::ostream& ostr) const;
virtual void write(std::ostream& ostr) const;
virtual void accept (ConstExpVisitor& v) const = 0;
virtual void accept (ExpVisitor& v) = 0;
virtual void accept(ConstExpVisitor& v) const = 0;
virtual void accept(ExpVisitor& v) = 0;
public:
operator int () const
......@@ -71,7 +71,7 @@ namespace inst
inline std::ostream&
operator<<(std::ostream& ostr, const Exp& e)
{
e.print(ostr);
e.write(ostr);
return ostr;
}
......
......@@ -39,7 +39,7 @@ namespace inst
}
void
LabelExp::print(std::ostream& ostr) const
LabelExp::write(std::ostream& ostr) const
{
ostr << *name_;
}
......
......@@ -48,7 +48,7 @@ namespace inst
}
public:
virtual void print(std::ostream& ostr) const;
virtual void write(std::ostream& ostr) const;
protected:
const misc::unique_string name_;
......
......@@ -40,7 +40,7 @@ namespace inst
}
void
OpExp::print(std::ostream& ostr) const
OpExp::write(std::ostream& ostr) const
{
ostr << *left_;
switch (kind_)
......
......@@ -63,7 +63,7 @@ namespace inst
}
public:
virtual void print(std::ostream& ostr) const;
virtual void write(std::ostream& ostr) const;
public:
const kind_type kind_;
......
......@@ -52,7 +52,7 @@ namespace inst
public:
void print(std::ostream& ostr) const
void write(std::ostream& ostr) const
{
ostr << data_section_;
ostr << text_section_;
......@@ -66,7 +66,7 @@ namespace inst
inline std::ostream&
operator<< (std::ostream& ostr, const Program& p)
{
p.print(ostr);
p.write(ostr);
return ostr;
}
......
......@@ -38,7 +38,7 @@ namespace inst
};
public:
Register (kind_type kind, int index):
Register(kind_type kind, int index):
kind_(kind), index_(index)
{
}
......@@ -54,7 +54,7 @@ namespace inst
}
public:
kind_type get_kind () const
kind_type get_kind() const
{
return kind_;
}
......@@ -63,13 +63,13 @@ namespace inst
kind_ = kind;
}
int get_index () const
int get_index() const
{
return index_;
}
public:
void print (std::ostream& ostr) const
void write(std::ostream& ostr) const
{
if (kind_ != unlimited)
ostr << "$" << index_;
......@@ -83,9 +83,9 @@ namespace inst
};
inline std::ostream&
operator<< (std::ostream& ostr, const Register& reg)
operator<<(std::ostream& ostr, const Register& reg)
{
reg.print(ostr);
reg.write(ostr);
return ostr;
}
......
......@@ -66,7 +66,7 @@ namespace inst
}
public:
virtual void print(std::ostream& ostr) const = 0;
virtual void write(std::ostream& ostr) const = 0;
protected:
const misc::unique_string name_;
......@@ -77,7 +77,7 @@ namespace inst
inline std::ostream&
operator<<(std::ostream& ostr, const Section& s)
{
s.print(ostr);
s.write(ostr);
return ostr;
}
......
......@@ -51,7 +51,7 @@ namespace inst
// --------------------------------------------------------------------------
void
TextSection::print(std::ostream& ostr) const
TextSection::write(std::ostream& ostr) const
{
ostr << "\t" << name_ << std::endl;
......
......@@ -72,7 +72,7 @@ namespace inst
}
public:
virtual void print(std::ostream& ostr) const;
virtual void write(std::ostream& ostr) const;
protected:
std::vector<const TextLabel*> labels_;
......
......@@ -74,7 +74,7 @@ namespace misc
public:
void print (std::ostream& ostr) const
void write(std::ostream& ostr) const
{
bool first = true;
......@@ -98,7 +98,7 @@ namespace misc
template<class K, class E>
inline std::ostream& operator<< (std::ostream& ostr, const Table<K, E>& t)
{
t.print (ostr);
t.write(ostr);
return ostr;
}
......
......@@ -77,7 +77,7 @@ namespace vm
// Print operators
// --------------------------------------------------------------------------
void
Cpu::print(std::ostream &os) const
Cpu::write(std::ostream &os) const
{
std::ios_base::fmtflags flags = os.flags (std::ios_base::hex);
......
......@@ -82,7 +82,7 @@ namespace vm
void reset();
/// Print registers' content
void print(std::ostream &os) const;
void write(std::ostream &os) const;
/** \name General purpose registers accessors.
\{ */
......@@ -361,7 +361,7 @@ namespace vm
inline std::ostream &
operator<<(std::ostream &ostr, const Cpu &cpu)
{
cpu.print(ostr);
cpu.write(ostr);
return ostr;
}
......
......@@ -73,7 +73,7 @@ namespace vm
void reset();
/// Print the vm
void print(std::ostream& ostr) const
void write(std::ostream& ostr) const
{
// FIXME: print the whole cpu, and cp0.
ostr << cpu_;
......@@ -162,7 +162,7 @@ namespace vm
inline std::ostream&
operator<<(std::ostream &os, const VirtualMachine &vm)
{
vm.print(os);
vm.write(os);
return os;
}
......
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