Ignore:
Timestamp:
Mar 10, 2012, 4:33:20 PM (13 years ago)
Author:
[email protected]
Message:

LLInt should support JSVALUE64
https://bugs.webkit.org/show_bug.cgi?id=79609
<rdar://problem/10063437>

Reviewed by Gavin Barraclough and Oliver Hunt.

Ported the LLInt, which previously only worked on 32-bit, to 64-bit. This
patch moves a fair bit of code from LowLevelInterpreter32_64.asm to the common
file, LowLevelInterpreter.asm. About 1/3 of the LLInt did not have to be
specialized for value representation.

Also made some minor changes to offlineasm and the slow-paths.

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntEntrypoints.cpp:
  • llint/LLIntSlowPaths.cpp:

(LLInt):
(JSC::LLInt::llint_trace_value):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::jitCompileAndSetHeuristics):

  • llint/LLIntSlowPaths.h:

(LLInt):
(SlowPathReturnType):
(JSC::LLInt::SlowPathReturnType::SlowPathReturnType):
(JSC::LLInt::encodeResult):

  • llint/LLIntThunks.cpp:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/armv7.rb:
  • offlineasm/asm.rb:
  • offlineasm/ast.rb:
  • offlineasm/backends.rb:
  • offlineasm/instructions.rb:
  • offlineasm/parser.rb:
  • offlineasm/registers.rb:
  • offlineasm/transform.rb:
  • offlineasm/x86.rb:
  • wtf/Platform.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/parser.rb

    r108913 r110383  
    105105        when /\A::/
    106106            result << Token.new(CodeOrigin.new(fileName, lineNumber), $&)
    107         when /\A[:,\(\)\[\]=\+\-*]/
     107        when /\A[:,\(\)\[\]=\+\-~\|&^*]/
    108108            result << Token.new(CodeOrigin.new(fileName, lineNumber), $&)
    109109        else
     
    323323            @idx += 1
    324324            NegImmediate.new(@tokens[@idx - 1].codeOrigin, parseExpressionAtom)
     325        elsif @tokens[@idx] == "~"
     326            @idx += 1
     327            BitnotImmediate.new(@tokens[@idx - 1].codeOrigin, parseExpressionAtom)
    325328        elsif @tokens[@idx] == "("
    326329            @idx += 1
     
    366369   
    367370    def couldBeExpression
    368         @tokens[@idx] == "-" or @tokens[@idx] == "sizeof" or isInteger(@tokens[@idx]) or isVariable(@tokens[@idx]) or @tokens[@idx] == "("
    369     end
    370    
    371     def parseExpression
     371        @tokens[@idx] == "-" or @tokens[@idx] == "~" or @tokens[@idx] == "sizeof" or isInteger(@tokens[@idx]) or isVariable(@tokens[@idx]) or @tokens[@idx] == "("
     372    end
     373   
     374    def parseExpressionAdd
    372375        skipNewLine
    373376        result = parseExpressionMul
     
    379382                @idx += 1
    380383                result = SubImmediates.new(@tokens[@idx - 1].codeOrigin, result, parseExpressionMul)
     384            else
     385                raise
     386            end
     387        end
     388        result
     389    end
     390   
     391    def parseExpressionAnd
     392        skipNewLine
     393        result = parseExpressionAdd
     394        while @tokens[@idx] == "&"
     395            @idx += 1
     396            result = AndImmediates.new(@tokens[@idx - 1].codeOrigin, result, parseExpressionAdd)
     397        end
     398        result
     399    end
     400   
     401    def parseExpression
     402        skipNewLine
     403        result = parseExpressionAnd
     404        while @tokens[@idx] == "|" or @tokens[@idx] == "^"
     405            if @tokens[@idx] == "|"
     406                @idx += 1
     407                result = OrImmediates.new(@tokens[@idx - 1].codeOrigin, result, parseExpressionAnd)
     408            elsif @tokens[@idx] == "^"
     409                @idx += 1
     410                result = XorImmediates.new(@tokens[@idx - 1].codeOrigin, result, parseExpressionAnd)
    381411            else
    382412                raise
Note: See TracChangeset for help on using the changeset viewer.