Skip to content
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

parse: Implement hacky way to handle full range of small ints. #313

Closed
wants to merge 1 commit into from

Commits on Feb 21, 2014

  1. parse: Implement hacky way to handle full range of small ints.

    Parser has its own "small small ints", which unfortunately means that full
    range of small ints are not available in lexical form. This issue is usually
    masked by presence of long int, but without them, it's not possible to write
    biggish numbers in a Python program.
    
    To work that around, CONST_INT node is overloaded with special encoding for
    full-range small ints, which eventually propagated to bytecode properly, as
    LOAD_CONST_SMALL_INT.
    
    TODO: Ideally, parser should not have its own "small int" type, and instead
    all parts of interpreter should use single consistent type (even if that on
    parser side requires more fat representation) - dealing with types fragmented
    without real need is a chore.
    pfalcon committed Feb 21, 2014
    Configuration menu
    Copy the full SHA
    ad0f006 View commit details
    Browse the repository at this point in the history