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/ast.rb

    r108913 r110383  
    384384end
    385385
     386class OrImmediates < Node
     387    attr_reader :left, :right
     388   
     389    def initialize(codeOrigin, left, right)
     390        super(codeOrigin)
     391        @left = left
     392        @right = right
     393    end
     394   
     395    def children
     396        [@left, @right]
     397    end
     398   
     399    def mapChildren
     400        OrImmediates.new(codeOrigin, (yield @left), (yield @right))
     401    end
     402   
     403    def dump
     404        "(#{left.dump} | #{right.dump})"
     405    end
     406   
     407    def address?
     408        false
     409    end
     410   
     411    def label?
     412        false
     413    end
     414   
     415    def immediate?
     416        true
     417    end
     418   
     419    def register?
     420        false
     421    end
     422end
     423
     424class AndImmediates < Node
     425    attr_reader :left, :right
     426   
     427    def initialize(codeOrigin, left, right)
     428        super(codeOrigin)
     429        @left = left
     430        @right = right
     431    end
     432   
     433    def children
     434        [@left, @right]
     435    end
     436   
     437    def mapChildren
     438        AndImmediates.new(codeOrigin, (yield @left), (yield @right))
     439    end
     440   
     441    def dump
     442        "(#{left.dump} & #{right.dump})"
     443    end
     444   
     445    def address?
     446        false
     447    end
     448   
     449    def label?
     450        false
     451    end
     452   
     453    def immediate?
     454        true
     455    end
     456   
     457    def register?
     458        false
     459    end
     460end
     461
     462class XorImmediates < Node
     463    attr_reader :left, :right
     464   
     465    def initialize(codeOrigin, left, right)
     466        super(codeOrigin)
     467        @left = left
     468        @right = right
     469    end
     470   
     471    def children
     472        [@left, @right]
     473    end
     474   
     475    def mapChildren
     476        XorImmediates.new(codeOrigin, (yield @left), (yield @right))
     477    end
     478   
     479    def dump
     480        "(#{left.dump} ^ #{right.dump})"
     481    end
     482   
     483    def address?
     484        false
     485    end
     486   
     487    def label?
     488        false
     489    end
     490   
     491    def immediate?
     492        true
     493    end
     494   
     495    def register?
     496        false
     497    end
     498end
     499
     500class BitnotImmediate < Node
     501    attr_reader :child
     502   
     503    def initialize(codeOrigin, child)
     504        super(codeOrigin)
     505        @child = child
     506    end
     507   
     508    def children
     509        [@child]
     510    end
     511   
     512    def mapChildren
     513        BitnotImmediate.new(codeOrigin, (yield @child))
     514    end
     515   
     516    def dump
     517        "(~#{@child.dump})"
     518    end
     519   
     520    def address?
     521        false
     522    end
     523   
     524    def label?
     525        false
     526    end
     527   
     528    def immediate?
     529        true
     530    end
     531   
     532    def register?
     533        false
     534    end
     535end
     536
    386537class RegisterID < NoChildren
    387538    attr_reader :name
     
    460611end
    461612
     613class SpecialRegister < NoChildren
     614    def initialize(name)
     615        @name = name
     616    end
     617   
     618    def address?
     619        false
     620    end
     621   
     622    def label?
     623        false
     624    end
     625   
     626    def immediate?
     627        false
     628    end
     629   
     630    def register?
     631        true
     632    end
     633end
     634
    462635class Variable < NoChildren
    463636    attr_reader :name
     
    479652    def dump
    480653        name
     654    end
     655   
     656    def inspect
     657        "<variable #{name} at #{codeOriginString}>"
    481658    end
    482659end
     
    758935        true
    759936    end
     937   
     938    def immediate?
     939        false
     940    end
    760941end
    761942
     
    790971    def label?
    791972        true
     973    end
     974   
     975    def immediate?
     976        false
    792977    end
    793978end
Note: See TracChangeset for help on using the changeset viewer.