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

revised API and implementation #37

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Commits on Jan 23, 2022

  1. this implements separate wrappers for ObjC classes and instances, and…

    … also now caches method wrappers (ObjC's method introspection APIs are heinously slow, so this caching provides ~1000× speedup on repeated method calls!); caution: this is all *very* Work In Progress (lots of stuff is incomplete/inconsistent/broken/mis-commented/to be redone; including JS↔︎NS type conversions, inout args, unit tests, docs, etc, etc)
    hhas committed Jan 23, 2022
    Configuration menu
    Copy the full SHA
    e57a473 View commit details
    Browse the repository at this point in the history
  2. added quick-n-dirty test script (mostly to check that method calling …

    …speed is much improved without breaking behavior)
    hhas committed Jan 23, 2022
    Configuration menu
    Copy the full SHA
    99e2b92 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2022

  1. * InOutRef now works (albeit only for ObjC instances for now, until…

    … we finish codecs redesign)
    
    * renamed `selectorForMethodName` to `Selector.fromjs` (this allows users to create Selector objects from both "foo:bar:" and "foo_bar_" strings)
    
    * various rejigging of internal API designs
    hhas committed Jan 26, 2022
    Configuration menu
    Copy the full SHA
    7380fee View commit details
    Browse the repository at this point in the history
  2. bump

    hhas committed Jan 26, 2022
    Configuration menu
    Copy the full SHA
    d6c8e5b View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2022

  1. * fixed bugs in ObjCObject[toPrimitive]

    * added `Selector.tojs()`
    
    * `callObjCMethod` now includes object and method name in error messages
    
    * added extra debug logging/error handling to `introspectMethod`
    hhas committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    0e2bd2e View commit details
    Browse the repository at this point in the history
  2. * testing, debugging, rearranging internal APIs

    * temporary fixes for `void*` inout arguments (pass a Buffer for now), argument encodings containing inout/out/etc modifiers
    hhas committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    685fead View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2022

  1. more testing, debugging, straightening out kinks (of note: Proxy pa…

    …sses a third argument to handler’s `get` which is the proxy object itself, so use that—*not* `this`, which is the handler object only—to call additional ObjC methods on the object)
    hhas committed Jan 30, 2022
    Configuration menu
    Copy the full SHA
    b16c84c View commit details
    Browse the repository at this point in the history
  2. disentangling JS representations of ObjC objects (final representatio…

    …ns are TBD, but these should do for now)
    hhas committed Jan 30, 2022
    Configuration menu
    Copy the full SHA
    e007c88 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2022

  1. * moved objc.types to objc.__internal__.types; decluttering `util…

    ….inspect(objc)` result
    
    * sorting out (touch-wood) `util.inspect.custom` support
    hhas committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    70d0785 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2022

  1. * fixed [hopefully] util.inspect.custom support in ObjCObjects

    * revised `ns`, `js` functions take function/value as optional 2nd argument, allowing handling of unconverted values to be customized
    
    * updated examples
    hhas committed Feb 4, 2022
    Configuration menu
    Copy the full SHA
    1849a67 View commit details
    Browse the repository at this point in the history
  2. fixed an error in the neverending whackamole that is trying to make `…

    …[util.inspect.custom]` and `Proxy` behave sensibly together
    hhas committed Feb 4, 2022
    Configuration menu
    Copy the full SHA
    dc89010 View commit details
    Browse the repository at this point in the history
  3. updated readme

    hhas committed Feb 4, 2022
    Configuration menu
    Copy the full SHA
    333f0ca View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2022

  1. * rewrote ObjC type bridging to use ref-napi-compatible type definiti…

    …ons, streamlining packing and unpacking of method arguments and results
    hhas committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    9707831 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2022

  1. * ns() should be faster at packing collections (although it's still…

    … dog-slow overall; which might be ffi overhead)
    
    * moved `swizzle` back to its own module, updating implementation (not yet tested)
    
    * redesigned block API, dividing it into `BlockType` and `Block` (not yet tested, and `BlockType` is not yet fully ref-napi compatible)
    hhas committed Feb 19, 2022
    Configuration menu
    Copy the full SHA
    5931adb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c826505 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2022

  1. bug fixes in isClass, isInstance

    hhas committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    66b1ee4 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2022

  1. * redesigned objc.structs API; this now uses standard StructType

    …from `ref-struct-di`, with `objc.structs.define` function for defining new struct types, and already-created struct types being cached and exported as `objc.structs.NAME` (note: `ref*` types may eventually go away, or at least be relegated to 'slow fallback' as there is are severe performance bottlenecks in `ref-napi` and `ffi-napi`; thus users should use ObjC encoding strings rather than `objc.types...` when defining new struct types)
    hhas committed Feb 28, 2022
    Configuration menu
    Copy the full SHA
    0e8af70 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2022

  1. * reworked block and struct APIs for consistency and ease of use (the…

    …se are currently publicly exported as `objc.blocks` and `objc.structs` but should eventually merge into top-level `objc` namespace)
    
    * various renamings of public classes for consistency (TBD: should they all have `ObjC` prefix or not; on one hand it may make troubleshooting easier as their names are otherwise very generic; on the other, name prefixing is verbose and clumsy)
    
    * reworked CommonJS `require` and `module.exports` usage to allow for circular dependencies (i.e. 1. attach to `module.exports` instead of replacing it; and 2. bind the whole module returned by `require`, not parts of it)
    hhas committed Mar 2, 2022
    Configuration menu
    Copy the full SHA
    111147e View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2022

  1. unbroke the build

    hhas committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    29ee162 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2022

  1. * renamed create-class.js to subclass.js; updated its implementat…

    …ion, example script, and docs to use current APIs (its own API is still TBD)
    
    * struct and block types should now be accessible via `objc`, although this is currently kludgy and doesn’t detect/prevent ObjC namespace collisions (which is a problem in current `objc.blocks` and `objc.structs` API design)
    hhas committed Mar 5, 2022
    Configuration menu
    Copy the full SHA
    1d22aa4 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2022

  1. * simplified block and struct API (all types now appear on top-level …

    …`objc` object)
    
    * simplified subclassing API (encodings object is now passed as argument before methods object)
    
    * tidying code, comments, docs
    hhas committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    8be2533 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2022

  1. tweaking, tidying

    hhas committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    2166589 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2022

  1. * create a new instance of ObjCTypeEncodingParser for each use (sha…

    …red parser object isn't thread safe)
    
    * added `objc.auto()` convenience function, equivalent to `@autoreleasepool {...}`
    
    * tidied comments
    hhas committed May 17, 2022
    Configuration menu
    Copy the full SHA
    37576ab View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2023

  1. API tweaks

    hhas committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    78c3df3 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' of https://github.com/hhas/objc

    # Conflicts:
    #	src/instance.js
    #	src/objctypes.js
    #	test/test-inout.js
    hhas committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    d673d79 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2023

  1. Configuration menu
    Copy the full SHA
    9bb5c34 View commit details
    Browse the repository at this point in the history
  2. bugfix in objctypes

    hhas committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    59b6d12 View commit details
    Browse the repository at this point in the history
  3. updated version to 0.24.1

    hhas committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    1e809f2 View commit details
    Browse the repository at this point in the history