Commit Graph

2731 Commits

Author SHA1 Message Date
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
sgjesse@chromium.org
b0c9738f77 Fix code cache lookup for keyed IC's
For keyed IC's the name is not necessarily a string.

BUG=http://crbug.com/37853
TEST=test/mjsunit/regress/regress-crbug-37853.js
Review URL: http://codereview.chromium.org/872001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 08:52:31 +00:00
serya@chromium.org
4fd99d23cc Math.abs rewrited to not use Runtime.
Review URL: http://codereview.chromium.org/799006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-11 08:31:15 +00:00
floitschV8@gmail.com
088afd03a6 Revert grisu commits.
Review URL: http://codereview.chromium.org/804005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 21:26:32 +00:00
floitschV8@gmail.com
c5eea7fee2 Fast algorithm for double->string conversion.
Review URL: http://codereview.chromium.org/619005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 20:49:14 +00:00
whesse@chromium.org
a77411bc70 Revert changes 4088 and 4087 to fix build.
Review URL: http://codereview.chromium.org/805005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 20:41:11 +00:00
fschneider@chromium.org
8117a9879b Fix x64 and arm build.
Review URL: http://codereview.chromium.org/816003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 17:30:35 +00:00
fschneider@chromium.org
0143d707a6 Add an assigned variables analysis.
This change adds a pass over the AST that computes the
set of assigned variables for locals and parameters for each expression.

The result of this analysis is used to for two purposes:
1. Recognize variables that are trivial subexpressions. A left sub-expression
   of a binary operation is trivial if it is a local variable or a parameter
   and it is not assigned in the right sub-expression. In the case of a 
   trivial left sub-expression we evaluate the right first.
   Currently only binary operations and compare operations are considered
   when finding trivial left sub-expressions.

2. Recogize certain simple for-loops with a constant trip count where the loop
   variable is always within smi range. If the loop count variable is not
   assigned in the body of the loop (except in the update expression the
   for-loop). This allows omitting smi checks on operation using the loop
   count variable.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 17:19:22 +00:00
kmillikin@chromium.org
dd8a7e1bc6 Add defensive checks to the flow graph builder.
Visitor stack overflow is used to signal an unsupported construct in
the flow graph.  Check for it in more places.  Make the utility
functions for appending to graphs handle more cases if they can be
handled correctly.

Remove the entry node in favor of a block with a NULL predecessor as
single entry.  Represent the empty flow graph as a single empty block.
Add empty blocks lazily where needed to preserve edge-split form.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 17:02:25 +00:00
kmillikin@chromium.org
d64008952a Fix presubmit failure.
TBR=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 14:43:43 +00:00
kmillikin@chromium.org
174466d4da Cut back the syntactic constructs handled by the flow graph builder.
While the flow graph is experimental, it's easier to be able to ignore
some problematic syntactic constructs.  Reduce the ones that can occur
in constructed flow graphs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 14:40:31 +00:00
erik.corry@gmail.com
f6df326714 Add 1-element caches to RegExp.exec and String.replace. We
probably want to remove this again if and when Dromaeo is
fixed so this strategy doesn't pay off.
Review URL: http://codereview.chromium.org/817001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 12:21:00 +00:00
sandholm@chromium.org
9e2c15e4af Moved one check outside of the loop and moved another one under an if statement
Review URL: http://codereview.chromium.org/821001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 12:00:22 +00:00
lrn@chromium.org
e9484a07a3 Optimize fromCharCode for smi argument(s) case.
Review URL: http://codereview.chromium.org/778005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 11:13:02 +00:00