1. 15 Feb, 2018 1 commit
  2. 22 Jun, 2017 1 commit
  3. 11 Nov, 2016 1 commit
    • verwaest's avatar
      Make private symbols non-enumerable · 135b9f93
      verwaest authored
      Methods in the runtime that enumerate over properties should never deal with private symbols. Most commonly such methods only loop over enumerable properties. This fix avoids accidentally handling private symbols in methods that only deal with enumerable properties. Methods that need to look at non-enumerable properties as well still have to manually filter private symbols (e.g., the KeyAccumulator).
      
      BUG=chromium:664411
      
      Review-Url: https://codereview.chromium.org/2499593002
      Cr-Commit-Position: refs/heads/master@{#40932}
      135b9f93
  4. 25 Oct, 2016 1 commit
  5. 27 Oct, 2015 1 commit
    • littledan's avatar
      Update to ES2015 == semantics for Symbol/SIMD wrappers · b436635a
      littledan authored
      When == is invoked on a Symbol or SIMD vector and an object, the object should
      be converted to a primitive with ToPrimitive and then compared again. This means,
      for example, that for a Symbol or SIMD vector s, s == Object(s). This patch makes
      that change in the implementation of ==. Only the runtime function needed to be
      changed, as the code stubs and compiler specializations don't operate on Symbols
      or SIMD vectors, and on these types, a fallback to the runtime function is always
      used.
      
      BUG=v8:3593
      LOG=Y
      R=adamk
      
      Review URL: https://codereview.chromium.org/1421413002
      
      Cr-Commit-Position: refs/heads/master@{#31614}
      b436635a
  6. 16 Jun, 2015 1 commit
  7. 18 Mar, 2015 1 commit
  8. 12 Sep, 2014 1 commit
  9. 11 Aug, 2014 1 commit
  10. 05 Aug, 2014 1 commit
  11. 04 Aug, 2014 1 commit
  12. 01 Jul, 2014 1 commit
  13. 06 May, 2014 1 commit
  14. 31 Mar, 2014 1 commit
  15. 27 Mar, 2014 1 commit
  16. 25 Mar, 2014 1 commit
  17. 24 Mar, 2014 1 commit
  18. 20 Mar, 2014 3 commits
  19. 18 Mar, 2014 1 commit
  20. 19 Feb, 2014 1 commit
    • rossberg@chromium.org's avatar
      Upgrade Symbol implementation to match current ES6 behavior. · 0d34254f
      rossberg@chromium.org authored
      Refresh the implementation of Symbols to catch up with what the
      specification now mandates:
      
      * The global Symbol() function manufactures new Symbol values,
        optionally with a string description attached.
      
      * Invoking Symbol() as a constructor will now throw.
      
      * ToString() over Symbol values still throws, and
        Object.prototype.toString() stringifies like before.
      
      * A Symbol value is wrapped in a Symbol object either implicitly if
        it is the receiver, or explicitly done via Object(symbolValue) or
        (new Object(symbolValue).)
      
      * The Symbol.prototype.toString() method no longer throws on Symbol
        wrapper objects (nor Symbol values.) Ditto for Symbol.prototype.valueOf().
      
      * Symbol.prototype.toString() stringifies as "Symbol("<description>"),
        valueOf() returns the wrapper's Symbol value.
      
      * ToPrimitive() over Symbol wrapper objects now throws.
      
      Overall, this provides a stricter separation between Symbol values and
      wrapper objects than before, and the explicit fetching out of the
      description (nee name) via the "name" property is no longer supported
      (by the spec nor the implementation.)
      
      Adjusted existing Symbol test files to fit current, adding some extra
      tests for new/changed behavior.
      
      LOG=N
      R=arv@chromium.org, rossberg@chromium.org, arv, rossberg
      BUG=v8:3053
      
      Review URL: https://codereview.chromium.org/118553003
      
      Patch from Sigbjorn Finne <sigbjornf@opera.com>.
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      0d34254f
  21. 26 Nov, 2013 1 commit
  22. 13 Nov, 2013 1 commit
    • rossberg@chromium.org's avatar
      Provide private symbols through internal APIs · cec8383c
      rossberg@chromium.org authored
      Adds a notion of private symbols, mainly intended for internal use, especially, self-hosting of built-in types that would otherwise require new C++ classes.
      
      On the JS side (i.e., in built-ins), private properties can be created and accessed through a set of macros:
      
        NEW_PRIVATE(print_name)
        HAS_PRIVATE(obj, sym)
        GET_PRIVATE(obj, sym)
        SET_PRIVATE(obj, sym, val)
        DELETE_PRIVATE(obj, sym)
      
      In the V8 API, they are accessible via a new class Private, and respective HasPrivate/Get/Private/SetPrivate/DeletePrivate methods on calss Object.
      
      These APIs are designed and restricted such that their implementation can later be replaced by whatever ES7+ will officially provide.
      
      R=yangguo@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/48923002
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      cec8383c
  23. 11 Apr, 2013 1 commit
  24. 03 Apr, 2013 1 commit
  25. 28 Mar, 2013 2 commits
  26. 22 Mar, 2013 3 commits
  27. 07 Mar, 2013 1 commit
  28. 06 Mar, 2013 1 commit
  29. 05 Mar, 2013 1 commit
  30. 04 Mar, 2013 1 commit
  31. 01 Mar, 2013 1 commit
    • rossberg@chromium.org's avatar
      ES6 symbols: Implement Symbol intrinsic and basic functionality · 090d09d6
      rossberg@chromium.org authored
      - Add --harmony-symbols flag.
      - Add Symbol constructor; allow symbols as (unreplaced) return value from constructors.
      - Introduce %CreateSymbol and %_IsSymbol natives and respective instructions.
      - Extend 'typeof' code generation to handle symbols.
      - Extend CompareIC with a UNIQUE_NAMES state that (uniformly) handles internalized strings and symbols.
      - Property lookup delegates to SymbolDelegate object for symbols, which only carries the toString method.
      - Extend Object.prototype.toString to recognise symbols.
      
      Per the current draft spec, symbols are actually pseudo objects that are frozen with a null prototype and only one property (toString). For simplicity, we do not treat them as proper objects for now, although typeof will return "object". Only property access works as if they were (frozen) objects (via the internal delegate object).
      
      (Baseline CL: https://codereview.chromium.org/12223071/)
      
      R=mstarzinger@chromium.org
      BUG=v8:2158
      
      Review URL: https://codereview.chromium.org/12296026
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      090d09d6