Commit Graph

3350 Commits

Author SHA1 Message Date
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
antonm@chromium.org
de070ccfa6 First take on custom call generators.
Review URL: http://codereview.chromium.org/669061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 16:24:31 +00:00
kmillikin@chromium.org
cb1f817f77 Initialize reaching definitions state for all flow graph nodes.
Reaching definitions in (RD_in) is initially empty for all nodes.  Gen
and kill sets are computed.  AST node numbers are used for nodes to
refer to their definition number.

Also: two small changes to flow graph printing.  Children of branch
nodes are visited in right-to-left order when performing depth first
search.  Instructions are numbered locally within blocks so as to not
destroy AST node number before printing (it's useful to print the
definition).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 16:24:05 +00:00
floitschV8@gmail.com
8814064337 Fast double-to-ascii conversion.
Review URL: http://codereview.chromium.org/866002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 14:49:35 +00:00
antonm@chromium.org
347f099c80 Minor refactorings to use some recently added methods.
Review URL: http://codereview.chromium.org/760002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 13:56:49 +00:00
antonm@chromium.org
21af2c360a Reland 4068 which wrapped Array methods into native builtins (reverted in 4075).
Review URL: http://codereview.chromium.org/857002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 13:13:21 +00:00
sgjesse@chromium.org
7def7afc23 Fix compile of MIPS port
TBR=alexandre.rames@gmail.com
Review URL: http://codereview.chromium.org/870002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 10:56:49 +00:00
fschneider@chromium.org
463ab046fa Fix a bug in smi loop analysis.
Add a missing null check that can hit when the for-loop index is
not a variable.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 10:37:29 +00:00
ager@chromium.org
ef371f3f24 Do not waste space for the fast-case elements backing storage for
object-literals with few elements but large element indices.

We can decide at parse time whether the created object literal should
have fast-case of slow-case elements.

Remove unused runtime function.
Review URL: http://codereview.chromium.org/805004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 10:34:29 +00:00
fschneider@chromium.org
7d933936d3 Fix assigned variables analysis.
This change fixes a bug with the arguments object that occurred with
r4087 and r4088. The fix is not marking the arguments variable as trivial
since it can have side effects.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 10:28:40 +00:00
sgjesse@chromium.org
8f76082701 Fix presubmit error
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/867002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 09:49:47 +00:00
mikhail.naganov@gmail.com
c413105da7 Make the assumption on the minimum buffer size for GetLogLines explicit.
Review URL: http://codereview.chromium.org/799008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 09:48:01 +00:00
sgjesse@chromium.org
e5f27966dc Add fuzzing support for inline runtime functions
The inline runtime functions are now included in the fuzzing of the natives. The chack for the expected number of arguments passed have been moved to the parser which will generate a syntax error if a runtime function (either C++ or inline) is called with a different number of arguments than expected.
Review URL: http://codereview.chromium.org/573056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 09:27:12 +00:00