add compile.cpp changes

This commit is contained in:
Joshua Warner 2014-06-28 22:57:07 -06:00 committed by Joshua Warner
parent 4df8f59f3c
commit 924f242e66
2 changed files with 456 additions and 427 deletions

View File

@ -19,20 +19,20 @@
namespace vm {
inline int16_t
codeReadInt16(Thread* t, object code, unsigned& ip)
codeReadInt16(Thread* t UNUSED, GcCode* code, unsigned& ip)
{
uint8_t v1 = codeBody(t, code, ip++);
uint8_t v2 = codeBody(t, code, ip++);
uint8_t v1 = code->body()[ip++];
uint8_t v2 = code->body()[ip++];
return ((v1 << 8) | v2);
}
inline int32_t
codeReadInt32(Thread* t, object code, unsigned& ip)
codeReadInt32(Thread* t UNUSED, GcCode* code, unsigned& ip)
{
uint8_t v1 = codeBody(t, code, ip++);
uint8_t v2 = codeBody(t, code, ip++);
uint8_t v3 = codeBody(t, code, ip++);
uint8_t v4 = codeBody(t, code, ip++);
uint8_t v1 = code->body()[ip++];
uint8_t v2 = code->body()[ip++];
uint8_t v3 = code->body()[ip++];
uint8_t v4 = code->body()[ip++];
return ((v1 << 24) | (v2 << 16) | (v3 << 8) | v4);
}
@ -51,7 +51,7 @@ inline bool
isSpecialMethod(Thread* t, GcMethod* method, GcClass* class_)
{
return (class_->flags() & ACC_SUPER)
and strcmp(reinterpret_cast<const int8_t*>("<init>"),
and strcmp(reinterpret_cast<const int8_t*>("<init>"),
method->name()->body().begin()) != 0
and isSuperclass(t, method->class_(), class_);
}

File diff suppressed because it is too large Load Diff