1. 08 Sep, 2015 1 commit
    • bmeurer's avatar
      [runtime] Replace many buggy uses of %_CallFunction with %_Call. · db2ba190
      bmeurer authored
      The semantics of the %_CallFunction intrinsic seem to be very unclear,
      which resulted in a lot of bugs. Especially the combination with
      %IsSloppyModeFunction is always a bug, because the receiver would be
      wrapped in the wrong context. So the %IsSloppyModeFunction helper is
      gone now, and many of the buggy uses of %_CallFunction are also
      eliminated.
      
      If you ever need to call something with a different receiver, then
      %_Call is your friend now. It does what you want and implements the
      call sequence fully (and correct).
      
      BUG=v8:4413
      LOG=n
      
      Review URL: https://codereview.chromium.org/1325573004
      
      Cr-Commit-Position: refs/heads/master@{#30634}
      db2ba190
  2. 02 Sep, 2015 1 commit
  3. 01 Sep, 2015 1 commit
  4. 31 Aug, 2015 1 commit
  5. 28 Aug, 2015 4 commits
    • littledan's avatar
      Sloppy-mode let parsing · decc7b09
      littledan authored
      This patch makes 'let' a contextual keyword in both strict and sloppy mode.
      It behaves as a keyword when used at the beginning of a StatementListItem
      or lexical declaration at the beginning of a for statement, if it is followed
      by an identifier, [ or {. Implementing this change requires an extra token
      look-ahead by the parser which is only invoked in certain cases (so as to
      avoid parsing RegExps as ECMAScript tokens). This might result in a slowdown
      of the scanner, but performance testing of this patch hasn't yet found much
      of a regression.
      
      BUG=v8:3305
      LOG=Y
      R=adamk,vogelheim
      
      Review URL: https://codereview.chromium.org/1315673009
      
      Cr-Commit-Position: refs/heads/master@{#30451}
      decc7b09
    • bmeurer's avatar
      [runtime] Add %ToString and %_ToString and remove the TO_STRING builtin. · 09de997b
      bmeurer authored
      This adds a new ToString runtime function and a fast-path ToStringStub
      (which is just a simple dispatcher for existing functionality), and also
      implements %_ToName using the ToStringStub.
      
      R=mstarzinger@chromium.org, yangguo@chromium.org
      BUG=v8:4307
      LOG=n
      
      Review URL: https://codereview.chromium.org/1319973007
      
      Cr-Commit-Position: refs/heads/master@{#30442}
      09de997b
    • bmeurer's avatar
      [es6] Implement spec compliant ToName (actually ToPropertyKey). · c403ede4
      bmeurer authored
      This adds a %ToName runtime entry that uses the previously introduced
      Object::ToName, which is based on the new Object::ToPrimitive method.
      Also removes the need to expose ToName in various way via the builtins
      and/or context.
      
      Drive-by-fix: Let %HasProperty do the ToName conversion implicitly as
      required.
      
      BUG=v8:4307
      LOG=n
      
      Review URL: https://codereview.chromium.org/1319133002
      
      Cr-Commit-Position: refs/heads/master@{#30435}
      c403ede4
    • bmeurer's avatar
      [es6] Implement spec compliant ToPrimitive in the runtime. · f6c6d713
      bmeurer authored
      This is the first step towards a spec compliant ToPrimitive
      implementation (and therefore spec compliant ToNumber, ToString,
      ToName, and friends).  It adds support for the @@toPrimitive
      symbol that was introduced with ES2015, and also adds the new
      Symbol.prototype[@@toPrimitive] and Date.prototype[@@toPrimitive]
      initial properties.
      
      There are now runtime functions for %ToPrimitive, %ToNumber and
      %ToString, which do the right thing and should be used as fallbacks
      instead of the hairy runtime.js implementations.  I will do the
      same for the other conversion operations mentioned by the spec in
      follow up CLs.  Once everything is in place we can look into
      optimizing things further, so that we don't always call into the
      runtime.
      
      Also fixed Date.prototype.toJSON to be spec compliant.
      
      R=mstarzinger@chromium.org, yangguo@chromium.org
      BUG=v8:4307
      LOG=y
      
      Review URL: https://codereview.chromium.org/1306303003
      
      Cr-Commit-Position: refs/heads/master@{#30434}
      f6c6d713
  6. 26 Aug, 2015 2 commits
  7. 25 Aug, 2015 3 commits
  8. 24 Aug, 2015 3 commits
  9. 21 Aug, 2015 2 commits
    • wingo's avatar
      Parse arrow functions at proper precedence level · 9271b0cc
      wingo authored
      BUG=v8:4211
      LOG=Y
      R=rossberg@chromium.org
      
      Review URL: https://codereview.chromium.org/1286383005
      
      Cr-Commit-Position: refs/heads/master@{#30298}
      9271b0cc
    • rossberg's avatar
      [es6] Parameter scopes for sloppy eval · 365fd7bc
      rossberg authored
      This CL is a nightmare! For the utterly irrelevant edge case of a sloppy function with non-simple parameters and a call to direct eval, like here,
      
        let x = 1;
        function f(g = () => x) {
          var y
          eval("var x = 2")
          return g() + x  // f() = 3
        }
      
      we have to do all of the following, on top of the declaration block ("varblock") contexts we already introduce around the body:
      
      - Introduce the ability for varblock contexts to have both a ScopeInfo and an extension object (e.g., the body varblock in the example will contain both a static var y and a dynamic var x). No other scope needs that. Since there are no context slots left, a special new struct is introduced that pairs up scope info and extension object.
      
      - When declaring lookup slots in the runtime, this new struct is allocated in the case where an extension object has to be added to a block scope (at which point the block's extension slot still contains a plain ScopeInfo).
      
      - While at it, introduce some abstraction to access context extension slots in a more controlled manner, in order to keep special-casing to a minimum.
      
      - Make sure that even empty varblock contexts do not get optimised away when they contain a sloppy eval, so that they can host the potential extension object.
      
      - Extend dynamic search for declaration contexts (used by sloppy direct eval) to recognize varblock contexts.
      
      - In the parser, if a function has a sloppy direct eval, introduce an additional varblock scope around each non-simple (desugared) parameter, as required by the spec to contain possible dynamic var bindings.
      
      - In the pattern rewriter, add the ability to hoist the named variables the pattern declares to an outer scope. That is required because the actual destructuring has to be evaluated inside the protecting varblock scope, but the bindings that the desugaring introduces are in the outer scope.
      
      - ScopeInfos need to save the information whether a block is a varblock, to make sloppy eval calls work correctly that deserialise them as part of the scope chain.
      
      - Add the ability to materialize block scopes with extension objects in the debugger. Likewise, enable setting extension variables in block scopes via the debugger interface.
      
      - While at it, refactor and unify some respective code in the debugger.
      
      Sorry, this CL is large. I could try to split it up, but everything is rather entangled.
      
      @mstarzinger: Please review the changes to contexts.
      @yangguo: Please have a look at the debugger stuff.
      
      R=littledan@chromium.org, mstarzinger@chromium.org, yangguo@chromium.org
      BUG=v8:811,v8:2160
      LOG=N
      
      Review URL: https://codereview.chromium.org/1292753007
      
      Cr-Commit-Position: refs/heads/master@{#30295}
      365fd7bc
  10. 17 Aug, 2015 1 commit
  11. 15 Aug, 2015 1 commit
    • caitpotter88's avatar
      [parser] make kInvalidLhsInFor a SyntaxError · 9b15445e
      caitpotter88 authored
      Second item in section 13.7.5.1 states that the error should be a
      SyntaxError, when previously CheckAndRewriteReferenceExpression
      would always emit a ReferenceError.
      
      BUG=v8:4373
      R=adamk, rossberg
      LOG=N
      CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
      
      Review URL: https://codereview.chromium.org/1292393002
      
      Cr-Commit-Position: refs/heads/master@{#30184}
      9b15445e
  12. 13 Aug, 2015 1 commit
  13. 12 Aug, 2015 2 commits
    • littledan's avatar
      Add class to existing lexical scoping tests · e261540b
      littledan authored
      This patch strengthens testing of classes by verifying that the binding
      that they export externally follows block scoping, as opposed to var-style
      scoping. The tests are based on existing tests for let and const.
      
      R=adamk
      LOG=N
      BUG=v8:3305
      
      Review URL: https://codereview.chromium.org/1286923002
      
      Cr-Commit-Position: refs/heads/master@{#30140}
      e261540b
    • littledan's avatar
      Split function block scoping into a separate flag · 1ebf0d7c
      littledan authored
      In an initial attempt to implement sloppy mode lexical bindings,
      functions were made lexically scoped in sloppy mode. However, the
      ES2015 spec says that they need an additional hoisted var binding,
      and further, it's not clear when we'll implement that behavior
      or whether it's web-compatible.
      
      This patch splits off function block scoping into a new, separate
      flag called --harmony_sloppy_function. This change will enable the
      possibility of testing and shipping this feature separately from
      other block scoping-related features which don't have the same risks.
      
      BUG=v8:4285
      R=adamk
      LOG=N
      
      Review URL: https://codereview.chromium.org/1282093002
      
      Cr-Commit-Position: refs/heads/master@{#30122}
      1ebf0d7c
  14. 11 Aug, 2015 2 commits
  15. 07 Aug, 2015 3 commits
  16. 05 Aug, 2015 3 commits
    • adamk's avatar
      Delete --harmony-computed-property-names flag · b7726c44
      adamk authored
      It was shipped in V8 4.4.
      
      Review URL: https://codereview.chromium.org/1273543002
      
      Cr-Commit-Position: refs/heads/master@{#30038}
      b7726c44
    • adamk's avatar
      Delete --harmony-unicode flag · cd455055
      adamk authored
      It was shipped in V8 4.4.
      
      Review URL: https://codereview.chromium.org/1271073002
      
      Cr-Commit-Position: refs/heads/master@{#30035}
      cd455055
    • rossberg's avatar
      [es6] Implement proper TDZ for parameters · 4273f66e
      rossberg authored
      Previously, examples like (({a = x}, x) => {})({}, 0) did not throw a ReferenceError like they should. This CL
      
      - Splits up DeclareFormalParameters such that the formals can be recorded first and declared later.
      
      - Declaration then takes the complete parameter list into account. If it is not simple, temporaries are introduced for all parameters.
      
      - BuildParameterInitializationBlock desugars all parameters from non-simple lists into let-bindings.
      
      - Refactored Pre/ParserFormalParameters, so that the arity information is no longer duplicated in Parser.
      
      - Rest is currently handled specially, until rest-via-destructuring has landed.
      
      R=adamk@chromium.org, littledan@chromium.org
      BUG=v8:811
      LOG=N
      
      Review URL: https://codereview.chromium.org/1259283002
      
      Cr-Commit-Position: refs/heads/master@{#30025}
      4273f66e
  17. 04 Aug, 2015 2 commits
  18. 03 Aug, 2015 1 commit
    • bbudge's avatar
      SIMD.js Add the other SIMD Phase 1 types. · 7b9670b6
      bbudge authored
      Adds Int32x4, Bool32x4, Int16x8, Bool16x8, Int8x16, Bool8x16.
      Adds Simd128Value base heap object class.
      Changes heap/factory construction pattern to use arrays.
      Adds replaceLane functions to facilitate testing.
      
      NOPRESUBMIT=true
      (presubmit checks erroneously interpret array declaration in macro definition as variable size array.)
      
      LOG=Y
      BUG=v8:4124
      
      Review URL: https://codereview.chromium.org/1250733005
      
      Cr-Commit-Position: refs/heads/master@{#29974}
      7b9670b6
  19. 25 Jul, 2015 2 commits
    • littledan's avatar
      Class block scoping tests · 024e3961
      littledan authored
      Class bindings are mutable and lexically scoped, with TDZ semantics.
      They may not overlap with var bindings in the same scope. This patch
      adds tests for those properties.
      
      R=adamk
      BUG=v8:3305
      LOG=N
      
      Review URL: https://codereview.chromium.org/1254003004
      
      Cr-Commit-Position: refs/heads/master@{#29856}
      024e3961
    • littledan's avatar
      Split off a separate --harmony_sloppy_let flag · 2d2b72f6
      littledan authored
      --harmony_sloppy includes behavior to turn on sloppy mode lexical
      bindings. Before this patch, it also included a way to parse let
      which is likely web-incompatible (let is disallowed as an
      identifier). This patch splits off the let parsing from the more
      general block scoping code, so that block scoping can be developed
      independently.
      
      R=adamk
      LOG=N
      BUG=v8:3305
      
      Review URL: https://codereview.chromium.org/1255013002
      
      Cr-Commit-Position: refs/heads/master@{#29855}
      2d2b72f6
  20. 24 Jul, 2015 1 commit
  21. 23 Jul, 2015 1 commit
  22. 22 Jul, 2015 1 commit
  23. 20 Jul, 2015 1 commit