Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ef1c5d8ad51c
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1d9f5fe6f19a
Choose a head ref
  • 3 commits
  • 5 files changed
  • 2 contributors

Commits on Mar 7, 2015

  1. Experiment 2: define object_id for strings, numbers, and booleans

    Fix #729. A different approach:
    
    For strings, object_id can be simply their string representation. For
    booleans, numbers, and nil, follow the MRI scheme:
    
    * false: 0
    * true: 2
    * nil: 4
    * numbers: (n * 2) + 1
    * heap objects: 6, 8, 10, 12, 14, 16, etc…
    vais committed Mar 7, 2015
    Copy the full SHA
    bd02a89 View commit details
  2. Added tests

    * Test coverage for object_id for true, false, nil, numbers, and strings
    * Test coverage for Opal.uid()
    * Make sure Opal.uid() starts incrementing from 4 (initialize the
    unique_id var from the nil_id var, then piggy-back on the fact that
    nil.object_id == 4 is already covered by the NilClass#object_id spec)
    * Fix bug with unique_id being accessed directly by
    setup_module_or_class_object in runtime.js. All access to the unique_id
    var shall be via Opal.uid()
    vais committed Mar 7, 2015

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    6a35d08 View commit details

Commits on Mar 9, 2015

  1. Merge pull request #733 from vais/object_id2

    Experiment 2: define object_id for strings, numbers, and booleans
    meh committed Mar 9, 2015
    Copy the full SHA
    1d9f5fe View commit details
Loading