diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-25 13:02:02 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-25 13:02:02 +0200 |
commit | 715be629d51174233403237bfc563cf150087dc8 (patch) | |
tree | 4cff72df808db977624338b0a38d8b6d1bd73c57 /Source/JavaScriptCore/offlineasm | |
parent | dc6262b587c71c14e30d93e57ed812e36a79a33e (diff) | |
download | qtwebkit-715be629d51174233403237bfc563cf150087dc8.tar.gz |
Imported WebKit commit ce614b0924ba46f78d4435e28ff93c8525fbb7cc (http://svn.webkit.org/repository/webkit/trunk@129485)
New snapshot that includes MingW build fixes
Diffstat (limited to 'Source/JavaScriptCore/offlineasm')
-rw-r--r-- | Source/JavaScriptCore/offlineasm/asm.rb | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/offlineasm/cloop.rb | 8 | ||||
-rw-r--r-- | Source/JavaScriptCore/offlineasm/instructions.rb | 8 | ||||
-rw-r--r-- | Source/JavaScriptCore/offlineasm/offsets.rb | 1 | ||||
-rw-r--r-- | Source/JavaScriptCore/offlineasm/parser.rb | 6 |
5 files changed, 21 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/offlineasm/asm.rb b/Source/JavaScriptCore/offlineasm/asm.rb index 14d616442..4d44c5e91 100644 --- a/Source/JavaScriptCore/offlineasm/asm.rb +++ b/Source/JavaScriptCore/offlineasm/asm.rb @@ -225,7 +225,7 @@ $stderr.puts "offlineasm: Parsing #{asmFile} and #{offsetsFile} and creating ass begin configurationList = offsetsAndConfigurationIndex(offsetsFile) rescue MissingMagicValuesException - $stderr.puts "offlineasm: No magic values found. Skipping assembly file generation assuming the classic interpreter is enabled." + $stderr.puts "offlineasm: No magic values found. Skipping assembly file generation." exit 0 end diff --git a/Source/JavaScriptCore/offlineasm/cloop.rb b/Source/JavaScriptCore/offlineasm/cloop.rb index 9975e0767..b3e319c4d 100644 --- a/Source/JavaScriptCore/offlineasm/cloop.rb +++ b/Source/JavaScriptCore/offlineasm/cloop.rb @@ -507,7 +507,7 @@ end 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 @@ class Instruction 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 diff --git a/Source/JavaScriptCore/offlineasm/instructions.rb b/Source/JavaScriptCore/offlineasm/instructions.rb index d046bee6f..ddb1bb90f 100644 --- a/Source/JavaScriptCore/offlineasm/instructions.rb +++ b/Source/JavaScriptCore/offlineasm/instructions.rb @@ -227,6 +227,14 @@ CXX_INSTRUCTIONS = "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 diff --git a/Source/JavaScriptCore/offlineasm/offsets.rb b/Source/JavaScriptCore/offlineasm/offsets.rb index 627183dc8..d9266d9a3 100644 --- a/Source/JavaScriptCore/offlineasm/offsets.rb +++ b/Source/JavaScriptCore/offlineasm/offsets.rb @@ -38,7 +38,6 @@ OFFSET_MAGIC_NUMBERS = [ to32Bit(0xec577ac7), to32Bit(0x0ff5e755) ] # MissingMagicValuesException # # Thrown when magic values are missing from the binary. -# This is usually an indication that the classic interpreter is enabled. # class MissingMagicValuesException < Exception diff --git a/Source/JavaScriptCore/offlineasm/parser.rb b/Source/JavaScriptCore/offlineasm/parser.rb index 70b03cf70..76eea522f 100644 --- a/Source/JavaScriptCore/offlineasm/parser.rb +++ b/Source/JavaScriptCore/offlineasm/parser.rb @@ -103,7 +103,11 @@ def lex(str, fileName) 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 |