1. 24 Aug, 2016 2 commits
    • mtrofin's avatar
      [wasm] Remember import indices · 5524cbf5
      mtrofin authored
      When compiling a wasm module, we initially generate placeholders for
      imports, which store the index corresponding to that import. Later,
      at instantiation time, we use that index to correctly link the
      provided import.
      
      In this scheme, supporting multiple instantiations requires we
      preserve a template (set of unlinked compiled wasm functions) which
      we clone for each instance. To avoid holding on to this template,
      which may be large (wasm compiled code should be expected to be in
      the order of tens of MB), we must enable cloning from an instance's
      linked wasm functions.
      
      This change is a step in that direction. Instead of assuming the wasm
      functions reference placeholders, we store a table of the code objects
      used for imports together with the compiled module, and use that
      information to determine the index of the import. Initially, that
      table contains placeholders. For instances, however, that table contains
      their actual imports.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2269323002
      Cr-Commit-Position: refs/heads/master@{#38848}
      5524cbf5
    • littledan's avatar
      Change which ExceptionEvents are triggered by Promises · 013e49f7
      littledan authored
      To make async/await catch prediction work well, this patch regularizes
      the exception events sent to DevTools from various places in the Promise
      lifecycle. The core is that there should be an exception event when the
      rejection first starts, rather than when it is propagated.
      
      - Several cases within Promise code which propagate errors are
        modified to not trigger a new ExceptionEvent in that case, such
        as .then on a rejected Promise and returning a rejected Promise
        from .then, as well as Promise.race and Promise.all.
      - Make Promise.reject() create an ExceptionEvent, subject to catch
        prediction based on the Promise stack. This is important
        so that, e.g., if "await Promise.reject()" will trigger a new
        throw (rather than a silent rethrow of something that never
        triggered an event in the first place).
      
      BUG=v8:5167
      
      Review-Url: https://codereview.chromium.org/2244003003
      Cr-Commit-Position: refs/heads/master@{#38847}
      013e49f7
  2. 23 Aug, 2016 38 commits