Changeset 172429 in webkit for trunk/Source/JavaScriptCore/offlineasm/ast.rb
- Timestamp:
- Aug 11, 2014, 8:20:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/offlineasm/ast.rb
r167094 r172429 581 581 end 582 582 583 class StringLiteral < NoChildren 584 attr_reader :value 585 586 def initialize(codeOrigin, value) 587 super(codeOrigin) 588 @value = value[1..-2] 589 raise "Bad string literal #{value.inspect} at #{codeOriginString}" unless value.is_a? String 590 end 591 592 def dump 593 "#{value}" 594 end 595 596 def ==(other) 597 other.is_a? StringLiteral and other.value == @value 598 end 599 600 def address? 601 false 602 end 603 604 def label? 605 false 606 end 607 608 def immediate? 609 false 610 end 611 612 def immediateOperand? 613 false 614 end 615 616 def register? 617 false 618 end 619 end 620 583 621 class RegisterID < NoChildren 584 622 attr_reader :name … … 890 928 when "globalAnnotation" 891 929 $asm.putGlobalAnnotation 930 when "emit" 931 $asm.puts "#{operands[0].dump}" 892 932 else 893 933 raise "Unhandled opcode #{opcode} at #{codeOriginString}"
Note:
See TracChangeset
for help on using the changeset viewer.