Commit Graph

46 Commits

Author SHA1 Message Date
mstarzinger
ab5379074d [parser] Deprecate ParseInfo constructor taking closure.
This removes the {ParseInfo} constructor consuming a closure, replacing
all uses to pass only the shared function info. The goal is to make the
fact that parsing is independent of a concrete closure explicit.

R=jochen@chromium.org
BUG=v8:2206

Committed: https://crrev.com/3de42b3f224217ec88e4c609d3cf23fe06806dca
Review-Url: https://codereview.chromium.org/2396963003
Cr-Original-Commit-Position: refs/heads/master@{#40083}
Cr-Commit-Position: refs/heads/master@{#40353}
2016-10-17 10:27:29 +00:00
hablich
234f1a84b7 Revert of [parser] Deprecate ParseInfo constructor taking closure. (patchset #2 id:20001 of https://codereview.chromium.org/2396963003/ )
Reason for revert:
Needed to revert https://codereview.chromium.org/2400343002/

Original issue's description:
> [parser] Deprecate ParseInfo constructor taking closure.
>
> This removes the {ParseInfo} constructor consuming a closure, replacing
> all uses to pass only the shared function info. The goal is to make the
> fact that parsing is independent of a concrete closure explicit.
>
> R=jochen@chromium.org
> BUG=v8:2206
>
> Committed: https://crrev.com/3de42b3f224217ec88e4c609d3cf23fe06806dca
> Cr-Commit-Position: refs/heads/master@{#40083}

TBR=jochen@chromium.org,bmeurer@chromium.org,marja@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:2206

Review-Url: https://codereview.chromium.org/2406623002
Cr-Commit-Position: refs/heads/master@{#40097}
2016-10-07 21:13:34 +00:00
mstarzinger
3de42b3f22 [parser] Deprecate ParseInfo constructor taking closure.
This removes the {ParseInfo} constructor consuming a closure, replacing
all uses to pass only the shared function info. The goal is to make the
fact that parsing is independent of a concrete closure explicit.

R=jochen@chromium.org
BUG=v8:2206

Review-Url: https://codereview.chromium.org/2396963003
Cr-Commit-Position: refs/heads/master@{#40083}
2016-10-07 12:26:54 +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
marja
0645135446 Separate CompilationInfo into its own file.
This way, many files which only need CompilationInfo but not compiler.h
and its dependencies can include just compilation-info.h.

BUG=

Review-Url: https://codereview.chromium.org/2284313003
Cr-Commit-Position: refs/heads/master@{#39038}
2016-08-31 08:49:59 +00:00
marja
f9d6076115 Cleanup: Move ParseInfo to a separate file.
This makes us able to get rid of dependencies to parser.h from places
which only need the ParseInfo, and also gets rid of the curious Parser
<-> Compiler circular dependency.

Also IWYUd where necessary.

BUG=

Review-Url: https://codereview.chromium.org/2268513002
Cr-Commit-Position: refs/heads/master@{#38777}
2016-08-22 11:33:58 +00:00
jarin
406146ff5c [stubs] ToNumberStub --> ToNumber builtin.
This makes sure we do not compile ToNumber stub on demand. This makes it
easier to use during concurrent compilation.

Review-Url: https://codereview.chromium.org/2051113002
Cr-Commit-Position: refs/heads/master@{#36870}
2016-06-09 15:38:21 +00:00
clemensh
c32b202014 Pass debug name as Vector instead of const char*
This allows to also pass non-null-terminated values, and values containing null
characters. Both might happen in wasm.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35795}
2016-04-26 14:37:05 +00:00
mstarzinger
1407c89427 [parser] Remove ParseInfo::closure field.
The parser should never need to look at the underlying closure object,
hence the field can be moved from ParseInfo into CompilationInfo.

R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#35358}
2016-04-08 12:32:23 +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
mstarzinger
46bd989a3a [compiler] Unify naming of methods in compiler API.
This is a pure refactoring and renaming of methods in the compiler API
with the goal to increase readability. Also the compiler API is moved to
the top of the file, as it is the central piece in that file.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34579}
2016-03-08 12:09:10 +00:00
danno
d1d0196473 [compiler] Remove CodeStub from CompilationInfo
The motivation for this is that CompilationInfo really shouldn't
explicitly know anything about CodeStubs. This is evident in
the TurboFan stubs pipeline, which only needs to pass down
information about Code::Flags to the code generator and not
any of the CallInterfaceDescriptor silliness that Hydrogen has
to push around, since TF has the Linkage class that
encapsulates everything that is needed for the stub ABI. So,
instead of threading CodeStub machinery through the TF stub
pipeline, it is now removed from CompilationInfo and replaced
by only the explicit bits needed both by the Crankshaft and
TF pipelines in code generation.

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

Cr-Commit-Position: refs/heads/master@{#33410}
2016-01-20 15:18:14 +00:00
jochen
6f472db65a Disable soon to be deprecated APIs per default for v8
Embedders still can use those APIs by default

test-api.cc still has an exception to use the old APIs...

BUG=v8:4143
R=vogelheim@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32701}
2015-12-09 10:35:04 +00:00
rossberg
199bbdb40f Create ast/ and parsing/ subdirectories and move appropriate files
Moves all files related to AST and scopes into ast/,
and all files related to scanner & parser to parsing/.

Also eliminates a couple of spurious dependencies.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32351}
2015-11-26 16:23:07 +00:00
mstarzinger
16f133001f Move compiler cctests into v8::internal::compiler namespace.
This moves all cctest files for the compiler to live in the same
namespace as the components they are testing. Hence we can avoid the
forbidden using directives pulling in entire namespaces.

From the Google C++ style guide: "You may not use a using-directive to
make all names from a namespace available". This would be covered by
presubmit linter checks if build/namespaces were not blacklisted.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31671}
2015-10-30 09:16:39 +00:00
mstarzinger
9ada38b4c6 Remove obsolete src/v8.h include from compiler cctests.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31632}
2015-10-28 13:32:30 +00:00
mstarzinger
4a2bb8903b Remove deprecated API usage from compiler cctests.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31630}
2015-10-28 13:09:55 +00:00
jochen
5587656155 Map v8::Function to JSReceiver + IsCallable
BUG=none
LOG=y
R=verwaest@chromium.org,bmeurer@chromium.org,rossberg@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng

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

Cr-Commit-Position: refs/heads/master@{#31519}
2015-10-23 12:27:06 +00:00
bmeurer
6db78c8065 [turbofan] Drop V8_TURBOFAN_BACKEND and V8_TURBOFAN_TARGET defines.
TurboFan is now a requirement and supported by all backends, so we don't
need those macros (plus all the machinery on top) anymore.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30082}
2015-08-10 07:17:34 +00:00
titzer
44bfb4b57e [turbofan] Simplifying handling of callee-cleanup stack area.
R=danno@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29957}
2015-07-31 15:18:52 +00:00
erikcorry
4f5337a2b6 Cosmetic changes to tests to make it easier to concatenate them.
When compiling on a laptop I like to concatenate the small test files.
This makes a big difference to compile times. These changes make that
easier.

R=ulan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28742}
2015-06-01 22:47:08 +00:00
horo
c5eb9573e7 [V8] Added Script::is_opaque flag for embedders
When the page is controlled by a ServiceWorker, the ServiceWorker can return an opaque (non-CORS cross origin) resource response.
We need to treat the messages from such script resource as opaque.

Committed: https://crrev.com/7a599c5e1242d3c5ab7515ee149623da90ae69ec
Cr-Commit-Position: refs/heads/master@{#28445}

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

Cr-Commit-Position: refs/heads/master@{#28459}
2015-05-19 03:11:23 +00:00
machenbach
91f38435ea Revert of [V8] Added Script::is_opaque flag for embedders (patchset #5 id:80001 of https://codereview.chromium.org/1140673002/)
Reason for revert:
[Sheriff] Breaks chromium win compilation:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Win/builds/96

Original issue's description:
> [V8] Added Script::is_opaque flag for embedders
>
> When the page is controlled by a ServiceWorker, the ServiceWorker can return an opaque (non-CORS cross origin) resource response.
> We need to treat the messages from such script resource as opaque.
>
> Committed: https://crrev.com/7a599c5e1242d3c5ab7515ee149623da90ae69ec
> Cr-Commit-Position: refs/heads/master@{#28445}

TBR=mkwst@chromium.org,jochen@chromium.org,yangguo@chromium.org,horo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28449}
2015-05-18 14:54:42 +00:00
horo
7a599c5e12 [V8] Added Script::is_opaque flag for embedders
When the page is controlled by a ServiceWorker, the ServiceWorker can return an opaque (non-CORS cross origin) resource response.
We need to treat the messages from such script resource as opaque.

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

Cr-Commit-Position: refs/heads/master@{#28445}
2015-05-18 13:54:24 +00:00
mstarzinger
1fefa31df6 Remove CompilationInfoWithZone from public API.
This removes the CompilationInfoWithZone class from the header file
because it is more than a pure convenience class and shouldn't be used
outside of the compiler at all.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27411}
2015-03-24 14:17:17 +00:00
mstarzinger
7421c7f598 Remove dangerous constructor from CompilationInfoWithZone.
This removes the stub-based constructor from CompilationInfoWithZone
as this class is more than a pure convenience class and only by chance
doesn't have an effect in the destructor.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27376}
2015-03-23 17:30:45 +00:00
yurys
e33ae81ce1 Allow passing sourceMapUrl when compiling scripts
According to Source Map specification [1] source map url can be passed either as a magic comment at the end of script or as SourceMap http header. We already parse the former value and expose it on Script object. This change allows to unify the way we deal with source map urls received in http header by providing api for passing that url into the script being compiled.

source_map_url is intentionally not passed into CompilationCacheScript::Lookup. The cache is anyways disabled when debugger is on.

[1] https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit

LOG=Y
BUG=chromium:462572

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

Cr-Commit-Position: refs/heads/master@{#27017}
2015-03-05 13:03:57 +00:00
svenpanne
222001ace4 Removed one bogus CompilationInfo constructor.
Use a fake code stub instead, basically following the null object pattern.

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

Cr-Commit-Position: refs/heads/master@{#26610}
2015-02-12 12:57:19 +00:00
svenpanne
d1b5aa0716 Removed most of the bogus CompilationInfo constructor calls.
A CompilationInfo constructed from just an Isolate* and a Zone* is in
weird an inconsistent state (calling e.g. flags() on it will crash),
so we need to avoid them. This CL removes almost all of them, the
remaining 2 call sites in (for testing only) will be handled in a
separate CL. Things which have been changed:

  * Linkage is basically a decorator for CallDescriptor now.

  * ChangeLowering doesn't need Linkage at all.

  * JSGenericLowering doesn't need a full CompilationInfo*, just a
    single flag.

  * JSContextSpecializer doesn't need the full CompilationInfo, just a
    Context.

  * Removed unused CompilationInfo from SimplifiedLoweringTester.

This nicely decouples things already a bit more, but there's still
work to do...

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

Cr-Commit-Position: refs/heads/master@{#26580}
2015-02-11 14:12:15 +00:00
svenpanne
41e74ad4e8 Relaxed parameter types a bit.
Somehow these changes didn't make it into https://codereview.chromium.org/915583002 ... :-/

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

Cr-Commit-Position: refs/heads/master@{#26567}
2015-02-11 08:52:38 +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
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
kozyatinskiy
eaae397c42 [V8] Added Script::is_debugger_script flag for embedders
In DevTools we need one more flag for script origin - is debugger script. We already have "is shared origin" flag. The new flag added by analogy with the old but new has accessor in script object.

R=yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26324}
2015-01-29 14:01:33 +00:00
mstarzinger
70093d719c De-generify the GenericNode.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25572}
2014-11-28 15:21:44 +00:00
mstarzinger
6d41045ba4 Enable TurboFan for Win64 targets.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25437}
2014-11-20 11:51:11 +00:00
titzer@chromium.org
c62bb3e2eb Now with more checkings! Skip the CallFunctionStub when the callee function can be statically determined.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25062}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 10:22:44 +00:00
jarin@chromium.org
6935e0131c Revert "Skip the CallFunctionStub when the callee function can be statically determined."
This reverts commit 9845dfadd2 (r25042) for failing tests.

TBR=titzer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25044}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-31 19:06:18 +00:00
titzer@chromium.org
9845dfadd2 Skip the CallFunctionStub when the callee function can be statically determined.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25042}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-31 16:36:13 +00:00
titzer@chromium.org
6c6a71b3f7 Move input/output counts directly into Operators, simplying OperatorProperties.
This is a first step to refactoring OperatorProperties out of existence.
The next step is to inline OperatorProperties::GetXXXCount into the callers.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#24983}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 14:41:18 +00:00
jarin@chromium.org
167fa99716 Revert "[turbofan] Merge GenericNode with Node."
This reverts commit a238443c00 (r24915)
for tanking benchmarks.

TBR=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#24916}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 22:34:44 +00:00
jarin@chromium.org
a238443c00 [turbofan] Merge GenericNode with Node.
BUG=
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24915}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 20:37:47 +00:00
dcarney@chromium.org
91f4962343 [turbofan] reduce allocations outside of pipeline
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24904}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 12:40:13 +00:00
titzer@chromium.org
e1a948a6f8 Convert Linkage to use MachineSignature.
This simplifies the handling of MachineTypes for parameters and returns
used in tests, and overall improves the regularity with which they
are handled in both tests and in CallDescriptor.

R=bmeurer@chromium.org, jarin@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-03 10:13:21 +00:00
danno@chromium.org
a1383e2250 Land the Fan (disabled)
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-30 13:54:45 +00:00