Title: [129434] trunk/Source/_javascript_Core
- Revision
- 129434
- Author
- [email protected]
- Date
- 2012-09-24 17:38:51 -0700 (Mon, 24 Sep 2012)
Log Message
Add cloopDo instruction for debugging the llint C++ backend.
https://bugs.webkit.org/show_bug.cgi?id=97502.
Reviewed by Geoffrey Garen.
* offlineasm/cloop.rb:
* offlineasm/instructions.rb:
* offlineasm/parser.rb:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (129433 => 129434)
--- trunk/Source/_javascript_Core/ChangeLog 2012-09-25 00:28:51 UTC (rev 129433)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-09-25 00:38:51 UTC (rev 129434)
@@ -1,3 +1,14 @@
+2012-09-24 Mark Lam <[email protected]>
+
+ Add cloopDo instruction for debugging the llint C++ backend.
+ https://bugs.webkit.org/show_bug.cgi?id=97502.
+
+ Reviewed by Geoffrey Garen.
+
+ * offlineasm/cloop.rb:
+ * offlineasm/instructions.rb:
+ * offlineasm/parser.rb:
+
2012-09-24 Filip Pizlo <[email protected]>
JSArray::putByIndex asserts with readonly property on prototype
Modified: trunk/Source/_javascript_Core/offlineasm/cloop.rb (129433 => 129434)
--- trunk/Source/_javascript_Core/offlineasm/cloop.rb 2012-09-25 00:28:51 UTC (rev 129433)
+++ trunk/Source/_javascript_Core/offlineasm/cloop.rb 2012-09-25 00:38:51 UTC (rev 129434)
@@ -507,7 +507,7 @@
class Instruction
def lowerC_LOOP
$asm.codeOrigin codeOriginString if $enableCodeOriginComments
- $asm.annotation annotation if $enableInstrAnnotations
+ $asm.annotation annotation if $enableInstrAnnotations && (opcode != "cloopDo")
case opcode
when "addi"
@@ -981,6 +981,12 @@
when "cloopCallSlowPath"
cloopEmitCallSlowPath(operands)
+ # For debugging only. This is used to insert instrumentation into the
+ # generated LLIntAssembly.h during llint development only. Do not use
+ # for production code.
+ when "cloopDo"
+ $asm.putc "#{annotation}"
+
else
lowerDefault
end
Modified: trunk/Source/_javascript_Core/offlineasm/instructions.rb (129433 => 129434)
--- trunk/Source/_javascript_Core/offlineasm/instructions.rb 2012-09-25 00:28:51 UTC (rev 129433)
+++ trunk/Source/_javascript_Core/offlineasm/instructions.rb 2012-09-25 00:38:51 UTC (rev 129434)
@@ -227,6 +227,14 @@
"cloopCallJSFunction", # operands: callee
"cloopCallNative", # operands: callee
"cloopCallSlowPath", # operands: callTarget, currentFrame, currentPC
+
+ # For debugging only:
+ # Takes no operands but simply emits whatever follows in // comments as
+ # a line of C++ code in the generated LLIntAssembly.h file. This can be
+ # used to insert instrumentation into the interpreter loop to inspect
+ # variables of interest. Do not leave these instructions in production
+ # code.
+ "cloopDo", # no operands
]
INSTRUCTIONS = MACRO_INSTRUCTIONS + X86_INSTRUCTIONS + ARMv7_INSTRUCTIONS + CXX_INSTRUCTIONS
Modified: trunk/Source/_javascript_Core/offlineasm/parser.rb (129433 => 129434)
--- trunk/Source/_javascript_Core/offlineasm/parser.rb 2012-09-25 00:28:51 UTC (rev 129433)
+++ trunk/Source/_javascript_Core/offlineasm/parser.rb 2012-09-25 00:38:51 UTC (rev 129434)
@@ -103,7 +103,11 @@
annotationType = whitespaceFound ? :local : :global
when /\A\n/
# We've found a '\n'. Emit the last comment recorded if appropriate:
- if $enableInstrAnnotations and annotation
+ # We need to parse annotations regardless of whether the backend does
+ # anything with them or not. This is because the C++ backend may make
+ # use of this for its cloopDo debugging utility even if
+ # enableInstrAnnotations is not enabled.
+ if annotation
result << Annotation.new(CodeOrigin.new(fileName, lineNumber),
annotationType, annotation)
annotation = nil
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes