Commit Graph

36632 Commits

Author SHA1 Message Date
marja
9c7b87269c include fixing: api.h shouldn't include objects-inl.h
Downside: this adds all kinds of weird includes in the .cc files.

(See design doc linked in the bug.)

BUG=v8:5402

Review-Url: https://codereview.chromium.org/2622503002
Cr-Commit-Position: refs/heads/master@{#42140}
2017-01-09 13:43:28 +00:00
verwaest
7256d90a35 [ignition] Prefill the constant array with holes to avoid needing to write padding holes
BUG=

Review-Url: https://codereview.chromium.org/2586513002
Cr-Commit-Position: refs/heads/master@{#42139}
2017-01-09 13:42:01 +00:00
cbruni
09167bf6cd Add Object::IsNullOrUndefined(Isolate*) helper method
The pattern IsNull(isolate) || IsUndefined(isolate) is used in many places all
over the code base.

Review-Url: https://codereview.chromium.org/2601503002
Cr-Commit-Position: refs/heads/master@{#42138}
2017-01-09 13:40:51 +00:00
yangguo
e24f3f3bd5 Use map to distinguish type feedback vectors.
R=mvstanton@chromium.org, ulan@chromium.org
BUG=v8:5808

Review-Url: https://codereview.chromium.org/2617363003
Cr-Commit-Position: refs/heads/master@{#42137}
2017-01-09 12:27:04 +00:00
franzih
7c7e188885 [turbofan] Remove eager checkpoint.
ToName, ToObject, and ToNumber do not need an
eager checkpoint.

BUG=

Review-Url: https://codereview.chromium.org/2623473002
Cr-Commit-Position: refs/heads/master@{#42136}
2017-01-09 11:35:18 +00:00
jkummerow
fab14341f5 [cleanup] Refactor builtins-math.cc to use TF_BUILTIN macro
Review-Url: https://codereview.chromium.org/2614773004
Cr-Commit-Position: refs/heads/master@{#42135}
2017-01-09 10:20:20 +00:00
jkummerow
f91e12cc09 [cleanup] Refactor builtins-string.cc to use TF_BUILTIN macro
Review-Url: https://codereview.chromium.org/2614973003
Cr-Commit-Position: refs/heads/master@{#42134}
2017-01-09 10:19:10 +00:00
machenbach
b606e1b6f4 [test] Skip flaky test under tsan
BUG=v8:5807
NOTRY=true
TBR=clemensh@chromium.org,ahaas@chromium.org

Review-Url: https://codereview.chromium.org/2620653002
Cr-Commit-Position: refs/heads/master@{#42133}
2017-01-09 10:14:52 +00:00
yangguo
081193d5b1 [serializer] pass internal fields deserializer callback as argument.
Background to this is that blink needs to be able to pass different internal
fields deserialization callbacks for individual to-be-deserialized contexts.

R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2619203002
Cr-Commit-Position: refs/heads/master@{#42132}
2017-01-09 10:12:04 +00:00
franzih
4805790c60 [ast] Delete unused variables.
BUG=

Review-Url: https://codereview.chromium.org/2596803002
Cr-Commit-Position: refs/heads/master@{#42131}
2017-01-09 09:51:30 +00:00
clemensh
fc327e2308 [asm.js] [wasm] Store function start position for stack check
We did not associate any position to the stack check in the wasm
function prologue, hence a check failed later when trying to map the
non-existent position to the asm.js source position.

With this CL, we add a mapping to the source position table, mapping
the stack check call to byte offset 0 (which is distinct from any valid
instruction position). Also, we add another entry to the asm.js source
position sidetable, mapping byte offset 0 to the start source position
of the function body.

R=titzer@chromium.org, ahaas@chromium.org
BUG=chromium:677685

Review-Url: https://codereview.chromium.org/2609363004
Cr-Commit-Position: refs/heads/master@{#42130}
2017-01-09 09:43:04 +00:00
marja
d17558bc49 PreParsing inner funcs: make scope analysis more complete.
This adds tracking the following:
- Declarations created by catch (potentially destructuring)
- Declarations created by for-each (potentially destructuring)
- Class declarations

BUG=v8:5501, v8:5516

Review-Url: https://codereview.chromium.org/2617923003
Cr-Commit-Position: refs/heads/master@{#42129}
2017-01-09 09:41:54 +00:00
jgruber
9e65ecd957 [regexp] Remove IsRegExp intrinsic
The two remaining uses of this intrinsic in debug.js and mirrors.js now
simply rely on the runtime function.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2591923003
Cr-Original-Commit-Position: refs/heads/master@{#41892}
Committed: c9cb94a06f
Review-Url: https://codereview.chromium.org/2591923003
Cr-Commit-Position: refs/heads/master@{#42128}
2017-01-09 09:34:48 +00:00
jgruber
1c26e0a493 [js-perf-test] Specify AsyncAwait tests in JSTests.json
BUG=v8:5805

Review-Url: https://codereview.chromium.org/2619753002
Cr-Commit-Position: refs/heads/master@{#42127}
2017-01-09 09:30:25 +00:00
zhengxing.li
8b900b8ba9 X87: Revert of [turbofan] Improve codegen for 8- and 16-bit memory comparisons on Intel platforms (patchset #3 id:40001 of https://codereview.chromium.org/2605863002/ ).
port c16ca32e5f (r42092)

  original commit message:
  Reason for revert:
  Breaks wasm benchmark (http://crbug.com/v8/5798).

  Original issue's description:
  > [turbofan] Improve codegen for 8- and 16-bit memory comparisons on Intel platforms
  >
  > Recognize and emit in-memory comparisons of 8-bit and 16-bit values with
  > immediate values that fit.
  >
  > LOG=N
  > R=epertoso@chromium.org
  >
  > Review-Url: https://codereview.chromium.org/2605863002
  > Cr-Commit-Position: refs/heads/master@{#41971}
  > Committed: be11812c53

BUG=

Review-Url: https://codereview.chromium.org/2622463002
Cr-Commit-Position: refs/heads/master@{#42126}
2017-01-09 09:06:05 +00:00
marja
bd62841eb9 Preparsing inner funcs: Update tests.
1) Fix confusion between for of and for in.

2) If a for loop doesn't declare its variables, no new variables
are introduced (the outer scope variables are used).

3) Add more cases for destructuring for and destructuring catch.

BUG=v8:5501, v8:5516

Review-Url: https://codereview.chromium.org/2614023004
Cr-Commit-Position: refs/heads/master@{#42125}
2017-01-09 08:53:14 +00:00
jochen
65537684b6 Add ability to enqueue SharedFunctionInfos so they can run on bg threads
If this is possible at all, we need to at least do the first step
(prepare to parse).

BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2610173004
Cr-Commit-Position: refs/heads/master@{#42124}
2017-01-09 08:52:04 +00:00
bmeurer
5f418c8a2d [crankshaft] Properly deal with null prototype.
Don't assume that the prototype of an object is always a JSObject when
inlining the known receiver map case for abstract relational comparison.

BUG=chromium:679202
R=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2621583002
Cr-Commit-Position: refs/heads/master@{#42123}
2017-01-09 08:47:43 +00:00
bmeurer
b36b8395e8 [turbofan] Optimize strict equality with unique input.
If one input to JSStrictEqual/JSNotStrictEqual is Unique (except
InternalizedString) or the hole, then we can turn that into a
direct pointer comparison, as such values are only equal to exactly
the same unique value.

BUG=v8:5267
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2611363002
Cr-Commit-Position: refs/heads/master@{#42122}
2017-01-09 06:40:23 +00:00
v8-autoroll
b0fab645b7 Update V8 DEPS.
Rolling v8/third_party/catapult: 4a7b232..487c2d0

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

Review-Url: https://codereview.chromium.org/2619713002
Cr-Commit-Position: refs/heads/master@{#42121}
2017-01-08 04:22:47 +00:00
v8-autoroll
6dd9e8e03d Update V8 DEPS.
Rolling v8/third_party/catapult: 9e6944a..4a7b232

Rolling v8/third_party/instrumented_libraries: 45f5814..5b6f777

Rolling v8/tools/clang: 5b3c04d..d150023

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

Review-Url: https://codereview.chromium.org/2618183002
Cr-Commit-Position: refs/heads/master@{#42120}
2017-01-07 06:59:01 +00:00
machenbach
b1e4f79e66 Revert of [intl] Remove redundant type checking system (patchset #4 id:60001 of https://codereview.chromium.org/2600913002/ )
Reason for revert:
Breaks noi18n.

Original issue's description:
> [intl] Remove redundant type checking system
>
> Previously, the Intl implementation tracked types two ways:
>  - In the intl_initialized_marker_symbol
>  - In various named properties of the intl_impl_object_symbol value
>
> As far as I can tell, these will never disagree with each other,
> modulo bugs in Intl itself. This patch removes the second type
> checking system.
>
> This reland includes a fixed type check for
> Intl.DateTimeFormat.prototype.formatToParts , which is the only Intl
> method which is not bound. All future methods will follow this
> pattern.
>
> BUG=v8:5751,chromium:677055, v8:4962
> CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng
>
> Review-Url: https://codereview.chromium.org/2600913002
> Cr-Commit-Position: refs/heads/master@{#42118}
> Committed: aa8a2d2789

TBR=yangguo@chromium.org,adamk@chromium.org,littledan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5751,chromium:677055, v8:4962

Review-Url: https://codereview.chromium.org/2617323002
Cr-Commit-Position: refs/heads/master@{#42119}
2017-01-07 06:50:45 +00:00
littledan
aa8a2d2789 [intl] Remove redundant type checking system
Previously, the Intl implementation tracked types two ways:
 - In the intl_initialized_marker_symbol
 - In various named properties of the intl_impl_object_symbol value

As far as I can tell, these will never disagree with each other,
modulo bugs in Intl itself. This patch removes the second type
checking system.

This reland includes a fixed type check for
Intl.DateTimeFormat.prototype.formatToParts , which is the only Intl
method which is not bound. All future methods will follow this
pattern.

BUG=v8:5751,chromium:677055, v8:4962
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng

Review-Url: https://codereview.chromium.org/2600913002
Cr-Commit-Position: refs/heads/master@{#42118}
2017-01-07 02:54:48 +00:00
littledan
586deecbb1 [test] Process to locally develop and upstream test262 tests
This patch provides improved infrastructure for developing test262 tests
together with V8. It has three parts:
- The test262 test runner is updated to look for local versions of tests
  in the /test/test262/local-tests directory, which mirrors
  /test/test262/data. Additional tests can be added there and are run
  together with tests from upstream. Upstream tests can be locally
  updated by using the same name in local-tests; if a same-named test
  exists, then only the local version will be run. The local-tests
  directory is in the V8 repository, unlike the contents of the data
  directory, so tests can be added in the same patch as something else.
- The tool /test/test262/upstream-local-tests.sh is added to create
  a patch against the test262 respository based on a patch which changes
  the local-tests directory.
- The tool /test/test262/prune-local-tests.sh is added to remove
  redundant local tests on a test262 roll.

See design doc:
https://docs.google.com/document/d/16bj7AIDgZLv4WOsUEzQ5NzcEN9_xo095e88Pz8FC5rA/edit

Review-Url: https://codereview.chromium.org/2611793002
Cr-Commit-Position: refs/heads/master@{#42117}
2017-01-07 02:44:49 +00:00
mtrofin
b5606fe07e [wasm] remove unused WasmInstance fields
BUG=

Review-Url: https://codereview.chromium.org/2619113002
Cr-Commit-Position: refs/heads/master@{#42116}
2017-01-07 00:51:15 +00:00
mtrofin
ccfb815c9d [wasm] factor lower level utilties out of WasmFullDecoder
Separated:
- decoding of locals
- loop assignment analysis
- determination of opcode length

as statics that work on a Decoder. Neither need the context of a
Module, and were used in scenarios where one wasn't available either.

Changed BodyLocalDecls to match the usecases for the type. In all but
one (a printer), we want the list (in order of declaration, with
repetitions) of types of locals.

Removed a now-unnecessary constructor for the WasmFullDecoder.

BUG=

Review-Url: https://codereview.chromium.org/2610813009
Cr-Commit-Position: refs/heads/master@{#42115}
2017-01-06 22:24:56 +00:00
adamk
0d72662400 Improve error message for calling super() twice in a derived constructor
Previously the message was "this is not defined" which is nonsensical.

BUG=v8:4407

Review-Url: https://codereview.chromium.org/2614053002
Cr-Commit-Position: refs/heads/master@{#42114}
2017-01-06 20:26:02 +00:00
gsathya
a5f3c4d10c [promises] Move various promise reject functions to TF
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2616673003
Cr-Commit-Position: refs/heads/master@{#42113}
2017-01-06 20:06:32 +00:00
adamk
45c1188792 [fullcodegen] Remove dead hole check logic
Variables requiring initialization are already forced into ignition,
so all the code supporting hole checks in full-codegen and
ast-graph-builder is dead.

R=bmeurer@chromium.org
BUG=v8:5657

Review-Url: https://codereview.chromium.org/2615033002
Cr-Commit-Position: refs/heads/master@{#42112}
2017-01-06 19:45:05 +00:00
adamk
02149d89a5 Include harmony-string-padding.js in the context snapshot
The attached chromium bug suggests that turning this on via a flag
regressed a perf test. Having previously run into slowdowns due
to experimental JS natives, my suspicion is that this regression
can be fixed by including the new builtins in the snapshot.
My intention is to land this patch to see if the regression
goes away on the bots.

Given the nature of this feature, it seems low-risk to remove
the runtime flag. If need be, it would be trivial to craft
a patch to remove these two methods from String.prototype
if we run into web compat issues during the release (note
that no release branch has yet picked up this feature).

BUG=v8:4954, chromium:677444

Review-Url: https://codereview.chromium.org/2610853010
Cr-Commit-Position: refs/heads/master@{#42111}
2017-01-06 18:56:00 +00:00
mtrofin
2c60a1facf [wasm] some const annotations
BUG=

Review-Url: https://codereview.chromium.org/2618743004
Cr-Commit-Position: refs/heads/master@{#42110}
2017-01-06 16:42:26 +00:00
gsathya
677bd40ea6 [promises] Add AllocatePromiseResolveThenableJobInfo to TF
Also moves most of the runtime function into TF. There are lots of
runtime calls but they happen only for the debug case so it's fine.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2611083002
Cr-Commit-Position: refs/heads/master@{#42109}
2017-01-06 15:29:09 +00:00
bjaideep
0a4f52972f PPC: fix smi compare in DoBoundsCheck
CmplSmiLiteral should be used to compare smi

R=joransiu@ca.ibm.com, jyan@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2614663009
Cr-Commit-Position: refs/heads/master@{#42108}
2017-01-06 14:41:09 +00:00
martyn.capewell
2bbcedb54e ARM: Remove unused variable
Remove unused size variable from disassembler.

BUG=

Review-Url: https://codereview.chromium.org/2615633004
Cr-Commit-Position: refs/heads/master@{#42107}
2017-01-06 13:45:30 +00:00
littledan
32c1a7933c [test] Presumbit check against missing tests in status files
Our test infrastructure ignores missing tests which are listed in
status files. Sometimes, tests are removed and status file lines
are not updated. This patch adds a presubmit check for status
files addressing JavaScript tests to not reference missing tests.
It also cleans up existing violations.

R=machenbach

Review-Url: https://codereview.chromium.org/2610353002
Cr-Commit-Position: refs/heads/master@{#42106}
2017-01-06 10:13:43 +00:00
mtrofin
a6402fd916 [wasm] Decoder had 2 representations for "end".
Removing "limit_", using just "end_".

BUG=

Review-Url: https://codereview.chromium.org/2613193002
Cr-Commit-Position: refs/heads/master@{#42105}
2017-01-06 08:02:10 +00:00
v8-autoroll
c8d8bf2150 Update V8 DEPS.
Rolling v8/build: 9cde9c9..87eca92

Rolling v8/tools/clang: 0ec6dce..5b3c04d

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

Review-Url: https://codereview.chromium.org/2619503002
Cr-Commit-Position: refs/heads/master@{#42104}
2017-01-06 04:27:02 +00:00
adamk
b54c825fd1 [cleanup] Remove unused runtime error functions/messages
R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2612373002
Cr-Commit-Position: refs/heads/master@{#42103}
2017-01-05 23:46:50 +00:00
gsathya
a40b7172fe [ESnext] Implement Object spread
This patch adds parsing of spread object property.

-- Changes ParsePropertyName to parse Token::ELLIPSIS.
-- Throws if rest is encountered by setting a pattern error.
-- Adds a new PropertyKind enum (SPREAD)
-- Adds a new ObjectLiteralProperty::kind (SPREAD)
-- Adds a new harmony-object-spread flag and protects the parser code
with it.
-- Adds a new runtime function called CopyDataProperties
-- Does not add any support for this feature in fullcodegen.
-- Ignition calls out to a runtime function CopyDataProperties to
perform spread operation.
-- Move FastAssign from builtins-objects.cc to objects.cc
-- Refactor Builtin_ObjectAssign to use SetOrCopyDataProperties

Object rest will be implemented in a follow on patch.

BUG=v8:5549

Review-Url: https://codereview.chromium.org/2606833002
Cr-Commit-Position: refs/heads/master@{#42102}
2017-01-05 23:44:25 +00:00
jyan
a5a376c530 s390: remove redundant instr in loadrepresentation
R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2617733003
Cr-Commit-Position: refs/heads/master@{#42101}
2017-01-05 23:13:03 +00:00
jyan
95040300ee s390: fix smi compare in DoBoundsCheck
CmpLogicalP only compares lower 32-bit, but smi is in upper 32-bit

R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2611193002
Cr-Commit-Position: refs/heads/master@{#42100}
2017-01-05 21:00:30 +00:00
jyan
130e12d020 [turbofan] Fix shift_left/right in unittest
x86 automatically truncates the shift amount to be 5-bits. But not
all architectures do that.

R=rossberg@chromium.org, jarin@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2616743002
Cr-Commit-Position: refs/heads/master@{#42099}
2017-01-05 18:43:31 +00:00
adamk
3166d4293e [ignition] Avoid unnecessary ToName calls in VisitClassLiteralProperties
R=rmcilroy@chromium.org
BUG=v8:5799

Review-Url: https://codereview.chromium.org/2612903002
Cr-Commit-Position: refs/heads/master@{#42098}
2017-01-05 18:25:25 +00:00
adamk
1bc48138a6 [class fields] Remove a bit of dead code leftover from cleanup
R=littledan@chromium.org
BUG=v8:5367

Review-Url: https://codereview.chromium.org/2611063002
Cr-Commit-Position: refs/heads/master@{#42097}
2017-01-05 18:11:37 +00:00
adamk
6e0796c2b9 [fullcodegen] Remove unused EmitPropertyKey method
R=bmeurer@chromium.org
BUG=v8:5657

Review-Url: https://codereview.chromium.org/2609863006
Cr-Commit-Position: refs/heads/master@{#42096}
2017-01-05 18:02:52 +00:00
jochen
58afa27beb Disable non-predictable wasm/gc-frame test
TBR=machenbach@chromium.org
BUG=5803

Review-Url: https://codereview.chromium.org/2611143002
Cr-Commit-Position: refs/heads/master@{#42095}
2017-01-05 16:03:20 +00:00
rdevlin.cronin
2804502615 [V8] Run clang-tidy performance-for-range-copy check on src/
BUG=None

Review-Url: https://codereview.chromium.org/2609173005
Cr-Commit-Position: refs/heads/master@{#42094}
2017-01-05 16:01:54 +00:00
jochen
12d20bdd31 Add v8_enable_verify_predictable gn args (mirroring the gyp var)
R=machenbach@chromium.org
BUG=chromium:645890

Review-Url: https://codereview.chromium.org/2614983002
Cr-Commit-Position: refs/heads/master@{#42093}
2017-01-05 15:01:30 +00:00
epertoso
c16ca32e5f Revert of [turbofan] Improve codegen for 8- and 16-bit memory comparisons on Intel platforms (patchset #3 id:40001 of https://codereview.chromium.org/2605863002/ )
Reason for revert:
Breaks wasm benchmark (http://crbug.com/v8/5798).

Original issue's description:
> [turbofan] Improve codegen for 8- and 16-bit memory comparisons on Intel platforms
>
> Recognize and emit in-memory comparisons of 8-bit and 16-bit values with
> immediate values that fit.
>
> LOG=N
> R=epertoso@chromium.org
>
> Review-Url: https://codereview.chromium.org/2605863002
> Cr-Commit-Position: refs/heads/master@{#41971}
> Committed: be11812c53

TBR=danno@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/2618443003
Cr-Commit-Position: refs/heads/master@{#42092}
2017-01-05 14:58:01 +00:00
jochen
a5440323a2 Add a flag for printf debugging the compiler dispatcher
BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2618503002
Cr-Commit-Position: refs/heads/master@{#42091}
2017-01-05 12:28:26 +00:00