1. 04 Mar, 2016 27 commits
  2. 03 Mar, 2016 13 commits
    • littledan's avatar
      Restrict FunctionDeclarations in Statement position · 0e7f095c
      littledan authored
      ES2015 generally bans FunctionDeclarations in positions which expect a Statement,
      as opposed to a StatementListItem, such as a FunctionDeclaration which constitutes
      the body of a for loop. However, Annex B 3.2 and 3.4 make exceptions for labeled
      function declarations and function declarations as the body of an if statement in
      sloppy mode, in the latter case specifying that the semantics are as if the
      function declaration occurred in a block. Chrome has historically permitted
      further extensions, for the body of any flow control construct.
      
      This patch addresses both the syntactic and semantic mismatches between V8 and
      the spec. For the semantic mismatch, function declarations as the body of if
      statements change from unconditionally hoisting in certain cases to acquiring
      the sloppy mode function in block semantics (based on Annex B 3.3). For the
      extra syntax permitted, this patch adds a flag,
      --harmony-restrictive-declarations, which excludes disallowed function declaration
      cases. A new UseCounter, LegacyFunctionDeclaration, is added to count how often
      function declarations occur as the body of other constructs in sloppy mode. With
      this patch, the code generally follows the form of the specification with respect
      to parsing FunctionDeclarations, rather than allowing them in arbitrary Statement
      positions, and makes it more clear where our extensions occur.
      
      BUG=v8:4647
      R=adamk
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1757543003
      
      Cr-Commit-Position: refs/heads/master@{#34470}
      0e7f095c
    • adamk's avatar
      Handle ES2015 Function.name in CallSite::GetMethodName · 045fa997
      adamk authored
      CallSite depends on using the function name to get ahold of the property
      name from which an exception was thrown. This fix properly handles the
      ES2015 names for getters and setters. The new tests pass both with
      --harmony-function-name off and on.
      
      BUG=v8:3699
      LOG=n
      
      Review URL: https://codereview.chromium.org/1751403004
      
      Cr-Commit-Position: refs/heads/master@{#34469}
      045fa997
    • bradnelson's avatar
      Disable primes with asm->wasm as it fails under gc-stress. · fe6f290c
      bradnelson authored
      BUG= https://code.google.com/p/v8/issues/detail?id=4203
      TEST=mjsunit/wasm/embenchen
      R=titzer@chromium.org,aseemgarg@chromium.org
      LOG=N
      NOTRY=true
      
      Review URL: https://codereview.chromium.org/1758373002
      
      Cr-Commit-Position: refs/heads/master@{#34468}
      fe6f290c
    • alan.li's avatar
      MIPS64: Fix 'Fix 'MIPS: use DAHI/DATH for li macro on mips64r6.'' · 4c57e05d
      alan.li authored
      This CL fixes the bugs caused by the following CL:
      50a394df -- MIPS64: Fix 'MIPS: use DAHI/DATH for li macro on mips64r6.'
        Port 1f5b84e4
        MIPS: use DAHI/DATH for li macro on mips64r6.
      
      LUI instruction would sign extend into higher 32bits, in that case we might need to use DAHI, DATI to overwrite the extension.
      
      The bug will occur when we are loading some addresses such as 0x00007fffffffxxxx.
      
      BUG=
      TEST=test-run-native-calls/Run_Int32_Select_*, test-run-native-calls/Run_Int32_WeightedSum_*, test-run-native-calls/Run_Int32_WeightedSum_*, test-run-native-calls/Run_Int32_Select_*
      
      Review URL: https://codereview.chromium.org/1763733002
      
      Cr-Commit-Position: refs/heads/master@{#34467}
      4c57e05d
    • bradnelson's avatar
      Enabling some embenchen tests running through asm->wasm. · dbc0f99b
      bradnelson authored
      BUG= https://code.google.com/p/v8/issues/detail?id=4203
      TEST=mjsunit/asm-wasm
      R=titzer@chromium.org,aseemgarg@chromium.org
      LOG=N
      
      Review URL: https://codereview.chromium.org/1758893002
      
      Cr-Commit-Position: refs/heads/master@{#34466}
      dbc0f99b
    • mbrandy's avatar
      PPC: [proxies] throw TypeError if is_callable Map bit is unset · 392435bc
      mbrandy authored
      Port 18b9c1ce
      
      Original commit message:
          Per ProxyCreate() (https://tc39.github.io/ecma262/#sec-proxycreate), a Proxy
          is only given a [[Call]] slot if the target has a [[Call]] slot as well. This
          was previously implemented correctly for [[Construct]], but not for [[Call]].
      
      R=caitpotter88@gmail.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
      BUG=v8:4797, v8:4796, v8:1543
      LOG=N
      
      Review URL: https://codereview.chromium.org/1758283002
      
      Cr-Commit-Position: refs/heads/master@{#34465}
      392435bc
    • jfb's avatar
      WebAssembly: skip unknown sections, add names · df269e6e
      jfb authored
      Sets the code up so it'll be easier to have section names as strings instead of
      hard-coded numbers. Using strings will require synchronizing with sexpr-wasm.
      
      Mostly NFC (besides now skipping *all* unknown sections).
      
      R=titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1743773002
      
      Cr-Commit-Position: refs/heads/master@{#34464}
      df269e6e
    • bmeurer's avatar
      [compiler] Initial TurboFan code stubs for abstract relational comparison. · 62bc168d
      bmeurer authored
      This adds new code stubs for abstract relational comparison,
      namely LessThanStub, LessThanOrEqualStub, GreaterThanStub and
      GreaterThanOrEqualStub, and hooks them up for Ignition and TurboFan.
      These stubs implement the full compare operation without any
      unpredictable bailouts. Currently they still go to C++ for string
      comparisons, and also use the %ToPrimitive_Number runtime entry, as
      we still lack a stub for the ToPrimitive operation. These issues
      will be addressed separately in follow-up CLs.
      
      Drive-by-fix: Add support for deferred code in the RawMachineAssembler
      and CodeStubAssembler. A block can be marked as deferred by marking its
      Label as deferred, which will then make the register allocator penalize
      this block and prefer better register assignments for the other blocks.
      
      R=epertoso@chromium.org
      
      Review URL: https://codereview.chromium.org/1759133002
      
      Cr-Commit-Position: refs/heads/master@{#34463}
      62bc168d
    • mbrandy's avatar
      PPC: [compiler] Introduce StringEqualStub and StringNotEqualStub. · d61b8cee
      mbrandy authored
      Port 2689548e
      
      Original commit message:
          These new stubs perform exactly the same job as the string equality case
          for the CompareIC, but are platform independent and usable outside of
          fullcodegen and Crankshaft. We use them in the StrictEqualStub and the
          StrictNotEqualStub instead of falling back to the runtime immediately
          for String comparisons, and we also use them in TurboFan to perform
          String equality or inequality comparisons.
      
          These stubs currently handle only internalized and one byte strings w/o
          going to C++, but it should be easy to add support for more string cases
          later, i.e. utilizing already flattened cons strings or comparing two
          byte strings as well.
      
      R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
      BUG=
      
      Review URL: https://codereview.chromium.org/1763723002
      
      Cr-Commit-Position: refs/heads/master@{#34462}
      d61b8cee
    • caitpotter88's avatar
      [proxies] throw TypeError if is_callable Map bit is unset · 18b9c1ce
      caitpotter88 authored
      Per ProxyCreate() (https://tc39.github.io/ecma262/#sec-proxycreate), a Proxy
      is only given a [[Call]] slot if the target has a [[Call]] slot as well. This
      was previously implemented correctly for [[Construct]], but not for [[Call]].
      
      BUG=v8:4797, v8:4796, v8:1543
      LOG=N
      R=cbruni@chromium.org, neis@chromium.org, adamk@chromium.org, littledan@chromium.org
      
      Review URL: https://codereview.chromium.org/1752133004
      
      Cr-Commit-Position: refs/heads/master@{#34461}
      18b9c1ce
    • epertoso's avatar
      [turbofan] Re-enables the jump table emission in the mips instruction selector. · a3a583db
      epertoso authored
      Changes MacroAssembler::GenerateSwitchTable to make sure that 'ra' is properly restored.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1761863002
      
      Cr-Commit-Position: refs/heads/master@{#34460}
      a3a583db
    • bmeurer's avatar
      [compiler] Introduce StringEqualStub and StringNotEqualStub. · 2689548e
      bmeurer authored
      These new stubs perform exactly the same job as the string equality case
      for the CompareIC, but are platform independent and usable outside of
      fullcodegen and Crankshaft. We use them in the StrictEqualStub and the
      StrictNotEqualStub instead of falling back to the runtime immediately
      for String comparisons, and we also use them in TurboFan to perform
      String equality or inequality comparisons.
      
      These stubs currently handle only internalized and one byte strings w/o
      going to C++, but it should be easy to add support for more string cases
      later, i.e. utilizing already flattened cons strings or comparing two
      byte strings as well.
      
      Review URL: https://codereview.chromium.org/1761823002
      
      Cr-Commit-Position: refs/heads/master@{#34459}
      2689548e
    • bmeurer's avatar
      [runtime] Rename IsUndetectableObject to IsUndetectable. · 0b3e436a
      bmeurer authored
      This is more consistent with the current naming scheme (i.e. IsCallable
      for callable bit on map, IsConstructor for constructor bit on map, and
      now IsUndetectable for undetectable bit on map).
      
      Also simplify the fallthrough case for Object::Equals, because we don't
      need to check for Null or Undefined or Undetectable, as both Null and
      Undefined already have the undetectable bit set on their maps.
      
      R=machenbach@chromium.org
      
      Review URL: https://codereview.chromium.org/1756413003
      
      Cr-Commit-Position: refs/heads/master@{#34458}
      0b3e436a