Commit Graph

3030 Commits

Author SHA1 Message Date
mikhail.naganov@gmail.com
f7ba38332b Fix ARM build (GCC 3 'all member functions in class are private' warning.)
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 13:07:43 +00:00
fschneider@chromium.org
ebf9e6e8e2 Remove unused LivenessAnalyzer class.
Also remove unused attributes related to it from the ast.
Review URL: http://codereview.chromium.org/1117003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 12:54:35 +00:00
ager@chromium.org
a8a7a74bb3 Fix presubmit errors.
I will lint my code, I will lint my code, I will lint my code. :)

TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/1115007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 12:53:55 +00:00
ager@chromium.org
1bf60267e7 Port number-dictionary probing in generated code to x64.
BUG=640
Review URL: http://codereview.chromium.org/1113001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 12:26:45 +00:00
floitschV8@gmail.com
05beab6b1f Rename files containing underscores.
Review URL: http://codereview.chromium.org/1102002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 12:15:24 +00:00
lrn@chromium.org
4db15f1235 Refactoring of RegExp interface to better support calling several times in a row.
Review URL: http://codereview.chromium.org/1114001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 12:01:17 +00:00
mikhail.naganov@gmail.com
9582645a02 Add basic C++ implementation of CPU profiler.
Review URL: http://codereview.chromium.org/1079006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 09:46:53 +00:00
ager@chromium.org
103db91e12 Add parens to DateYMDFromTimeSlow to clearify.
BUG=649
Review URL: http://codereview.chromium.org/1132002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 08:00:52 +00:00
fschneider@chromium.org
2726a4d4f9 Add debug code assertions where we expect smi inputs.
Review URL: http://codereview.chromium.org/998007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 07:43:03 +00:00
peter.rybin@gmail.com
f822f101a0 Show file name/line number in stack trace
Review URL: http://codereview.chromium.org/1002010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 22:15:54 +00:00
fschneider@chromium.org
ec974ddb50 Fix bug when generating a fast smi loop.
We may encounter an invalid frame after generating code
for the loop body in case the loop body ends in an unconditional
return. Before setting the type information for the loop variable
we need to check for a valid frame.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 14:32:02 +00:00
floitschV8@gmail.com
9e84308722 Rename grisu to fast-dtoa. Get rid of template.
Review URL: http://codereview.chromium.org/1032007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 13:19:59 +00:00
oleg@chromium.org
825a5d741f Improve Math.round(). Fix the bug in r4146. Further improve performance by checking the exponent instead of comparing doubles. Add several tests for numbers near the limits of SMI and several tests from WebKit.
Review URL: http://codereview.chromium.org/1008004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 13:00:57 +00:00
kaznacheev@chromium.org
c8a2735762 Porting binary op ICs to x64.
Review URL: http://codereview.chromium.org/845002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 11:54:53 +00:00
fschneider@chromium.org
c5ce8e47ef Update number info for count operations.
If the input of a ++ or -- operation is a smi, the
result is an Integer32. Otherwise it is a number.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 10:01:53 +00:00
vitalyr@chromium.org
494ba3a4c8 Fix windows build again: one more memchr call.
Review URL: http://codereview.chromium.org/1109001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:38:30 +00:00
vitalyr@chromium.org
c3972d21fb Fix windows build.
On windows memchr returns const void* instead of void*.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:27:15 +00:00
fschneider@chromium.org
34faea85db Add test cases for fast smi loops.
Review URL: http://codereview.chromium.org/1014007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:08:24 +00:00
vitalyr@chromium.org
b148282b56 String search performance improvements:
* Using memchr for first/only char lookup is faster than hand-coded
   loop. It processes one machine word per iteration so it helps even
   more on x64.

 * Tweaked badness computation in simple search. We pay only for the
   first char memchr scans, not for all of them.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:01:08 +00:00
fschneider@chromium.org
e090f46a55 Fix type propagation rules for count operation.
Also treat const-variables as not side-effect free.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 16:39:29 +00:00
floitschV8@gmail.com
74b4ad0e69 Fix arm compilation. DiyFp multiplications are now in a separate procedure.
Review URL: http://codereview.chromium.org/971006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 15:57:26 +00:00
antonm@chromium.org
6405be71b9 Reenable ability to Dispose already Disposed Vector.
Review URL: http://codereview.chromium.org/1016006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 15:15:45 +00:00
erik.corry@gmail.com
dda96b61c6 Fix formatting around * and &.
Review URL: http://codereview.chromium.org/1000007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 14:53:16 +00:00
antonm@chromium.org
c1597031bf Properly release zero-length Vectors.
Review URL: http://codereview.chromium.org/987004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 14:42:01 +00:00
sgjesse@chromium.org
1963ffba99 Don't generate inline constructors if this.__proto__ is assigned.
BUG=http://code.google.com/p/v8/issues/detail?id=646
TEST=test/mjsunit/regress/regress-646.js
Review URL: http://codereview.chromium.org/1023008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:23:53 +00:00
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
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
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
ager@chromium.org
5153477a3e Prepare push of version 2.1.3 to trunk.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/802002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 09:40:18 +00:00
ager@chromium.org
5fd33c7527 Revert change to always call builtins for Array functions.
It causes regressions on test shell tests.

TBR=antonm@chromium.org
Review URL: http://codereview.chromium.org/819001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 08:45:00 +00:00
kmillikin@chromium.org
b4c8b98894 Change BitVector class to be a zone object.
Change the BitVector utility class to allow allocation via 'new' in the
Zone.  Change the backing store to be always zone-allocated.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-10 08:08:32 +00:00
peter.rybin@gmail.com
60fa408414 Remove tabs
Review URL: http://codereview.chromium.org/747002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 22:24:46 +00:00
peter.rybin@gmail.com
9c9451eff3 Check that function being patched has no activations on any thread stack
Review URL: http://codereview.chromium.org/668246

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 21:45:24 +00:00
antonm@chromium.org
52ec954dd2 Always invoke C++ ArrayPush builtin.
Now this builtin checks if it should go into fast case or resort to JS ArrayPush builtin.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 15:43:04 +00:00
kasperl@chromium.org
c909e5b75f Add a bit more room for type string when reporting heap
stats to make sure PRIVATE_EXTERNAL_ASCII_STRING_TYPE fits.
Review URL: http://codereview.chromium.org/726002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 14:43:01 +00:00
sgjesse@chromium.org
504664365d Refactor the code cache to handle large number of properties on the global object (take 2).
A separate object type for the code cache have been added. This object has two different code caches. The first one (default_cache) is a fixed array organized in the same way as the as the code cache was before. The second cache (global_access_cache) is for code stubs to access the global object. This cache is organized as a hash table taking the property name and code flags as the key.

The reason for separating the global access stubs into a hash table representation is that the number of these is not bounded in the same was as the other types.

This is a remake of r3952 (http://codereview.chromium.org/652119) which have the additional ability to look for the index of code stubs for access to the global object.

BUG=http://code.google.com/p/v8/issues/detail?id=613

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 10:49:41 +00:00
kmillikin@chromium.org
0c2885f83d Add IsStackAllocated helper for variables.
Add a simple boolean helper function for Variables and Slots.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 10:39:18 +00:00
kmillikin@chromium.org
3c0a0ba1e4 Have the flow graph builder collect definitions.
Before computing reaching definitions, the set of all definitions in a
function must be collected and they must be numbered.  Have the flow
graph builder collect definitions for stack-allocated variables into a
list, and implicitly number them with their list index.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 09:56:19 +00:00
fschneider@chromium.org
cc9512f661 Add copy constructor and assignment operator to the BitVector class.
Review URL: http://codereview.chromium.org/668259

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 09:51:37 +00:00
kasperl@chromium.org
97f7484303 Experimental change to idle notifications: Try to limit the
interactions between idle notifications for background tabs
and the context disposal GCs even further.
Review URL: http://codereview.chromium.org/698003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 09:41:58 +00:00
sgjesse@chromium.org
800b6df2a6 Correct handling of adding a string and a smal integer
The fast case of looking up the string convertion of the smi did not handle the case where left/reghe operands could be in eax/edx instead of edx/eax which is the default.

Also got rid of creating an internal frame for calling string and instead patched the argument on the stack and performed a tail call.

BUG=http://code.google.com/p/v8/issues/detail?id=636
TEST=test/mjsunit/regress/regress-636.js
Review URL: http://codereview.chromium.org/720001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 09:40:35 +00:00
ricow@chromium.org
2fa30a8e34 Added zone-inl.h to jsregexp.h since it relies on calling new ZoneList which again relies on calling the static new method on Zone (defined in zone-inl.h but declared in zone.h).
Review URL: http://codereview.chromium.org/719001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 09:15:28 +00:00
kmillikin@chromium.org
3817a7ba6e Small simplification of #include dependencies.
Remove messages.h from v8.h and include it explicitly in only the few places
it is needed.  Many files relied on getting handles-inl.h implicitly from
messages.h through v8.h, so include handles-inl.h explicitly in v8.h
instead.

Remove zone-inl.h from header files where it is not needed, can be replaced
by a forward declaration, or can be replaced by zone.h (specifically,
factory.h and heap.h).  Include zone.h or zone-inl.h in header files where
it was implicitly included via heap.h or factory.h.  Prefer zone.h over
zone-inl.h in header files where possible by including zone-inl.h in .cc
files.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 06:38:33 +00:00
whesse@chromium.org
b1bac8ce4f Fix typographical error in comment in r4056
Review URL: http://codereview.chromium.org/668258

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 16:01:40 +00:00
whesse@chromium.org
3dbefbedef Add AST analysis that flags expressions that will have ToInt32 applied to them.
Simplify AST analysis of side-effect-free int32 expressions.
Review URL: http://codereview.chromium.org/668256

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 15:28:57 +00:00
ricow@chromium.org
b4e0375e96 Added sqrt and pow for arm and x64 - to fix build failures.
Review URL: http://codereview.chromium.org/669272

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 13:49:23 +00:00
ricow@chromium.org
b60eba5fc5 Inline Math.sqrt().
Also changed name of GeneratePow and the %_ call name to follow convention based on MathSin and MathCos. Moved GeneratePow down to the other methods. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 13:23:54 +00:00
kmillikin@chromium.org
d2fbf9436e Fix presubmit failure (line longer than 80 characters).
TBR=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 13:04:09 +00:00
kmillikin@chromium.org
bce8d2ebae Remove unneeded variable usage analysis.
A variable usage analysis pass was run on toplevel and lazily-compiled
code but never used.  Remove this pass and the data structures it
builds.

The representation of variable usage for Variables has been changed
from a struct containing a (weighted) count of reads and writes to a
simple flag.  VariableProxies are always used, as before.  The unused
"object uses" is removed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 13:01:24 +00:00
kmillikin@chromium.org
8528d650d8 Initial implementation of an edge-labeled instruction flow graph.
The flow graph is built by walking the AST.  Edges are labeled with
instructions (AST nodes).  Normal nodes have a single predecessor edge and a
single (labeled) successor edge.  Branch nodes are explicit, they have a
single predecessor edge and a pair of (unlabeled) successor edges.  Merge
nodes are explicit, they have a pair of predecessor edges and a single
(unlabeled) successor edge.

There is a distinguished (normal) entry node and a distinguished (special)
exit node with arbitrarily many predecessor edges and no successor edges.

The graph is intended to support graph-based analysis and transformation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 12:53:11 +00:00
vegorov@chromium.org
6b47d26217 Port of changes from r3842 (symbol table probing for two character strings) to x64 and arm
Review URL: http://codereview.chromium.org/661469

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 11:58:33 +00:00
kasperl@chromium.org
95964bd95f Let the callers of V8::ContextDisposedNoticication() know
how many pending context disposals there are.
Review URL: http://codereview.chromium.org/669266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 11:19:20 +00:00
erik.corry@gmail.com
9fd33e74f5 Speed up no-capture case for RegExp.exec().
Review URL: http://codereview.chromium.org/669161

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 08:49:14 +00:00
peter.rybin@gmail.com
a934eb1523 Quick fix for r4045
Review URL: http://codereview.chromium.org/668203

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-06 01:21:34 +00:00
erik.corry@gmail.com
00a44ae51a Make more use of the NumberInfo data.
Makes NumberInfo into a real class.
Fix bug where NumberInfo was lost in ToRegister.
Allow 17 bits in safe Smis instead of 16.
Review URL: http://codereview.chromium.org/668151

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 23:54:13 +00:00
peter.rybin@gmail.com
77d63cc29e Basic implementation of liveedit feature
Review URL: http://codereview.chromium.org/652027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 22:08:58 +00:00
antonm@chromium.org
85632fca35 Explicitly release allocated memory as Vector doesn't do that in dtor.
Review URL: http://codereview.chromium.org/669164

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 16:46:39 +00:00
antonm@chromium.org
1bc04768a9 An attempt to fix the tests.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 15:07:53 +00:00
sgjesse@chromium.org
df4471c8f3 Fix stack tweaking in array allocation
When Array(0) or new Array(0) is handled by the generated code it is handled
by the same code as Array() and new Array(). For this to work the stack is
tweaked to remove the argument of value 0. However the argc was still passed
as 1 if a call to the runtime system was made.

When the stack is tweaked argc is also changed to 0.

BUG=634
TEST=test/mjsunittest/mjsunit/regress/regress-634.js
Review URL: http://codereview.chromium.org/668155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 13:43:53 +00:00
kasperl@chromium.org
b83ca84d8f Revert r4029.
Review URL: http://codereview.chromium.org/668153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 13:35:59 +00:00
vitalyr@chromium.org
48cc7ed3b0 Fixed filling of char array in StringToArray.
Review URL: http://codereview.chromium.org/669159

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 13:33:33 +00:00
vitalyr@chromium.org
9ce2f728d5 Removed dangerous Factory::NewUninitializedFixedArray.
This was used in runtime StringToArray function which I simplified
keeping its performance for ascii strings.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 12:30:59 +00:00
antonm@chromium.org
8c2c7fde17 Fixing style of variable names.
Review URL: http://codereview.chromium.org/668149

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 11:19:37 +00:00
kasperl@chromium.org
503c7ee70e Try to let the context disposal GC at idle time have less
impact on the normal idle notification scheme by making sure
we do not restart the idle GC sequence just because of a
forced GC due to context disposal.
Review URL: http://codereview.chromium.org/669150

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 08:58:59 +00:00
kasperl@chromium.org
95795db1f5 Try to allow the new context disposal GC heuristic to kick
in even when running with --expose-gc.
Review URL: http://codereview.chromium.org/668143

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-05 07:35:06 +00:00
antonm@chromium.org
61d2ebde63 Fix invalid fast return in splice when returned array is empty.
TBR=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 22:16:58 +00:00
antonm@chromium.org
56eb46e096 Fix a special case (zero length result array).
Review URL: http://codereview.chromium.org/669075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 21:29:33 +00:00
vitalyr@chromium.org
05a74e8131 Add runtime function for string to array conversion.
Review URL: http://codereview.chromium.org/669060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 14:03:08 +00:00
kasperl@chromium.org
8c086c50dd Try to fix issue 632 by being more careful in the locking/unlocking
in the test-log/ProfMultipleThreads.
Review URL: http://codereview.chromium.org/669058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 13:25:23 +00:00
ricow@chromium.org
d3cf6cbf75 Added new ia32 assembler instructions to the diassembler from Math.pow inline implementation.
Review URL: http://codereview.chromium.org/668056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 12:51:49 +00:00
mikhail.naganov@gmail.com
6df83af604 [Linux] Patch LogSharedLibraryAddresses to work correctly on Android.
On 'usual' Linux systems in '/proc/self/maps' we encounter two entries
per library: one has 'rw-p' attrs and the other has 'r-xp'. While on
Android, I see 'rwxp' and 'r-xp' (both entries are marked executable.)
So I've added an explicit check for non-writability to leave only a
single record in the log file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 12:32:47 +00:00
mikhail.naganov@gmail.com
af3fc27613 Assign to "sample.state" before reading it.
I noticed a funny thing: in StackTracer::Trace "sample.state" is
checked, but it is only assigned after the check. I've put assignment
before the check.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 12:32:03 +00:00
ager@chromium.org
fe3b875577 Add IsExecutionTerminating api method.
IsExecutionTerminating returns true if a termination exception is
currently being propagated.  C++ code should not reenter V8 when
IsExecutionTerminating returns true.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 12:13:04 +00:00
bak@chromium.org
9f85caeb2d - Fixed the compilation cache so Put works.
- Cleaned up the calls to HashTable::Allocate.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 11:27:28 +00:00
iposva@chromium.org
7e163d2552 - Rearrange fields in SharedFunctionInfo.
Review URL: http://codereview.chromium.org/669051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 09:55:04 +00:00
whesse@chromium.org
f4190f9876 Change heap sort of descriptor array to bottom-up.
Review URL: http://codereview.chromium.org/661470

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4013 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 09:27:45 +00:00
kasperl@chromium.org
5cee8eeb3d Nasty workaround for bug 632.
Review URL: http://codereview.chromium.org/669045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 07:43:05 +00:00
vitalyr@chromium.org
6e32048eda Fast case conversion for ascii strings.
Review URL: http://codereview.chromium.org/660455

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 16:40:29 +00:00
bak@chromium.org
1334adbd40 - Changed the initial size for HashTable.
- Pretenured large expanding hash tables.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 16:22:17 +00:00
oleg@chromium.org
d49a5db0a4 Fix broken test in WebKit test suite and add the test in question to V8 tests.
Review URL: http://codereview.chromium.org/661466

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 14:19:04 +00:00
lrn@chromium.org
d51f2c96cb Added implementation if Uint32::Value.
Review URL: http://codereview.chromium.org/661275

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 13:44:20 +00:00
sgjesse@chromium.org
fca7b2cefa Refactor the scanner interface
No need to create sub strings for lazy compiles. The scanner will start from the start position provided.

Moved the creating of character streams into the scanner where possible. This uses a input buffer in the scanner class instead of a stack allocated one.

Added a UTF16 buffer for reading external ascii strings (by templating the external two byte string one) as all the source for the builtins are exposed as external ascii strings.
Review URL: http://codereview.chromium.org/661367

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 13:16:10 +00:00
fschneider@chromium.org
b0e9a9203f Remove a duplicated move instruction for store IC calls on ia32.
Review URL: http://codereview.chromium.org/661461

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 11:43:45 +00:00
kasperl@chromium.org
c309a63369 Remove the deprecated context disposal GC heuristic.
Review URL: http://codereview.chromium.org/661458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 11:41:22 +00:00
vitalyr@chromium.org
9f681fa9d6 Small API improvements:
* Added Get and Set taking uint32_t for faster and more convenient
   access to elements.

 * Added less verbose casting for handles. Now instead of
       v8::Local<v8::String>::Cast(args[0])
   one can write
       args[0].As<v8::String>().

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 18:47:03 +00:00
oleg@chromium.org
99e67e0e77 Prevent "control reaches end of non-void function" warning from gcc on Mac.
Review URL: http://codereview.chromium.org/660379

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 14:44:01 +00:00
oleg@chromium.org
96ff21c703 Fix minor syntax error which broke the compilation.
TBR=whesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 14:32:31 +00:00
oleg@chromium.org
5e0763efd5 Revert change to EquivalentTime in date.js. The checks that I've removed in the last changed were essential after all.
Review URL: http://codereview.chromium.org/660375

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 14:19:34 +00:00
whesse@chromium.org
7657955f3f Add syntax checker for side-effect-free expressions to AstOptimizer in rewriter.cc. Add bit fields for syntax checker results to Expression in ast.h.
Review URL: http://codereview.chromium.org/660372

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 14:00:59 +00:00
oleg@chromium.org
b021997f81 Rewrite MakeDay function from JS to C++.
Review URL: http://codereview.chromium.org/661366

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 13:29:26 +00:00
antonm@chromium.org
bfe1f02c3f Add cld before doing rep movs.
Review URL: http://codereview.chromium.org/661368

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 13:22:04 +00:00
antonm@chromium.org
38acad676a Faster filling newly allocated arrays with the holes from the Array construction stub.
Review URL: http://codereview.chromium.org/661245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 12:42:15 +00:00
bak@chromium.org
6bee49ddda - Changed the growth policy for hash tables to reduce the wasted memory.
Now we fill hashtables 75% before expanding.
  
Review URL: http://codereview.chromium.org/660373

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 12:27:11 +00:00
sgjesse@chromium.org
d960bd2c4b Re-introduce this as a trivial expression
The reverts r3939 as it turned out not be the root cause for the regression http://crbug.com/36604.
Review URL: http://codereview.chromium.org/661365

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 11:58:10 +00:00
erik.corry@gmail.com
c2106c13fc Allow snapshots built without -DANDROID to work on Android.
Fix bug in fast code generator on ARM (can't use ip as scratch
in RecordWrite).
Activate normal-sized compilation cache on Android.
This is a port of 3938 from the partial snapshots branch.
Review URL: http://codereview.chromium.org/652227

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 11:54:11 +00:00
fschneider@chromium.org
5183607d81 Implementation of a fixed-size bit vector.
This is a basic implementation bit vector containing an fixed 
arbitrary number of bits.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 10:43:46 +00:00
mikhail.naganov@gmail.com
16b34b8c6e Parametrize C++ splay tree with allocator.
Thus, now there is a "generic" SplayTree and its Zone-bound
specialization ZoneSplayTree.

This is needed for my reimplementation of profiler tree generation in
C++. As generation is performed in a separate thread, Zone can't be
used, because it intentionally not thread-safe.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 10:03:38 +00:00
peter.rybin@gmail.com
aec90d099e Enable GC update for pointers in GenerateKeyedLoadICDebugBreak
Review URL: http://codereview.chromium.org/660257

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 17:26:46 +00:00
kaznacheev@chromium.org
7d58852374 Implementing inline caches for binary operations (ia32).
This is a subset of a CL reviewed earlier(http://codereview.chromium.org/551093).
The register usage optimisation part has been reviewed and submitted separately.
Two fast cases supported: HeapNumber operands and String operands for ADD.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 16:24:05 +00:00
antonm@chromium.org
d4cb1ba3c5 Faster moving FixedArray elements around.
Review URL: http://codereview.chromium.org/660245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 15:33:30 +00:00
mikhail.naganov@gmail.com
b7f0608c9a Logging-related changes.
- when logging 'open-tag' / 'close-tag' events, don't depend on
   FLAG_log (as it may be not enabled, e.g. in Chromium);

 - PauseProfiler / ResumeProfiler were supposing that they
   use 'is_logging_' var exclusively, thus preventing any
   other logging that may be turned on for diagnostic purposes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 10:41:34 +00:00
kasperl@chromium.org
a60beefd1b Tweak the new context disposal GC heuristic to cleanly separate
it from the old heuristic (disabled if the new notications are 
used) and make sure to not force a GC if one has already happened
after V8 received the last context disposal notification.
Review URL: http://codereview.chromium.org/660267

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 08:49:33 +00:00
whesse@chromium.org
09e3bac689 Move definitions of named registers as constant structures to assembler-arm.h file.
Review URL: http://codereview.chromium.org/660256

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 08:34:09 +00:00
sgjesse@chromium.org
dee0b9d636 Update MIPS port to support recent changes
This lands http://codereview.chromium.org/660244.

Patch by Alexandre Rames from Sigma Designs Inc.
Review URL: http://codereview.chromium.org/661268

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 08:32:54 +00:00
kasperl@chromium.org
9f2f6f4022 Count GlobalHandles::PostGarbageCollectionProcessing() as being
in external code so it's visible when running with --trace-gc.

Landed on behalf of James Robinson (jamesr@chromium.org).

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 07:04:42 +00:00
vitalyr@chromium.org
dd7b55eb9f Implemented one-char cache lookup in generated code.
This speeds up string,charAt(n) and string[n].

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 20:14:20 +00:00
antonm@chromium.org
0c77912aaf Return length passed instead of receiver to allow chained assignments like
foo = a.length = 7

BUG=crbug.com/36854

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 16:12:39 +00:00
ager@chromium.org
b299c61976 Add missing error message for calling functions on incompatible receivers.
Review URL: http://codereview.chromium.org/660178

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 15:46:57 +00:00
antonm@chromium.org
3051ba1a5b Faster filling of arrays of holes.
Review URL: http://codereview.chromium.org/661105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 15:19:13 +00:00
bak@chromium.org
4766a592ce - Pushed source code for functions into old space.
- Renamed TryFlattenIfNotFlat to TryFlatten.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 14:37:33 +00:00
fschneider@chromium.org
1d330492af Make another small virtual frame function inlined.
Move a constructor to the platform-independent -inl.h file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 14:02:29 +00:00
ricow@chromium.org
46440e6f77 Moved initialization of xmm3 making sure it is initialized on all paths in GeneratePow - solves the sputnik failure on mac.
Review URL: http://codereview.chromium.org/661177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 12:28:25 +00:00
bak@chromium.org
0e0594dcbc Removed space to please lint.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 12:00:10 +00:00
kasperl@chromium.org
4abae7a728 Add an explicit API entry to notify V8 that one or more
contexts have been disposed. 
Review URL: http://codereview.chromium.org/661173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 11:51:33 +00:00
bak@chromium.org
0adf83b10d - Moved the computation of old space limits to after the mandatory scavenge.
This reduces the number of mark sweep operations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 11:48:18 +00:00
ricow@chromium.org
def4980625 Changed GeneratePow ensure xmm1 is loaded with y before making the test for NaN
Review URL: http://codereview.chromium.org/660172

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 11:09:06 +00:00
ricow@chromium.org
496868722f Added fast support for Math.pow. This simply calculates the result using the
same method as the old powi version in runtime.cc and also checks if
the exponent is 0.5 or -0.5 in which case we calculate the square root or 
reciprocal value of the square root.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 10:24:58 +00:00
fschneider@chromium.org
893637a057 Inlining a few virtual frame functions.
Introducing a virtual-frame-inl.h file containing some platform-independent
virtual frame function which are small enough to be inlined.

Removed unnecessary #include of virtual-frame.h from register-allocator-inl.h
and added the necessary explicit includes in a number of files.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 09:32:48 +00:00
kasperl@chromium.org
57f47e704f Add information about time spent in external callback to
traces produces with --trace-gc.
Review URL: http://codereview.chromium.org/661170

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 08:27:20 +00:00
ager@chromium.org
d2061c07c8 Fix presubmit error.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/661090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 18:26:36 +00:00
ager@chromium.org
4a9d4b7bd5 Fix the mac debug build. Apparently g++ on Mac cannot figure out that there
is a return in each branch of an if-else.

TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/661088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 18:19:12 +00:00
whesse@chromium.org
a3a3a1f0be Change KeyedStoreIC interface to take value, key, and receiver in registers.
Review URL: http://codereview.chromium.org/608031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 18:04:25 +00:00
oleg@chromium.org
a6940ef0a8 Optimize three Number2Integer functions in runtime.cc: remove the check that was already done in JavaScript, add simpler code in case we are getting a SMI
result.

Code review: http://codereview.chromium.org/660084


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 16:46:37 +00:00
sgjesse@chromium.org
05ae9effa3 Revert r3952
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/660086

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 15:43:27 +00:00
sgjesse@chromium.org
8398287070 Refactor the code cache to handle large number of properties on the global object.
A separate object type for the code cache have been added. This object has two different code caches. The first one (default_cache) is a fixed array organized in the same way as the as the code cache was before. The second cache (global_access_cache) is for code stubs to access the global object. This cache is organized as a hash table taking the property name and code flags as the key.

The reason for separating the global access stubs into a hash table representation is that the number of these is not bounded in the same was as the other types.

BUG=613
Review URL: http://codereview.chromium.org/652119

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 14:24:44 +00:00
serya@chromium.org
164daeda7a Adding 'static const' for arg numbers used with CallCFunction.
Review URL: http://codereview.chromium.org/660078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 13:06:05 +00:00
vitalyr@chromium.org
945673574e Improve string runtime compare performance for flat strings.
Review URL: http://codereview.chromium.org/650058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 12:49:23 +00:00
lrn@chromium.org
024faf1105 Fix test for overflow in memory allocation Failure payload.
It bailed out too early, and could give a DEBUG assertion failure due
to right shift being artihmetic. Changed values to unsigned to be safe.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 12:28:35 +00:00
serya@chromium.org
2c872c26fd AllignFrame/CallCFuntion moved from regexp-macro-assembler-ia32 to macro-assembler-ia32 (like in x64 version).
Review URL: http://codereview.chromium.org/657080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 12:18:55 +00:00
ager@chromium.org
fc382f0ffa Revert pax change as it does not work with older versions of scons.
Review URL: http://codereview.chromium.org/661071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 08:27:07 +00:00
peter.rybin@gmail.com
4b6b2dc9c6 Implement BlindReference object and provide couple of liveedit-specific structures
Review URL: http://codereview.chromium.org/650127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 19:59:09 +00:00
vitalyr@chromium.org
e76f06a1e2 Fix miss in smi check when doing fast api call.
BUG=http://crbug.com/36604

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 19:26:10 +00:00
vitalyr@chromium.org
3d76502914 Fix uninitialized memory read in CallOptimization.
BUG=http://crbug.com/36602

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 19:14:21 +00:00
ager@chromium.org
be1ea81cbf Land change to allow building on Gentoo Hardened Linux.
Codereview URL: http://codereview.chromium.org/659002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 18:50:56 +00:00
sgjesse@chromium.org
6ceb6d95fc Don't treat this as a trivial expression.
This caused some regressions in Chromium.

BUG=http://crbug.com/36604
Review URL: http://codereview.chromium.org/652228

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 14:02:20 +00:00
serya@chromium.org
43d074985a Review URL: http://codereview.chromium.org/652118
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-24 08:33:51 +00:00
whesse@chromium.org
ce1f6b2a3c Add comment to generated code that says which code generator compiled it.
Review URL: http://codereview.chromium.org/652110

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 12:40:36 +00:00
lrn@chromium.org
3135110af8 IA32: Native access to TranscendentalCache for sin/cos.
Review URL: http://codereview.chromium.org/652041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 10:29:02 +00:00
fschneider@chromium.org
2883c03037 Prepare push to trunk. Now working on 2.1.3.
Review URL: http://codereview.chromium.org/654003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 10:22:07 +00:00
fschneider@chromium.org
d955c20beb Fix reliability crash caused by wrong assert.
These two asserts in ComputeEntryFrame are wrong since the
virtual frame already knows how to deal with the number type
information of copy elements: We do not store type 
information with copy elements. Instead the backing element
contains the type information.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 15:42:23 +00:00
whesse@chromium.org
2074e4847d Add integer casts to make v8 compile without warnings on 64-bit Visual Studio
Review URL: http://codereview.chromium.org/650140

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 11:42:46 +00:00
whesse@chromium.org
df9544d598 Declare register names as constants in assembler-x64.h. Fix for issue 615.
Review URL: http://codereview.chromium.org/650136

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 11:41:52 +00:00
sgjesse@chromium.org
38f2363df6 Consistently return failure if the stub cache cannot deliver a code object
Some functions of the stub cache returned undefined if a code stub could not be generated. However the clients of these functions only cehcks for failure. Now all these functions return a failire object if no code stub can be made available
Review URL: http://codereview.chromium.org/652039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 10:04:22 +00:00
vitalyr@chromium.org
91a2fb7ace Land patch by Oleg Eterevsky (oleg@chromium.org).
Original review: http://codereview.chromium.org/646010/show

Change the implementation of lastIndexOf method of String. Convert the
strings in question to Vector<char> or Vector<uc16> and execute simple
search algorithm on them.

The difference in speed on 500k character string is about 10x.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 17:11:47 +00:00
whesse@chromium.org
d931c9b70a Improve stores to global variables.
Review URL: http://codereview.chromium.org/650028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 15:04:16 +00:00
kmillikin@chromium.org
a9202fc45d Begin using a list of bailouts instead of a singleton in the fast code generator.
A list of bailout descriptions is kept in the CompilationInfo
structure that is shared between the primary and secondary code
generators.  The primary adds a description to the list for each
bailout position.

Responsibility for binding labels is moved from the primary to the
secondary code generator. All the labels still target the start of the
secondary code and the compilation state of the primary is still
ignored.

Move the compilation mode flag to the CompilationInfo.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 14:52:39 +00:00
yurys@chromium.org
a47746d209 Add maxStrinLength argument to debugger requests
Review URL: http://codereview.chromium.org/647022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 14:33:08 +00:00
vitalyr@chromium.org
c03db75853 Some string optimizations:
* Inlined checks for strings and regexps.
 * Rewrote split for the non-regexp case.
 * Implemented one-char case for lastIndexOf.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 13:07:37 +00:00
ricow@chromium.org
24011207c6 Removed asserts on attributes when setting elements. Will file a bug on not handling elements correctly when using Object.defineProperty
Review URL: http://codereview.chromium.org/651025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 12:16:00 +00:00
ager@chromium.org
469d694d5b Add missing break in GetPropertyWithFailedAccessCheck. This break has
been missing for a long time but the fallthrough to the default case
used to break.  Now the default case should be unreachable and the
fallthrough therefore causes assertion failures.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 12:10:46 +00:00
kmillikin@chromium.org
49a336e5be Reorder code in fast-codegen-ia32.cc.
Reorder code so that helper functions and simple accessors come before
all the visit function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 11:39:12 +00:00
whesse@chromium.org
d2dd02152c Improve load of global variables.
Review URL: http://codereview.chromium.org/651019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 10:05:33 +00:00
fschneider@chromium.org
ec86513519 Make class BitField able to use 32 bits of a uint32.
Although algorithmically correct, the compiler would not allow to instantiate
a BitField that uses all 32 bits without warnings about a too large shift
count. As a consequence we were limited to 31 bit values when using BitField.

This happened when instantiating a bitfield BitField<T, shift, size> with 
[shift=0, size=32] or [shift=31, size=1] or more general any 
[shift=X, size=32-X]

As side-effect of the new implementation the compiler now warns if we ever
try instantiating a bitfield with size 0.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 10:02:04 +00:00
fschneider@chromium.org
62d62cb8e2 Fix missing includes.
TBR=kmillikin@chromium.org, 
Review URL: http://codereview.chromium.org/650025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 09:59:47 +00:00
fschneider@chromium.org
226769d8bf Temporarily move the ia32 fast code generator into the platform-specific directory.
This allows us to make changes to one platform without affecting the others.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 09:17:37 +00:00
kmillikin@chromium.org
e1041c9f9c Introduce 'trivial' expressions, use them for this property assignments.
Add a (currently) syntactic predicate to AST expression nodes telling
whether they are 'trivial'.  Trivial expressions have no side effects,
do not require storage to be allocated for them, and can be evaluated
out of order (because their value does not change between when they
are visited by the code generator as expressions in the AST and when
it is consumed).

Mark 'this' and literals as trivial.  Allow them to be pushed on the
virtual frame.  Make use of them to push 'this' more lazily in this
property assignments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 09:01:31 +00:00
ager@chromium.org
d316336162 Prepare push to trunk. Now working on version 2.1.2.
Review URL: http://codereview.chromium.org/651016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 08:19:20 +00:00
antonm@chromium.org
f70dd176a6 Make setting length on arrays faster.
Review URL: http://codereview.chromium.org/647013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 17:30:32 +00:00
ager@chromium.org
806c15e4b5 Remove the LookupResult IsValid method because it is confusing.
Replaced IsValid by IsPropertyOrTransition and used IsProperty in most
of the places where IsValid was used before.  Most of the time when
inspecting a lookup result we really want to know if there is a real
property present.  Only for stores are we interested in transitions.

BUG=http://crbug.com/20104
TEST=cctest/test-api/NamedInterceptorMapTransitionRead
Review URL: http://codereview.chromium.org/647015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 15:10:35 +00:00
ricow@chromium.org
0d6fe0a44f Added access check to SetNormalizedProperty which is used from runtime DefineOrRedefineDataProperty.
Review URL: http://codereview.chromium.org/647010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 13:13:21 +00:00
kmillikin@chromium.org
e5584e45e2 Refactor assignments in the ia32 code generator.
Change compilation of assignment expressions in the ia32 code
generator to no longer use the Reference helper class.  This gives us
more explicit control over which subexpressions are evaluated and
when.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 13:02:17 +00:00
sgjesse@chromium.org
17e80e76e7 Add a test case for issue 618
Review URL: http://codereview.chromium.org/647014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 13:01:58 +00:00
whesse@chromium.org
b9a250d2e6 Fix error in compound assignment to keyed load by making platform-independent full compiler code platform dependent, add test of compound assignments.
Review URL: http://codereview.chromium.org/646009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 12:59:41 +00:00
mikhail.naganov@gmail.com
b740dea517 Kill some unused code.
It doesn't mean I'm participating in some fixit, just spotted some
code which doesn't have usages and decided to remove it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 12:47:17 +00:00
whesse@chromium.org
70c7e513af Change KeyedLoadIC interface on ia32 to take receiver and name in registers.
Review URL: http://codereview.chromium.org/601080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 10:09:54 +00:00
sgjesse@chromium.org
97d842fa1e Fix issues with commit r3839
Fix broken condition.
Fixe some style issues.
Re-enabel part of a test which was turned off.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/647007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 09:41:47 +00:00
sgjesse@chromium.org
ecf4b9fc76 Refactor the check for generating inline constructors
Moved all the logic to a function on SharedFunctionInfo (including the flag check) to make things more readable.

Changed the check for setter to do a lookup for a named setter for each of the properties assigned in the constructor.

Added tests using accessors and interseptors set through the API.

Added fast case objects to the mjsunit test.

TEST=test/mjsunit/setter-on-constructor-prototype.js
TEST=test/cctest/test-api/SetterOnConstructorPrototype
TEST=test/cctest/test-api/InterceptorOnConstructorPrototype
Review URL: http://codereview.chromium.org/619006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-18 09:07:03 +00:00
peter.rybin@gmail.com
95ae024771 Fix lint errors
Review URL: http://codereview.chromium.org/626002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 20:57:05 +00:00
peter.rybin@gmail.com
3849f08ade Add central bridge for liveedit support
Review URL: http://codereview.chromium.org/607004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 20:37:08 +00:00
kmillikin@chromium.org
68246ec4a9 Remove a generated mov and jmp.
Remove a move and jump from the fast-path code in the speculative
backend. Ultimately, this code belongs to the bailout and not the
fast path.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 14:18:47 +00:00
mikhail.naganov@gmail.com
39e63f0aec Implement tagging of profiler log event blocks.
This change allows to associate integer tags with blocks of profiler
log events, and repeat calls to 'ResumeProfiler' / 'PauseProfiler' in
order to establsh nested (not necessary properly nested) blocks. By
supporting this, we will be able to match WebInspector's CPU profiler
abilities in DevTools.

I also refactored some testing code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 13:23:46 +00:00
whesse@chromium.org
1b526cc700 Remove obsolete bug TODO
Review URL: http://codereview.chromium.org/618006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 13:16:53 +00:00
antonm@chromium.org
a346644121 Adding checks for the cases when array grows too big.
Review URL: http://codereview.chromium.org/601092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 13:04:30 +00:00
sgjesse@chromium.org
1684b2d9ac Remove duplicate function from runtime.
Review URL: http://codereview.chromium.org/620003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 11:26:00 +00:00
antonm@chromium.org
be21c71584 Introduce Array.splice builtin.
Review URL: http://codereview.chromium.org/618002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 10:54:49 +00:00
kmillikin@chromium.org
3c0d77f32e Fix stack corruption when calling non-function.
Fix for issue 603.

Revision r3484 removed the property name from the call stack for
call ICs.  When a non-function was called via a call IC and
Function.prototype.call, an extra value was left on the stack that the
caller could not know to clean up.

Fix is to change the JS builtin used for calling non-functions.  It
now gets the callee as receiver, rather than iterating stack frames
and finding it on the expression stack of its JS caller.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 08:26:50 +00:00
antonm@chromium.org
a48a7bf6ff Add class name into FunctionTemplateInfo debug printing.
Review URL: http://codereview.chromium.org/608015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 07:14:43 +00:00
antonm@chromium.org
087fedeae8 Normalize the object before updating getter/setter info.
BUG=612

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 06:53:19 +00:00
sgjesse@chromium.org
1c2b2ac9c6 Fix construction of simple objects with setters on prototype
Simple objects which are constructed without calling the actual constructor function did not take setters defined on prototype chain of the new object into account.

Constructing objects this way is now not done if there are setters involved on the prototype chain of the new object.

This only fixes the case where the setter is found when the first object from a constructor is created. If the prototype chain is changed new objects will on take any change to setters into account.

TEST=test/mjsunit/setter-on-constructor-prototype.js
Review URL: http://codereview.chromium.org/606062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 06:28:33 +00:00
vitalyr@chromium.org
ad9ea637be Don't externalize fresh strings.
With the current API the embedder has to extrenalize a string each
time a string is encountered to avoid the cost of repeated character
copying/conversion. The issue here is that the externalization cost
itself is non-negligible (both in time and space) and should not be
paid for a rarely used string. This change is an attempt to predict a
string's usage frequency based on its freshness. A string is
considered fresh if it was recently allocated in the new space.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3878 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 18:56:07 +00:00
mikhail.naganov@gmail.com
e61996bf3f Fix the build after previous commit.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 15:29:35 +00:00
mikhail.naganov@gmail.com
dcef87af66 Enable passing of script data via script creation methods.
Patch by Andrey Kosyakov <caseq@chromium.org>
Original issue http://codereview.chromium.org/606053

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 15:15:31 +00:00
ager@chromium.org
a9e174f8ea Make sure that the inline_new flag guards all the optimizations for
constructors that only contain simple this assignments.

Make sure that constructors with declarations are not treated as
constructors with only simple this property assignments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 15:14:34 +00:00
antonm@chromium.org
8bc68937a7 Port keyed interceptor stubs to ARM and x64.
Review URL: http://codereview.chromium.org/600123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 14:13:21 +00:00
fschneider@chromium.org
fc67ad346a Pass the complete number type information into the GenericBinaryOpStub.
Currently we only pass a boolean parameter indicating whether
the input operands to the GenericBinaryOpStub are guaranteed
to be numbers or not. 

Instead we pass the complete number type as a parameters. This 
allows to use more precise type information for code generation
in the stub.

Also make the computation of the result type more precise and correct on both ia32 and x64.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 13:03:16 +00:00
mikhail.naganov@gmail.com
8f3ae5b60a Fix regression in cctest/test-log/EquivalenceOfLoggingAndTraversal
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 13:01:05 +00:00
antonm@chromium.org
ea1b4f0eb1 Introduce builtin for Array.slice function.
Review URL: http://codereview.chromium.org/604059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 12:14:23 +00:00
mikhail.naganov@gmail.com
899bef8226 Use binary search in GetScriptLineNumber.
Patch by Ilya Tikhonovsky <loislo@chromium.org>
Original issue http://codereview.chromium.org/593108

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 12:08:10 +00:00
ager@chromium.org
69b96e608a Land thumb2 assembler update.
Review URL: http://codereview.chromium.org/596065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 11:40:56 +00:00
sgjesse@chromium.org
58207806fe Fix inline NumberToString
Glitch in pre-commit cleanup.

TBR=ager@chromium.orgZ
Review URL: http://codereview.chromium.org/600134

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 11:16:10 +00:00
ager@chromium.org
51b5df388c Port arguments object allocation in generated code to ARM and x64.
BUG=v8:611
Review URL: http://codereview.chromium.org/605024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 10:50:56 +00:00
yurys@chromium.org
0630b1fd9f Object.getOwnPropertyNames should return string names for indexed properties
Land original change by pfeldman: http://codereview.chromium.org/596117
Review URL: http://codereview.chromium.org/596124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 10:08:39 +00:00
sgjesse@chromium.org
6093d0dbf5 Inline NumberToString
NumberToString in runtime JavaScript is inlined through a call to a stub. Currently the stub only checks the number string cache and only if the number is a smi. Code is shared with the inlining of number string cache lookup when adding a smi to a string.
Review URL: http://codereview.chromium.org/604062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 09:41:11 +00:00
ager@chromium.org
7f422b2a35 Remove caching of ToBoolean on the global context. This was used for
API operations but the API C++ code no longer performs a call to the
JavaScript code for ToBoolean.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 09:24:14 +00:00
kmillikin@chromium.org
edfc3c31b3 Remove printf committed by mistake
Review URL: http://codereview.chromium.org/600126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-16 07:54:28 +00:00
fschneider@chromium.org
82341d28b3 Fix arm build.
Change the function declarations in the arm virtual frame header 
file to match the other platform.

TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/608007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 14:47:03 +00:00
fschneider@chromium.org
dbe99e405a Introduce number type information in the virtual frame.
Each frame element gets a new attribute with number type information. A frame element can be: 

- smi 
- heap number 
- number (i.e. either of the above) 
- or something else. 

The type information is propagated along with all virtual frame operations. 
Results popped from the frame carry the number information with them.

Two optimizations in the code generator make use of the new 
information: 
- GenericBinaryOpSyub omits map checks if input operands are numbers. 
- Boolean conversion for numbers: Emit inline code for converting a number (smi or heap number) to boolean. Do not emit call to ToBoolean stub in this case.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 14:24:38 +00:00
mikhail.naganov@gmail.com
d3ce4347d9 Add GetScriptOrigin and GetScriptLineNumber functions for Timeline panel.
Patch by Ilya Tikhonovsky <loislo@chromium.org>.
Original issue: http://codereview.chromium.org/565007

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 14:19:15 +00:00
antonm@chromium.org
e02a5aa602 Introduce builtin for Array.unshift function.
Review URL: http://codereview.chromium.org/600124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 13:25:06 +00:00
kmillikin@chromium.org
a2bb215611 Change the interface of CallStubCompiler::CompileCallInterceptor.
Move responsibility for a typecast into the caller so that it can be
locally verified to succeed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 13:20:49 +00:00
antonm@chromium.org
3d4d5e9e34 Refactoring various pieces of post interceptor caching.
Review URL: http://codereview.chromium.org/596096

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 12:32:27 +00:00
whesse@chromium.org
58b04396bf Change CallIC interface on ARM. Remove name from the stack, and pass it in register r2.
Review URL: http://codereview.chromium.org/598065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 12:26:07 +00:00
whesse@chromium.org
4507ca1523 Simplify compilation of CallIC interceptor stub.
Review URL: http://codereview.chromium.org/604054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 11:52:18 +00:00
antonm@chromium.org
01b1176e08 Introduce builtin for Array.shift function.
Review URL: http://codereview.chromium.org/606017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 09:17:38 +00:00
yurys@chromium.org
f5eb70e411 Land 598061(Process //@ scriptURL=url comment for scripts that don't have name set)
Review URL: http://codereview.chromium.org/596088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 17:17:13 +00:00
kmillikin@chromium.org
61ce433d82 Change interface to CodeGenerator::LoadFromSlot.
Change the interface to LoadFromSlot, LoadFromSlotCheckForArguments,
and LoadFromGlobalSlotCheckExtensions in the ia32 classic code
generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 16:39:07 +00:00
whesse@chromium.org
077d785842 Fix CallIC stub for CallInterceptor on ARM
Review URL: http://codereview.chromium.org/593080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 16:01:38 +00:00
antonm@chromium.org
62a9497787 Compile very thin code to access objects on which indexed interceptor is set.
Review URL: http://codereview.chromium.org/603028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 14:21:18 +00:00
sgjesse@chromium.org
f937e7daa5 Fix array allocation in generated code on x64
The porting of array allocation in generated code from ia32 to x64 wrongly assumed that a smi contained the actual number times 2. Removed the constant times_half_pointer_size, as it will probably not be needed.
Review URL: http://codereview.chromium.org/596084

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 13:49:57 +00:00
lrn@chromium.org
2e6ab729ef Added optimization for div/mod by constant power of 2.
Review URL: http://codereview.chromium.org/597059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 13:37:10 +00:00
sgjesse@chromium.org
e60efbff28 Optimize string plus smi
When adding a string with a smi value the number string cache is checked in generated code. If the there is a string value in the number string cache the resulting string is produced in generated code.
Review URL: http://codereview.chromium.org/596082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 11:55:04 +00:00
sgjesse@chromium.org
46020b3169 Probe the symbol table for two character strings in native code
All two character string results from adding two strings and from sub string used to be handled in the runtime system as a lookup in the symbol table was done before allocating a new string. The native code for string add and sub string now probes the symbol cache for two character strings to avoid the runtime call. If the result string is not found in the symbol table within a fixed number of probes a new string is just allocated. Newly allocated two character strings are not added to the symbol table immediately.
Review URL: http://codereview.chromium.org/598062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 11:43:00 +00:00
whesse@chromium.org
c7fe99d3ff Change LoadIC interface on ia32 to take arguments in registers.
Review URL: http://codereview.chromium.org/573009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 10:32:24 +00:00
kmillikin@chromium.org
85c24cee57 Change the interface of CodeGenerator::InstantiateBoilerplate.
Begin changing the interface of the virtual-frame-based code generator
to avoid pushing short-lived temporaries on the frame.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 10:28:40 +00:00
fschneider@chromium.org
4a2c81d3b0 Add last use data flow information to the fast code generator.
This change add simple local live variable information to 
the fast code generator.  It supports only AST nodes that 
are accepted by the syntax checker.

Each variable use points to a variable definition structure
which contains the last use of the definition.

To determine whether a variable is live after a certain point
we can check whether its last use occurs later in the evaluation
order defined by the AST labeling number.

The new information is currently only printed out together with
the IR and not yet used for code generation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 10:16:30 +00:00
whesse@chromium.org
4831b79421 Port change in CallIC interface to x64 platform. Name of called function is now passed in rcx.
Review URL: http://codereview.chromium.org/596036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-12 08:53:13 +00:00
ager@chromium.org
4c929953b4 Port FastCloneShallowArrayStub to ARM and x64.
Review URL: http://codereview.chromium.org/597022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-11 12:28:49 +00:00
ager@chromium.org
51a7ecc1f7 Fix problem with GenericBinaryOperationStub::GenerateCall for a Smi
left operand.  For non-commutative operations the right operand could
be overwritten with the Smi left operand.

We need better testing of all of these cases.  We will add more test
cases as a separate commit.
Review URL: http://codereview.chromium.org/598059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-11 12:26:08 +00:00
kmillikin@chromium.org
9b47ae91d1 Simple type tracking in the fast code generator.
Initial implementation of ad hoc must-be-smi tracking in the fast code
generator.  Type information is used to avoid the write barrier for
smi property stores and to avoid the smi check for the inputs/output
of bitwise OR.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-11 08:41:19 +00:00
ager@chromium.org
638cb4f91d Always load the JavaScript builtins code entry from the JavaScript
function instead of baking in the address of the first one that we see
in code.

This removes the need for fixups processing and makes the stubs safe
when there is no natives cache and therefore multiple versions of the
builtin functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-11 08:05:33 +00:00
mikhail.naganov@gmail.com
4f7b9e4da3 Report code stubs to OProfile.
Patch from Dineel D Sule <dsule@codeaurora.org>.
Original issue: http://codereview.chromium.org/600019

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 17:50:16 +00:00
whesse@chromium.org
9344612bef Change StoreIC interface on ARM platform
Review URL: http://codereview.chromium.org/554152

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 15:06:08 +00:00
antonm@chromium.org
5ecfd4bfe9 Refactor prototype setting code and expose SetPrototype to public V8 API.
Review URL: http://codereview.chromium.org/598020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 14:44:15 +00:00
kmillikin@chromium.org
b04a26dc31 Harden global variable accesses in the fast code generator.
Explicitly check that global variables do not have accessors or
interceptors in the fast code generator syntax checker.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 13:46:15 +00:00
antonm@chromium.org
a9664cbd0d Making lint happy.
Review URL: http://codereview.chromium.org/593014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 11:48:53 +00:00
kmillikin@chromium.org
30cf88af6b Restrict the syntax that we aggressively optimize.
Do not use the speculative compiler for functions with other than one
statement in the body, and do not use it if subexpressions can have
side effects.  Bailing out to the beginning of the full code is not
sound if side effects have already occurred.

Add tests that would fail without the restrictions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 09:18:55 +00:00
vitalyr@chromium.org
d1d56d9891 ia32: Fuse map and type checks in call ICs for API functions.
This uses the fact that if a map stayed the same then the object
still passes the type check. A new builtin is added to handle the
API call in this case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 16:14:14 +00:00
whesse@chromium.org
ad83e411e1 Eliminate unused function KeyedStoreIC::GenerateExtendStorage, and unused parameter from StubCompiler::GenerateStoreField.
Review URL: http://codereview.chromium.org/575022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 15:18:37 +00:00
whesse@chromium.org
c00dcbe5f2 Fix error introduced in version 3820. Add optimization suggested by the error.
Review URL: http://codereview.chromium.org/597006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-09 14:19:23 +00:00