- modify exception checks to jump ahead if the exception is to be thrown as it limits static misprediction
This commit is contained in:
parent
a7ef178284
commit
e6023c55a8
5 changed files with 77 additions and 93 deletions
|
|
@ -78,11 +78,9 @@ void JitCompiler::EmitLFP()
|
|||
|
||||
void JitCompiler::EmitMETA()
|
||||
{
|
||||
auto label = cc.newLabel();
|
||||
auto label = EmitThrowExceptionLabel(X_READ_NIL);
|
||||
cc.test(regA[B], regA[B]);
|
||||
cc.jne(label);
|
||||
EmitThrowException(X_READ_NIL);
|
||||
cc.bind(label);
|
||||
cc.je(label);
|
||||
|
||||
auto result = newResultIntPtr();
|
||||
auto call = CreateCall<uint8_t*, DObject*>([](DObject *o) { return o->GetClass()->Meta; });
|
||||
|
|
@ -93,11 +91,9 @@ void JitCompiler::EmitMETA()
|
|||
|
||||
void JitCompiler::EmitCLSS()
|
||||
{
|
||||
auto label = cc.newLabel();
|
||||
auto label = EmitThrowExceptionLabel(X_READ_NIL);
|
||||
cc.test(regA[B], regA[B]);
|
||||
cc.jne(label);
|
||||
EmitThrowException(X_READ_NIL);
|
||||
cc.bind(label);
|
||||
cc.je(label);
|
||||
|
||||
auto result = newResultIntPtr();
|
||||
auto call = CreateCall<PClass*, DObject*>([](DObject *o) { return o->GetClass(); });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue