Add a HBreak instruction for debugging
BUG= R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/14997008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
85949ac260
commit
8bbe48c7b9
@ -980,6 +980,10 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
|
||||
return new(zone()) LDebugBreak();
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
|
||||
ASSERT(instr->value()->representation().IsTagged());
|
||||
|
@ -89,6 +89,7 @@ class LCodeGen;
|
||||
V(ConstantI) \
|
||||
V(ConstantT) \
|
||||
V(Context) \
|
||||
V(DebugBreak) \
|
||||
V(DeclareGlobals) \
|
||||
V(DeleteProperty) \
|
||||
V(Deoptimize) \
|
||||
@ -695,6 +696,12 @@ class LMultiplySubD: public LTemplateInstruction<1, 3, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LDebugBreak: public LTemplateInstruction<0, 0, 0> {
|
||||
public:
|
||||
DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break")
|
||||
};
|
||||
|
||||
|
||||
class LCmpIDAndBranch: public LControlInstruction<2, 0> {
|
||||
public:
|
||||
LCmpIDAndBranch(LOperand* left, LOperand* right) {
|
||||
|
@ -2198,6 +2198,11 @@ void LCodeGen::EmitBranch(int left_block, int right_block, Condition cc) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
|
||||
__ stop("LBreak");
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoBranch(LBranch* instr) {
|
||||
int true_block = chunk_->LookupDestination(instr->true_block_id());
|
||||
int false_block = chunk_->LookupDestination(instr->false_block_id());
|
||||
|
@ -103,6 +103,7 @@ class LChunkBuilder;
|
||||
V(CompareConstantEqAndBranch) \
|
||||
V(Constant) \
|
||||
V(Context) \
|
||||
V(DebugBreak) \
|
||||
V(DeclareGlobals) \
|
||||
V(DeleteProperty) \
|
||||
V(Deoptimize) \
|
||||
@ -1463,6 +1464,17 @@ class HSoftDeoptimize: public HTemplateInstruction<0> {
|
||||
};
|
||||
|
||||
|
||||
// Inserts an int3/stop break instruction for debugging purposes.
|
||||
class HDebugBreak: public HTemplateInstruction<0> {
|
||||
public:
|
||||
virtual Representation RequiredInputRepresentation(int index) {
|
||||
return Representation::None();
|
||||
}
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(DebugBreak)
|
||||
};
|
||||
|
||||
|
||||
class HDeoptimize: public HControlInstruction {
|
||||
public:
|
||||
HDeoptimize(int environment_length, Zone* zone)
|
||||
|
@ -3500,6 +3500,11 @@ void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
|
||||
__ int3();
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoPushArgument(LPushArgument* instr) {
|
||||
LOperand* argument = instr->value();
|
||||
EmitPushTaggedOperand(argument);
|
||||
|
@ -1049,6 +1049,11 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
|
||||
return new(zone()) LDebugBreak();
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
|
||||
ASSERT(instr->value()->representation().IsTagged());
|
||||
LOperand* value = UseRegisterAtStart(instr->value());
|
||||
|
@ -84,6 +84,7 @@ class LCodeGen;
|
||||
V(ConstantI) \
|
||||
V(ConstantT) \
|
||||
V(Context) \
|
||||
V(DebugBreak) \
|
||||
V(DeclareGlobals) \
|
||||
V(DeleteProperty) \
|
||||
V(Deoptimize) \
|
||||
@ -569,6 +570,12 @@ class LArgumentsElements: public LTemplateInstruction<1, 0, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LDebugBreak: public LTemplateInstruction<0, 0, 0> {
|
||||
public:
|
||||
DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break")
|
||||
};
|
||||
|
||||
|
||||
class LModI: public LTemplateInstruction<1, 2, 1> {
|
||||
public:
|
||||
LModI(LOperand* left, LOperand* right, LOperand* temp) {
|
||||
|
@ -1827,6 +1827,11 @@ void LCodeGen::EmitBranchF(int left_block, int right_block,
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
|
||||
__ stop("LDebugBreak");
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoBranch(LBranch* instr) {
|
||||
int true_block = chunk_->LookupDestination(instr->true_block_id());
|
||||
int false_block = chunk_->LookupDestination(instr->false_block_id());
|
||||
|
@ -208,6 +208,10 @@ void LBranch::PrintDataTo(StringStream* stream) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
|
||||
return new(zone()) LDebugBreak();
|
||||
}
|
||||
|
||||
void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
|
||||
stream->Add("if ");
|
||||
left()->PrintTo(stream);
|
||||
|
@ -89,6 +89,7 @@ class LCodeGen;
|
||||
V(ConstantI) \
|
||||
V(ConstantT) \
|
||||
V(Context) \
|
||||
V(DebugBreak) \
|
||||
V(DeclareGlobals) \
|
||||
V(DeleteProperty) \
|
||||
V(Deoptimize) \
|
||||
@ -655,6 +656,12 @@ class LMultiplyAddD: public LTemplateInstruction<1, 3, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LDebugBreak: public LTemplateInstruction<0, 0, 0> {
|
||||
public:
|
||||
DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break")
|
||||
};
|
||||
|
||||
|
||||
class LCmpIDAndBranch: public LControlInstruction<2, 0> {
|
||||
public:
|
||||
LCmpIDAndBranch(LOperand* left, LOperand* right) {
|
||||
|
@ -1863,6 +1863,11 @@ void LCodeGen::EmitBranch(int left_block, int right_block, Condition cc) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
|
||||
__ int3();
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoBranch(LBranch* instr) {
|
||||
int true_block = chunk_->LookupDestination(instr->true_block_id());
|
||||
int false_block = chunk_->LookupDestination(instr->false_block_id());
|
||||
|
@ -967,6 +967,11 @@ LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
|
||||
return new(zone()) LDebugBreak();
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
|
||||
HValue* value = instr->value();
|
||||
if (value->EmitAtUses()) {
|
||||
|
@ -89,6 +89,7 @@ class LCodeGen;
|
||||
V(ConstantI) \
|
||||
V(ConstantT) \
|
||||
V(Context) \
|
||||
V(DebugBreak) \
|
||||
V(DeclareGlobals) \
|
||||
V(DeleteProperty) \
|
||||
V(Deoptimize) \
|
||||
@ -1172,6 +1173,12 @@ class LBranch: public LControlInstruction<1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LDebugBreak: public LTemplateInstruction<0, 0, 0> {
|
||||
public:
|
||||
DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break")
|
||||
};
|
||||
|
||||
|
||||
class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 0> {
|
||||
public:
|
||||
explicit LCmpMapAndBranch(LOperand* value) {
|
||||
|
Loading…
Reference in New Issue
Block a user