Commit Graph

260 Commits

Author SHA1 Message Date
machenbach@chromium.org
6ccf6f8bf8 Revert "Support external startup data in V8."
This reverts commit r21696 for breaking chromium windows compilation in the chromium cq.

Conflicts:
	src/d8.cc

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-10 10:51:33 +00:00
vogelheim@chromium.org
ba9f391bc0 Support external startup data in V8.
[Retry of crrev.com/293993021, which caused problems with 'ninja all' in Chromium. First patch set if a clean apply
of crrev.com/293993021. Subsequent sets are the actual fix
for that issue.]

If the embedder chooses, the 'natives' (library sources) and the
precompiled startup blob can be written to files during the build
process and handed over to V8 at startup. The main purpose would be
to reduce the size of the compiled binary for space constrained
platforms.

The build-time option is off by default. Nothing should change if
it's not enabled.

BUG=
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-05 13:06:21 +00:00
mvstanton@chromium.org
e039477000 Revert "Support external startup data in V8."
This reverts commit r21646, as it blocks pushing to chromium.

TBR=vogelheim@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-04 08:35:42 +00:00
vogelheim@chromium.org
61509aaea5 Support external startup data in V8.
If the embedder chooses, the 'natives' (library sources) and the
precompiled startup blob can be written to files during the build
process and handed over to V8 at startup. The main purpose would be
to reduce the size of the compiled binary for space constrained
platforms.

The build-time option is off by default. Nothing should change if
it's not enabled.

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-03 14:38:35 +00:00
jochen@chromium.org
56a486c322 Use full include paths everywhere
- this avoids using relative include paths which are forbidden by the style guide
- makes the code more readable since it's clear which header is meant
- allows for starting to use checkdeps

BUG=none
R=jkummerow@chromium.org, danno@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-03 08:12:43 +00:00
jkummerow@chromium.org
f6a249c6d0 Inlined optimized runtime functions: expose Runtime versions for direct testing, skip Hydrogen versions
R=dslomov@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-30 17:07:38 +00:00
jochen@chromium.org
84e078e561 Reland 21502 - "Move OS::MemCopy and OS::MemMove out of platform to utils"
Verified that arm builds locally.

BUG=none
TBR=jkummerow@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-27 07:57:22 +00:00
jochen@chromium.org
eabd5a19b9 Revert 21502 - "Move OS::MemCopy and OS::MemMove out of platform to utils"
TBR=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-26 19:56:27 +00:00
jochen@chromium.org
a5a21a0da4 Move OS::MemCopy and OS::MemMove out of platform to utils
Since both are jitted on some platforms and depend on codegen, they
don't belong to the platform abstraction. At the same time, I can't put
them to codegen.h, as this would introduce cyclic dependencies.

BUG=none
R=jkummerow@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-26 19:33:15 +00:00
hpayer@chromium.org
6ed0102b1d Remove high promotion mode.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-26 12:58:55 +00:00
yangguo@chromium.org
d0398c08ce Make serializer non-static.
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-22 09:36:20 +00:00
yangguo@chromium.org
6fd69c2476 Remove special debug ExternalReferences.
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-22 07:57:33 +00:00
alph@chromium.org
a7e816db28 Introduce a separate event for CodeDeopt
The reuse of CodeCreateEvent for deopt events caused a CodeCreateEvent
fired twice for a code object. When the event was processed for the first
time it seized the no-fp-ranges from code object, so the second event
had no ranges info leaving code entry without them.
As a result when a cpu profile sample falls into the region it missed the
2nd stack frame.

LOG=N
BUG=
R=bmeurer@chromium.org, loislo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-22 05:36:27 +00:00
yangguo@chromium.org
db904a20da Always initialize the debugger eagerly.
There is no point doing it lazily, since compiling and executing the tiniest piece of code triggers lazy init.
Also removed some dead code.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-05 07:10:38 +00:00
svenpanne@chromium.org
4dca23f825 Added a Isolate* parameter to Serializer::enabled().
This parameter will soon be used when a few pseudo-classes like
Serializer are turned into real classes. The current CL is already big
enough, untying our Gordian knot called "startup" will continue...

BUG=359977
LOG=y
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 09:50:58 +00:00
ulan@chromium.org
1a2d652658 Remove old-style accessor support from runtime.
BUG=
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 10:59:14 +00:00
bmeurer@chromium.org
d4b533d41b Bulk update of Google copyright headers in source files.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 06:42:26 +00:00
ulan@chromium.org
60b14ea631 Convert function.name to API-style accessor and make CallApiGetterStub serializable.
BUG=
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-28 08:26:35 +00:00
yangguo@chromium.org
cb2f43cb14 Always include debugger support.
Motivation: we do not have test coverage for debuggersupport=off.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 11:00:37 +00:00
yangguo@chromium.org
41bfa036b3 Return Object* instead of MaybeObject* from runtime calls.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-22 12:50:58 +00:00
svenpanne@chromium.org
eeb1d7020e Revert "Simplify v8/Isolate teardown."
This reverts commit r20876, it broke non-snapshot tests.

TBR=bmeurer@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-22 10:45:43 +00:00
svenpanne@chromium.org
618ff3a3f5 Simplify v8/Isolate teardown.
This implies that one better has a v8::V8::Initialize when v8::V8::Dispose is used.

BUG=359977
LOG=y
R=jochen@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-22 09:24:56 +00:00
mvstanton@chromium.org
9ce1c5144a Serializer enable/disable flags need thread safety.
BUG=
R=hpayer@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-17 14:45:06 +00:00
svenpanne@chromium.org
7976d95cac Removed Isolate::EnterDefaultIsolate.
BUG=359977
LOG=y
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 12:01:38 +00:00
marja@chromium.org
8b9fd69616 Refactoring: HashMap: provide a pointer match function, so users don't need to.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-15 14:48:21 +00:00
ulan@chromium.org
a650916d3d Reland r20652 "Handlify and convert string.length to new API-style accessor."
BUG=
R=dcarney@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-15 13:25:17 +00:00
ulan@chromium.org
f4cce54313 Revert r20652 "Handlify and convert string.length to new API-style accessor."
Reason: test failure with --noenable-sse3.

R=dcarney@chromium.org
TBR=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-10 12:40:55 +00:00
ulan@chromium.org
2564c72036 Handlify and convert string.length to new API-style accessor.
BUG=
R=dcarney@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-10 12:00:36 +00:00
yangguo@chromium.org
8847b52097 Reland "Correctly OOM in the CEntryStub after retries."
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-27 10:41:45 +00:00
yangguo@chromium.org
caad1de770 Revert "Correctly OOM in the CEntryStub after retries."
This reverts r20292 due to no-snapshot failures.

TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-27 09:59:07 +00:00
yangguo@chromium.org
3ee0783686 Correctly OOM in the CEntryStub after retries.
This fixes a bug introduced in r20179.

R=jkummerow@chromium.org
BUG=356211
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-27 09:26:47 +00:00
yangguo@chromium.org
9be61ddb8a Hide some runtime functions.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-26 15:51:48 +00:00
dslomov@chromium.org
f66af4feb4 Refactor optimized in hydrogen only runtime functions.
This splits all runtime function into 3 categories:
1) RUNTIME: implemented in runtime and called from both full and optimized code.
2) RUNTIME_HIDDEN: implemented in runtime, never called directly from JS builtins.
3) INLINE: inlined in both full and optimized code
4) INLINE_OPTIMIZED: inlined in optimized code, implemented in runtime for full code.

R=yangguo@chromium.org, yannguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 14:26:55 +00:00
rmcilroy@chromium.org
e57d0296da Reland "Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool."
The ool constant pool will require a pointer to the code's constant pool when
updating or reading target addresses using set_target_address_at()
and target_address_at().

Original Review URL: https://codereview.chromium.org/183803022

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-12 15:23:54 +00:00
rmcilroy@chromium.org
0896bd70a2 Revert "Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool."
This reverts r19825 for breaking ia32.debug checks.

Original Review URL: https://codereview.chromium.org/183803022

Update serializer to be able to deal with ool constant pool.

TBR=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-11 21:46:26 +00:00
rmcilroy@chromium.org
f9288fca53 Update serializer to be able to deal with ool constant pool.
This CL depends on CL https://codereview.chromium.org/179813005/ landing first.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-11 20:52:00 +00:00
rmcilroy@chromium.org
38732785dd Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool.
The ool constant pool will require a pointer to the code's constant pool when
updating or reading target addresses using set_target_address_at()
and target_address_at().

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-11 20:31:23 +00:00
hpayer@chromium.org
b3ecfa32c2 Consolidate RecordWriteFromCode and RecordWriteForEvacuationFromCode.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-03 13:27:59 +00:00
yangguo@chromium.org
7f6dc1ff9b Do not visit smis in the root list during GC.
R=mstarzinger@chromium.org
BUG=328804
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 10:41:25 +00:00
svenpanne@chromium.org
84aa5263f3 Remove the last remnants of the TranscendentalCache.
It was only used for Math.log, and even then only in full code and in %_MathLog. For crankshafted code, Intel already used the FP operations directly, while the ARM/MIPS ports were a bit lazy and simply called the stub. The latter directly call the C library now without any cache. It would be possible to directly generate machine code if somebody has the time, from what I've seen out in the wild it should be only about a dozen instructions.

LOG=y
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 10:40:26 +00:00
ulan@chromium.org
c88f993ffc Flush instruction cache for deserialized code objects.
This fixes the flaky crashes on ARM when running preparser test suite in
optdebug mode.

R=svenpanne@chromium.org

Review URL: https://chromiumcodereview.appspot.com/107543003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-16 13:08:24 +00:00
svenpanne@chromium.org
b6b84c02b2 Reland "Implement Math.random() purely in JavaScript" plus fixes.
The main change is that a bit has been added to array buffers to
signal that the backing store has to be freed when the buffer dies.

BUG=316359
LOG=Y
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-22 11:35:39 +00:00
danno@chromium.org
8e266c2244 Revert 17963, 17962 and 17955: Random number generator in JS changes
Revert 17966, 17965 also as collateral damage: Embed trigonometric lookup table.

Due to Heapcheck and valgrind failures that are not yet fixed.

TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 17:21:00 +00:00
svenpanne@chromium.org
2b1da67263 Implement Math.random() purely in JavaScript.
This removes tons of architecture-specific code and makes it easy to
experiment with other pseudo-RNG algorithms. The crankshafted code is
extremely good, keeping all things unboxed and doing only minimal
checks, so it is basically equivalent to the handwritten code.

When benchmarks are run without parallel recompilation, we get a few
percent regression on SunSpider's string-validate-input and
string-base64, but these benchmarks run so fast that the overall
SunSpider score is hardly affected and within the usual jitter. Note
that these benchmarks actually run even faster when we don't
crankshaft at all on the main thread (the regression is not caused by
bad code, it is caused by Crankshaft needing a few hundred microsecond
for compilation of a trivial function). Luckily, when parallel
recompilation is enabled, i.e. in the browser, we see no regression at
all!

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 09:55:15 +00:00
mstarzinger@chromium.org
7758713a8a Allow passing flags to Runtime_AllocateInTargetSpace.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-15 13:49:41 +00:00
mstarzinger@chromium.org
8f611593a4 Simplify current inline allocation tracking mechanism.
R=yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-11 18:00:52 +00:00
svenpanne@chromium.org
ba24c3a79f Removed dead function V8::FillHeapNumberWithRandom.
Removed a useless test case along the way.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-08 10:55:01 +00:00
svenpanne@chromium.org
4ac37914ec Refactored ObjectSerializer::VisitFoo functions.
Tiny superficial cleanup to make the similarities more visible.
Removed a few useless assertions on the way.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-07 07:37:28 +00:00
svenpanne@chromium.org
dc8c314084 Make snapshots reproducible.
To keep the structure of the serializer more or less untouched, we use
some ingenious Corry-approved(TM) 3-step technology (a.k.a. "hack"):

   * Create copies of code objects.
   * Wipe out all absolute addresses in these copies.
   * Write out the cleaned copies instead of the originals.

In conjunction with --random-seed, our snapshots are reproducible now.

BUG=v8:2885
R=bmeurer@chromium.org, erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-05 10:14:48 +00:00
svenpanne@chromium.org
bb010f8ad0 Removed RelocInfo::target_object_address() and reconstructed_obj_ptr_.
Depends on https://codereview.chromium.org/46583006/ and has similar reasoning behind it.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-05 09:40:36 +00:00