Commit Graph

143 Commits

Author SHA1 Message Date
yangguo
faf5f52627 [debugger,api] deprecate everything in v8-debug.h
R=clemensh@chromium.org, jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2727393003
Cr-Commit-Position: refs/heads/master@{#43714}
2017-03-10 07:06:25 +00:00
cbruni
89f159b042 [runtime] Port simple String.prototype.indexOf cases to TF Builtin
Many websites use simple calls to String.prototype.indexOf with either a
one character ASCII needle or needles bigger than the search string. This
CL adds a TFJ builtin for these simple cases, giving up to factor 5 speedup.

Drive-by-fix: Add default Object type to Arguments.at

BUG=

Review-Url: https://codereview.chromium.org/2539093002
Cr-Commit-Position: refs/heads/master@{#41760}
2016-12-16 13:24:07 +00:00
yangguo
62937cf533 [test] Speed up some slow tests.
- split up cctest/test-api/Threading*
- shortened mjsunit/math-floor-part*
- split up cctest/test-serialize/CustomSnapshotDataBlob
- skipped mjsunit/regress/regress-crbug-474297 unless gc-stress
- shortened cctest/test-serialize/CodeSerializerLargeCodeObject

R=jkummerow@chromium.org

Review-Url: https://codereview.chromium.org/2470143004
Cr-Commit-Position: refs/heads/master@{#40753}
2016-11-04 09:04:28 +00:00
heimbuef
7a4f8e4d83 Moved zones and zone related stuff in its own directory.
This is some initial cleanup to keep /src clean. The
AccountingAllocator is actually exclusively used by zones and this
common subfolder makes that more clear.

BUG=v8:5409

Review-Url: https://codereview.chromium.org/2344143003
Cr-Commit-Position: refs/heads/master@{#39558}
2016-09-20 16:08:07 +00:00
ulan
1b26611ce9 [heap] Introduce enum of garbage collection reasons.
Now callers of Heap::CollectGarbage* functions need to
specify the reason as an enum value instead of a string.

Subsequent CL will add stats counter for GC reason.

BUG=

Review-Url: https://codereview.chromium.org/2310143002
Cr-Commit-Position: refs/heads/master@{#39239}
2016-09-07 10:03:08 +00:00
marja
8e7241fdde Include only stuff you need, part 6: Fix cctest.h.
Rebuilding (after touching certain files) is crazy slow because
includes are out of control. Many of these files we need to rebuild are
cctests which pull in more includes than they need.

BUG=v8:5294

Review-Url: https://codereview.chromium.org/2304553002
Cr-Commit-Position: refs/heads/master@{#39080}
2016-09-01 12:02:16 +00:00
jochen
cb7aa79b12 Expose a lower bound of malloc'd memory via heap statistics
We expect that the majority of malloc'd memory held by V8 is allocated
in Zone objects. Introduce an Allocator class that is used by Zones to
manage memory, and allows for querying the current usage.

BUG=none
R=titzer@chromium.org,bmeurer@chromium.org,jarin@chromium.org
LOG=n
TBR=rossberg@chromium.org

Review URL: https://codereview.chromium.org/1847543002

Cr-Commit-Position: refs/heads/master@{#35196}
2016-04-01 10:01:56 +00:00
machenbach
76876b9ae9 [test] Remove dependent commands.
BUG=

Review URL: https://codereview.chromium.org/1753803003

Cr-Commit-Position: refs/heads/master@{#34428}
2016-03-02 13:14:13 +00:00
vogelheim
5819e4be5b Re-re-land FastAccessorBuilder.
... using the RawMachineAssembler and the work in crrev.com/1407313004.

The original change collided with crrev.com/1513543003.

BUG=chromium:508898
LOG=Y

Committed: https://crrev.com/515d9ccd8e6df7bf2ca01e2a55aaad30226399e1
Cr-Commit-Position: refs/heads/master@{#32742}

patch from issue 1474543004 at patchset 260001 (http://crrev.com/1474543004#ps260001)

Committed: https://crrev.com/ee5c38d7db907ff86dd4049721c0cb4bc90a6c4d
Cr-Commit-Position: refs/heads/master@{#32753}

patch from issue 1504713012 at patchset 20001 (http://crrev.com/1504713012#ps20001)

Review URL: https://codereview.chromium.org/1518703002

Cr-Commit-Position: refs/heads/master@{#32786}
2015-12-11 09:54:00 +00:00
vogelheim
f564231a6b Revert of Re-land FastAccessorBuilder. (patchset #2 id:20001 of https://codereview.chromium.org/1504713012/ )
Reason for revert:
Meeh. Now "V8 Linux - gcmole" bot has issues; apparently due to a somewhat exotic builder configuration.

Original issue's description:
> Re-land FastAccessorBuilder.
>
> ... using the RawMachineAssembler and the work in crrev.com/1407313004.
>
> The original change collided with crrev.com/1513543003.
>
> BUG=chromium:508898
> LOG=Y
>
> Committed: https://crrev.com/515d9ccd8e6df7bf2ca01e2a55aaad30226399e1
> Cr-Commit-Position: refs/heads/master@{#32742}
>
> patch from issue 1474543004 at patchset 260001 (http://crrev.com/1474543004#ps260001)
>
> Committed: https://crrev.com/ee5c38d7db907ff86dd4049721c0cb4bc90a6c4d
> Cr-Commit-Position: refs/heads/master@{#32753}

TBR=epertoso@chromium.org,mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:508898

Review URL: https://codereview.chromium.org/1517683002

Cr-Commit-Position: refs/heads/master@{#32754}
2015-12-10 14:45:55 +00:00
vogelheim
ee5c38d7db Re-land FastAccessorBuilder.
... using the RawMachineAssembler and the work in crrev.com/1407313004.

The original change collided with crrev.com/1513543003.

BUG=chromium:508898
LOG=Y

Committed: https://crrev.com/515d9ccd8e6df7bf2ca01e2a55aaad30226399e1
Cr-Commit-Position: refs/heads/master@{#32742}

patch from issue 1474543004 at patchset 260001 (http://crrev.com/1474543004#ps260001)

Review URL: https://codereview.chromium.org/1504713012

Cr-Commit-Position: refs/heads/master@{#32753}
2015-12-10 14:15:19 +00:00
vogelheim
0a50af8625 Revert of Implement Fast Accessor Builder (patchset #14 id:260001 of https://codereview.chromium.org/1474543004/ )
Reason for revert:
Broke the build, apparently.

Original issue's description:
> Implement FastAccessorBuilder.
>
> ... using the RawMachineAssembler and the work in cl/1407313004
>
> BUG=chromium:508898
> LOG=Y
>
> Committed: https://crrev.com/515d9ccd8e6df7bf2ca01e2a55aaad30226399e1
> Cr-Commit-Position: refs/heads/master@{#32742}

TBR=epertoso@chromium.org,bmeurer@chromium.org,jochen@chromium.org,mstarzinger@chromium.org,mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:508898

Review URL: https://codereview.chromium.org/1513203002

Cr-Commit-Position: refs/heads/master@{#32744}
2015-12-10 10:16:35 +00:00
vogelheim
515d9ccd8e Implement FastAccessorBuilder.
... using the RawMachineAssembler and the work in cl/1407313004

BUG=chromium:508898
LOG=Y

Review URL: https://codereview.chromium.org/1474543004

Cr-Commit-Position: refs/heads/master@{#32742}
2015-12-10 10:10:11 +00:00
mlippautz
8ad016d361 [cctest] Move most heap related tests to test/cctest/heap and clean wrt IWYU
* Move most heap related tests into heap/ subdir
* IWYU for heap utility functions

R=ulan@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1512553002

Cr-Commit-Position: refs/heads/master@{#32706}
2015-12-09 11:26:15 +00:00
jochen
6c0d1a1100 Pass explicit Isolate parameter to v8::Debug methods that need it
BUG=v8:2487
LOG=n
R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/1496493002

Cr-Commit-Position: refs/heads/master@{#32509}
2015-12-02 12:47:41 +00:00
vogelheim
fd73cb191c Remove usage of deprecated APIs from test-api.cc.
No more deprecation warnings up to line 11k.

BUG=

Review URL: https://codereview.chromium.org/1427643005

Cr-Commit-Position: refs/heads/master@{#32334}
2015-11-26 12:44:39 +00:00
yangguo
6980f1957d Do not use deprecated API in cctest/test-debug.
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1459783005

Cr-Commit-Position: refs/heads/master@{#32115}
2015-11-19 13:46:16 +00:00
ofrobots
7b704c4f9b [heap] inline allocation steps refactor
Expose the steps for incremental marking and idle scavenge more directly in
NewSpace. Adjust the NewSpace and Heap interfaces to allow callers to be more
clear about how they are interacting with inline allocation steps. This refactor
prepares the ground for more consumers of inline allocation steps (e.g. sampling
heap profiler.)

R=hpayer@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1404523002

Cr-Commit-Position: refs/heads/master@{#31814}
2015-11-05 04:45:33 +00:00
ulan
27d23eee12 Add the rate of js invocations from the api as a signal of idleness
for starting major GC in the memory reducer.

BUG=

Review URL: https://codereview.chromium.org/1414483004

Cr-Commit-Position: refs/heads/master@{#31655}
2015-10-29 14:00:04 +00:00
hpayer
6074b32608 [heap] Convert overapproximate weak closure phase into finalize incremental marking phase and revisit the root set there.
BUG=chromium:548562
LOG=n

Review URL: https://codereview.chromium.org/1428683002

Cr-Commit-Position: refs/heads/master@{#31627}
2015-10-28 12:05:58 +00:00
hpayer
5d125f218a [heap] Reland prepare code for smaller large object allocation limit than max allocatable memory.
BUG=

Review URL: https://codereview.chromium.org/1393833002

Cr-Commit-Position: refs/heads/master@{#31136}
2015-10-07 09:14:13 +00:00
machenbach
9af0174f03 Revert of [heap] Prepare code for smaller large object allocation limit than max allocatable memory. (patchset #10 id:180001 of https://codereview.chromium.org/1361853005/ )
Reason for revert:
[Sheriff] Need to revert for reverting https://codereview.chromium.org/1358703003/

Original issue's description:
> [heap] Prepare heap for smaller large object allocation limit than max allocatable memory.
>
> BUG=chromium:524425
> LOG=n
>
> Committed: https://crrev.com/c2bce747993c445daf78975392e587bff20c6677
> Cr-Commit-Position: refs/heads/master@{#31107}

TBR=mlippautz@chromium.org,mstarzinger@chromium.org,hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:524425

Review URL: https://codereview.chromium.org/1376413005

Cr-Commit-Position: refs/heads/master@{#31129}
2015-10-06 17:11:38 +00:00
hpayer
c2bce74799 [heap] Prepare heap for smaller large object allocation limit than max allocatable memory.
BUG=chromium:524425
LOG=n

Review URL: https://codereview.chromium.org/1361853005

Cr-Commit-Position: refs/heads/master@{#31107}
2015-10-05 17:04:10 +00:00
mstarzinger
6a20034d24 [presubmit] Fix whitespace/semicolon linter violations.
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1365803004

Cr-Commit-Position: refs/heads/master@{#30963}
2015-09-28 08:18:49 +00:00
ulan
6256dc53cc Perform scavenge in idle tasks.
BUG=chromium:490559
LOG=NO

Review URL: https://codereview.chromium.org/1352453004

Cr-Commit-Position: refs/heads/master@{#30944}
2015-09-25 14:49:23 +00:00
jochen
c161799f2c Start removing deprecated APIs from cctest
BUG=4134
R=vogelheim@chromium.org,rmcilroy@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1333463002

Cr-Commit-Position: refs/heads/master@{#30622}
2015-09-07 14:44:56 +00:00
mstarzinger
5f57ebe222 Make isolate.h usable without objects-inl.h header.
This CL us a pure refactoring that makes an empty compilation unit
including just "isolate.h" or "contexts.h" but not "objects-inl.h"
compile without warnings or errors. This is needed to further reduce
the header dependency tangle.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1322883002

Cr-Commit-Position: refs/heads/master@{#30500}
2015-09-01 09:25:27 +00:00
mlippautz
1507da8d28 [heap] Make the current GCCallbackFlags are part of {Heap}.
Moves the GCCallbackflags where they belong, i.e., {Heap}, and gets rid of
IncrementalMarking::Start() callsites.

BUG=

Review URL: https://codereview.chromium.org/1314853002

Cr-Commit-Position: refs/heads/master@{#30349}
2015-08-25 10:59:56 +00:00
mlippautz
477f5a81f0 [heap,cctest] Get rid of protected-for-sake-of-testing scope.
BUG=

Review URL: https://codereview.chromium.org/1293283003

Cr-Commit-Position: refs/heads/master@{#30301}
2015-08-21 12:40:33 +00:00
hpayer
43f3303838 Record slots in large objects.
BUG=

Review URL: https://codereview.chromium.org/1296713007

Cr-Commit-Position: refs/heads/master@{#30299}
2015-08-21 11:41:52 +00:00
mstarzinger
98a0fe0f32 Remove grab-bag includes of v8.h from everywhere.
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1285183010

Cr-Commit-Position: refs/heads/master@{#30263}
2015-08-20 07:44:15 +00:00
jianghua.yjh
94ee6b1ba2 fix StrDup memory leak in CcTest
BUG=

Review URL: https://codereview.chromium.org/1287023002

Cr-Commit-Position: refs/heads/master@{#30191}
2015-08-17 11:30:40 +00:00
adamk
d746dbfed7 [api] Delete non-maybe version of CompileModule
Also add a bigger warning to the header comment for the Maybe version.

R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1276353003

Cr-Commit-Position: refs/heads/master@{#30137}
2015-08-12 16:43:17 +00:00
mstarzinger
00a07bc1b7 Remove inline header includes from non-inline headers (1).
This tries to remove includes of "-inl.h" headers from normal ".h"
headers, thereby reducing the chance of any cyclic dependencies and
decreasing the average size of our compilation units.

Note that this change still leaves 7 violations of that rule in the
code. However there now is the "tools/check-inline-includes.sh" tool
detecting such violations.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1283033003

Cr-Commit-Position: refs/heads/master@{#30125}
2015-08-12 07:32:54 +00:00
epertoso
e6e53390cc Let the second pass phantom callbacks run in a separate task on the foreground thread.
R=jochen@chromium.org
LOG=y
BUG=

Review URL: https://codereview.chromium.org/1209403005

Cr-Commit-Position: refs/heads/master@{#29680}
2015-07-15 12:26:11 +00:00
erikcorry
6ba8455e63 Put getter functions on Script line-endings objects
This is a step towards having Blink no longer look directly at the
line endings array.  That prevented https://codereview.chromium.org/1137683003/
from landing.  Next step, after the roll, will be using these
functions in Blink.
R=jochen@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1213783002

Cr-Commit-Position: refs/heads/master@{#29330}
2015-06-26 14:59:07 +00:00
yangguo
75350f1ef0 Debugger: require debugger to be active when dealing with breaks.
This invariant will save us some head ache.
The changes to test-debug/DebugStub is due to the fact that it abuses
the ability to set break points in code that has no debug break slots.
This is now no longer possible.

R=ulan@chromium.org
BUG=v8:4132
LOG=N

Review URL: https://codereview.chromium.org/1181013007

Cr-Commit-Position: refs/heads/master@{#29038}
2015-06-16 07:11:21 +00:00
bbudge
f9dd3446da Add new Float32x4 type for SIMD.js.
LOG=N
BUG=v8:4124

Review URL: https://codereview.chromium.org/1153373003

Cr-Commit-Position: refs/heads/master@{#28797}
2015-06-03 23:56:33 +00:00
machenbach
67c0dcbe1b Revert of Revert of Pass GC flags to incremental marker and start incremental marking with (patchset #1 id:1 of https://codereview.chromium.org/1151143002/)
Reason for revert:
Wasn't the reason...

Original issue's description:
> Revert of Pass GC flags to incremental marker and start incremental marking with (patchset #3 id:40001 of https://codereview.chromium.org/1156463002/)
>
> Reason for revert:
> [Sheriff] Speculative revert because chromebook is really misbehaving:
> http://build.chromium.org/p/client.v8/builders/V8%20Arm/builds/2109
>
> I also triggered a retry with the failing build to be sure. If the revert doesn't help or the bot had a scary hiccup, this can reland.
>
> Original issue's description:
> > Pass GC flags to incremental marker and start incremental marking with
> > reduce memory footprint in idle notification.
> >
> > BUG=
> >
> > Committed: https://crrev.com/4656308147b12405037678b1ab192fb4f2437bbc
> > Cr-Commit-Position: refs/heads/master@{#28567}
>
> TBR=hpayer@chromium.org,ulan@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=
>
> Committed: https://crrev.com/634c58a4f10b346a98208ec34d169e1bdb04e1b7
> Cr-Commit-Position: refs/heads/master@{#28568}

TBR=hpayer@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1157613002

Cr-Commit-Position: refs/heads/master@{#28569}
2015-05-22 05:51:50 +00:00
machenbach
634c58a4f1 Revert of Pass GC flags to incremental marker and start incremental marking with (patchset #3 id:40001 of https://codereview.chromium.org/1156463002/)
Reason for revert:
[Sheriff] Speculative revert because chromebook is really misbehaving:
http://build.chromium.org/p/client.v8/builders/V8%20Arm/builds/2109

I also triggered a retry with the failing build to be sure. If the revert doesn't help or the bot had a scary hiccup, this can reland.

Original issue's description:
> Pass GC flags to incremental marker and start incremental marking with
> reduce memory footprint in idle notification.
>
> BUG=
>
> Committed: https://crrev.com/4656308147b12405037678b1ab192fb4f2437bbc
> Cr-Commit-Position: refs/heads/master@{#28567}

TBR=hpayer@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1151143002

Cr-Commit-Position: refs/heads/master@{#28568}
2015-05-21 20:34:22 +00:00
ulan
4656308147 Pass GC flags to incremental marker and start incremental marking with
reduce memory footprint in idle notification.

BUG=

Review URL: https://codereview.chromium.org/1156463002

Cr-Commit-Position: refs/heads/master@{#28567}
2015-05-21 18:23:14 +00:00
hpayer
055d4ee19c Clean-up aligned allocation logic.
BUG=

Review URL: https://codereview.chromium.org/1138643005

Cr-Commit-Position: refs/heads/master@{#28430}
2015-05-15 17:04:41 +00:00
jochen
9ba5fe028f Pass ArrayBuffer::Allocator via Isolate::CreateParams
We shouldn't have shared state between isolates by default. The embedder
is free to pass the same allocator to all isolates it creates.

BUG=none
R=dcarney@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1116633002

Cr-Commit-Position: refs/heads/master@{#28127}
2015-04-29 09:54:43 +00:00
svenpanne
4d3044e161 Removed src/{isolate,property-details,utils}-inl.h
Baby steps towards saner #includes...

Review URL: https://codereview.chromium.org/1051393003

Cr-Commit-Position: refs/heads/master@{#27958}
2015-04-21 10:21:37 +00:00
jochen
fe3544b370 Make tests pass with weak closure overapproximation enabled
BUG=v8:3862
R=hpayer@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1014873002

Cr-Commit-Position: refs/heads/master@{#27261}
2015-03-18 10:01:36 +00:00
adamk
70079dab13 Add basic compilation support for modules
This adds an "experimental" API hook (v8::ScriptCompiler::CompileModule)
allowing compilation of modules. The code gen is incredibly basic: the
module body is represented by a Block in the AST. But this at least gets
more of the pipeline working, and opens the door to writing mjsunit tests
(once d8 is modified to support module compilation).

BUG=v8:1569
LOG=n

Review URL: https://codereview.chromium.org/902093002

Cr-Commit-Position: refs/heads/master@{#26496}
2015-02-06 17:52:38 +00:00
caitpotter88
b5c43674f9 Update harmony ObjectProtoToString() to 2/2/2015 spec
Applies to API implementation of O.p.toString

- Removes special handling of non-string @@toStringTag values (use builtinTag)
- Removes special handling of @@toStringTags which match [[Class]] names (remove ~ prefix)
- Add tests for non-string @@toStringTag values in test-api.cc

BUG=v8:3502
R=arv@chromium.org
LOG=N

Review URL: https://codereview.chromium.org/892393003

Cr-Commit-Position: refs/heads/master@{#26415}
2015-02-03 21:05:25 +00:00
bmeurer
c65ae4f10c Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/877753007

Cr-Commit-Position: refs/heads/master@{#26346}
2015-01-30 09:29:41 +00:00
Benedikt Meurer
883852293a Revert "Make GCC happy again." and "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
This reverts commit 6a4c0a3bae and commit
0deaa4b629 for breaking GCC bots.

TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/893533003

Cr-Commit-Position: refs/heads/master@{#26342}
2015-01-30 07:19:57 +00:00
bmeurer
0deaa4b629 Initial switch to Chromium-style CHECK_* and DCHECK_* macros.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/888613002

Cr-Commit-Position: refs/heads/master@{#26340}
2015-01-30 06:25:36 +00:00