remove Event::validate, since it is no longer needed and actually causes trouble

This commit is contained in:
Joel Dice 2008-05-20 16:47:53 -06:00
parent 36dbf1ad14
commit 21cb1c3c8f
2 changed files with 13 additions and 13 deletions

View File

@ -55,8 +55,6 @@ class Site {
virtual void thaw(Context*) { }
virtual void validate(Context*, Stack*, unsigned, Value*) { }
virtual OperandType type(Context*) = 0;
virtual Assembler::Operand* asAssemblerOperand(Context*) = 0;
@ -581,7 +579,12 @@ class RegisterSite: public Site {
}
virtual void acquire(Context* c, Stack* stack, unsigned size, Value* v) {
validate(c, stack, size, v);
low = ::validate(c, mask, stack, size, v, this, low);
if (size > BytesPerWord) {
::freeze(low);
high = ::validate(c, mask >> 32, stack, size, v, this, high);
::thaw(low);
}
}
virtual void release(Context* c) {
@ -611,15 +614,6 @@ class RegisterSite: public Site {
}
}
virtual void validate(Context* c, Stack* stack, unsigned size, Value* v) {
low = ::validate(c, mask, stack, size, v, this, low);
if (size > BytesPerWord) {
::freeze(low);
high = ::validate(c, mask >> 32, stack, size, v, this, high);
::thaw(low);
}
}
virtual OperandType type(Context*) {
return RegisterOperand;
}
@ -2196,7 +2190,6 @@ readSource(Context* c, Stack* stack, Read* r)
apply(c, Move, r->size, site, target);
return target;
} else {
site->validate(c, stack, r->size, r->value);
return site;
}
}

View File

@ -89,7 +89,14 @@ public class Misc {
return a + b + c;
}
private static long roundUp(long a, long b) {
a += b - 1L;
return a - (a % b);
}
public static void main(String[] args) {
expect(roundUp(156, 2) == 156);
{ Foo foo = new Foo();
int x = foo.a + foo.b + foo.c;
bar(foo.a, foo.b, foo.c);