1. 15 May, 2019 1 commit
    • Toon Verwaest's avatar
      [json] Make json parsing iterative · 4b60b40a
      Toon Verwaest authored
      This avoids the need to throw range errors when we run out of stack, limiting
      us only by available memory.
      
      The main parser loop is implemented by two subloops.
      
      The first subloop finishes whenever it generates primitive values, empty
      arrays, or empty objects. If a non-empty object or array is started, the loop
      continues to parse its first member.
      
      The second subloop consumes produced values and either adds them to the parent
      array or object, or returns it. The second loop finishes whenever a next value
      needs to be produced. When the loop itself produces a finished array or object,
      the loop continues.
      
      Exceptions are handled by moving the cursor to end-of-input. Upon end-of-input,
      the first loop sets the continuation to "kFail". That causes the second loop to
      tear down continuation stack and related handle scopes, resulting in an empty
      handle.
      
      The CL additionally buffers all named properties and elements so we can
      immediately allocate a correctly shaped object. For object elements we'll take
      flat array or dictionary encoding depending on what is more efficient.
      
      This means that element handles are now allocated in their parent HandleScope,
      rather than having local handlescopes per-property (of big objects); which is
      why I've adjusted the handle-count test to not allocate as many properties. In
      the future it would be nice to not have to allocate (as many) handles since
      almost everything in the JSON graph will survive JSON parsing...
      
      Bug: chromium:710383
      Change-Id: Ia3a7fd0ac260fb1c0e5f929276792b2f8e5fc0ca
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1609802Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Toon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61533}
      4b60b40a
  2. 12 Nov, 2012 1 commit
  3. 24 Sep, 2012 2 commits
  4. 25 Mar, 2012 1 commit
  5. 13 Jan, 2012 1 commit
  6. 27 Nov, 2009 1 commit
  7. 23 Oct, 2009 1 commit
  8. 20 Oct, 2009 1 commit
  9. 04 Mar, 2009 1 commit
  10. 26 Sep, 2008 1 commit
  11. 09 Sep, 2008 1 commit
  12. 22 Aug, 2008 1 commit
    • christian.plesner.hansen's avatar
      Included mjsunit JavaScript test suite and C++ unit tests. · c42f5829
      christian.plesner.hansen authored
      In the shell sample don't print the result of executing a script, only
      evaluating expressions.
      
      Fixed issue when building samples on Windows using a shared V8
      library.  Added visibility option on Linux build which makes the
      generated library 18% smaller.
      
      Changed build system to accept multiple build modes in one build and
      generate seperate objects, libraries and executables for each mode.
      
      Removed deferred negation optimization (a * -b => -(a * b)) since this
      visibly changes operand conversion order.
      
      Improved parsing performance by introducing stack guard in preparsing.
      Without a stack guard preparsing always bails out with stack overflow.
      
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      c42f5829
  13. 03 Jul, 2008 1 commit