Commit Graph

12036 Commits

Author SHA1 Message Date
svenpanne@chromium.org
8a89306785 Use Marsaglia's original random number generator.
BUG=316359
LOG=Y
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 12:34:34 +00:00
svenpanne@chromium.org
bef1cb43f9 Build fix.
We should better initialize the random state even for non-snapshot
builds...

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 12:07:17 +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
machenbach@chromium.org
4270a0f2a8 Prepare push to trunk. Now working on version 3.23.10.
R=jkummerow@chromium.org, danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 09:47:23 +00:00
hpayer@chromium.org
df35c0e4d3 Do deferred migration of maps after deoptimizing once.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 09:16:34 +00:00
jkummerow@chromium.org
293b8f7325 Fix Windows build
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 08:38:51 +00:00
jkummerow@chromium.org
9318e1cc4a API: Change AdjustAmountOfExternalAllocatedMemory calls to use int64_t instead
of intptr_t

This prevents an overflow in FreeArrayBuffer, which in turn caused needless GCs
as well as crashes on isolate teardown.

LOG=Y
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 08:06:02 +00:00
svenpanne@chromium.org
617c2dd714 Removed dead stack printing code.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 07:08:24 +00:00
plind44@gmail.com
c41ca55f72 MIPS: Improvement of “MIPS: Fixed crashes exposed though fuzzing.” (r17886).
BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 19:33:50 +00:00
plind44@gmail.com
391f05aece MIPS: Use SmiTst and TrySmiTag MacroAssembler instructions.
BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 19:01:33 +00:00
plind44@gmail.com
c33cbd9f37 MIPS: Replace hard-coded stack frame size literals with StandardFrameConstants::kFixedFrameSizeFromFp.
Port r17925 (0b95731)

BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 18:22:18 +00:00
plind44@gmail.com
29e47d1f43 MIPS: Remove the first_right_arg hack for HMod.
Port r17919 (23e9644)

Original commit message:
Generate a proper subgraph in BuildBinaryOperation instead.

BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 17:02:12 +00:00
jochen@chromium.org
840bc42de0 Reland r17907 - Make it possible to add more than one piece of embedder data to isolates"
This will allow for using gin and blink bindings in the same
process.

Over r17907, I changed the order of fields in Isolate to be stable across different platforms, since the ABI defined packing is not the same on
all targets, and I initialize the embedder data field in Isolate.

BUG=317398
R=svenpanne@chromium.org, dcarney@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 15:16:18 +00:00
yangguo@chromium.org
2c7ebfa7f0 Increase precision when finding the remainder after division by pi/2.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 15:04:37 +00:00
yurys@chromium.org
e7511b6234 Do not recompile existing functions when enabling allocation tracking
Now that we don't have special hooks for the allocations in the generated code there is no need to recompile existing functions when enabling allocation tracking.

BUG=chromium:27798
LOG=N
R=loislo@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 14:57:39 +00:00
mvstanton@chromium.org
b90d87c382 MaterializedLiteral expressions need to cache expression depth.
A problem arises in recursive literal expressions due to recent
changes that defer allocation of constant literal properties
from parse time. We were calculating expression depth as a
side-effect of a lazy constant property build, but subsequent
calls for the depth always returned 1. Cache the correct depth
in the MaterializedLiteral instead.

(Related-to/very-partial-revert-of
https://codereview.chromium.org/61873003)

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 14:17:47 +00:00
rmcilroy@chromium.org
df38e6f9a6 Replace hard-coded stack frame size literals with StandardFrameConstants::kFixedFrameSizeFromFp
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 13:44:24 +00:00
m.m.capewell@googlemail.com
2b1aeec591 ARM: Optimize AccessArgumentsAt
Optimize register constraints and code generated for AccessArgumentsAt
Lithium instruction.

TEST=none
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 13:28:19 +00:00
verwaest@chromium.org
6557c85ff4 Use SimpleLoadField for JSObjectFieldAccessors, rather than compiling a new stub.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 13:25:40 +00:00
danno@chromium.org
adb39abd6d Activate Hydrogen-generated KeyedLoadDictionary ICs
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 12:58:10 +00:00
bmeurer@chromium.org
d38abc3bba Remove the first_right_arg hack for HMod.
Generate a proper subgraph in BuildBinaryOperation instead.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 12:43:33 +00:00
svenpanne@chromium.org
8f88467bf6 Removed unused --preallocate-message-memory flag.
It results in a lot of dead code, and Isolate::PrintStack itself
crashes most of the time when something went wrong earlier.
Furthermore, we have plans do get better information into the
minidump, anyway.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 12:35:58 +00:00
bmeurer@chromium.org
4c4d911cde Convert constant numbers at compile time.
TEST=mjsunit/number-tostring
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 12:35:21 +00:00
jochen@chromium.org
bd09937300 Revert r17907 - Make it possible to add more than one piece of embedder data to isolates
> This will allow for using gin and blink bindings in the same process
>
> BUG=317398
> R=svenpanne@chromium.org, dcarney@chromium.org
> LOG=y
>
> Review URL: https://codereview.chromium.org/77913003

BUG=none
R=svenpanne@chromium.org
TBR=svenpanne@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 12:05:44 +00:00
bmeurer@chromium.org
defee14d76 Make BuildBinaryOperation use ReturnValue instead of ReturnInstruction.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 12:00:57 +00:00
bmeurer@chromium.org
6826b74708 Replace unsafe uses of Add<> with AddUncasted<>.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 11:57:49 +00:00
bmeurer@chromium.org
da6d5586f9 Don't generate useless string checks for string adds.
If we know that one side of a string add is definitely a string
(i.e. if it's a string constant), then we don't need to emit a
string check for the argument.

This adds a new BuildCheckString() method to the graph builder,
which does "the right thing".

TEST=mjsunit/string-add
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 11:53:09 +00:00
rmcilroy@chromium.org
782040d275 Remove deprecated v8::SetResourceConstraints without Isolate parameter
LOG=Y
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 11:21:51 +00:00
rmcilroy@chromium.org
57dc3139cb Remove deprecated v8-defaults.h and defaults.cc.
BUG=312241
LOG=Y
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 11:20:01 +00:00
jochen@chromium.org
4515fb5c4f Make it possible to add more than one piece of embedder data to isolates
This will allow for using gin and blink bindings in the same process

BUG=317398
R=svenpanne@chromium.org, dcarney@chromium.org
LOG=y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 10:59:13 +00:00
dcarney@chromium.org
c595853bb5 faster stack frame generation for accessor property ics
this is implemented for intel platforms only, as they are the only ones which show speed up with this change

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 10:11:56 +00:00
bmeurer@chromium.org
54dc61a504 Reset overwrite mode for BinaryOpStub unless we can actually make use of it.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 09:30:46 +00:00
machenbach@chromium.org
15582e2467 Prepare push to trunk. Now working on version 3.23.9.
R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 09:25:38 +00:00
plind44@gmail.com
79de22a56a MIPS: Fixed crashes exposed though fuzzing.
Port r17886 (e2fb3ed)

Original commit message:
The %_OneByteSeqStringSetChar intrinsic expects its arguments to be checked before being called for efficiency reasons, but the fuzzer provided no such checks. Now the intrinsic is robust to bad input if FLAG_debug_code is set.

R=plind44@gmail.com, yangguo@chromium.org
TEST=test/mjsunit/regress/regress-320948.js
BUG=chromium:320948
LOG=Y

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 22:23:41 +00:00
danno@chromium.org
06c7620302 Fixed crashes exposed though fuzzing.
The %_OneByteSeqStringSetChar intrinsic expects its arguments to be checked before being called for efficiency reasons, but the fuzzer provided no such checks. Now the intrinsic is robust to bad input if FLAG_debug_code is set.

R=yangguo@chromium.org
TEST=test/mjsunit/regress/regress-320948.js
BUG=chromium:320948
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 16:41:07 +00:00
plind44@gmail.com
1cfcf25efe MIPS: Remove unused StubType's, freeing 2 bits in Code objects.
Port r17867 (a305bd3)

BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 16:06:11 +00:00
plind44@gmail.com
44f3f410f4 MIPS: Properly initialize desc->origin in the MIPS assembler.
Port r17865 (5b2e594)

BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17884 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 15:58:10 +00:00
jochen@chromium.org
e744b82fae Revert 17877 - Introduce a v8::Platform class that bundles embedder callbacks
This also reverts 17879 and 17880.

BUG=v8:3015
TBR=svenpanne@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 14:28:07 +00:00
jochen@chromium.org
28b807597a Remove faulty CHECK() statement.
TBR=svenpanne@chromium.org
BUG=none
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 14:15:12 +00:00
jochen@chromium.org
c24ce076e9 Introduce a v8::Platform class that bundles embedder callbacks
Also provide a default implementation to use in cctests.

For now, there are just two thread releated callbacks. In future CLs, I will
move callbacks registered e.g. via V8::SetFooCallback over.

BUG=v8:3015
R=svenpanne@chromium.org, danno@chromium.org
LOG=no

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 13:44:36 +00:00
verwaest@chromium.org
40d255ec82 Move template instance check from Object to FunctionTemplateInfo::IsTemplateFor
BUG=
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 13:38:15 +00:00
yangguo@chromium.org
9b6151946d Fix debugger wrt concurrent recompilation flag.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 13:19:51 +00:00
jochen@chromium.org
34b534c906 Add a proper way to pass the number of processors to V8
BUG=321060
LOG=n
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 13:08:37 +00:00
jkummerow@chromium.org
37443768bf Fix register trashing in Emit*ByteSeqStringSetChar
This is currently not observable without --allow-natives-syntax because all internal usages are safe, but it deserves to be fixed nonetheless.

BUG=chromium:320922
LOG=N
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 12:59:09 +00:00
yangguo@chromium.org
baf0f96d0b Fix compilation.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 12:14:22 +00:00
bmeurer@chromium.org
b39db7bbf3 Remove unused StubType's, freeing 2 bits in Code objects.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 12:04:54 +00:00
yangguo@chromium.org
e2563d7a8e Make number of available threads isolate-dependent and expose it to ResourceConstraints.
R=svenpanne@chromium.org
BUG=v8:2991
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 11:52:47 +00:00
bmeurer@chromium.org
3d2f9cf3cf Properly initialize desc->origin in the ARM assembler.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 11:52:38 +00:00
ishell@chromium.org
53bd540ee0 Constant-folding through HForceRepresentation fix.
Reverts changes in HValue::IsInteger32Constant() made in https://code.google.com/p/v8/source/detail?r=17787

R=bmeurer@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 11:41:04 +00:00
machenbach@chromium.org
0767ee86d8 Prepare push to trunk. Now working on version 3.23.8.
R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-19 11:04:54 +00:00