Commit Graph

31831 Commits

Author SHA1 Message Date
franzih
7e4c4cb5c5 Fix toString() behavior on proxy objects.
Proxy objects need special treatment in toString(). Usually, we use the
@@toStringTag, if it is set, otherwise we determine the result of toString()
by checking IsArray() and other internal slots. According to
ES2017 19.1.3.6, IsArray() and the internal slots  must be checked first,
then get(@@toStringTag). The result of IsArray() and internal slots is discarded if
@@toStringTag is set. For proxy
objects, we must obey this order, because get() can have side-effects, i.e.,
revoke the proxy. For all other objects, we can skip the check of the
internal slots, if @@toStringTag is set.

BUG=

CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2090773006
Cr-Commit-Position: refs/heads/master@{#37289}
2016-06-27 12:12:46 +00:00
bbudge
5107f1c135 [Turbofan] Allow compiler to elide complex aliasing code.
- Add a const bool kSimpleFPAliasing variable for each platform so it's
easier for the compiler to eliminate dead code.
- Modify RegisterAllocator to use it.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2101473002
Cr-Commit-Position: refs/heads/master@{#37288}
2016-06-27 11:57:51 +00:00
machenbach
1deca4bafd [gn] Add remaining executables to gn
This adds generate-bytecode-expectations and parser_shell.

BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2102483002
Cr-Commit-Position: refs/heads/master@{#37287}
2016-06-27 11:57:50 +00:00
jochen
c34cc7a6ff Optionally invoke an interceptor on failed access checks
This superseeds all-can-read/all-can-write properties

BUG=chromium:618305
R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2087823002
Cr-Commit-Position: refs/heads/master@{#37286}
2016-06-27 11:49:09 +00:00
bbudge
2db846d531 [arm] Eliminate OperandConverter Float32 and Float64 register methods.
Removes OperandConverter::*Float32* and *Float64* methods.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2091973002
Cr-Commit-Position: refs/heads/master@{#37285}
2016-06-27 11:40:06 +00:00
mlippautz
35720342c3 [heap] Use PageIterator in HeapObjectIterator
BUG=chromium:581412
LOG=N
R=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2094753002
Cr-Commit-Position: refs/heads/master@{#37284}
2016-06-27 11:37:03 +00:00
franzih
a1debda6c7 Use the instance type to determine if an object is a promise.
We can check if the instance type of an object is JS_PROMISE_TYPE to determine if it is a promise rather than test whether the property promise_state_symbol is present.

BUG=
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2091243002
Cr-Commit-Position: refs/heads/master@{#37283}
2016-06-27 11:07:57 +00:00
zhengxing.li
d1e6a2e21a X87: [builtins] Always pass target and new target to C++ builtins.
port f5b83dec4e (r37061)

  original commit message:
  As a first step towards showing builtin frames in stack traces, we will now
  push target and new target unconditionally.

  Since the various specializations of BuiltinArguments are made redundant by
  this change, we can remove them and all related code.

BUG=

Review-Url: https://codereview.chromium.org/2095323002
Cr-Commit-Position: refs/heads/master@{#37282}
2016-06-27 10:19:10 +00:00
neis
c031c83d3d [ast] Be more precise in --print-scopes about the function kind.
R=littledan@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2088813002
Cr-Commit-Position: refs/heads/master@{#37281}
2016-06-27 09:41:02 +00:00
neis
b35623cab3 [ast] Remove unused function Scope::ReportMessage.
R=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2081163002
Cr-Commit-Position: refs/heads/master@{#37280}
2016-06-27 09:38:02 +00:00
franzih
a2dad04f9c Use JS_ERROR_TYPE to check for error objects.
Replace explicit Object::IsErrorObject() and v8::IsNativeError() with macro generated functions Object::IsJSError() and HeapObject::IsJSError().

BUG=

Committed: https://crrev.com/90e4fd136387ca7271d8ea87f4fc667e4f55063b
Cr-Commit-Position: refs/heads/master@{#37244}
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2090333002
Cr-Commit-Position: refs/heads/master@{#37279}
2016-06-27 09:34:44 +00:00
ishell
cd18075df7 [ic] Don't pass receiver and name to LoadGlobalIC.
The global object can be loaded from the native context and the name can be loaded in the type feedback metadata.

BUG=chromium:576312

Review-Url: https://codereview.chromium.org/2096653003
Cr-Commit-Position: refs/heads/master@{#37278}
2016-06-27 08:44:53 +00:00
zhengxing.li
f42891c9d9 X87: [builtins] Unify Atanh, Cbrt and Expm1 as exports from flibm.
port 4d4eb61111 (r37058)

  original commit message:

BUG=

Review-Url: https://codereview.chromium.org/2097323002
Cr-Commit-Position: refs/heads/master@{#37277}
2016-06-27 08:39:04 +00:00
franzih
b0016f6dc6 Add missing instance types in switch statement.
BUG=623021

Review-Url: https://codereview.chromium.org/2099923002
Cr-Commit-Position: refs/heads/master@{#37276}
2016-06-27 08:15:49 +00:00
zhengxing.li
b0c5705159 X87: [builtins] Use BUILTIN frame in DatePrototype_GetField.
port 198e09de5a (r37053)

  original commit message:
  Construct a BUILTIN frame before throwing an exception from runtime.

BUG=

Review-Url: https://codereview.chromium.org/2094223002
Cr-Commit-Position: refs/heads/master@{#37275}
2016-06-27 08:03:55 +00:00
machenbach
a93f1bdb83 [test] Sync unittests gn build
Fix after:
https://codereview.chromium.org/2060743002/
https://codereview.chromium.org/2086653003/

BUG=v8:5086, v8:5092, v8:4124
TBR=bmeurer@chromium.org, yangguo@chromium.org,  bbudge@chromium.org

NOTRY=true

Review-Url: https://codereview.chromium.org/2095313002
Cr-Commit-Position: refs/heads/master@{#37274}
2016-06-27 08:03:54 +00:00
bmeurer
bd8a36a727 [turbofan] Fold word32 representation changes for checked constants.
If we know that a constant can be represented as word32, then we don't
need to insert a checked conversion, but just change the constant
appropriately.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2100063002
Cr-Commit-Position: refs/heads/master@{#37273}
2016-06-27 07:46:21 +00:00
thakis
8c8a9f18fb v8 clang/win: Stop passing /FIIntrin.h
See https://codereview.chromium.org/2076483002 for a lengthy reasoning.
The two mysterious files called out there were in boringssl and nacl,
so for v8 this should be a complete no-op.

BUG=chromium:592745

Review-Url: https://codereview.chromium.org/2099843002
Cr-Commit-Position: refs/heads/master@{#37272}
2016-06-27 07:34:35 +00:00
mlippautz
7fda3adb65 [heap] Use hashmap instead of RB tree for ArrayBufferTracker
BUG=chromium:611688
LOG=N
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2098443002
Cr-Commit-Position: refs/heads/master@{#37271}
2016-06-27 07:22:30 +00:00
zhengxing.li
1e18c55edb X87: [builtins] Introduce a proper BUILTIN frame type.
port f47b9e9810 (r37051)

  original commit message:
  This adds a new BUILTIN frame type, which supports variable number of
  arguments for builtins implemented in hand-written native code (we will
  extend this mechanism to TurboFan builtins at some point). Convert the
  Math.max and Math.min builtins to construct a BUILTIN frame if required.

  This does not yet work for C++ builtins, but that'll be the next step.

BUG=

Review-Url: https://codereview.chromium.org/2096283003
Cr-Commit-Position: refs/heads/master@{#37270}
2016-06-27 07:02:16 +00:00
zhengxing.li
9714c98f6a X87: [builtins] Introduce proper Float64Exp operator.
port d5f2ac5e33 (r37047)

  original commit message:
  Import base::ieee754::exp() from FreeBSD msun and introduce a Float64Exp
  TurboFan operator based on that, similar to what we do for Float64Log.
  Rewrite Math.exp() as TurboFan builtin and use that operator to also
  inline Math.exp() into optimized TurboFan functions.

BUG=

Review-Url: https://codereview.chromium.org/2096283002
Cr-Commit-Position: refs/heads/master@{#37269}
2016-06-27 06:32:59 +00:00
zhengxing.li
513240bfdf X87: [builtins] Introduce proper Float64Log2 and Float64Log10 operators.
port d9bf520a22 (r37035)

  original commit message:

BUG=

Review-Url: https://codereview.chromium.org/2100023002
Cr-Commit-Position: refs/heads/master@{#37268}
2016-06-27 05:43:34 +00:00
zhengxing.li
21c4be4d28 X87: [wasm] Support for memory size relocation for asm-wasm.
port c5e3c9bf56 (r37011)

  original commit message:
  Only Intel needed changes, arm and mips work as expected.

BUG=

Review-Url: https://codereview.chromium.org/2094143003
Cr-Commit-Position: refs/heads/master@{#37267}
2016-06-27 04:25:26 +00:00
zhengxing.li
877e428fd9 X87: [wasm] Relocatable Globals.
port 2d1f977c93 (r36978)

  original commit message:
  Support for relocatable globals, to facilitate compilation before
  instantiation.

BUG=

Review-Url: https://codereview.chromium.org/2096273002
Cr-Commit-Position: refs/heads/master@{#37266}
2016-06-27 04:16:37 +00:00
zhengxing.li
d0607218a0 X87: [turbofan] Prevent storing signalling NaNs into holey double arrays.
port 6470ddadf9 (r36950)

  original commit message:
  This introduces SilenceNaN operator, which makes sure that we only
  store quiet NaNs into holey arrays. We omit the NaN silencing code
  at instruction selection time if the input is an operation that
  cannot possibly produce signalling NaNs.

BUG=

Review-Url: https://codereview.chromium.org/2099143002
Cr-Commit-Position: refs/heads/master@{#37265}
2016-06-27 03:38:54 +00:00
v8-autoroll
aee9a72a1e Update V8 DEPS.
Rolling v8/build to 95bb77009ecdeaa992b031b947142fbf7da57ed6

Rolling v8/tools/mb to 62e2d060db3b06208f5d6558db03efd140ecd180

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2098293002
Cr-Commit-Position: refs/heads/master@{#37264}
2016-06-27 03:24:14 +00:00
zhengxing.li
785bb8a3ed X87: Fix arguments object stubs for large arrays.
port e95cfafb67 (r36917)

  original commit message:
  This fixes FastNewStrictArgumentsStub and FastNewRestParameterStub to no
  longer assume that the strict arguments object being allocated will fit
  into new-space. The case where said object needs to move to large object
  space is now handled in the runtime.

BUG=

Review-Url: https://codereview.chromium.org/2100003002
Cr-Commit-Position: refs/heads/master@{#37263}
2016-06-27 02:46:04 +00:00
zhengxing.li
4953b17c52 X87: [builtins] Introduce proper Float64Atan and Float64Atan2 operators.
port 89d8c57b9c (r36916)

  original commit message:
  Import base::ieee754::atan() and base::ieee754::atan2() from fdlibm and
  introduce Float64Atan and Float64Atan2 TurboFan operators based on those,
  similar to what we already did for Float64Log and Float64Log1p. Rewrite
  Math.atan() and Math.atan2() as TurboFan builtin and use the operators
  to also inline Math.atan() and Math.atan2() into optimized TurboFan functions.

BUG=

Review-Url: https://codereview.chromium.org/2093423003
Cr-Commit-Position: refs/heads/master@{#37262}
2016-06-27 02:37:19 +00:00
v8-autoroll
8ac5a457c4 Update V8 DEPS.
Rolling v8/build to e6d755246d1db2bc122ff2bfbc2b741b43d4afb7

Rolling v8/tools/mb to 3bf9b2fd6fb3127fc9b29d30cc4ff82eb025b7f6

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2088393007
Cr-Commit-Position: refs/heads/master@{#37261}
2016-06-25 03:27:50 +00:00
caitpotter88
4bb1f70e66 [parser] don't report error for CoverInitializedNames in async arrow formals
BUG=v8:4483, v8:5148
R=littledan@chromium.org, adamk@chromium.org, jwolfe@igalia.com, nikolaos@chromium.org

Review-Url: https://codereview.chromium.org/2091313002
Cr-Commit-Position: refs/heads/master@{#37260}
2016-06-25 00:39:11 +00:00
bakkot
b2ce1fa20c add use counters for __defineGetter__ failing
We deviate from spec in that, in our implementation, __defineGetter__ on non-
configurable properties returns false instead of throwing a TypeError. This commit
adds a use counter to track how often we would be throwing an error we currently
avoid, to determine if we can change to align with spec or if the spec is not
implementable.

BUG=v8:5070

Review-Url: https://codereview.chromium.org/2089533002
Cr-Commit-Position: refs/heads/master@{#37259}
2016-06-24 22:05:03 +00:00
tandrii
44ca872385 Make bucket names explicit in cq.cfg.
Don't assume bucket name to start with 'master.'.

NOTRY=True
BUG=chromium:617627
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2093993002
Cr-Commit-Position: refs/heads/master@{#37258}
2016-06-24 20:14:25 +00:00
bakkot
e32d89ce86 Removes unused lines from the test262 status file after roll.
https://crrev.com/d3a95b8a78eefabf884a60bc3d6aac5830b44eb3
The removed tests are a mix of renamed files and tests which have been
removed after the spec was relaxed.

Also marks one test as a test262 failure rather than our failure.

Review-Url: https://codereview.chromium.org/2098833002
Cr-Commit-Position: refs/heads/master@{#37257}
2016-06-24 18:56:07 +00:00
jyan
fa5e049055 [compiler] Fix turbofan string allocation
The hash field is supposed to be 4 bytes even in 64-bit. But the
default parameter of StoreObjectFieldNoWriteBarrier using kTagged
will generate 64-bit store. Fix by Replacing kTagged with kWord32.

This causes ~200 test failures on big-endian, because hash field
offset in BE is 12 instead of 8 in LE platforms.

R=bmeurer@chromium.org, epertoso@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2095003003
Cr-Commit-Position: refs/heads/master@{#37256}
2016-06-24 18:26:05 +00:00
zhengxing.li
196a0d3a64 X87: [builtins] Introduce proper Float64Log1p operator.
port 7ceed92ac0 (r36914)

  original commit message:
  Import base::ieee754::log1p() from fdlibm and introduce a Float64Log1p
  TurboFan operator based on that, similar to what we do for Float64Log.
  Rewrite Math.log1p() as TurboFan builtin and use that operator to also
  inline Math.log1p() into optimized TurboFan functions.

  Also unify the handling of the special IEEE 754 functions somewhat in
  the TurboFan backends. At some point we can hopefully express this
  completely in the InstructionSelector (once we have an idea what to do
  with the ST(0) return issue on IA-32/X87).

BUG=

  Drive-by-fix: Add some more test coverage for the log function.
Review-Url: https://codereview.chromium.org/2094953002

Cr-Commit-Position: refs/heads/master@{#37255}
2016-06-24 15:23:50 +00:00
verwaest
235ed70074 Pass in the original receiver to avoid use-after-return issues
BUG=chromium:622664

Review-Url: https://codereview.chromium.org/2092943003
Cr-Commit-Position: refs/heads/master@{#37254}
2016-06-24 14:11:59 +00:00
ishell
cfcb3597fd [ic] Let LoadGlobalIC load the variable name from TypeFeedbackMetadata.
This simplifies the calling convention of LoadGlobalIC.

Currently we do a linear search to get the name but I'll address this in a follow-up CL.

BUG=chromium:576312
TBR=rossberg@chromium.org

Review-Url: https://codereview.chromium.org/2084913006
Cr-Commit-Position: refs/heads/master@{#37253}
2016-06-24 14:08:57 +00:00
verwaest
a7a9ac37d4 Share SharedFunctionInfo between all functions created for a FunctionTemplateInfo
BUG=

Review-Url: https://codereview.chromium.org/2095673002
Cr-Commit-Position: refs/heads/master@{#37252}
2016-06-24 13:53:00 +00:00
bbudge
a933b7044a [Turbofan] Add the concept of aliasing to RegisterConfiguration.
- Adds the concept of FP register aliasing to RegisterConfiguration.
- Changes RegisterAllocator to distinguish between FP representations
when allocating.
- Changes LinearScanAllocator to detect interference when FP register
aliasing is combining, as on ARM.
- Changes ARM code generation to allow all registers s0 - s31 to be
accessed.
- Adds unit tests for RegisterConfiguration, mostly to test aliasing
calculations.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2086653003
Cr-Commit-Position: refs/heads/master@{#37251}
2016-06-24 12:45:05 +00:00
machenbach
f0a03f0b94 Revert of Use instance type in Object::IsErrorObject(). (patchset #9 id:160001 of https://codereview.chromium.org/2090333002/ )
Reason for revert:
[Sheriff] Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/7700

Please rebase upstream first if intended.

Original issue's description:
> Use JS_ERROR_TYPE to check for error objects.
>
> Replace explicit Object::IsErrorObject() with macro generated functions Object::IsJSError() and HeapObject::IsJSError().
>
> BUG=
>
> Committed: https://crrev.com/90e4fd136387ca7271d8ea87f4fc667e4f55063b
> Cr-Commit-Position: refs/heads/master@{#37244}

TBR=verwaest@chromium.org,jochen@chromium.org,franzih@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2092083002
Cr-Commit-Position: refs/heads/master@{#37250}
2016-06-24 11:52:49 +00:00
machenbach
8349651e06 [mb] Switch remaining bots to mb
BUG=chromium:616035
NOTRY=true

Review-Url: https://codereview.chromium.org/2081263003
Cr-Commit-Position: refs/heads/master@{#37249}
2016-06-24 11:29:45 +00:00
machenbach
f86cabe674 [mb] Switch remaining ports to mb
BUG=chromium:616035
NOTRY=true

Review-Url: https://codereview.chromium.org/2082283002
Cr-Commit-Position: refs/heads/master@{#37248}
2016-06-24 10:20:02 +00:00
rmcilroy
361548ca4c [Interpreter] Maintain the parent frame pointer after load
Maintain the parent frame pointer in a variable after loading it to avoid
having to reload it each time it is required.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2085353005
Cr-Commit-Position: refs/heads/master@{#37247}
2016-06-24 10:16:50 +00:00
machenbach
25b511ca9b [mb] Switch mac bots to mb
BUG=chromium:616035
NOTRY=true

Review-Url: https://codereview.chromium.org/2083153003
Cr-Commit-Position: refs/heads/master@{#37246}
2016-06-24 10:05:03 +00:00
zhengxing.li
a88d41919a X87: [ia32] Propagate rmodes when computing MemoryOperands.
port 8c1ba59aee (r36911)

  original commit message:
  RelocInfo modes were not propagated when computing
  MemoryOperands, on IA32. This needed to be fixed so that we can
  compile wasm code before creating instances, since the compiled code
  needs to be patched up for memory and globals references.

  This surfaces in asm-to-wasm scenarios.

  Added testing (rather, enhanced existing tests).
  Note patch#1 where we fail on ia32, and patch#2 with the fix.

BUG=

Review-Url: https://codereview.chromium.org/2097583003
Cr-Commit-Position: refs/heads/master@{#37245}
2016-06-24 09:56:25 +00:00
franzih
90e4fd1363 Use JS_ERROR_TYPE to check for error objects.
Replace explicit Object::IsErrorObject() with macro generated functions Object::IsJSError() and HeapObject::IsJSError().

BUG=

Review-Url: https://codereview.chromium.org/2090333002
Cr-Commit-Position: refs/heads/master@{#37244}
2016-06-24 09:53:14 +00:00
zhengxing.li
5f28e5a9cd X87: [stubs] Remove N-argument Hydrogen-based Array constructor stub.
port c8ac0d8693f559795eeb3f3aaf386dde166fb2ab(r36888)

  original commit message:
  Instead, always tail call to the runtime. Also, cleanup the various versions
  of the runtime call that is used for Array construction fallback. There can be
  only one.

BUG=

Review-Url: https://codereview.chromium.org/2080223009
Cr-Commit-Position: refs/heads/master@{#37243}
2016-06-24 09:38:20 +00:00
zhengxing.li
2d8738ed09 X87: [builtins] Introduce proper base::ieee754::log.
port d0c7775d7cfec5ae628ab9f3f00cff09b01930ac(r36880)

  original commit message:
  This switches Math.log to use an fdlibm based version of log, imported
  as base::ieee754::log, and use that consistently everywhere, i.e. change
  the Float64Log TurboFan operators on Intel to use the C++ implementation
  as well (same for Crankshaft).

BUG=

Review-Url: https://codereview.chromium.org/2081653005
Cr-Commit-Position: refs/heads/master@{#37242}
2016-06-24 09:05:55 +00:00
balazs.kilvady
5cda2db7d3 Fix '[tests] Don't test moves between different reps in test-gap-resolver.cc'
Port fc59eb8a7a

Original commit message:
Moves between operands with different representations shouldn't happen,
so don't test them. This makes it easier to modify canonicalization to
differentiate between floating point types, which is needed to support
floating point register aliasing for ARM and MIPS.

This change also expands tests to include explicit FP moves (both register and stack slot).

LOG=N
BUG=v8:4124
BUG=chromium:622619

Review-Url: https://codereview.chromium.org/2090993002
Cr-Commit-Position: refs/heads/master@{#37241}
2016-06-24 08:26:36 +00:00
ahaas
4b8128a051 [wasm] Use ChangeSmiToInt32 instead of SmiConstant in wasm.
Signature indices are encoded as SMIs in the function table of a wasm
module. To compare a signature index with the index parameter that is
passed to an indirect function call, we now change the signature index
to an int32 instead of encoding the index parameter as a SmiConstant.
SmiConstants get encoded as NumberConstant nodes in the TF graph, which
can cause the allocation of heap numbers. Heap allocation has to be
avoided for parallel compilation.

R=bradnelson@chromium.org, titzer@chromium.org

Review-Url: https://codereview.chromium.org/2090923002
Cr-Commit-Position: refs/heads/master@{#37240}
2016-06-24 07:23:45 +00:00