Commit Graph

3312 Commits

Author SHA1 Message Date
mikhail.naganov@gmail.com
d2188658ca Re-apply r4159 now with working test on x64
TBR=sgjesse@chromium.org

Review URL: http://codereview.chromium.org/979005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:15:42 +00:00
fschneider@chromium.org
0f988248b2 Prepare push to trunk. Now working on version 2.1.7.
Review URL: http://codereview.chromium.org/974005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:08:58 +00:00
fschneider@chromium.org
9f318feb93 Revert r4159 because of x64 test failures.
Review URL: http://codereview.chromium.org/1049003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:04:07 +00:00
fschneider@chromium.org
3a958c3b39 Prepare push to trunk. Now working on version 2.1.6.
Review URL: http://codereview.chromium.org/1050002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 12:46:17 +00:00
whesse@chromium.org
64278854ba Fix excessive stack usage by compiler due to local in recursive scope.
Review URL: http://codereview.chromium.org/1019006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 12:27:32 +00:00
mikhail.naganov@gmail.com
ce9298029d Implement circular queues for the C++ version of CPU profiler.
Circular queues serve as a transport for communicating between
VM, stack sampler and analyzer threads. Logging requirements
for VM and stack sampler are completely different, that's why
I introduced two different versions of CQs.

Review URL: http://codereview.chromium.org/1047002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 12:25:10 +00:00
sgjesse@chromium.org
a43c533d2f Make the C++ tests run without SSE2 support.
Review URL: http://codereview.chromium.org/982007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 10:28:44 +00:00
erik.corry@gmail.com
889cbe55b8 Fix a bug in the regexp caching. Also add a few more places to
cache.  We now cache most of the places where Opera cache and
one or two where they do not cache for some reason.  Since
these optimizations aren't necessarily useful on real code we
may remove them if and when the Dromaeo website makes the
benchmarks harder to game.
Review URL: http://codereview.chromium.org/995005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 10:23:06 +00:00
fschneider@chromium.org
38d6470fca Revert r4146. Add a special case in Math.round for a SMI result. Also change the imp...
TBR=ager@chromium.org, 
Review URL: http://codereview.chromium.org/1042006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 09:58:28 +00:00
fschneider@chromium.org
3ca9367341 Fix bug in propagation of type information into registers.
The number type information of results has to be also copied when
calling ToRegister with a fixed register as destination.

Also fix an unbound label and a missing CpuFeatures scope.

Review URL: http://codereview.chromium.org/987003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 09:49:03 +00:00
antonm@chromium.org
4496250e51 Restore http://code.google.com/p/v8/source/detail?r=4151 fixing a typo:
index d545c34..91cb151 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -738,7 +738,7 @@ BUILTIN(ArrayConcat) {
   int result_len = 0;
   for (int i = 0; i < n_arguments; i++) {
     Object* arg = args[i];
-    if (!arg->IsJSArray() || JSArray::cast(arg)->HasFastElements()) {
+    if (!arg->IsJSArray() || !JSArray::cast(arg)->HasFastElements()) {
       return CallJsBuiltin("ArrayConcat", args);
     }
This reverts 4153.
    # Please enter the commit message for your changes. Lines starting

Review URL: http://codereview.chromium.org/1055003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 09:40:54 +00:00
antonm@chromium.org
c7e21cc31b Revert "More generic version of Array.concat builtin."
Review URL: http://codereview.chromium.org/1058003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 09:13:39 +00:00
kasperl@chromium.org
feefa06b35 Remove handle scope that caused debug mode assertion failures
because a handle was returned out of the destroyed scope.
Review URL: http://codereview.chromium.org/1029003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 08:53:21 +00:00
antonm@chromium.org
c8e795e3af More generic version of Array.concat builtin.
Review URL: http://codereview.chromium.org/1036002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 08:30:07 +00:00
erik.corry@gmail.com
e1c486c313 Keep more track of whether code is from the built
in .js files in V8.  This change gets bleeding edge
a tiny bit closer to the partial snapshots branch.
Review URL: http://codereview.chromium.org/1052003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 08:14:59 +00:00
peter.rybin@gmail.com
56c90bc0cf Non-ASCII sybmols made their way into JS comments
Review URL: http://codereview.chromium.org/984005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 23:15:10 +00:00
whesse@chromium.org
4751f36492 Use untagged int32 values in evaluation of side-effect free expressions.
Review URL: http://codereview.chromium.org/975001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 16:07:19 +00:00
fschneider@chromium.org
9202e05016 Fix bug in the count operation where we statically know the input is a smi.
Even if we know that the input to a count operation is a smi we still need to check if the result overflowed (and becomes a heap number).

Also fix the smi loop analysis to take two border cases correctly into account.

Review URL: http://codereview.chromium.org/1040002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 16:03:40 +00:00
oleg@chromium.org
78f19f1ae9 Add a special case in Math.round for a SMI result. Also change the implementation for non-SMI case.
Review URL: http://codereview.chromium.org/981002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 13:23:41 +00:00
vitalyr@chromium.org
6a10a837c0 Add heuristic for flattening strings before comparing them.
Also switched to using CompareChars instead of memcmp since it's
faster than gcc's builtin and on par with msvc's builtin.

Review URL: http://codereview.chromium.org/991002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 12:30:04 +00:00
lrn@chromium.org
b2b2eb5792 Take ARM big-endian floating point numbers into account in FastD2UI.
Review URL: http://codereview.chromium.org/996004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 12:20:52 +00:00
kmillikin@chromium.org
4669473a7b Propagate reaching definitions to the instuctions of a block.
After computing RD_in for all flow graph nodes, push the reaching
definitions through the basic blocks to annotate all variable
references in the AST.

Review URL: http://codereview.chromium.org/889003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 10:54:02 +00:00
lrn@chromium.org
ae9b1088f2 Fix, again, assertion so that it also compiles on Mac.
Review URL: http://codereview.chromium.org/993004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 10:38:17 +00:00
lrn@chromium.org
d5f9fd8548 Fix bad use of OffsetFrom that fails on ARM (sizeof(Object) wasn't 1).
Review URL: http://codereview.chromium.org/1043001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 09:56:06 +00:00
lrn@chromium.org
11dca3ae12 Fix build problem on arm compiler.
Review URL: http://codereview.chromium.org/975005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 09:10:11 +00:00
peter.rybin@gmail.com
ad876956c0 LiveEdit: patch positions in function
Review URL: http://codereview.chromium.org/914003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 21:06:51 +00:00
vegorov@chromium.org
ed53268006 Port of string plus smi optimization from ia32 to x64 and ARM.
Review URL: http://codereview.chromium.org/668254

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 17:11:08 +00:00
oleg@chromium.org
a46b65c4b9 Review URL: http://codereview.chromium.org/968001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 17:04:07 +00:00
lrn@chromium.org
d8aed420a9 Converted String.prototype.split with string to C++.
Review URL: http://codereview.chromium.org/875001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 15:27:11 +00:00
antonm@chromium.org
14547ef434 Just grow elements if they happen to be at the edge of new space.
Review URL: http://codereview.chromium.org/945002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 15:16:04 +00:00
ricow@chromium.org
cf3219bc4e Added fast case for shift operations when the left parameter is a double and we know that the right parameter is a smi.
Review URL: http://codereview.chromium.org/955001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 14:24:37 +00:00
mikhail.naganov@gmail.com
12d252eb81 Start migrating profiles processing to C++.
Adding code for maintaining (address -> name) mapping and building
call trees.

Review URL: http://codereview.chromium.org/910002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 14:11:19 +00:00
whesse@chromium.org
7abbd29826 Add static analysis to AST expressions that records whether a negative zero will be treated identically to a positive zero in the expression's context. Use this flag to avoid some tests in inlined smi code.
Review URL: http://codereview.chromium.org/965001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 14:03:36 +00:00
antonm@chromium.org
c2dc316138 Add Array.concat builtin for the most common case.
Review URL: http://codereview.chromium.org/954001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 10:52:38 +00:00
lrn@chromium.org
27c737bb73 Optimized Array.prototype.{lastIndexOf,indexOf} by special casing comparison to undefined.
Review URL: http://codereview.chromium.org/851008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 10:14:59 +00:00
vegorov@chromium.org
127c11193b Prepare push of version 2.1.4 to trunk.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/961001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 10:04:34 +00:00
antonm@chromium.org
dca7574e6e Some cosmetic issues.
Review URL: http://codereview.chromium.org/903004



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 18:27:31 +00:00
antonm@chromium.org
c9b9c431d4 Remove now obsolete comment.
Now builtins only process fast case when there is no need to lift elements from
the prototypes.

TBR=ager@chromium.org

Review URL: http://codereview.chromium.org/890004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 16:54:35 +00:00
fschneider@chromium.org
ff03f6b36f Only invoke reaching definitions if there are >0 variables and >0 definitions.
Review URL: http://codereview.chromium.org/885004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 15:01:05 +00:00
kmillikin@chromium.org
10e5690d32 Simple bugfix in reaching definitions.
We only track definitions of stack-allocated variables.  Trying to
look up other variables in the environment is a bug.

Review URL: http://codereview.chromium.org/843006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 14:06:04 +00:00
antonm@chromium.org
7f1eda50cc Implement a custom call compiler for Array.pop.
Review URL: http://codereview.chromium.org/870007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 13:45:31 +00:00
fschneider@chromium.org
d0908674fa Fix bug in assigned variables analysis.
Property stores were not visited correctly by the visitor.
I fixed this issue by visiting property stores by visiting 
receiver and key directly (and not calling visit on the lhs property
 ast node)

Review URL: http://codereview.chromium.org/903003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 13:12:08 +00:00
kmillikin@chromium.org
ac896bb5a0 Add a predicate IsPrimitive to AST Expression nodes.
IsPrimitive reflects that an expression's value is known statically to
be one of the ECMA-262-3 JS types other than Object (e.g., Undefined,
Null, Boolean, String, or Number).

The type conversions ToPrimitive, ToNumber, ToInteger, ToInt32,
ToUInt32, ToUint16, ToString, or ToObject cannot invoke user code for
primitive input values.  ToObject throws a TypeError if its input is
Undefined or Null.

Review URL: http://codereview.chromium.org/912002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 13:10:42 +00:00
oleg@chromium.org
5f75b01bb1 Rewrite the function that converts timestamp to year, month and day in C++.
Review URL: http://codereview.chromium.org/811006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 13:01:32 +00:00
kmillikin@chromium.org
4e5d347644 Fix presubmit error.
Single argument constructors should be marked explicit.

TBR=fschneider@chromium.org

Review URL: http://codereview.chromium.org/876005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 10:39:31 +00:00
kmillikin@chromium.org
e026813732 Compute reaching definitions.
Use the classical worklist algorithm to compute reaching definitions.
All nodes are initially put on the worklist.  Until the worklist is
empty, nodes are removed, their RD_in is recomputed, and if it changes
their successors are added to the worklist.

Review URL: http://codereview.chromium.org/853004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 10:35:45 +00:00
fschneider@chromium.org
d896e4f6f2 Fix treatment of const variables in assigned variable analysis.
Const variables are not considered as trivial sub-expressions since
we have the check for the hole value as a side-effect.

Review URL: http://codereview.chromium.org/849003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 10:20:31 +00:00
sgjesse@chromium.org
16bfc31317 Fix issues with compiling V8 with LLVM Clang
Added this-> in some places where accessing a method on a templated base class.

Added #include <strings.h> for bit_cast, moved it to utils.h and renamed it to BitCast.

Patch by Evan Martin <evan@chromium.org>, see http://codereview.chromium.org/894001 and http://codereview.chromium.org/888003
Review URL: http://codereview.chromium.org/888005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 10:20:01 +00:00
whesse@chromium.org
44d0112b71 Add SSE2 instructions to disassembler and movmskpd SSE2 instruction to assembler.
Review URL: http://codereview.chromium.org/865002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 08:36:01 +00:00
ager@chromium.org
d6e08a41f6 Probe number dictionaries in generated code on ia32.
With my previous change to limit memory for object literals, we get more slow-case elements and this makes up for the slowdown when loading from those slow-case elements.

The most complicated part here is the computation of the integer hash code.  We might want to simplify the integer hash function.
Review URL: http://codereview.chromium.org/857003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-12 08:21:10 +00:00