Modified:
/trunk/include/compiler.h
/trunk/include/opcode.h
/trunk/include/value.h
/trunk/src/compiler.cc
/trunk/src/opcode.cc
=======================================
--- /trunk/include/compiler.h Sun Feb 6 09:31:36 2011
+++ /trunk/include/compiler.h Thu Jul 21 18:40:17 2011
@@ -74,7 +74,7 @@
/**
* Checks if the supplied value pointers are compatibles
*/
- static bool checkCompatibleTypes(Value*, Value*) throw();
+ static bool checkCompatibleTypes(const Value* const, const Value* const)
throw();
/**
* Performs a constant folding and constant propagation optimization
*/
=======================================
--- /trunk/include/opcode.h Wed Jul 20 16:10:31 2011
+++ /trunk/include/opcode.h Thu Jul 21 18:40:17 2011
@@ -117,7 +117,7 @@
*/
void dump() const throw();
const char* getOpName(Opcodes) const throw();
- std::string dumpOp(const char*, Value*) const throw();
+ std::string dumpOp(const char* const, Value* const) const throw();
private:
Opcodes m_op_type;
VM::opcode_handler m_handler;
=======================================
--- /trunk/include/value.h Sat Feb 12 13:55:35 2011
+++ /trunk/include/value.h Thu Jul 21 18:40:17 2011
@@ -123,14 +123,14 @@
void set_type(int type) { m_type = type; }
int get_type() const { return m_type; }
- int hasSameType(Value* value) const { return m_type == value->get_type();
}
+ int hasSameType(const Value* const value) const { return m_type ==
value->get_type(); }
const Type* get_type_ptr() const { return m_type_ptr; }
- void set_type_ptr(const Type* ptr) { m_type_ptr = ptr; }
+ void set_type_ptr(const Type* const ptr) { m_type_ptr = ptr; }
bool hasName() const { return m_name != NULL; }
const CString* get_name() const { return m_name; }
- void set_name(const CString* name) { m_name = name; }
+ void set_name(const CString* const name) { m_name = name; }
int get_status() { return m_status; }
void set_status(int status) { m_status = status; }
@@ -164,7 +164,7 @@
bool isUserValue() const { return m_type == USER; }
void setInteger(int64_t i) { m_type = INTEGER; m_data.l_value = i; }
- void setString(const CString* s) { m_type = STRING; m_data.s_value = s; }
+ void setString(const CString* const s) { m_type = STRING; m_data.s_value
= s; }
void setDouble(double d) { m_type = DOUBLE; m_data.d_value = d; }
void setBoolean(bool b) { m_type = BOOLEAN; m_data.b_value = b; }
void setVector(ValueVector* v) { m_type = VECTOR; m_data.v_value = v; }
@@ -178,7 +178,7 @@
const ValueData *get_data() const { return &m_data; }
- void copy(const Value* value) throw() {
+ void copy(const Value* const value) throw() {
std::memcpy(&m_data, value->get_data(), sizeof(ValueData));
m_type = value->get_type();
}
=======================================
--- /trunk/src/compiler.cc Sun Feb 13 10:23:26 2011
+++ /trunk/src/compiler.cc Thu Jul 21 18:40:17 2011
@@ -103,7 +103,7 @@
/**
* Performs a type compatible checking
*/
-bool Compiler::checkCompatibleTypes(Value* lhs, Value* rhs) throw() {
+bool Compiler::checkCompatibleTypes(const Value* const lhs, const Value*
const rhs) throw() {
/**
* Constants with different type cannot performs operation
*/
=======================================
--- /trunk/src/opcode.cc Sun Feb 13 10:23:26 2011
+++ /trunk/src/opcode.cc Thu Jul 21 18:40:17 2011
@@ -84,7 +84,7 @@
/**
* Dumps an operand
*/
-std::string Opcode::dumpOp(const char* label, Value* op) const throw() {
+std::string Opcode::dumpOp(const char* const label, Value* const op) const
throw() {
if (op) {
std::ostringstream str;