Ignore:
Timestamp:
Aug 24, 2012, 12:37:50 PM (13 years ago)
Author:
[email protected]
Message:

Autogenerate Opcode definitions
https://bugs.webkit.org/show_bug.cgi?id=94840

Reviewed by Gavin Barraclough.

Start the process of autogenerating the code emission for the bytecode.
We'll just start with automatic generation of the list of Opcodes as that
requires the actual definition of the opcodes, and the logic for parsing
them.

Due to some rather annoying dependency cycles, this initial version has
the OpcodeDefinitions.h file checked into the tree, although with some
work I hope to be able to fix that.

  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/Opcode.h: Include OpcodeDefinitions.h as our definitive source of info about the opcodes.
  • bytecode/OpcodeDefinitions.h: Added. Autogenerated file
  • bytecode/opcodes: Added. The new opcode definition file
  • opcode_definition_generator.py: Added.

(generateOpcodeDefinition):
(generate):

Module that generates the content for OpcodeDefinitions.h

  • opcode_generator.py: Added.

(printUsage):
(main):

Driver script

  • opcode_parser.py: Added. Simple parser for the opcode definitions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/DerivedSources.make

    r126526 r126613  
    8181        python $^ > $@
    8282
     83# Don't autogenerate these yet, as there are some dependency problems
     84# interacting with the LLIntOffsetsExtractor
     85# opcode_generator.py: opcode_definition_generator.py opcode_parser.py
     86#
     87# OpcodeDefinitions.h: opcode_generator.py | bytecode/opcodes
     88#       python $< -i $| -m definition -o $@
     89
    8390# udis86 instruction tables
    8491
Note: See TracChangeset for help on using the changeset viewer.