Special casing some VC++ traps.
This commit is contained in:
@@ -577,21 +577,21 @@ void HIRBuilder::DebugBreakTrue(Value* cond) {
|
||||
EndBlock();
|
||||
}
|
||||
|
||||
void HIRBuilder::Trap() {
|
||||
Instr* i = AppendInstr(OPCODE_TRAP_info, 0);
|
||||
void HIRBuilder::Trap(uint16_t trap_code) {
|
||||
Instr* i = AppendInstr(OPCODE_TRAP_info, trap_code);
|
||||
i->src1.value = i->src2.value = i->src3.value = NULL;
|
||||
EndBlock();
|
||||
}
|
||||
|
||||
void HIRBuilder::TrapTrue(Value* cond) {
|
||||
void HIRBuilder::TrapTrue(Value* cond, uint16_t trap_code) {
|
||||
if (cond->IsConstant()) {
|
||||
if (cond->IsConstantTrue()) {
|
||||
Trap();
|
||||
Trap(trap_code);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Instr* i = AppendInstr(OPCODE_TRAP_TRUE_info, 0);
|
||||
Instr* i = AppendInstr(OPCODE_TRAP_TRUE_info, trap_code);
|
||||
i->set_src1(cond);
|
||||
i->src2.value = i->src3.value = NULL;
|
||||
EndBlock();
|
||||
|
||||
@@ -71,8 +71,8 @@ public:
|
||||
void DebugBreak();
|
||||
void DebugBreakTrue(Value* cond);
|
||||
|
||||
void Trap();
|
||||
void TrapTrue(Value* cond);
|
||||
void Trap(uint16_t trap_code = 0);
|
||||
void TrapTrue(Value* cond, uint16_t trap_code = 0);
|
||||
|
||||
void Call(runtime::FunctionInfo* symbol_info, uint32_t call_flags = 0);
|
||||
void CallTrue(Value* cond, runtime::FunctionInfo* symbol_info,
|
||||
|
||||
Reference in New Issue
Block a user