Skip to content

Merge lit-unicode-*.inc.h-related generator scripts #1767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2017

Conversation

akosthekiss
Copy link
Member

The conversions and ranges files had separate generators, which
shared some functionality through a 3rd python module, and were
quite similar to each other -- but also had some differences.
Moreover, as they were separate scripts, nothing forced to keep the
outputs in sync (to re-generate them at the same time from the same
inputs).

To fix these maintainability issues, this patch

  • merges the two python files and part of the 3rd utility module
    into a single script while keeping the existing functionality,
  • names the new file gen-unicode.py to align better with other
    generator script in tools, and
  • adds some extra documentation how to retrieve the input files
    (as they are not part of the repository).

The refactoring affected the utility module as well, so this patch
also

  • renames c_source_helper.py to gen_c_source.py (again, for
    naming consistency),
  • reorganizes some of its functions not to export module-local
    helper functions, and
  • adapts js2c.py, as it also uses this utility module.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]

The `conversions` and `ranges` files had separate generators, which
shared some functionality through a 3rd python module, and were
quite similar to each other -- but also had some differences.
Moreover, as they were separate scripts, nothing forced to keep the
outputs in sync (to re-generate them at the same time from the same
inputs).

To fix these maintainability issues, this patch
- merges the two python files and part of the 3rd utility module
  into a single script while keeping the existing functionality,
- names the new file `gen-unicode.py` to align better with other
  generator script in `tools`, and
- adds some extra documentation how to retrieve the input files
  (as they are not part of the repository).

The refactoring affected the utility module as well, so this patch
also
- renames `c_source_helper.py` to `gen_c_source.py` (again, for
  naming consistency),
- reorganizes some of its functions not to export module-local
  helper functions, and
- adapts `js2c.py`, as it also uses this utility module.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
@akosthekiss akosthekiss added enhancement An improvement tools Related to the tooling scripts labels Apr 21, 2017
@zherczeg
Copy link
Member

@robertsipka please check this change

@robertsipka
Copy link
Contributor

I strongly endorse this merge. I also think it is better to keep the outputs in sync. Previously, the version of the inputs were different, but after adapting the generator script of unicode ranges (to python code from bash script), and updating it with the latest version of Unicode Standard, it's not needed to re-generate them from different inputs and scripts anymore.
LGTM (informally)

Copy link
Member

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yichoi yichoi merged commit 49ae946 into jerryscript-project:master Apr 24, 2017
@akosthekiss akosthekiss deleted the gen-unicode branch April 24, 2017 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement tools Related to the tooling scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants