Revision: 14691
Author: ol...@chromium.org
Date: Wed May 15 07:24:47 2013
Log: Add a HBreak instruction for debugging
BUG=
R=jkumme...@chromium.org
Review URL: https://codereview.chromium.org/14997008
http://code.google.com/p/v8/source/detail?r=14691
Modified:
/branches/bleeding_edge/src/arm/lithium-arm.cc
/branches/bleeding_edge/src/arm/lithium-arm.h
/branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
/branches/bleeding_edge/src/hydrogen-instructions.h
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
/branches/bleeding_edge/src/ia32/lithium-ia32.cc
/branches/bleeding_edge/src/ia32/lithium-ia32.h
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.h
/branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
/branches/bleeding_edge/src/x64/lithium-x64.cc
/branches/bleeding_edge/src/x64/lithium-x64.h
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.cc Tue May 14 05:56:53 2013
+++ /branches/bleeding_edge/src/arm/lithium-arm.cc Wed May 15 07:24:47 2013
@@ -980,6 +980,10 @@
}
+LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
+ return new(zone()) LDebugBreak();
+}
+
LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
ASSERT(instr->value()->representation().IsTagged());
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.h Tue May 14 05:56:53 2013
+++ /branches/bleeding_edge/src/arm/lithium-arm.h Wed May 15 07:24:47 2013
@@ -89,6 +89,7 @@
V(ConstantI) \
V(ConstantT) \
V(Context) \
+ V(DebugBreak) \
V(DeclareGlobals) \
V(DeleteProperty) \
V(Deoptimize) \
@@ -695,6 +696,12 @@
};
+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) {
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Tue May 14
15:51:33 2013
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Wed May 15
07:24:47 2013
@@ -2196,6 +2196,11 @@
__ b(chunk_->GetAssemblyLabel(right_block));
}
}
+
+
+void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
+ __ stop("LBreak");
+}
void LCodeGen::DoBranch(LBranch* instr) {
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Tue May 14 06:10:52
2013
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Wed May 15 07:24:47
2013
@@ -103,6 +103,7 @@
V(CompareConstantEqAndBranch) \
V(Constant) \
V(Context) \
+ V(DebugBreak) \
V(DeclareGlobals) \
V(DeleteProperty) \
V(Deoptimize) \
@@ -1463,6 +1464,17 @@
};
+// 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)
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Wed May 15
07:04:44 2013
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Wed May 15
07:24:47 2013
@@ -3498,6 +3498,11 @@
__ InvokeFunction(function, actual, CALL_FUNCTION,
safepoint_generator, CALL_AS_METHOD);
}
+
+
+void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
+ __ int3();
+}
void LCodeGen::DoPushArgument(LPushArgument* instr) {
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Tue May 14 05:56:53
2013
+++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Wed May 15 07:24:47
2013
@@ -1047,6 +1047,11 @@
LOperand* temp = needs_temp ? TempRegister() : NULL;
return AssignEnvironment(new(zone()) LBranch(UseRegister(value), temp));
}
+
+
+LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
+ return new(zone()) LDebugBreak();
+}
LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.h Tue May 14 05:56:53 2013
+++ /branches/bleeding_edge/src/ia32/lithium-ia32.h Wed May 15 07:24:47 2013
@@ -84,6 +84,7 @@
V(ConstantI) \
V(ConstantT) \
V(Context) \
+ V(DebugBreak) \
V(DeclareGlobals) \
V(DeleteProperty) \
V(Deoptimize) \
@@ -569,6 +570,12 @@
};
+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) {
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue May 14
17:02:40 2013
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed May 15
07:24:47 2013
@@ -1825,6 +1825,11 @@
__ Branch(chunk_->GetAssemblyLabel(right_block));
}
}
+
+
+void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
+ __ stop("LDebugBreak");
+}
void LCodeGen::DoBranch(LBranch* instr) {
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Tue May 14 05:56:53
2013
+++ /branches/bleeding_edge/src/mips/lithium-mips.cc Wed May 15 07:24:47
2013
@@ -208,6 +208,10 @@
}
+LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
+ return new(zone()) LDebugBreak();
+}
+
void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
stream->Add("if ");
left()->PrintTo(stream);
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.h Tue May 14 05:56:53 2013
+++ /branches/bleeding_edge/src/mips/lithium-mips.h Wed May 15 07:24:47 2013
@@ -89,6 +89,7 @@
V(ConstantI) \
V(ConstantT) \
V(Context) \
+ V(DebugBreak) \
V(DeclareGlobals) \
V(DeleteProperty) \
V(Deoptimize) \
@@ -655,6 +656,12 @@
};
+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) {
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Tue May 14
15:51:33 2013
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Wed May 15
07:24:47 2013
@@ -1861,6 +1861,11 @@
}
}
}
+
+
+void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
+ __ int3();
+}
void LCodeGen::DoBranch(LBranch* instr) {
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Tue May 14 05:56:53 2013
+++ /branches/bleeding_edge/src/x64/lithium-x64.cc Wed May 15 07:24:47 2013
@@ -965,6 +965,11 @@
LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
return new(zone()) LGoto(instr->FirstSuccessor()->block_id());
}
+
+
+LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
+ return new(zone()) LDebugBreak();
+}
LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.h Tue May 14 05:56:53 2013
+++ /branches/bleeding_edge/src/x64/lithium-x64.h Wed May 15 07:24:47 2013
@@ -89,6 +89,7 @@
V(ConstantI) \
V(ConstantT) \
V(Context) \
+ V(DebugBreak) \
V(DeclareGlobals) \
V(DeleteProperty) \
V(Deoptimize) \
@@ -1172,6 +1173,12 @@
};
+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) {
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.