Skip to content
This repository has been archived by the owner on Jan 28, 2019. It is now read-only.

Var metadata contracts #62

Merged
merged 6 commits into from
Feb 13, 2016
Merged

Var metadata contracts #62

merged 6 commits into from
Feb 13, 2016

Commits on Feb 13, 2016

  1. Add RT.getPos()

    Just a quick wrapper for generating the increasingly used
    file/line/column string.
    arrdem committed Feb 13, 2016
    Configuration menu
    Copy the full SHA
    11b1279 View commit details
    Browse the repository at this point in the history
  2. Rework Var to track metadata state correctly

    This patch makes Var impement the metadata parts of AReference itself,
    so that changes to metadata can be observed. This allows Var to update
    the internal status flags corresponding to isPublic, isDynamic, isMacro
    etc.
    
    This deals with a class of state errors wherein the metadata of the Var
    would not correctly reflect the state of the Var. For instance, since
    privacy was decoupled from ^:private, it was possible for a Var to
    become `{:private true}` and be .isPrivate() -> False, and vice versa.
    
    Furthermore this patch causes Var to emit warnings when a Var looses its
    ^:dynamic, ^:once or ^:private bits. This helps capture a class of user
    metadata update errors where the Var's metadata is simply reset.
    
    Fixes #42
    arrdem committed Feb 13, 2016
    Configuration menu
    Copy the full SHA
    cabfc84 View commit details
    Browse the repository at this point in the history
  3. Set *agent* metadata in core not RT

    This patch deals with one instance of the Var metadata state loss
    bugs. *agent* is dynamic, has a tag and metadata. Previously, its
    metadata was altered in RT with .resetMeta(), which lost the ^:dynamic
    flag.
    
    This patch fixes that bug, and moves the metadata and tag initialization
    of *agent* into core since it doesn't need to be in RT at all.
    arrdem committed Feb 13, 2016
    Configuration menu
    Copy the full SHA
    99f11cc View commit details
    Browse the repository at this point in the history
  4. Set print-initialized correctly

    This patch again fixes metadata updating issues. So that tests can alter
    it to access basic printing, print-initialized is supposed to be private
    and dynamic. It is initially false valued, but is eventually redefined
    to be true once Clojure's printing has been initialized.
    
    This patch fixes the way that print-initialized is redefined so that
    pertinent metadata is not lost.
    arrdem committed Feb 13, 2016
    Configuration menu
    Copy the full SHA
    5586c72 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3828ce9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dfd21c0 View commit details
    Browse the repository at this point in the history