From 284837daa07b29d6a63a748544a90b1f5842ac5c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 10 Sep 2012 19:10:20 +0200 Subject: Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073) New snapshot --- Source/JavaScriptCore/offlineasm/asm.rb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'Source/JavaScriptCore/offlineasm/asm.rb') diff --git a/Source/JavaScriptCore/offlineasm/asm.rb b/Source/JavaScriptCore/offlineasm/asm.rb index 1603f4af4..14d616442 100644 --- a/Source/JavaScriptCore/offlineasm/asm.rb +++ b/Source/JavaScriptCore/offlineasm/asm.rb @@ -96,6 +96,12 @@ class Assembler result end + # Puts a C Statement in the output stream. + def putc(*line) + raise unless @state == :asm + @outp.puts(formatDump(" " + line.join(''), lastComment)) + end + def formatDump(dumpStr, comment, commentColumns=$preferredCommentStartColumn) if comment.length > 0 "%-#{commentColumns}s %s" % [dumpStr, comment] @@ -151,7 +157,11 @@ class Assembler @numGlobalLabels += 1 putsNewlineSpacerIfAppropriate(:global) @internalComment = $enableLabelCountComments ? "Global Label #{@numGlobalLabels}" : nil - @outp.puts(formatDump("OFFLINE_ASM_GLOBAL_LABEL(#{labelName})", lastComment)) + if /\Allint_op_/.match(labelName) + @outp.puts(formatDump("OFFLINE_ASM_OPCODE_LABEL(op_#{$~.post_match})", lastComment)) + else + @outp.puts(formatDump("OFFLINE_ASM_GLUE_LABEL(#{labelName})", lastComment)) + end @newlineSpacerState = :none # After a global label, we can use another spacer. end @@ -171,6 +181,14 @@ class Assembler "\" LOCAL_LABEL_STRING(#{labelName}) \"" end + def self.cLabelReference(labelName) + "#{labelName}" + end + + def self.cLocalLabelReference(labelName) + "#{labelName}" + end + def codeOrigin(text) case @commentState when :none -- cgit v1.2.1