Commit Graph

6454 Commits

Author SHA1 Message Date
kmillikin@chromium.org
765cf1f25e Fix presubmit failures.
TBR=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-07 11:11:36 +00:00
kmillikin@chromium.org
94777e213d Remove variable rewrites and the unneccesary Slot class.
R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-07 11:02:31 +00:00
svenpanne@chromium.org
296612c114 Nuked unused method declaration.
Review URL: http://codereview.chromium.org/7841030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-07 09:34:47 +00:00
kmillikin@chromium.org
8b165d414f Fix a bug in abrupt exit from with or catch inside finally.
When with or catch is nested inside finally, we were not properly restoring
the context in the stack for the finally code.  Also, as a small
optimization, restore it from the handler block instead of iteratively
unwinding contexts.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-07 09:21:44 +00:00
keuchel@chromium.org
85a5b6d3c4 Getting rid of ExitContextStatement for scoped blocks.
Review URL: http://codereview.chromium.org/7835027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 22:00:59 +00:00
keuchel@chromium.org
edd893a159 Simplfy handling of exits from scoped blocks.
BUG=
TEST=mjsunit/harmony/block-leave.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 21:48:32 +00:00
keuchel@chromium.org
0820205316 Avoid dynamic lookup when initializing let declared variables.
'Let's inside a 'with' would initialize the variable
using the StoreContextSlot runtime function which
would fail because it checks that the variable does
not hold the hole value.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 21:22:35 +00:00
yangguo@chromium.org
8b82ad274f Put test directories of d8-os tests into /tmp/.
Review URL: http://codereview.chromium.org/7835040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 14:48:08 +00:00
jkummerow@chromium.org
09c66d20ce Fix possible crash in FixedDoubleArray::Initialize()
(this only affected ia32).

BUG=95113
TEST=mjsunit/regress/regress-95113.js passes without crashing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 14:07:54 +00:00
ricow@chromium.org
df9d8ee8be Fix map space explosion from changing the arguments and caller properties on native functions.
Adding these local properties on all native functions made us do a
ConvertDescriptorToField on the callback on each and every native
functions, resulting in us creating an extra map for each of these.
Review URL: http://codereview.chromium.org/7779046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 14:03:32 +00:00
vegorov@chromium.org
d451878c91 Fix bug in Page::GetRegionMaskForSpan.
When checking for a wrap take into account offset of the start address in the region.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 11:24:48 +00:00
yangguo@chromium.org
bd624b2f9f Limit the time d8 interactive shell's input strings stay alive.
Review URL: http://codereview.chromium.org/7779032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 09:07:39 +00:00
jkummerow@chromium.org
1db6be7f2b Fix a few clang warnings (which -Werror treats as errors)
Review URL: http://codereview.chromium.org/7779033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 07:41:45 +00:00
yangguo@chromium.org
4a36886a80 MIPS: ported r9119 fixing performance regression in regexp.
Review URL: http://codereview.chromium.org/7779030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-06 07:09:53 +00:00
svenpanne@chromium.org
768b00a53c Print value and type check dependency for JSArrayLength instruction.
Review URL: http://codereview.chromium.org/7800028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 13:28:56 +00:00
fschneider@chromium.org
bbd5cdf8c2 Landing MIPS: Support declarations of context allocated locals in Crankshaft.
Original code review: http://codereview.chromium.org/7739017/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 11:45:09 +00:00
lrn@chromium.org
6875d5e734 Optimize isFinite and isNaN.
Arithmetic on infinities and NaN is much slower than doing several exact comparisons.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 11:08:57 +00:00
fschneider@chromium.org
42e8bb6216 Prepare push to trunk. Now working on version 3.6.1.
Review URL: http://codereview.chromium.org/7833025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 10:37:49 +00:00
erik.corry@gmail.com
72bf0e229e Up the max heap size from 512Mbytes to 700MBytes as an experiment.
Review URL: http://codereview.chromium.org/7835029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 10:35:31 +00:00
yangguo@chromium.org
efada0017a MIPS: port Generated code for substring slices in x64 and arm.
Ported r9111 (2b946464)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 09:05:52 +00:00
yangguo@chromium.org
63bbe11e6a MIPS: Minor cleanup change to arguments slots constants.
This is the bleeding_edge port of our crankshaft commit 41cab38.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 09:04:32 +00:00
mikhail.naganov@gmail.com
29bb1f8d62 Remove STL dependencies from mksnapshot.cc
Remove unused code and consequently the stl includes of map and string.

R=mnaganov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 08:06:29 +00:00
lrn@chromium.org
449fd357df Remove unused includes from scanner.h.
This file should also be renamed to something else, as after many refactors,
there isn't any Scanner class in there, just four CharacterStream classes.

R=lrn@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 07:39:47 +00:00
mikhail.naganov@gmail.com
1e90df2aad A temporary workaround for huge heap snapshots problem.
Do not try to serialize them into JSON to avoid crashing / hanging DevTools.

R=sgjesse@chromium.org
BUG=v8:1658,89268
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 07:37:52 +00:00
lrn@chromium.org
ffffa716c5 Lock the prototype of internal classes.
Prototypes and their properties and methods are locked down to prevent fiddling with their operation, even if the build-in object leaks.

Made some built-in functions only work during bootstrapping.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-05 07:30:35 +00:00
mikhail.naganov@gmail.com
5105a20dd7 Make a static non-POD object a static raw pointer instead.
Change it to a plain static pointer and initialize lazy.

BUG=83856
TEST=None

R=ager@chromium.org,mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-02 16:46:35 +00:00
yangguo@chromium.org
9e7f24a739 Fixed performance regression in v8 regexp benchmark on ARM.
Review URL: http://codereview.chromium.org/7824033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-02 13:42:50 +00:00
fschneider@chromium.org
b20f952e71 Remove unused code for AstSentinels and related stuff.
TEST=compiles
Review URL: http://codereview.chromium.org/7792097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-02 12:59:05 +00:00
keuchel@chromium.org
ccd2cd8f64 Prune empty block scopes from scope tree
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-02 12:43:28 +00:00
lrn@chromium.org
b7eb138eab The spec (15.1.2.2 parseInt (string , radix)) says ToString should be called before ToInt32.
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

In the current implementation, the order is reversed. So this webkit test (https://bugs.webkit.org/show_bug.cgi?id=65366) fails on Chromium.

BUG=1649
TEST=parse-int-float.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-02 11:38:40 +00:00
fschneider@chromium.org
5289e3e08b Allow OSR for closures that reference context slots.
Review URL: http://codereview.chromium.org/7812023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-02 09:29:21 +00:00
fschneider@chromium.org
913f444cb7 Support declarations of context allocated locals in Crankshaft.
The changes to scopes and parser introduce a VariableProxy
wrapping the function-name variable for function literals.
It seems the easiest way to get an AST id for the HSimulate
after context-slot stores in declarations.
Review URL: http://codereview.chromium.org/7826009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 16:33:57 +00:00
yangguo@chromium.org
1be99a9627 Generated code for substring slices in x64 and arm.
Review URL: http://codereview.chromium.org/7795018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 15:24:26 +00:00
svenpanne@chromium.org
4e049d4619 Include more information when printing phi nodes.
Still a bit cryptic, but people interested in phi nodes should know what they're doing... ;-)
Review URL: http://codereview.chromium.org/7824004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 14:59:47 +00:00
yangguo@chromium.org
00c1153887 Changed printing of immediate result in d8's interactive shell.
BUG=v8:371

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 14:02:35 +00:00
keuchel@chromium.org
d434d3158c Detect conflicting variable bindings in harmony mode.
BUG=
TEST=mjsunit/harmony/block-conflicts.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 12:31:18 +00:00
lrn@chromium.org
fdc7f60f42 Make functions on the built-in object non-writable.
Review URL: http://codereview.chromium.org/7736018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:57:02 +00:00
yangguo@chromium.org
86a62d0da3 Added check for trailing whitespaces and corrected existing violations.
Review URL: http://codereview.chromium.org/7826007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:28:10 +00:00
ricow@chromium.org
4e94cd8b08 Make arguments and caller always be null on native functions (fixes issue 1548 and issue 1643).
With this change we follow Firefox, Safari has a slightly different approach where the property is just not there (at least according to GetOwnProperty). 
Review URL: http://codereview.chromium.org/7792054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:09:11 +00:00
svenpanne@chromium.org
d02dfb301d Tiny change flags cleanups.
Introduced a getter for change flags, making a related helper function private.

Do not print a '*' at the end of hydrogen instruction mnemonics with side
effects, this is subsumed by the 'changes' info.
Review URL: http://codereview.chromium.org/7827009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:06:03 +00:00
vegorov@chromium.org
e833f91eb3 Do constant function check earlier in TryCallApply and ensure correct environment for deopt.
R=kmillikin@chromium.org
BUG=v8:1650
TEST=test/mjsunit/regress/regress-1650.js
Review URL: http://codereview.chromium.org/7812033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 10:33:59 +00:00
kmillikin@chromium.org
690efb3a04 Fix deoptimization data printing.
Remove a spurious newline.

R=whesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 08:00:40 +00:00
lrn@chromium.org
1b4cb57c52 Cleanup of messages.js.
Lock down some otherwise modifiable objects that don't need it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 07:39:22 +00:00
yangguo@chromium.org
d586e9c504 MIPS: port ARM: Fix context save/restore for VFP registers.
This commit was missed/skipped earlier for some reason.

Ported r8357 (d78dae4)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 07:35:33 +00:00
jkummerow@chromium.org
c657d440ba MIPS: port ARM: Changed the handling of compiletime CPU feature detection
Another port of an older arm commit, which was not upstreamed at the time.

Ported r7754 (ef678641)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 15:34:33 +00:00
jkummerow@chromium.org
6c9ce544cc MIPS: Convert a bunch of ASSERTs to STATIC_ASSERTs
Ported r9057 (f6c548d)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 15:22:43 +00:00
fschneider@chromium.org
ffc6c7e56b Introduce local function declarations in Crankshaft and fix issue 1647.
We have to emit code for declarations later into the body block
(and not into the start block) so that the environment contains
the correct values.

In order to capture the environment effect of the declarations
that generate code (function declarations) I inserted a separate
AST id and a HSimulate after the declarations are visited.

Also fixes handling deopt in named function expressions:
BUG=v8:1647
TEST=test/mjsunit/regress/regress-fundecl.js, test/mjsunit/regress/regress-1647.js
Review URL: http://codereview.chromium.org/7776009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 13:26:08 +00:00
keuchel@chromium.org
227e679ce9 MIPS: port Temporal dead zone behaviour for let bindings.
Ported r9070 (1cfdac01)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 10:01:43 +00:00
yangguo@chromium.org
ea1879f1d5 Prepare push to trunk. Now working on version 3.6.0.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 07:59:23 +00:00
yangguo@chromium.org
90c6c826ba MIPS: port Fix for a possible bug in RegExp stack guard.
Ported r9058 (43f127bd)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-31 07:32:47 +00:00
mikhail.naganov@gmail.com
4f3a8bd137 Return v8::True or v8::False instead of using Boolean::New.
BUG=None
TEST=None

R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 18:45:48 +00:00
yangguo@chromium.org
3c04a9d71d MIPS: Added ASSERTs to BranchShort to detect bad use of 'at' register.
Make sure 'at' and an immediate operand can't be used together in cases
where 'at' would be overwritten by li.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 16:15:48 +00:00
yangguo@chromium.org
65daf10c23 MIPS: Fix implementation of string slices.
Bug on mips using at register innapropriately, use different reg as temp.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 16:13:02 +00:00
keuchel@chromium.org
42388ad5c7 Temporal dead zone behaviour for let bindings.
BUG=
TEST=mjsunit/harmony/block-let-semantics.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 11:23:57 +00:00
mstarzinger@chromium.org
c6e42e1bfa Fix initial prototype of WeakMap function.
The bootstrapper accidentally overwrote the constructor property of the Object
prototype because it used initial_object_prototype() as prototype for WeakMap.
Unfortunately this is not possible for experimental natives because they are
installed after the snapshot initialization finished.

R=erik.corry@gmail.com
TEST=mjsunit/mirror-object,mjsunit/harmony/weakmaps

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 09:35:20 +00:00
yangguo@chromium.org
4cc8ca359a Fixing presubmit issue.
Review URL: http://codereview.chromium.org/7792034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 09:05:40 +00:00
yangguo@chromium.org
d5a0b00bde Fixing compile error introducted by a typo in r9064.
Review URL: http://codereview.chromium.org/7790022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 08:41:54 +00:00
yangguo@chromium.org
3077e8aa2f Generated code for substring slices in ia32.
Review URL: http://codereview.chromium.org/7744052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 08:22:41 +00:00
svenpanne@chromium.org
4084e698c3 Fixed a bug in the chaining of fixup position
The ARM and MIPS assemblers had a bug where they did not handle the last element
in the list of code positions correctly during the fixup of offsets for forward
jumps. This happened when the first instruction contained a forward jump to a
label, and that label was used in a forward jump later, too.

Unified the code for Assembler::next on ARM and MIPS while we were there.

Added test cases, even for ia32/x64, which seem to be correct, even I don't
fully understand why... %-}

BUG=v8:1644
Review URL: http://codereview.chromium.org/7786001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-30 07:36:31 +00:00
yangguo@chromium.org
d74cceb2bc Removing bogus check introduced in r9027.
Review URL: http://codereview.chromium.org/7781013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 14:04:01 +00:00
yangguo@chromium.org
a2f1431aff MIPS: Fix an invalid stack-check in the simulator.
This fixes mjsunit regress-1132.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 13:29:55 +00:00
yangguo@chromium.org
596daba583 Fix for a possible bug in RegExp stack guard.
Review URL: http://codereview.chromium.org/7744051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 13:04:33 +00:00
jkummerow@chromium.org
5262061eac Convert a bunch of ASSERTs to STATIC_ASSERTs
making our debug binaries ever so slightly faster

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 13:02:35 +00:00
fschneider@chromium.org
a846d482dd Revert r9047 to fix broken build.
I need some more time to properly fix the problem.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 12:19:43 +00:00
yangguo@chromium.org
054b737ea5 MIPS: Fixed a RecordWrite call in the FullCodeGenerator.
This caused an occasional failure in the Threading2 cctest running in debug mode with --always-opt.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 11:56:48 +00:00
lrn@chromium.org
5c32722581 Make built-in functions not rely on callback functions .call method.
In builtin code, we can't rely on Function.prototype.call being unmolested.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 11:44:54 +00:00
yangguo@chromium.org
2ade6a5a2e Small fix for STATIC_ASSERT.
Review URL: http://codereview.chromium.org/7776007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 11:41:23 +00:00
fschneider@chromium.org
8ab5b50f1b Introduce support for local function declarations in Hydrogen.
Review URL: http://codereview.chromium.org/7782001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 10:50:47 +00:00
jkummerow@chromium.org
1befe0bbbb Remove unnecessary break-after-return in switch statement
BUG=v8:1642

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 10:47:00 +00:00
ricow@chromium.org
e7032b8c48 Prepare push to trunk. Now working on version 3.5.10.
Review URL: http://codereview.chromium.org/7782002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 10:15:47 +00:00
yangguo@chromium.org
55849e95d7 MIPS: port Tentative implementation of string slices (hidden under the flag --string-slices).
Ported r9027 (e9a3514)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 09:36:58 +00:00
jkummerow@chromium.org
a549ddf49d Fix warnings reported by MSVS for shared library build
TEST=compiles without warnings (esp. the shared-lib build with Visual Studio)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 09:14:59 +00:00
vegorov@chromium.org
9e2db4c0f0 MIPS: Fix KeyedStoreStubCompiler::GenerateStoreFastDoubleElement()
Test regress-91013.js (to ensure that the stored value was returned) passed on mips
without this fix, since the input value (in value_reg, a0) also happens to be in
mips return value register v0 at the time of call.

But it is fragile to depend on that behavior, so an explicit move from a0 to v0
is warranted. This fix puts that move in the delay slot of the Ret().

Patch by Paul Lind.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 09:10:27 +00:00
yangguo@chromium.org
ab03dff745 Commenting register usage in MIPS.
Review URL: http://codereview.chromium.org/7775007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 08:41:39 +00:00
fschneider@chromium.org
a2deb8af0b Landing: MIPS: Fixed a bug in a special case of MacroAssembler::Ext.
Original code review: http://codereview.chromium.org/7777005/
Review URL: http://codereview.chromium.org/7778007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 07:13:06 +00:00
fschneider@chromium.org
a58b9ba90b Remove code handling parameters rewritten to properties (aka synthetic properties).
After merging the new arguments branch, there is no need for this code anymore.

TEST=all tests pass
Review URL: http://codereview.chromium.org/7753030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-29 07:07:39 +00:00
lrn@chromium.org
cd3588d582 Make (some) functions called from builtin functions use the callback's global as receiver.
Changes GetGlobalReceiver() to GetDefaultReceiver(func) that returns undefined
for strict and native functions, and the function's context's global proxy
for "normal" functions.

BUG=v8:1547
TEST=cctest/api-test/ForeignFunctionReceiver

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:53:00 +00:00
yangguo@chromium.org
daf8135ba6 Fixed regression introduced in r9027.
Review URL: http://codereview.chromium.org/7741041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:40:25 +00:00
yangguo@chromium.org
77141f78ff Tentative implementation of string slices (hidden under the flag --string-slices).
TEST=test/mjsunit/string-slices.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 13:03:30 +00:00
yangguo@chromium.org
92b9bdfec5 Fixed regression introduced in r9023.
Review URL: http://codereview.chromium.org/7740049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 11:56:12 +00:00
yangguo@chromium.org
d727ba855c Changed some jumps to short jumps in IA32 generated code.
Review URL: http://codereview.chromium.org/7745022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 08:22:13 +00:00
svenpanne@chromium.org
a5001de29c Centralize code for freeing LargeObjectChunks, fixing an uncommit bug.
Due to heavy copy-n-paste, the handling of guard pages was inconsistent and we
didn't uncommit exactly the region we previously committed. Furthermore, the LOG
calls weren't consistent, either.
Review URL: http://codereview.chromium.org/7744025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 07:44:36 +00:00
fschneider@chromium.org
3cdff159ea Landing: MIPS: Remove gp and sp from callee-saved register list.
Original code review: http://codereview.chromium.org/7740018/
Review URL: http://codereview.chromium.org/7744050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-26 07:24:30 +00:00
jkummerow@chromium.org
dda2889ba1 Refactor .gyp files:
common.gypi now contains global target defaults and is included by all .gyp files;
standalone.gypi contains definitions for stand-alone v8 builds.
This fixes d8 for the ARM simulator.

TEST=compiles and tests pass on all platforms

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 14:50:09 +00:00
lrn@chromium.org
2f2f90610e Changed computation of func.caller to skip some built-in functions.
Now skips built-in functions called from other built-in functions,
so only the initally called built-in function is exposed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 13:38:58 +00:00
svenpanne@chromium.org
3d88d16f47 Two tiny refactorings: Removed a bit of copy-n-paste. Moved LargeObjectChunk::Free from header to implementation, it does a syscall, anyway.
Review URL: http://codereview.chromium.org/7744023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 13:35:15 +00:00
lrn@chromium.org
893b8320b8 Added access check to Runtime_GetPrototype.
BUG=93759

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 13:22:55 +00:00
fschneider@chromium.org
2b024e3d5d Land two MIPS changes contributed by Paul Lind.
1. Issue 7744014: MIPS: Fixed and optimized MacroAssembler::Trunc_uw_d, Cvt_d_uw, Ext, Ins. (http://codereview.chromium.org/7744014/)

2. Issue 7740019: MIPS: Fix for function argument access in non-strict mode. (http://codereview.chromium.org/7740019/)
Review URL: http://codereview.chromium.org/7741016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 12:12:25 +00:00
svenpanne@chromium.org
a546e4a8dd Fixed bool <-> Executability confusion and improved typing a bit.
Passing a value of type Executability to a function expecting a bool worked only
by accident (because of the order of values in the enum). But using boolean
parameters is often a bad idea, anyway, so we use Executability directly.

Just another example why implicit type conversions in C++ are a bad idea... :-P
Review URL: http://codereview.chromium.org/7753001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9013 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 10:55:44 +00:00
lrn@chromium.org
0946ce67d3 Make FromPropertyDescriptor not trigger inherited setters.
Review URL: http://codereview.chromium.org/7745017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 09:07:43 +00:00
ricow@chromium.org
d9eccf2beb Prepare push to trunk. Now working on version 3.5.9.
Review URL: http://codereview.chromium.org/7714033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-24 11:53:59 +00:00
yangguo@chromium.org
02e70b799b Fixed the shared library build of D8 that was broken by r9005.
Review URL: http://codereview.chromium.org/7701024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-24 10:48:48 +00:00
yangguo@chromium.org
1afbe92a0e Fixed minor bug in D8 related to mapping counters to a file.
Review URL: http://codereview.chromium.org/7717022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-24 09:47:10 +00:00
yangguo@chromium.org
2d538fe6a6 removed executable bit in those files.
Review URL: http://codereview.chromium.org/7710019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 13:57:37 +00:00
lrn@chromium.org
13dd915a2a Fix typo in assert.
Also remove the requirement to have an AssertNoAllocation object when getting the flat content. We actually do allow allocation, it's just GC's we don't allow.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 13:23:30 +00:00
mikhail.naganov@gmail.com
2e1e5fc09c Heap profiler: for objects of class "Object", try to lookup name
from the constructor function. This works well for binding objects,
and this matches DevTools' algorithm for name assignment.

R=sgjesse@chromium.org
BUG=none
TEST=test-heap-profiler/GetConstructorName

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 12:24:54 +00:00
lrn@chromium.org
9eb7d4a53c Replace ToAsciiVector and ToUC16Vector with single function that returns a tagged value.
The tag tells whether the content is ASCII or UC16, or even if the string wasn't flat.

BUG: v8:1633

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 12:22:12 +00:00
erik.corry@gmail.com
bf4222fb29 Fix ARM build for gcc-4.6.
This is based on Peter Varga's work in http://codereview.chromium.org/7708004/
but with a different solution for the Operand(0) int/pointer ambiguity.
Review URL: http://codereview.chromium.org/7706030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 12:00:09 +00:00
fschneider@chromium.org
701146a3d7 Perform range analysis after GVN.
This eliminate redundant HChange instructions and allows range information of
converted values propagated across control-flow splits.

It fixes the performance regression on code like:

if (x > 1) {
  y = x - 1;
}

where we should eliminate the overflow check on the sub inside the if-statement.
Review URL: http://codereview.chromium.org/7709025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 11:19:08 +00:00
yangguo@chromium.org
011b136ee0 Slight API change enabling opting out from null termination in String::Write*().
BUG=v8:1537
TEST=cctest test-api/StringWrite

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 11:11:12 +00:00
fschneider@chromium.org
99b4d756fc Insert representation changes before doing range analysis and fix a bug in Range::Copy.
This improves our static type information by calculating the result type
of conversions (HChange) during range analysis. It allows e.g. to eliminate
the write barrier in the following example where it was not possible before:

function f(x) {
  var y = x + 1;
  if (y > 0 && y < 100) {
    a[0] = y;
  }
}


* Fix bug in Range::Copy. The minus-zero flags has to be preserved by default.
Review URL: http://codereview.chromium.org/7634022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-23 07:34:45 +00:00
vitalyr@chromium.org
633e615b89 Improve memory usage of receiver type feedback.
Some AST nodes (Property, Call, etc.) store either a list of receiver
types or a monomorphic receiver type. This patch merges the two fields
using a small pointer list. GetMonomorphicReceiverType() is now a
purely convenience function returning the first and only recorded
type.

This saves about 500K (of about 39M) on average when compiling V8
benchmark as measured by a simple patch adding a zone allocation
counter (https://gist.github.com/1149397).

R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 14:23:37 +00:00
yangguo@chromium.org
107d1b5e65 Inserted a missing string encoding check in lastIndexOf.
Review URL: http://codereview.chromium.org/7685005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 13:55:25 +00:00
svenpanne@chromium.org
4b930daf1a Ensure that the current isolate is initialized in the API function Context::GetEntered.
r8833 introduced a regression in our API semantics, showing up in e.g.
Chrome 12, which is fixed by this patch.
Review URL: http://codereview.chromium.org/7686005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 13:04:14 +00:00
lrn@chromium.org
41426bde56 Fix bug introduced by earlier "cleanup".
TEST=message/replacement-marker-as-argument

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 12:54:03 +00:00
rossberg@chromium.org
1a717259f4 Prepare push to trunk. Working version now 3.5.8.
Review URL: http://codereview.chromium.org/7697017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 10:55:48 +00:00
lrn@chromium.org
d2626be5d9 Prune some internal objects' prototypes.
Review URL: http://codereview.chromium.org/7703005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:51:56 +00:00
mstarzinger@chromium.org
d4a6b4ac5b Make instruction for write barrier smaller.
R=yangguo@chromium.org
BUG=v8:1495

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:10:47 +00:00
keuchel@chromium.org
a367058c6a MIPS: port Parse harmony let declarations.
Port r8944 (a5a36f4)

Original commit message:
Implementation of the harmony block scoped let bindings as proposed here:
http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings
Changes to the syntax are explained there. They are active under the
harmony_block_scoping_ flag in the parser.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:05:28 +00:00
whesse@chromium.org
d3880a19bc MIPS: port Clean up the nesting stack in the full code generator.
Port 8972 (6a896b3)

Original commit message:
Remove unused methods, introduce named constants, and attempt to add some
sanity to naming.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-22 09:00:27 +00:00
lrn@chromium.org
d8a123169b Make regexp flag parsing stricter.
BUG=v8:1628
TEST=mjsunit/regress/regress-219

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-19 11:02:41 +00:00
kmillikin@chromium.org
dc917453b3 Clean up the nesting stack in the full code generator.
Remove unused methods, introduce named constants, and attempt to add some
sanity to naming.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-19 09:54:08 +00:00
ricow@chromium.org
025c05dc25 Remove trailing whitespaces from *.js files.
This is a whitespace removal only change
Review URL: http://codereview.chromium.org/7687001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-19 05:24:39 +00:00
lrn@chromium.org
7939f9acf2 Make scanner handle invalid unicode escapes in identifiers correctly.
I.e., don't just convert \u to u in identifiers (like in strings and regexps).

Also make the scanning of RegExp flags not interpret the escapes.

(Fix and reapply of r8942)

BUG=v8:1620
TEST=mjsunit/regress/regress-1620

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 12:47:23 +00:00
jkummerow@chromium.org
c50094bda3 Fix another handful of memory leaks
TEST=valgrind reports 0 bytes definitely lost for cctest/test-api/RunTwoIsolatesOnSingleThread

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 12:33:40 +00:00
jkummerow@chromium.org
e4d43b7306 Fix three ~Isolate() related memory leaks
BUG=93253
TEST=running valgrind on cctest/test-api/RunTwoIsolatesOnSingleThread reports fewer leaks than before

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 12:14:12 +00:00
danno@chromium.org
4c460099a0 Unify GetElement handlers in ElementsAccessor
BUG=none
TEST=external-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 09:51:08 +00:00
danno@chromium.org
a8b4b4f42a Remove redundant implementation of UnionOfKeys
R=svenpanne@chromium.org
BUG=none
TEST=external-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 09:20:32 +00:00
ricow@chromium.org
d9c1984fe3 Use InternalArray in Object.defineProperties to avoid issues with overwriten properties on Array.prototype
TEST=mjsunit/regress/regress-1625
BUG=v8:1625
Review URL: http://codereview.chromium.org/7631039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-18 08:39:06 +00:00
danno@chromium.org
edd691960f Implement UnionOfKeys for NonStrictArguments
BUG=none
TEST=cctest/test-api/IndexedInterceptorNonStrictArgsWithIndexedAccessor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 16:15:30 +00:00
danno@chromium.org
5d634be405 Prepare push to trunk. Now working on version 3.5.7.
R=ricow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 13:55:05 +00:00
keuchel@chromium.org
16be5abdec Initialize harmony block scoping field in scanner.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 11:17:59 +00:00
vegorov@chromium.org
4b94137323 Fix GC unsafe place in JSProxy::DeletePropertyWithHandler.
Review URL: http://codereview.chromium.org/7670023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 09:51:20 +00:00
danno@chromium.org
080b25063f Bugs in x64 ICs introduced by array length refactor.
BUG=chromium:93044
TEST=external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 09:39:03 +00:00
mstarzinger@chromium.org
ca049c7b58 fix compilation with gcc 4.6
* src/bootstrapper.cc (Genesis::InitializeExperimentalGlobal): Remove
  assigned-but-unused var.

BUG=
TEST=passes test suite, modulo http://code.google.com/p/v8/issues/detail?id=1621

Review URL: http://codereview.chromium.org/7658014
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 09:22:58 +00:00
jkummerow@chromium.org
9f9959182d Fix memory leaks in ~Zone and ~Isolate
TEST=chromium valgrind bots

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 08:48:54 +00:00
erik.corry@gmail.com
1e2d65780e Fix compilation on Linux 2.6.9 and older.
Review URL: http://codereview.chromium.org/7655016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 08:24:36 +00:00
ricow@chromium.org
7f36b52540 Revert 8942 "Make scanner not accept invalid unicode escapes in identifiers"
This is causing webkit failures, reverting until we figure out if this is a V8 regression or wrong test expectations.
Review URL: http://codereview.chromium.org/7669017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-17 08:22:41 +00:00
vegorov@chromium.org
bdfceace53 Fix potentially GC unsafe place in JSObject::DeleteElementWithInterceptor.
Review URL: http://codereview.chromium.org/7660012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 15:51:49 +00:00
keuchel@chromium.org
a6cf884bcd Presubmit fix.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 15:15:34 +00:00
keuchel@chromium.org
c6c504f8b6 Parse harmony let declarations.
Implementation of the harmony block scoped let bindings as proposed here:
http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings

Changes to the syntax are explained there. They are active under the
harmony_block_scoping_ flag in the parser.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 14:24:12 +00:00
jkummerow@chromium.org
9295a3a0bb Use immediates when possible for HBoundsCheck and HLoadKeyedFastElement
Review URL: http://codereview.chromium.org/7608020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 13:32:27 +00:00
lrn@chromium.org
7d17c8d5d3 Make scanner not accept invalid unicode escapes in identifiers.
BUG=v8:1620
TEST=mjsunit/regress/regress-1620

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 13:31:08 +00:00
mstarzinger@chromium.org
d640d8d913 Fix issue with prototype of WeakMap constructor.
The WeakMap constructor didn't have a unique prototype, so it shared one with
Object. All WeakMap functions (including "get" and "set") were installed on
that prototype.

R=rossberg@chromium.org
BUG=v8:1617
TEST=mjsunit/harmony/weakmaps

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 12:09:47 +00:00
danno@chromium.org
fc17bd3795 Fix live-object-list to work with isolates.
TEST: Build v8 with live-object-list enabled.

Review URL: http://codereview.chromium.org/7398025
Patch from Alexander Miller <Alexander.Miller@palm.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 11:47:06 +00:00
rossberg@chromium.org
b1ae597808 MIPS: port Implement Harmony semantics for typeof null (behind a flag).
Port r8876 (2aeeae7)

Original commit message:
Harmony is intended to make typeof null === "null". This may
break existing programs. Implementing it will allow us to run
some tests on the actual web.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7650009
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 10:08:50 +00:00
svenpanne@chromium.org
af112fda75 Refactored DirectCEntryStub::GenerateCall a bit to make it clearer what's going on and added an ASSERT.
Review URL: http://codereview.chromium.org/7640016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 09:58:34 +00:00
kmillikin@chromium.org
06b8e73b99 MIPS: port Simplify handling of exits from with and catch.
Ported r8922 (5ea2fb5)

Original commit message:
Remove the try/finally used for with and catch. Instead of using
try/finally to handle break and continue from with or catch,
statically track nesting dept and clean up when compiling break or
continue.
And instead of using try/finally to handle throw to handler in a frame
whose pc is inside a with or catch, store the context that the handler
should run in in the handler itself.

BUG=
TEST=

Review URL: http://codereview.chromium.org/7648026
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-16 08:48:45 +00:00
cira@chromium.org
24e6d48d9b Return error not null for date time format.
BUG=v8:1602
TEST=new (new v8Locale().createDateTimeFormat()).getWeekdays should return Error not a Null.
Review URL: http://codereview.chromium.org/7647027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-15 22:29:03 +00:00
ricow@chromium.org
685c5c1fb8 Add FIXED_DOUBLE_ARRAY_TYPE to INSTANCE_TYPE_LIST_ALL in objects.h
Leaving this out can cause crashes when running with --heap-stats (but this is only used when reporting heap statistics, so this is not a stability issue).
Review URL: http://codereview.chromium.org/7647018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-15 12:55:18 +00:00
whesse@chromium.org
90561038c1 Prepare push to trunk. Now working on version 3.5.6.
Review URL: http://codereview.chromium.org/7645020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-15 10:39:51 +00:00
danno@chromium.org
96f198a4dc Change AddElementsToFixedArray to work on FixedArrayBase rather than JSObject
In the process, make ElementsAccessors work internally more seamlessly with FixedArrayBase.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 14:52:03 +00:00
danno@chromium.org
48f411a225 Change JSObject elements to be of type FixedArrayBase
R=kmillikin@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 13:54:27 +00:00
kmillikin@chromium.org
91553bbacd Simplify handling of exits from with and catch.
Remove the try/finally used for with and catch.  Instead of using
try/finally to handle break and continue from with or catch,
statically track nesting dept and clean up when compiling break or
continue.

And instead of using try/finally to handle throw to handler in a frame
whose pc is inside a with or catch, store the context that the handler
should run in in the handler itself.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 10:52:49 +00:00
fschneider@chromium.org
6549163a55 Add roundsd instruction to ia32 and use it in optimized Math.floor.
It is available platforms that have SSE 4.1 and allows us to handle
negative numbers without deoptimization. Before we would deoptimize
on negative inputs to Math.floor. x64 already uses this instruction.

* Change Math.floor unit test to make sure every test case gets
optimized by changing the source code for each test case.

* Fix HIR debug printing for some instructions.
Review URL: http://codereview.chromium.org/7628017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 10:13:40 +00:00
mikhail.naganov@gmail.com
58824435d1 Pick the namespace alias 'i' from v8.h.
These files already include v8.h so they don't need to define the
namespace alias again.

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 09:49:55 +00:00
svenpanne@chromium.org
808748b44d Do not use deprecated ARM instructions in DirectCEntryStub::GenerateCall.
Non-ancient versions of the ARM-ARM explicitly deprecate most uses of the PC
within instructions and older ARM implementations have a non-predictable offset
(8 or 12) for some of these deprecated uses. Avoiding the deprecated instruction
costs us one additional instruction in DirectCEntryStub::GenerateCall, but this
should not cause any significant performance degradation.

The deoptimizer still uses the PC in a stm instruction, but it is a bit unclear
what to do about that, so simply a comment has been added to reconsider this in
the future.
Review URL: http://codereview.chromium.org/7633014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 08:45:17 +00:00
keuchel@chromium.org
3c7ca304fe Preliminary code for block scopes and block contexts.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 16:29:28 +00:00
yangguo@chromium.org
431b51aca7 Rollback of r8903
Review URL: http://codereview.chromium.org/7620012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 16:11:07 +00:00
yangguo@chromium.org
189be860aa Quick fix to issue 1593
BUG=v8:1593

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 15:18:55 +00:00
danno@chromium.org
d5d7185578 Create a common base class for Fixed-, FixedDouble- and ExternalArrays.
Also unify Crankshaft code to load array length.

BUG=v8:1493
TEST=external-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 14:00:16 +00:00
svenpanne@chromium.org
3c13926936 Output missing comments after the last disassembled instruction.
Review URL: http://codereview.chromium.org/7623014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 13:59:29 +00:00
svenpanne@chromium.org
bb81895595 Fixed printing of deoptimization input data without --print-code-verbose.
Review URL: http://codereview.chromium.org/7617008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 13:56:09 +00:00
svenpanne@chromium.org
93808ce651 Removed some arbitrary size restrictions when disassembling generated code.
We output line-by-line now, this avoids hitting StringBuffer ASSERTs when
disassembling huge code objects.
Review URL: http://codereview.chromium.org/7622006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 12:52:37 +00:00
fschneider@chromium.org
384615f2a4 Remove unused code from runtime profiler.
Review URL: http://codereview.chromium.org/7617003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 08:26:01 +00:00
svenpanne@chromium.org
06bea35f7f Simplify and optimize ToBoolean handling.
Changing our builtin JavaScript code slightly, we can make sure that we never
see internal objects as arguments for ToBoolean at runtime. Removing that case
from the stub generator and crankshaft makes things a lot easier.

Heap numbers can never be undetectable (only strings and spec objects can), so
we can leave out a useless test.

Try to re-use a non-null register value when returning 'true' in some cases.

Removed special handling of the 'handle all' case, it will very probably never
happen in real code and only makes things more complicated.

Improved naming of the ToBoolean stubs a bit, reflecting the order in which
cases are handled in the code itself.
Review URL: http://codereview.chromium.org/7497063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 07:22:16 +00:00
antonm@chromium.org
48e6274cc3 Allows not API functions as inputs for CreationConext method.
Review URL: http://codereview.chromium.org/7552034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 06:40:14 +00:00
vitalyr@chromium.org
a107387dde Fix fun.apply(receiver, arguments) optimization.
R=kmillikin@chromium.org
BUG=v8:1592
TEST=mjsunit/regress/regress-1592.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8884 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 16:05:17 +00:00
fschneider@chromium.org
e63fdc619d Fix x64 build.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/7604034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 13:11:14 +00:00
fschneider@chromium.org
f17bd8ca51 Fix three bugs with handling negative zero in the optimizing compiler.
* Bug fix for range analysis (contributed by Andy Wingo). Ranges of
double values have to include negative zero. Original code review:
 http://codereview.chromium.org/7514040/

* Fix a bug in optimized Math.round on ARM. When emitting minus-zero checks
we previously return a wrong result because of incorrect register assignment.

* Fix performance problem in IA32 and x64. Refine the checks
for minus zero and avoid unnecessary deoptimizations on Math.floor.

* Improve mjsunit test for Math.round to make sure we also
 get the optimized version of the code for each test case.
Review URL: http://codereview.chromium.org/7604028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 12:32:43 +00:00
rossberg@chromium.org
bd18514972 Implement Harmony semantics for typeof null (behind a flag).
Harmony is intended to make typeof null === "null". This may
break existing programs. Implementing it will allow us to run
some tests on the actual web.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 12:12:06 +00:00
kmillikin@chromium.org
f14dfd7aa8 Prepare push to trunk. Now working on version 3.5.5.
R=danno@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 11:22:23 +00:00
danno@chromium.org
ff13ab4575 Refactor UnionOfKeys into ElementsAccessor
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 10:51:01 +00:00
mstarzinger@chromium.org
c68d205c08 ARM: Fix deoptimizer for two-word call sites.
R=svenpanne@chromium.org,kmillikin@chromium.org
BUG=v8:1584

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-10 08:03:22 +00:00
vitalyr@chromium.org
df91f6b396 Simpler (and a bit faster) keyword matcher.
Replaced the keyword matching state machine with a switch on the first char followed up by inlined char comparisons.

R=lrn@chromium.org
TEST=cctest/test-parsing/ScanKeywords

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 13:32:53 +00:00
kmillikin@chromium.org
7adb10a48e Fix a bug in named getter/setter compilation.
Because these are function literals that have an associated name, we were
compiling them as if they were named function expressions.  This is
incorrect, the property name should not be in scope.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 12:43:08 +00:00
lrn@chromium.org
2f826c2b89 Added fast detection of one character tokens.
Reduced size of first-character table for keyword scanner.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 11:28:09 +00:00
svenpanne@chromium.org
399728afc5 Fixed extremely important, mission-critical presubmit warnings...
Review URL: http://codereview.chromium.org/7600019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 08:16:32 +00:00
svenpanne@chromium.org
79276ec132 Implement type recording for ToBoolean on ARM.
Review URL: http://codereview.chromium.org/7491054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-09 07:59:00 +00:00
kmillikin@chromium.org
d941053dbe Revert "Revert "Fix a bug in scope analysis.""
Reapply r8838 with a fix for the issue of function names.

Because function names can be added/changed/removed through the API,
remember whether the function is anonymous when initially parsed and use
that information when compiling.

R=vegorov@chromium.org
BUG=1583
TEST=regress-1583

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 16:14:46 +00:00
jkummerow@chromium.org
8e62a1c72c Remove orphaned file src/shell.h
This has nothing to do with the sample shell.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 14:31:47 +00:00
yangguo@chromium.org
b301cab837 Added two whitespaces to match correct indentation.
Review URL: http://codereview.chromium.org/7585033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 09:53:28 +00:00
yangguo@chromium.org
76aad1a07b Fixed a known issue in D8 (read file), enabled D8 shared library build on Windows.
Review URL: http://codereview.chromium.org/7586001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 09:34:18 +00:00
whesse@chromium.org
528a3301b8 Fix compilation error on X64 and ARM. Error was introduced in r8851.
Clean up TranslationIterator and DeoptimizationInputDataPrint, so they will work with alignment padding in the Translation info.

BUG=
TEST=v8 compiles on X64 and ARM platforms.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 07:34:54 +00:00
whesse@chromium.org
92e7656c4d Clean up TranslationIterator and DeoptimizationInputDataPrint.
Without this refactoring, they break when we add alignment padding in the Translation info.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 07:17:01 +00:00
lrn@chromium.org
e9bc76c499 Avoid infinite recursion for unterminated non-ASCII JSON string literals.
BUG=91787
TEST=mjsunit/regress/regress-91787

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 12:55:29 +00:00
vitalyr@chromium.org
3ae6f64b0d Remove TLS load in regexp code.
Spotted while reviewing Yang's patch.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 12:31:37 +00:00
keuchel@chromium.org
c14b08658e Fix DebugEvaluate crash within a catch in a function without local context.
BUG=v8:1586
TEST=mjsunit/regress/regress-1586.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 12:00:57 +00:00
vitalyr@chromium.org
5b63bc1fe8 Static state cleanup: add more consts.
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 11:32:46 +00:00
lrn@chromium.org
61ae1be609 Fix bug in scanner.
Checking for end-of-comment truncated to byte before comparing to '*'.

BUG=v8:1546
TEST=mjsunit/regress/regress-1546

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 11:21:04 +00:00
jkummerow@chromium.org
1a849d2754 Make GYP build usable for day-to-day work (second attempt)
- Introduce a global Makefile that triggers GYP-based building
- Some fixes to .gyp[i] files to make everything work
- tools/test-wrapper-gypbuild.py as a temporary solution for easy testing

Original review URL: http://codereview.chromium.org/7383006/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 09:44:30 +00:00
kmillikin@chromium.org
3e28347d55 Revert "Fix a bug in scope analysis."
This reverts commit revision 8838.

TBR=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 09:20:08 +00:00
kmillikin@chromium.org
b625ce2b6b Fix a bug in scope analysis.
When recompiling code (e.g., when optimizing) we could incorrectly hoist
some function expressions.  This leads to incorrect results or a crash.  The
root cause was that functions were not correctly categorized as expression
or declaration at parse time.

This requires some extra hoops to prevent the print name "anonymous" for
functions created by 'new Function' from establishing a binding.

R=vegorov@chromium.org,kasperl@chromium.org
BUG=1583
TEST=regress-1583

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 08:28:11 +00:00
kmillikin@chromium.org
abb04d9ec1 Revert "tighten invariants of HValue::InferRange"
This change reportedly causes a slowdown or inifinite loop on ARM.  Revert
pending investigation.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-04 16:43:20 +00:00
vitalyr@chromium.org
1dcb6e33cd Minimize malloc heap allocation on process startup.
R=vegorov@chromium.org
BUG=http://b/issue?id=5095592

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-04 15:18:18 +00:00
danno@chromium.org
4a7a47ac8f Move element deletion into element handlers
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-04 11:42:14 +00:00
mstarzinger@chromium.org
9b826964f2 Additional functions to Harmony weak maps API.
R=rossberg@chromium.org
BUG=v8:1565
TEST=mjsunit/harmony/weakmaps

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-04 11:13:15 +00:00
danno@chromium.org
9aa75ed998 Fix out-of-bounds access in fetching propery names
R=vegorov@chromium.org
BUG=chromium:91517
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-04 09:23:25 +00:00
mstarzinger@chromium.org
767debf7fe Fix GCMole warning.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 15:42:25 +00:00
danno@chromium.org
5f6f4d969d Add missing bounds check in FixedArray::set for smis
R=svenpanne@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 13:56:55 +00:00
mstarzinger@chromium.org
b05ff5e0b9 Prototype of mark-and-compact support for Harmony weak maps.
R=vegorov@chromium.org
BUG=v8:1565
TEST=cctest/test-weakmaps

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 12:48:30 +00:00
ricow@chromium.org
9721eddc1f Ensure that the length property of bound functions are actual unique
for the individually bound functions.

Our existing code will generate a new function on every call to bind,
but it will use the same shared function. When setting the lenght this
will be set on the shared function, i.e., the length of all bound
functions will be that of the last bound function.
Review URL: http://codereview.chromium.org/7475002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 12:44:17 +00:00
danno@chromium.org
a2eaf852a9 Fix performance regression due to elements refactor
Consolidate the runtime logic for fetching elements from Objects and JSObjects so that element access in the GetElement cases that are not handled in generated code.

R=svenpanne@chromium.org
BUG=none
TEST=closure.js test faster

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 12:42:04 +00:00
mstarzinger@chromium.org
1d414cd99c Fix presubmit error.
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 12:23:55 +00:00
mstarzinger@chromium.org
2bb7c74f80 Preliminary Harmony weak maps API implementation.
R=rossberg@chromium.org,danno@chromium.org
BUG=v8:1565
TEST=mjsunit/harmony/weakmaps

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 11:55:13 +00:00
danno@chromium.org
bdf6895bb3 Encapsulate element handling into a class keyed on ElementsKind
Advantage is that it's much easier to add new element types (like FAST_SMI_ELEMENTS), and that handling logic for each element kind is (more) consolidated.

Currently, only GetElementsWithReceiver uses the new encapsulation, but the goal is to move much more element functionality into the class incrementally.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 11:12:46 +00:00
lrn@chromium.org
8a8329ed75 Prepare push to trunk. Now working on 3.5.4.
R=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 10:56:06 +00:00
kmillikin@chromium.org
ffa08197e4 tighten invariants of HValue::InferRange
* src/hydrogen-instructions.cc (HValue::InferRange): Only mark values
  with int32 representation as never being -0.  Always return a non-NULL
  value; callers should check for representation().IsNone() if that's
  their concern.

  In practice these invariants were not violated by callers, but they
  were sometimes two calls away, which seems brittle.

BUG=
TEST=tests pass, modulo http://code.google.com/p/v8/issues/detail?id=1572

Review URL: http://codereview.chromium.org/7514040
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 10:44:20 +00:00
vegorov@chromium.org
bd8c469cf9 Check phi uses of the arguments object after redundant phies elimination.
This allows to handle code like:

var a = arguments;
while (smth) a[i];

without bailout.

R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 10:40:03 +00:00
danno@chromium.org
76ede3e063 MIPS: port Fix ClassOf check on ARM.
Ported r8713 (6bdadc4)

BUG=
TEST=

Review URL: http://codereview.chromium.org/7564003
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 10:11:09 +00:00
danno@chromium.org
efb7c67a2c MIPS: port Ensure that GenerateStoreFastDoubleElement returns stored value on all paths.
Ported r8781 (ca7888b)

BUG=
TEST=

Review URL: http://codereview.chromium.org/7563002
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 10:07:34 +00:00
jkummerow@chromium.org
a41c25607d Revert "Make window.{undefined,NaN,Infinity} read-only"
This reverts r8766.

TEST=WebKit LayoutTests green again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 09:53:14 +00:00
kmillikin@chromium.org
4487f8c050 Revert "Revert "Fix a bug in scope analysis.""
Reapply r8783 with an additional fix.

Because the preparser and parser do not use the same scope analysis to
determine if a function can be lazily compiled, the parser can have false
positives.  Rather than treating this as a parse error, treat the preparser
as authoritative and eagerly compile the function.

R=lrn@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-03 09:10:35 +00:00
kmillikin@chromium.org
a129c95a54 Revert "Fix a bug in scope analysis."
This reverts r8783.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 17:02:24 +00:00
vegorov@chromium.org
db2d2b0c1b Don't use mprotect on Cygwin as virtual memory is managed directly via WinAPI calls.
Patch by Bert Belder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 16:16:32 +00:00
vegorov@chromium.org
129a2ba06b Avoid uninitialized member warning on gcc 4.3.4
Patch by Bert Belder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 16:02:33 +00:00
svenpanne@chromium.org
6f6c882e19 Fixed code generation for LBranch on ARM when the operand's representation is double.
The condition code for branching on the result of vcmp was wrong, effectively
swapping the true/false branches.

TEST=regress-lbranch-double.js
Review URL: http://codereview.chromium.org/7553010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 15:14:12 +00:00
kmillikin@chromium.org
f37f6e88ca Fix a bug in scope analysis.
Function declarations inside catch are hoisted to the nearest enclosing
function scope, but we compiled their bodies as if occurring inside the
catch scope.

BUG=chrome:91120
TEST=regress/regress-91120 attached

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 15:04:31 +00:00
danno@chromium.org
b333719607 Properly handle FixedDoubleArrays in sort()
R=jkummerow@chromium.org
BUG=91008
TEST=regress-91008.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 14:05:11 +00:00
vegorov@chromium.org
9226cfe5b7 Ensure that GenerateStoreFastDoubleElement returns stored value on all paths.
BUG=chromium:91013
TEST=test/mjsunit/regress/regress-91013.js
Review URL: http://codereview.chromium.org/7551009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 13:36:38 +00:00
vegorov@chromium.org
9f24cd0eef Mark optimized modulo and memcpy code pages -w after writing them.
BUG=91245

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 13:34:52 +00:00
vegorov@chromium.org
a547d333f0 Check for phi-uses of arguments object before eliminating dead phi's.
HGraphBuilder::TryArgumentsAccess does not emit any uses for receiver and will generate incorrect code when receiver for a property access is defined by a phi that returns either arguments object or something else.
 
BUG=v8:1582
TEST=test/mjsunit/regress/regress-1582.js
Review URL: http://codereview.chromium.org/7553006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 09:32:28 +00:00
danno@chromium.org
008f834117 Properly handle FastDoubleArrays in Runtime_MoveArrayContents
BUG=91013
TEST=regress91013.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 09:28:55 +00:00
yangguo@chromium.org
6bc1aa0db2 Fixed: regression in issue 1579 concerning readline() in d8.
BUG=v8:1579

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 14:15:02 +00:00
svenpanne@chromium.org
ddf38624b5 Tiny cleanup.
Review URL: http://codereview.chromium.org/7541020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 13:35:11 +00:00
svenpanne@chromium.org
3d4ab9be07 Implement type recording for ToBoolean on x64.
Handle oddballs on ia32 via root indices, similar to other platforms. Added a
special case for Smi types on ia32 to make lithium code generation on both Intel
platforms more similar.
Review URL: http://codereview.chromium.org/7544012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 12:53:24 +00:00
jkummerow@chromium.org
15c979eeaa Make window.{undefined,NaN,Infinity} read-only
as per ES5.

BUG=89490
TEST=es5conform 15.1.*, 15.2.3.*; mjsunit/undeletable-functions

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 12:18:03 +00:00
vegorov@chromium.org
0a470aa578 Prepare push to trunk. Now working on 3.5.3.
Review URL: http://codereview.chromium.org/7538017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 11:10:33 +00:00
yangguo@chromium.org
15b13fac8e String to ascii char array converter for debug mode.
Review URL: http://codereview.chromium.org/7523052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-29 09:49:40 +00:00
fschneider@chromium.org
6637fa2835 Revert r8753.
It caused a regressions in compile time in the optimizing compiler. I'm reverting until
the reason for this is identified and fixed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-29 09:14:00 +00:00
mstarzinger@chromium.org
eef3e8739e Reintroduced dictionary that can use objects as keys.
R=vitalyr@chromium.org
TEST=cctest/test-dictionary

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 17:21:22 +00:00
svenpanne@chromium.org
3ce397f975 Optimization: Do not assign an environment to LBranch when are sure that we will never deopt later.
Review URL: http://codereview.chromium.org/7524025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 14:56:08 +00:00
svenpanne@chromium.org
d9c2e28a32 Tiny cleanup of LCodeGen::DoBranch.
Review URL: http://codereview.chromium.org/7482044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 14:31:16 +00:00
svenpanne@chromium.org
e48ec1c4bd Use type info for the ToBoolean translation in crankshaft.
To do this, the Branch instruction needs to carry around a temporary register,
but only when the crankshafted code will make a map access. When the
crankshafted code sees an object of a type it hasn't encountered before, it will
always trigger a deopt. Another option in theses cases would be calling a
ToBooleanStub which can handle all types, but then one has to be careful to
*not* trigger a GC (which is currently a bit tricky to achieve).

Const-corrected ToBoolean::Types. Moved the NeedsMap logic into ToBoolean::Types
itself, where it belongs.

This patch improves a lot of benchmarks, crypto-orig even by 16.7%, but slows
down others. The slowdown has to be investigated, but I'd like to get this patch
out first to fix the flakiness problems we currently have due to the previous
crankshafted ToBoolean.
Review URL: http://codereview.chromium.org/7461107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 13:33:51 +00:00
ricow@chromium.org
588d039433 Fix win64 debug mode compilation
Review URL: http://codereview.chromium.org/7482042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 12:34:37 +00:00
keuchel@chromium.org
dfb195550f Fix calculation of 'scope_calls_eval' when 'eval' is within a nested catch.
BUG=
TEST=mjsunit/scope-calls-eval.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 12:17:36 +00:00
whesse@chromium.org
b10a1141b5 Add tracing of the stack height to full code generator.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 10:17:41 +00:00
fschneider@chromium.org
2ff0383c7c Fix presubmit error.
TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/7523025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 09:34:14 +00:00
fschneider@chromium.org
b87a0e5a22 Simplifications and cleanup of range analysis code.
Landing two patches contributed by Andy Wingo:

http://codereview.chromium.org/7514040/ and

http://codereview.chromium.org/7516001/
Review URL: http://codereview.chromium.org/7520022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 09:19:57 +00:00
ricow@chromium.org
1cad334d1b Prepare push to trunk. Now working on 3.5.2.
Review URL: http://codereview.chromium.org/7522015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 07:31:21 +00:00
danno@chromium.org
d7641b89aa Re-activate unboxed double arrays by default.
R=svenpanne@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-27 15:29:02 +00:00
danno@chromium.org
b7300c6fb1 Fix FixedDoubleArray crashes in chromebot
R=ricow@chromium.org
BUG=non
TEST=running urls from reliability bots

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-27 15:08:50 +00:00
fschneider@chromium.org
4ac6f0253f Record safepoint at calls ToBooleanStub.
This fixes the issues when GC happens when invoking
ToBooleanStub.
Review URL: http://codereview.chromium.org/7465066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-27 14:56:36 +00:00
whesse@chromium.org
4cba3faf71 Ensure that a string is flattened when entering JsonParser::ParseJson. Fixes issue v8:1572.
BUG=v8:1572
TEST=mjsunit/regress/regress-crbug-l84186.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-27 14:34:59 +00:00
danno@chromium.org
e4e83422bc Allow GVN to separately optimize FastDoubleArrays
R=fschneider@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-26 16:31:11 +00:00
vitalyr@chromium.org
42a2b4ede7 Improve fast to slow elements conversion:
o Use a more strict limit for old arrays.

o Initial capacity of a slow elements dictionary should be the number
  of used elements and not the old array capacity.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-26 13:56:21 +00:00
fschneider@chromium.org
6c58013b36 Fix presubmit error.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/7470016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-26 10:24:14 +00:00
fschneider@chromium.org
41ac29d0f4 Landing http://codereview.chromium.org/7514005/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-26 10:12:37 +00:00
yangguo@chromium.org
635a9f72ef Fixed win64 compiler warnings for D8 (static type casting).
Review URL: http://codereview.chromium.org/7470014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-26 08:15:49 +00:00
danno@chromium.org
a923a94d6d remove dead code in fast double elements
* src/x64/lithium-codegen-x64.cc (DoLoadKeyedFastDoubleElement)
  (DoStoreKeyedFastDoubleElement): Remove set but unused variables.

BUG=
TEST=Fixes a build with gcc-4.6.

Review URL: http://codereview.chromium.org/7491041
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 15:43:41 +00:00
jkummerow@chromium.org
0aab25fabf Fix: FunctionTemplate::SetPrototypeAttributes broke prototype object
BUG=v8:1539
TEST=cctest test-api/SetPrototypeAttributes

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 15:01:45 +00:00
svenpanne@chromium.org
8ebf3993d6 Record ToBoolean's type information in Hydrogen's HBranch instruction, so we can use it in LCodeGen::DoBranch later.
Review URL: http://codereview.chromium.org/7491043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 14:08:36 +00:00
fschneider@chromium.org
561d0cf228 Better range information for logical shift right >>>.
If the input range is positive and the shift count is constant
we can replace >>> with >> to compute the output range.

For negative inputs, we can only compute a range if the 
result always fits into a signed int32.

BUG=v8:1510
Review URL: http://codereview.chromium.org/7489043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 13:28:35 +00:00
ricow@chromium.org
6ce628cb31 Prepare push to trunk. Now working on 3.5.1.
Review URL: http://codereview.chromium.org/7493055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 10:51:46 +00:00
ricow@chromium.org
b1115ec2d3 Revert r8719 - Enable unboxed double arrays by default.
It causes relibility bot crashes
Review URL: http://codereview.chromium.org/7461061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 10:24:14 +00:00
svenpanne@chromium.org
414966a72d Removed forgotten debugging code.
Review URL: http://codereview.chromium.org/7492042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 07:49:36 +00:00
whesse@chromium.org
96b07762ba Fix compilation error in ia32 platform valgrind tests. Error was introduced in r8721.
Review URL: http://codereview.chromium.org/7495025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 06:58:54 +00:00
danno@chromium.org
1f9801bb9e Fix bug in ARM pixel array clamping
Properly handle undefined conversion to zero in Crankshaft.

R=yangguo@chromium.org
BUG=none
TEST=regress-1563.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 16:01:53 +00:00
svenpanne@chromium.org
73f8cec70e Do not explicitly record undetectable objects in the ToBoolean stub.
Loading the map within the stub already implies a check for an undetectable
object, so there is no need to record this separately. Furthermore, this brings
the size of the type info to record down to 8 bits, removing the need to find a
place for the ninth bit in the Code object. ;-)
Review URL: http://codereview.chromium.org/7484022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 12:42:40 +00:00
whesse@chromium.org
c081c550d6 Update valgrind.h. Codereview http://codereview.chromium.org/7468002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 11:22:29 +00:00
mikhail.naganov@gmail.com
c32fa8fae7 Finally, remove logging to memory support.
Since r93412, Chromium no more passes "--logfile=*" to V8.

R=danno@chromium.org
BUG=859

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 09:59:45 +00:00
danno@chromium.org
e63813ec48 Enable unboxed double arrays by default.
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 09:48:54 +00:00
danno@chromium.org
3e7d642d0a Remaining changes to fully support FastDoubleArray.
R=ager@chromium.org
BUG=none
TEST=cctests, unboxed-double-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 09:04:16 +00:00
svenpanne@chromium.org
f7138b1427 Implement a type recording ToBoolean IC.
The IC records the set of types it has seen, e.g. {String} or {Boolean,
Undefined}, etc.  Note that in theory this could lead to a large number of
different ToBoolean ICs (512, to be exact, because we distinguish 9 types),
but in practice only a small handful of them are actually generated.

Currently the type recording part is only implemented on ia32, other platforms
continue to work like they did before, though.

Removed some dead code on the way.
Review URL: http://codereview.chromium.org/7473028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 13:51:04 +00:00
svenpanne@chromium.org
0b55f28e34 Introduce a poor man's version of STL's bitset.
Used in a separate upcoming patch...
Review URL: http://codereview.chromium.org/7472029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 13:06:55 +00:00
rossberg@chromium.org
bab9ec0b48 Fix ClassOf check on ARM.
R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 12:39:35 +00:00
jkummerow@chromium.org
622cf2e091 Fix deopts caused by misplaced COW checks.
TEST=Performance of pixel-array-blur back to normal.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 12:01:51 +00:00
rossberg@chromium.org
3ff882ff64 Make proxy fixing GC safe.
R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 11:28:18 +00:00
rossberg@chromium.org
3f5bc11c55 Implement Object.prototype.{hasOwnProperty, propertyIsEnumerable} for proxies.
Refactor trap invocation.
Test other Object.prototype functionality for proxies.

R=ager@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 11:20:27 +00:00
ager@chromium.org
5fba76891b Re-apply: Implement mapping randomization for 64-bit Linux.
- 32-bit Linux already seems to scatter the mmap() chunks around;
  64-bit didn't.

- Seed the system random number generator a little better (we needlessly trunctaed microsecond resolution to millisecond resolution).

- Will automatically take advantage of better entropy when V8::RandomPrivate uses it.

R=fschneider@chromium.org,cevans@chromium.org
BUG=v8:805
TEST=

Review URL: http://codereview.chromium.org/7464022
Patch from Chris Evans <cevans@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 11:01:50 +00:00
ager@chromium.org
7a0adba963 Fix overlap check in MoveBlock and fix assertion.
The old code was adding a size in words to a byte*. Should use size in
bytes. Also, the assertions were doing signed comparisons on pointers
instead of unsigned. Fixing the assertions makes one of the assertions
identical to the condition just before it.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 10:51:06 +00:00
ager@chromium.org
651e1b2460 Revert "Implement mapping randomization for 64-bit Linux."
Causes sputnik test failures.

R=cevans@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 08:36:58 +00:00
ager@chromium.org
96e3482731 Implement mapping randomization for 64-bit Linux. Notes:
- 32-bit Linux already seems to scatter the mmap() chunks around; 64-bit didn't.
- Seed the system random number generator a little better (we needlessly
trunctaed microsecond resolution to millisecond resolution).
- Will automatically take advantage of better entropy when V8::RandomPrivate
uses it.

BUG=v8:805

Review URL: http://codereview.chromium.org/7377008
Patch from Chris Evans <cevans@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 07:52:54 +00:00
cira@chromium.org
d0ee5982a8 ICU 4.6 NumberFormat::EStyle enum is gone in ICU 4.8. Adding #if #else to make it work across versions.
There was an ICU cleanup (removing all C++ style enums and replacing them with plain C enums). NumberFormat::EStyle had a draft status (from ICU 4.2) and it was cut. Confusion came up because DateFormat::EStyle is stable and won't be removed.

TEST=Compile Chromium with ICU 4.6 and ICU 4.8
BUG=1561
Review URL: http://codereview.chromium.org/7421003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 17:46:56 +00:00
vitalyr@chromium.org
013baa4164 Slightly simplify slow elements conversion check.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 15:14:50 +00:00
jkummerow@chromium.org
c9f2a4325f Add fake data dependencies (instead of disabling GVN) to fix code motion
for HInstructions used in polymorphic array access code.

TEST=existing tests pass.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 14:43:10 +00:00
danno@chromium.org
92fc85b480 Implement support for getters/setter on FixedDoubleArrays.
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 13:41:50 +00:00
rossberg@chromium.org
fa5037e4fd Preparing push to trunk.
Review URL: http://codereview.chromium.org/7452020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 13:22:01 +00:00
yangguo@chromium.org
252d62ed27 Fix for issue 1566: added flushing after writing to stdout.
BUG=v8:1566

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 13:14:46 +00:00
danno@chromium.org
8bc3254e4b Implement for..in for FastDoubleArrays
Also add tests for apply on FastDoubleArrays.

R=ager@chromium.org
BUG=none
TEST=unboxed-double-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 10:54:58 +00:00
jkummerow@chromium.org
9de5255b60 Revert "Make window.undefined, window.NaN, window.Infinitiy read-only (ES5 section 15.1.1)"
This reverts r8691.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 10:51:11 +00:00
jkummerow@chromium.org
6768c5e24e Make window.undefined, window.NaN, window.Infinitiy read-only (ES5 section 15.1.1)
BUG=89490
TEST=manual: "Infinity = 42;" doesn't change the value of "Infinity"

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 10:06:53 +00:00
danno@chromium.org
a85a493f70 Reland 8636: Implement setting the length property for FixedDoubleArrays.
R=ager@chromium.org
BUG=none
TEST=unboxed-double-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 09:11:38 +00:00
whesse@chromium.org
e37a45c336 Fix presubmit error in copyright message.
Use new gcc flag -Wno-unused-but-set-variable only on linux.
TBR=fschneider@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 08:45:30 +00:00
whesse@chromium.org
47e03a0000 fix -Wunused-but-set-variable for gcc-4.6 on x64
* src/third_party/valgrind/valgrind.h: Update from upstream valgrind
  r11899, so as to get around some unused value warnings.  Also adds
  support for darwin.

  This version of valgrind.h differs from the original in that all
  instances of "unsigned long long int" have been replaced with
  "uint64_t", as the former is not allowed in ISO C++ 89.

  See https://bugs.kde.org/show_bug.cgi?id=211926 for the upstream bug
  report.

* src/x64/cpu-x64.cc:
* src/builtins.cc:
* src/conversions-inl.h:
* src/debug.cc:
* src/frames.cc:
* src/full-codegen.cc:
* src/jsregexp.cc:
* src/objects.cc:
* src/parser.cc:
* src/platform-linux.cc:
* src/x64/code-stubs-x64.cc:
* src/x64/deoptimizer-x64.cc:
* src/x64/full-codegen-x64.cc:
* src/x64/lithium-codegen-x64.cc:
* src/x64/regexp-macro-assembler-x64.cc:
* src/x64/stub-cache-x64.cc: Remove a number of assigned but
  unreferenced variables.

* SConstruct (CCTEST_EXTRA_FLAGS): Punt on -Wunused-but-set-variable for
  the test suite.

BUG=1291
TEST=A build and tools/test.py passes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 08:09:58 +00:00
ager@chromium.org
e372a2ddeb Add guard pages in front of executable allocations
BUG=89247

Review URL: http://codereview.chromium.org/7379004
Patch from Chris Neckar <cdn@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 08:06:43 +00:00
danno@chromium.org
5df0886925 MIPS: port Implement ICs for FastDoubleArray loads and stores
Ported r8637 (72bd791)

BUG=
TEST=

Review URL: http://codereview.chromium.org/7386003
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 07:24:50 +00:00
danno@chromium.org
a1e851e916 Rollback 8683: Implement setting the length property for FixedDoubleArrays
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 16:34:17 +00:00
danno@chromium.org
837d83ebf3 Implement setting the length property for FixedDoubleArrays.
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 16:06:17 +00:00
danno@chromium.org
11c7b47430 Crankshaft support for FixedDoubleArrays
BUG=none
TEST=unboxed-double-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 13:04:00 +00:00
rossberg@chromium.org
f7ff89ea02 Implement `in' for proxies.
R=ager@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 09:38:59 +00:00
ager@chromium.org
85f5afb717 Correctly mark functions from our natives files during compilation.
When creating a CompilationInfo we always have the script and can
determine if it is a natives script.

Now that all natives functions are recognized as such, many of them
are called with undefined as the receiver. We have to use different
filtering for builtins functions when printing stack traces.

Also, fixed one call of CALL_NON_FUNCTION to be correctly marked as a
method call (with fixed receiver). Now that CALL_NON_FUNCTION is
marked as a native function this caused the receiver to be undefined.

R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 08:19:31 +00:00
ager@chromium.org
645bb1b1ba Add GetPropertyAttribute method for Object in the API
Patch by Peter Varga.

BUG=none
TEST=cctest/test-api/PropertyAttributes

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 17:44:57 +00:00
vitalyr@chromium.org
bfd7c71954 Pass isolate to AST ID functions.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 17:32:41 +00:00
jkummerow@chromium.org
7ac9dfcc81 Revert "Make GYP build usable for day-to-day work"
This reverts r8674 due to failures on the buildbots.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 16:39:41 +00:00
svenpanne@chromium.org
a58580011e Encapsulated the AST ID recording a bit, this time for MIPS.
Review URL: http://codereview.chromium.org/7400019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 14:46:35 +00:00
ager@chromium.org
6098abf46e Fix the debugger for strict-mode functions.
undefined is passed unchanged as the receiver for strict-mode
functions through call and apply. Also, if a strict-mode function is
called without an explicit receiver, undefined is passed as the
receiver (not the global object as for other functions).

R=vegorov@chromium.org
BUG=89236
TEST=mjsunit/debug-scopes.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 14:29:50 +00:00
jkummerow@chromium.org
93c5c5fa23 Make GYP build usable for day-to-day work
- Introduce a global Makefile that triggers GYP-based building
- Some fixes to .gyp[i] files to make everything work
- tools/test-wrapper-gypbuild.py as a temporary solution for easy testing

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 14:19:48 +00:00
rossberg@chromium.org
5e62e325ac Implement sealing, freezing, and related functions for proxies.
R=ager@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 13:04:52 +00:00
ager@chromium.org
ce75f236f4 Replace reinterpret_cast with BitCast in deoptimizer to please certain compilers.
R=jkummerow@chromium.org
BUG=v8:1564

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 10:51:28 +00:00
svenpanne@chromium.org
55336b37bd Fixed confusion between AST IDs and condition codes on ARM.
C++'s 'great' idea of implicitly converting an enum to an integral value hit us
again, this time resulting in silly (but currently non-harmful) entries in the
relocation table. Encapsulated the AST ID recording a bit, which helped a lot to
find the culprit.
Review URL: http://codereview.chromium.org/7400016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 10:44:13 +00:00
svenpanne@chromium.org
ec9ae871dd Prepare push to trunk.
Review URL: http://codereview.chromium.org/7397010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 09:36:15 +00:00
ager@chromium.org
78f173c47b Introduce a random entropy source which can optionally be provided at initialization.
BUG=89462

Review URL: http://codereview.chromium.org/7395012
Patch from Chris Neckar <cdn@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-17 09:16:28 +00:00
vitalyr@chromium.org
6c71920a51 Fix win64 build.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 17:01:54 +00:00
vitalyr@chromium.org
3d323c691b Avoid TLS load in AstNode constructor.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 16:57:35 +00:00
mstarzinger@chromium.org
2a225a3717 Fixed bug in array filter and reduce functions.
R=danno@chromium.org
BUG=v8:1559
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 11:07:18 +00:00
rossberg@chromium.org
75a2c49c1d Implement delete trap for proxies.
R=ager@chromium.org
BUG=1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 09:10:20 +00:00
yangguo@chromium.org
5f1a8dc71f Included variable default for d8.gyp.
TEST=build/gyp_v8 --generator-output=testbuild/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 08:44:00 +00:00
yangguo@chromium.org
e8bf31427b Introduces a light version of D8 that links against shared library.
Review URL: http://codereview.chromium.org/7351017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 15:43:40 +00:00
jkummerow@chromium.org
d4779286b6 Add map check for COW elements to crankshaft array handling code.
BUG=1560
TEST=mjsunit/regress/regress-1560.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 14:45:20 +00:00
mikhail.naganov@gmail.com
e1e2b369eb Convert *.js files of cctest/test-log into "resources".
This allows running cctest from anywhere.

I was to rename single-letter variables in my script due to an encountered issue
in JSMin (http://code.google.com/p/v8/issues/detail?id=1557).

R=svenpanne@chromium.org,sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:38:18 +00:00
vegorov@chromium.org
615add8463 Expose APIs for detecting boxed primitives, native errors and Math.
While implementing structured clone I found that I need support
for detecting and creating objects using the builtin Number, String
and Boolean constructors; this CL adds this support. I also need
to be able to detect entities of "native object type (e.g., Error)",
hence the new IsNativeError() calls.

(ref: http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-passing-of-structured-data)

Patch by Luke Zarko.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:00:04 +00:00
danno@chromium.org
dbf0aee6ae simplification to HClampToUint8
* src/hydrogen-instructions.h (HClampToUint8): Don't mark as having
  flexible representation; instead the output is always an Integer32.
  There is no input representation restriction, so we can still perform
  input-specific truncation.

I tested by looking at the --print-code of

var a = PixelArray(1000000)
function fill(a,x) { for (var i=0; i<a.len; i++) a[i] = x; }

Seems to optimize fine both for double and integer inputs.  But perhaps
there is a better test, for which the original code does better, and
this is a bogus patch.

Review URL: http://codereview.chromium.org/7357003
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 09:51:52 +00:00
svenpanne@chromium.org
be24b71ffe Harmonize naming a bit, x64 was the only platform where Register::from_code was called Register::toRegister.
Review URL: http://codereview.chromium.org/7364001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 07:44:04 +00:00
danno@chromium.org
a2d162becd Fix the build on x64 and ARM.
BUG=none
TEST=bot greeness

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 16:51:30 +00:00
danno@chromium.org
2e19844aa2 Fixes build failures from FixedDoubleArray IC patch.
BUG=none
TEST=windows build bot works

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 16:36:26 +00:00
ager@chromium.org
9c233c711e Fix shortcutting bug in HInferRepresentation
* src/hydrogen.cc (HInferRepresentation::Analyze): Fix iterative loop
  over phis; the shortcutting behavior of || appears to be accidental
  here, causing O(n^2) convergence.  Not that it matters much, but hey!

While I'm at it, a minor comment fix:

* src/hydrogen-instructions.h (EnsureAndPropagateNotMinusZero): Fix a
  comment about the kinds of instructions that propagate to multiple
  inputs.

BUG=
TEST=passes tools/test.py

Review URL: http://codereview.chromium.org/7350019
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 14:43:09 +00:00
danno@chromium.org
391ef3be33 Implement ICs for FastDoubleArray loads and stores
Implemented on ia32, x64, ARM. Stubbed out with UNIMPLEMENTED on MIPS.

BUG=none
TEST=unbox-double-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 13:50:27 +00:00
ricow@chromium.org
907065c1ae Fix presubmit
Review URL: http://codereview.chromium.org/7354021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 13:29:10 +00:00
vegorov@chromium.org
67709e5355 Fix bug in prototype transitions cache clearing introduced by r8165.
Invalid loop nesting causes full cleanup of the prototype transitions cache on every GC.

R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 13:16:00 +00:00
sgjesse@chromium.org
be1eee7063 Support scope information and evaluation in optimized frames
R=svenpanne@chromium.org

BUG=v8:1140
TEST=test/mjsunit/debug-evaluate-locals-optimized.js,test/mjsunit/debug-evaluate-locals-optimized-double.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 12:49:27 +00:00
whesse@chromium.org
86b5123ddc Prepare push to trunk. We are now working on version 3.4.13.
Review URL: http://codereview.chromium.org/7356011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 12:26:39 +00:00
mikhail.naganov@gmail.com
a9a51c054d WebKit Win fix after r8629: use ...A Win API functions explicitly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:58:46 +00:00
rossberg@chromium.org
ddb782dcb8 Implement Object.getOwnPropertyDescriptor for proxies.
Fix bug in compilation of calls with proxy receivers.

R=kmillikin@chromium.org,ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:57:15 +00:00
mikhail.naganov@gmail.com
5c57d0d643 Remove support for logging into a memory buffer.
The only usage of it was in logging tests, I've switched them for
using a file.

I've left out support for "--logfile=*" for now, as Chromium uses it.
Will be removed after the next V8 roll.

R=sgjesse@chromium.org
BUG=859
TEST=mjsunit/log-*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:31:22 +00:00
whesse@chromium.org
b2e8d72bf5 Revert r8619 because of Webkit failures.
Review URL: http://codereview.chromium.org/7351014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:13:40 +00:00
svenpanne@chromium.org
f1860fbdc0 Disentangle printing of stub names and memory allocation.
Using a C++-style method PrintName (a.k.a. << ;-), things get a lot easier when
two unrelated concerns are separated. Stubs don't need a name cache anymore,
simpler code while generating the stub name, memory allocation is centralized,
etc.
Review URL: http://codereview.chromium.org/7342042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:08:25 +00:00
rossberg@chromium.org
6e2da733da Implement Object.keys for proxies.
R=kmillikin@chromium.org,ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:01:17 +00:00
sgjesse@chromium.org
8b684b9a08 Make fast tls the default
Now V8_NO_FAST_TLS needs to be defined to switch off fast tls access on platform which supports it.

R=ager@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 10:00:33 +00:00
sgjesse@chromium.org
620d50af55 Avoid patching code after the call to binary operation stub in optimized code
This patch just adds a nop after the call to the binary operation stub in optimized code to avoid the patching for the inlined smi case used in the full code generator to kick in if the next instruction generated by the lithium code generator should accidentially enable that. For calls generated by CallCodeGeneric this was already handled on Intel platforms, but missing on ARM.

On IA-32 I did also try to check for whether the code containing the call was optimized (patch below), but that caused regressions on some benchmarks.

diff --git src/ia32/ic-ia32.cc src/ia32/ic-ia32.cc
index 5f143b1..f70e208 100644
--- src/ia32/ic-ia32.cc
+++ src/ia32/ic-ia32.cc
@@ -1603,12 +1603,18 @@ void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {

   // Activate inlined smi code.
   if (previous_state == UNINITIALIZED) {
-    PatchInlinedSmiCode(address());
+    PatchInlinedSmiCode(address(), isolate());
   }
 }

-void PatchInlinedSmiCode(Address address) {
+void PatchInlinedSmiCode(Address address, Isolate* isolate) {
+  // Never patch in optimized code.
+  Code* code = isolate->pc_to_code_cache()->GetCacheEntry(address)->code;
+  if (code->kind() == Code::OPTIMIZED_FUNCTION) {
+    return;
+  }
+
   // The address of the instruction following the call.
   Address test_instruction_address =
       address + Assembler::kCallTargetAddressOffset;
diff --git src/ic.cc src/ic.cc
index f70f75a..62e79da 100644
--- src/ic.cc
+++ src/ic.cc
@@ -2384,7 +2384,7 @@ RUNTIME_FUNCTION(MaybeObject*, BinaryOp_Patch) {

     // Activate inlined smi code.
     if (previous_type == BinaryOpIC::UNINITIALIZED) {
-      PatchInlinedSmiCode(ic.address());
+      PatchInlinedSmiCode(ic.address(), isolate);
     }
   }

diff --git src/ic.h src/ic.h
index 11c2e3a..9ef4b20 100644
--- src/ic.h
+++ src/ic.h
@@ -721,7 +721,7 @@ class CompareIC: public IC {
 };

 // Helper for BinaryOpIC and CompareIC.
-void PatchInlinedSmiCode(Address address);
+void PatchInlinedSmiCode(Address address, Isolate* isolate);

 } }  // namespace v8::internal

R=danno@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 09:31:17 +00:00
sgjesse@chromium.org
8a6108de95 Remove the ability to compile without logging and profiling
The preprocessor defines ENABLE_LOGGING_AND_PROFILING and ENABLE_VMSTATE_TRACKING has been removed as these where required to be turned on for Crankshaft to work. To re-enable reducing the binary size by leaving out heap and CPU profiler a new set of defines needs to be created.

R=ager@chromium.org

BUG=v8:1271
TEST=all

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 09:09:04 +00:00
yangguo@chromium.org
c0044bb7e2 Added dictionary that can use objects as keys.
R=vegorov@chromium.org
TEST=cctest/test-dictionary

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-12 15:13:57 +00:00
svenpanne@chromium.org
0ff690b370 Fixed a long-standing TODO: Removed a few *-incl.h #includes from isolate.h.
ZoneAllocationPolicy::New is not inlined anymore because this pulls in far too
much stuff and doesn't really make any measurable performance difference. And
no, the #includes are still not in alphabetical order... ;-)
Review URL: http://codereview.chromium.org/7346006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-12 08:03:19 +00:00
lrn@chromium.org
2ee07e1d93 Remove prematurely added dependencies from preparser.
Also remove some dead code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-12 07:50:25 +00:00
yangguo@chromium.org
216a3935c9 second attempt at correcting fopen (hangs when trying to read from a dir)
Review URL: http://codereview.chromium.org/7334010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 15:30:24 +00:00
sgjesse@chromium.org
54e81c351f Add source position recording for variable loads
This provides more precise source to generated code mapping as variable loads can be handled using IC calls.

R=kmillikin@chromium.org

BUG=v8:1527
TEST=test/message/regress/regress-1527

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 15:20:17 +00:00
yangguo@chromium.org
58d7fb8266 rollback
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 14:08:27 +00:00
kmillikin@chromium.org
890bc1607a Fix a potential crash in const declaration.
Declaration of const lookup slots would trigger an assertion if there was a
setter somewhere in the prototype chain, and that setter was shadowed by a
non-readonly data property also in the prototype chain.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 14:07:12 +00:00
ager@chromium.org
15429da469 Remove heap protection support.
It does not currently work and when it did work we never got it fast
enough to be useful.

R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 14:03:21 +00:00
yangguo@chromium.org
6cb055ae5d bug fix
BUG=http://code.google.com/p/v8/issues/detail?id=1533

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 13:48:10 +00:00
vegorov@chromium.org
3555f82311 Fix bug in Map::TraverseTransitionTree.
If map has an empty DescriptorArray we have to set map_or_index_field to NULL otherwise we will
reset iteration state for a previously visited map in the transition tree which has a non-empty
DescriptorArray. This might result in visiting the same map several times.

R=whesse@chromium.org
BUG=v8:1526

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 12:06:35 +00:00
yangguo@chromium.org
f2f2efc544 bug fix since --prof did not work
BUG= --prof did not work
TEST=./d8 --prof <insert any test>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 12:04:13 +00:00
sgjesse@chromium.org
7225401ff4 Prepare push to trunk. We are now working on version 3.4.12.
R=ricow@chromium.org

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7331037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 11:10:45 +00:00
sgjesse@chromium.org
d51834ad5e Fix heap corruption and memory leakage in inspection of optimized frames.
R=ricow@chromium.org

BUG=none
TEST=test/mjsunit/debug-evaluate-arguments.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 09:35:18 +00:00
svenpanne@chromium.org
c71cf782e8 Drastically reduce the transitive dependencies of jsregexp.h, making it (almost)
architecture-independent.

jsregexp.h is itself included transitively quite a lot, and by getting rid of 19
of its dependencies (which even included things like src/cpu.h, the various
assemblers, etc.), the recompilation behaviour is a bit less funny than it was.
Review URL: http://codereview.chromium.org/7331014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 09:12:17 +00:00
yangguo@chromium.org
8330176f3f ported --isolate option to d8 and refactored to group together option parsing
TEST=tools/test.py -j15 --shell d8 --isolates

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 07:38:09 +00:00
kmillikin@chromium.org
cbaf1bc98b Allow JSObject::PreventExtensions to work for arguments objects.
R=karlklose@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 06:48:19 +00:00
sgjesse@chromium.org
77933b4f63 MIPS: port Fix problem with arguments object ICs not checking for dictionary mode elements.
Ported r8497 (916120a)

Patch by Daniel Kalmar <kalmard@homejinni.com>

BUG=
TEST=

Review URL: http://codereview.chromium.org//7329013
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 06:46:58 +00:00
sgjesse@chromium.org
5528ce7057 MIPS: Cleaned up calling-related methods in the assembler.
Patterned after r8482, Cleaned up calling-related methods in the ARM assembler.

On MIPS I completely refactored the Jump and Call methods.
All the Jump and Call macro helpers have been replaced with overloaded functions
(matching the ARM version) and using default parameter values where possible.
The previously mostly-unused CallSize function is utilized as well (same as on ARM).
The unused Jump(Operand, ...) and Call(Operand, ...) versions have been completely removed.
I also removed the Jump(BranchDelaySlot, ...) and Call(BranchDelaySlot,...) methods as
they were unused and declaring them would either result in a lot of unused code or the
previously experienced macro-hell. The only exception to this is for Ret() where the
branch delay slot is often used.

This fixes the failing debug tests for example cctest test-debug/DebugStepFor.

Ported r8482 (41cb9ed)

Patch by Daniel Kalmar <kalmard@homejinni.com>

BUG=
TEST=

Review URL: http://codereview.chromium.org//7328013
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 06:45:27 +00:00
danno@chromium.org
07def3cb1e Unify handling of element IC stubs.
In the process, add shared stubs for DictionaryValue lookups that are handled in the same way as fast elements and external array elements.

Includes code for MIPS, which compiles and run polymorph-arrays.js successfully.

R=jkummerow@chromium.org
BUG=none
TEST=test/mjsunit/polymorph-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 10:46:10 +00:00
svenpanne@chromium.org
c8618923ec Removed useless implementations of GetName and Print for code stubs, the common
super-class handles the most common case already.
Review URL: http://codereview.chromium.org/7332001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 09:40:14 +00:00
sgjesse@chromium.org
562adac59f Generate shorter instruction forms for constant in ia32 gap resolver.
Review URL: http://codereview.chromium.org//7277084

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 09:08:12 +00:00
sgjesse@chromium.org
7cbf0a4d48 Add inspection of whether frame is a construct frame to optimized frames
Also avoid that calling Debug::IsBreakAtReturn causes a full doptimization when there are no break points set. The full deoptimization is caused by Debug::IsBreakAtReturn calling Debug::EnsureDebugInfo which will assume that a break point is now set.

R=svenpanne@chromium.org

BUG=v8:1140
TEST=test/mjsunit/debug-evaluate-locals-optimized.js,test/mjsunit/debug-
evaluate-locals-optimized-doubles.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 08:55:26 +00:00
kmillikin@chromium.org
44c4d0e376 Fix compilation error.
Compiler cannot recognize the typename in template declaration.  Caught by
MSVC.

R=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 08:03:39 +00:00
kmillikin@chromium.org
fe23339bdd Fix a bug in for/in iteration of arguments objects.
We did not properly combine the property names from the parameter map
and the arguments backing store.  They could overwrite each other and
be unsorted.

Also fix an unrelated bug: deleting from a dictionary-mode arguments
backing store could corrupt the parameter map.

R=rossberg@chromium.org
BUG=1531
TEST=mjsunit/regress/regress-1531.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 07:31:48 +00:00
sgjesse@chromium.org
436c547a27 MIPS: port Fix ARM regression introduced with polymorphic array support.
Ported r8484 (9f824d7)

BUG=
TEST=

Review URL: http://codereview.chromium.org//7237046
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 06:59:54 +00:00
sgjesse@chromium.org
d9d40dd5d9 MIPS: port Fix a typo in KeyedStoreIC, restore Kraken performance.
Ported r8539 (46103ea)

BUG=
TEST=

Review URL: http://codereview.chromium.org//7327016
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 06:48:27 +00:00
sgjesse@chromium.org
4145dded9a MIPS: port Introduce code flushing of RegExp code.
Ported r8532 (c9db503)

Original commit message:
Due to issues relating mostly to chrome extensions we have lately been
running into OOMs that are caused by our executable space running
out. This change introduces flushing of code from regexps if we have
not used the code for 5 mark sweeps.
The approach is different from the normal function code flusing. Here
we make a copy of the code inside the data array, and exchange the
original code with a smi determined by the sweep_generation (a new
heap variable increased everytime we do mark sweep/compact). If we
encounter a smi in EnsureCompiled we simply reinstate the code
object. If, in the marking phase of mark sweep, we find a regexp that
already have a smi in the code field, and this is more than 5
generations old we flush the code from the saved index.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7324018
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 06:47:09 +00:00
sgjesse@chromium.org
ae35e56221 Try to fix Windows compilation error.
R=whesse@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 19:27:48 +00:00
sgjesse@chromium.org
8ccb47f57e Add inspection of arguments for optimized frames
R=svenpanne@chromium.org

BUG=v8:1140
TEST=test/mjsunit/debug-evaluate-locals-optimized.js,test/mjsunit/debug-
evaluate-locals-optimized-doubles.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 14:29:16 +00:00
svenpanne@chromium.org
894f57f96a Reduce the number of global constructor calls by changing a constant to a
(constant) inline function.

This brings down the size of v8's .ctors section to 1/4, hopefully fixing the
recent issues with Chromes' CL 91522.
Review URL: http://codereview.chromium.org/7321005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 13:57:58 +00:00
rossberg@chromium.org
58b913f9f0 Implement Object.defineProperty for proxies.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 12:41:20 +00:00
vitalyr@chromium.org
0f9b0ad8c3 Don't check symbol literals for being symbols.
R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 12:01:49 +00:00
vegorov@chromium.org
c1e1e97b8b When resolving phies use ANY instead of NONE as a policy for phi operands.
R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 10:22:39 +00:00
fschneider@chromium.org
d54460fd85 Don't emit a write barrier when storing boolean-typed values.
Review URL: http://codereview.chromium.org/7312022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 10:14:55 +00:00
ricow@chromium.org
82e53270dc Ensure that regexps always have code object, even if GC happened while running multiple times in runtime.
Review URL: http://codereview.chromium.org/7316018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 10:04:56 +00:00
vitalyr@chromium.org
28d5392bc0 Group property assignments in top-level blocks.
This patch enables insertion of To{Slow,Fast}Properties around a group
of assigments to the same object even when they are put in a block
(e.g. try-catch, if, etc.). Catching exceptions and disabling parts of
code based on some config vars is rather common in top-level code.

R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 17:21:32 +00:00
sgjesse@chromium.org
53a5b07992 Add inspection of function for optimized frames
R=svenpanne@chromium.org

BUG=none
TEST=test/mjsunit/debug-evaluate-locals-optimized.js,test/mjsunit/debug-evaluate-locals-optimized-doubles.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 13:02:17 +00:00
vegorov@chromium.org
172cd39760 Define OS::MaxVirtualMemory on MinGW.
Patch by Bert Belder.

BUG=v8:1508

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 12:29:21 +00:00
vegorov@chromium.org
f465eeff69 MinGW32: define STRUNCATE and change strncpy_s implementation to follow specification.
This fixes the debug build for MinGW32

Patch by Bert Belder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 12:25:25 +00:00
jkummerow@chromium.org
aed876cb21 Prepare push to trunk. Now working on version 3.4.11.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 10:58:52 +00:00
sgjesse@chromium.org
ca3787f395 Fix debug break on binary boolean operators
The syntax checker finding breakable statements did not take into account that the right hand side of a boolean binary opration might never get evaluated.

R=svenpanne@chromium.org

BUG=v8:1523
TEST=test/mjsunit/regress/regress-1523.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 10:16:57 +00:00
sgjesse@chromium.org
612d6d3274 Use the information from the last recorded safepoint for the padding after the deferrred code.
R=kmillikin@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 09:28:07 +00:00
lrn@chromium.org
57b7a67dba Revert preparser duplicate detection.
Doesn't work on Windows yet.
Crashes some layout-tests.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 09:15:10 +00:00
lrn@chromium.org
57760b8275 Make preparser detect duplicate parameters and object literal properties.
This is a fix and reapply of r8516 with some comments addressed and more
tests added.
The difference from r8516 is that canonicalization of number literals is
no performed using the same methods as in v8, to avoid false positives/negatives
when detecting duplicates.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 08:32:48 +00:00
sgjesse@chromium.org
4f12a06c8a Fix a typo in KeyedStoreIC, restore Kraken performance.
TEST=none
BUG=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 07:05:49 +00:00
vitalyr@chromium.org
47ed2b58c6 Fix arm build.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 16:12:42 +00:00
vitalyr@chromium.org
bbaed5b82e Fix a few issues breaking cctest/test-lockers/Regress1433:
o The thread local state in an isolate has to be initialized before
  it's used.
o v8::Locker was incorrectly tracking whether it's the topmost one.
o Waking the profiler thread on shutdown should not leave the
  semaphore counter in an inconsitent state.

R=fschneider@chromium.org
BUG=v8:1522
TEST=cctest/test-lockers/Regress1433

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 15:49:39 +00:00
sgjesse@chromium.org
10bb16f495 Add support for lazy deoptimization from deferred stack checks
The debugger can be entered from the deferred stack check in optimized code. This can cause both lazy deoptimization and debugger deoptimization (setting the first break point and inspecting the stack for optimized code respectively). This required deoptimization support from the deferred stack check.

The lazy deoptimiztion call is inserted when the deferred code is done including restoring the registers. The bailout to the full code is the begining of the loop body as that is where the stack check is sitting in the optimized code. The bailout is not to the stack check in the full code as that is sitting at the end of the loop.

R=kmillikin@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 13:21:29 +00:00
lrn@chromium.org
877d6198e5 Extract string->double and double->string conversions for use in the preparser.
Review URL: http://codereview.chromium.org/7308004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 11:54:11 +00:00
vegorov@chromium.org
e3b1fe2c14 Fix ABI for API calls on ia32.
Instead of relying on eax value after the call load returned handle value directly from the slot that was preallocated for it.

R=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 11:36:52 +00:00
ricow@chromium.org
0f682143d9 Introduce code flushing of RegExp code.
Due to issues relating mostly to chrome extensions we have lately been
running into OOMs that are caused by our executable space running
out. This change introduces flushing of code from regexps if we have
not used the code for 5 mark sweeps.

The approach is different from the normal function code flusing. Here
we make a copy of the code inside the data array, and exchange the
original code with a smi determined by the sweep_generation (a new
heap variable increased everytime we do mark sweep/compact). If we
encounter a smi in EnsureCompiled we simply reinstate the code
object. If, in the marking phase of mark sweep, we find a regexp that
already have a smi in the code field, and this is more than 5
generations old we flush the code from the saved index.
Review URL: http://codereview.chromium.org/7282026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 06:19:53 +00:00
whesse@chromium.org
f3d1453f83 As part of allowing different contexts for inlined functions, eliminate most explicit reads of the context from the stack frame in ia32 crankshaft codegen.
Eliminates the enum flag RESTORE_CONTEXT and CONTEXT_ADJUSTED, and adds a context HValue and LOperand to many hydrogen and lithium instructions.

Context is still used from the stack from in CallKnownFunction (this seems safe), and in CallRuntimeFromDeferred in lithium-codegen-ia32.cc, which needs to be fixed.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 14:13:08 +00:00
vitalyr@chromium.org
8f60208324 Fix bug 1529: check for NULL handle in v8::TryCatch::StackTrace.
Internal HandleScope::CloseAndEscape crashes on NULL handles.

R=kmillikin@chromium.org
BUG=v8:1529
TEST=mjsunit/regress/regress-1529

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 13:29:56 +00:00
ricow@chromium.org
9217a45b9e Prepare push to trunk. Now working on 3.4.10.
Review URL: http://codereview.chromium.org/7307003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 13:20:39 +00:00
whesse@chromium.org
03c694258a Fix Windows 64-bit compilation error.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 11:58:20 +00:00
whesse@chromium.org
5f721c3f84 Speed up V8 random number generator, reverting part of 8490.
Return to previous random number generator, but mix more bits into
output to hide hidden state better.  Keep the multithreading fix that
moves the PNG into isolate.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 11:34:29 +00:00
kmillikin@chromium.org
57c29c1f29 Fix a bug in with and catch context allocation.
We were only looking one level up the scope chain to decide which
closure to use in the fresh context.  Instead, we should look to the
first non-catch scope.

R=vegorov@chromium.org
BUG=1528
TEST=regress-1528

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 09:34:47 +00:00
sgjesse@chromium.org
c5aebcb7b0 MIPS: port Introduce scopes to keep track of catch blocks at compile time.
Port r8496 (b7d5ecf0).

Original commit message:
Introduce scopes to keep track of catch blocks at compile time.
The catch variable is bound in the catch scope. For simplicity in this
initial implementation, it is always allocated even if unused and always
allocated to a catch context even if it doesn't escape. The presence of
catch is no longer treated as a with.
In this change, care must be taken to distinguish between the scope where a
var declaration is hoisted to and the scope where the initialization occurs.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7212020
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 09:05:57 +00:00
sgjesse@chromium.org
a89f314de3 MIPS: port Do not pass the global object as the receiver to strict-mode ...
Do not pass the global object as the receiver to strict-mode and
builtin replace and sort functions.

Port r8488 (6f347b6)

BUG=
TEST=

Review URL: http://codereview.chromium.org//7278024
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 09:01:52 +00:00
sgjesse@chromium.org
9cc5b94c2e Correctly handle the constant pool in constant pool splitting test
The constant pool was not taken into account in the test test-compiler/SplitConstantsInFullCompiler which caused random failures.

This also reverts the test code added in r8469 and r8471.

R=ricow@chromium.org

BUG=none
TEST=test-compiler/SplitConstantsInFullCompiler

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 08:57:43 +00:00
lrn@chromium.org
4f1e60cc75 Revert r8516.
Revision 8516 contained a temporary hack that doesn't work on Windows.

TBR: ricow

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 15:44:21 +00:00
kmillikin@chromium.org
a48c03bb2a Fix an issue with optimization of functions inside catch.
When optimizing a function defined inside a catch, we did not count
the catch context as part of the context chain.

R=vegorov@chromium.org
BUG=1521
TEST=regress-1521

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 14:05:46 +00:00
lrn@chromium.org
b6779044c9 Add duplicate parameter detection to preparser.
Add tests for duplicate properties of object initialisers to preparser.

TEST=preparser

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 13:46:52 +00:00
vitalyr@chromium.org
8448d09d3b Do a backing store sparseness check on fast element delete.
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 13:18:42 +00:00
vitalyr@chromium.org
fe7bdf1fe8 Remove unmarked entries from per context map caches.
Made "map_cache" a weak field of global context and added a pass over
all caches late in the marking phase.

R=vegorov@chromium.org
BUG=v8:1516
TEST=cctest/test-api/Regress1516

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 12:47:18 +00:00
yangguo@chromium.org
77a3c7226b exposing a few boolean queries from objects.h
TEST=start with ./d8 --allow-natives-syntax and try %ObjectHasFastElements({})

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 11:47:55 +00:00
lrn@chromium.org
ff9ce1abd4 Make date parser handle all ES5 Date Time Strings correctly.
This means that ES5 Date Time Strings will default to UTC if timezone is absent.
Handle as many legacy strings as possible the same way as before

BUG=v8:1498
TEST=mjsunit/date

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 11:41:45 +00:00
jkummerow@chromium.org
31487d29e3 Add missing HandleScope
Review URL: http://codereview.chromium.org/7210056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 11:04:36 +00:00
sandholm@chromium.org
9a2165c7fb An attempt to resolve the win32 build error introduced in r8506
Review URL: http://codereview.chromium.org/7278018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 10:59:38 +00:00
mikhail.naganov@gmail.com
33177880c8 Remove "modules" and "tags" of the logging CPU profiler.
Modules now makes a little sense, as there is only one module.
Tags was a simplistic attempt of supporting nested profiles.

R=sgjesse@chromium.org
BUG=859

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 09:35:16 +00:00
sandholm@chromium.org
7a817f620e Special case handling of one char split on an ASCII string.
Review URL: http://codereview.chromium.org/7285030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 09:29:38 +00:00
jkummerow@chromium.org
3916da5f98 Cleanup polymorphic IC code to make use of ElementsKind information in maps.
Review URL: http://codereview.chromium.org/7283044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 07:58:58 +00:00
svenpanne@chromium.org
e6ec7808db Simplify UnaryOpStub a little bit.
Only a single constructor is really needed. Make UnaryOp_Patch's arguments
simpler, avoiding encoding/decoding things in a cryptic way.
Review URL: http://codereview.chromium.org/7248063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 07:50:46 +00:00
ager@chromium.org
75bebf3db8 Fixes the build for the shell on illumos and Solaris. -D__C99FEATURES__ was added to mirror how the build is done on the normal platform. The changes in the platform code are a follow up to a prior review and has the Solaris implementation be more similar to the Linux version as opposed to the FreeBSD.
Contributed by Robert Mustacchi <rm@fingolfin.org>

TEST=Note the test suite uncovered a bug in libm where pow(3M) was not doing the right thing on edge cases. The only test failures are related to this bug.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 05:50:14 +00:00
fschneider@chromium.org
f437f859c9 Relax register constraints for instructions that support memory operands on IA32.
Review URL: http://codereview.chromium.org/7290006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 18:14:48 +00:00
whesse@chromium.org
473f833699 Change return type of FrameDescription::GetFrameSize to avoid unneeded type casts.
Review URL: http://codereview.chromium.org/7282033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 15:57:56 +00:00
kmillikin@chromium.org
05c73983a7 Remove bogus assertion.
R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 15:49:14 +00:00
fschneider@chromium.org
eb380e0f85 Fix broken ARM debug build.
TBR=
Review URL: http://codereview.chromium.org/7284035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 15:05:24 +00:00
karlklose@chromium.org
c0e2268c8c Fix problem with arguments object ICs not checking for dictionary mode elements.
R=kmillikin@chromium.org
BUG=1514
TEST=mjsunit/regress/regress-1513.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 14:56:06 +00:00
kmillikin@chromium.org
f4c4df2d9a Introduce scopes to keep track of catch blocks at compile time.
The catch variable is bound in the catch scope.  For simplicity in this
initial implementation, it is always allocated even if unused and always
allocated to a catch context even if it doesn't escape.  The presence of
catch is no longer treated as a with.

In this change, care must be taken to distinguish between the scope where a
var declaration is hoisted to and the scope where the initialization occurs.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 14:37:55 +00:00
fschneider@chromium.org
b12e933e43 Refactor handling of test expressions in the graph builder.
Instead of generating two instructions and combining them
at lithium translation using the EmitAtUses predicate, we
generate the correct branch instruction right from the start.
Review URL: http://codereview.chromium.org/7237024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 14:19:52 +00:00
mikhail.naganov@gmail.com
d0559ee206 Heap profiler: annotate fixed arrays by their purpose.
This helps understanding what is a particular array for by
just looking at its name.

R=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 14:19:33 +00:00
svenpanne@chromium.org
a482bd7ee3 Unbreak compilation on MIPS after EmitCallIC removal.
Note: It has only been verified that compilation is OK, nothing more... ;-)
Review URL: http://codereview.chromium.org/7273097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 14:02:18 +00:00
whesse@chromium.org
3a7e8fb791 Fix compilation on 64-bit Windows build.
Review URL: http://codereview.chromium.org/7283043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 13:08:13 +00:00
whesse@chromium.org
03df9dd50b Improve pseudorandom number generation and move the PNG state to Isolate.
Review URL: http://codereview.chromium.org/7248060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 13:07:43 +00:00
svenpanne@chromium.org
dd7e3cbdb2 Nuke EmitCallIC, it is a plain call now.
Note that the MIPS part will need some similar changes, too.
Review URL: http://codereview.chromium.org/7283042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 13:05:03 +00:00
ager@chromium.org
0d8c343c90 Do not pass the global object as the receiver to strict-mode and
builtin replace and sort functions.

R=ricow@chromium.org
BUG=v8:1360
TEST=mjsunit/regress/regress-1360.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 12:29:19 +00:00
vegorov@chromium.org
89c83051aa Fix presubmit failure in gdb-jit.cc.
R=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 12:19:47 +00:00
danno@chromium.org
743babcb44 Fix ARM regression introduced with polymorphic array support.
BUG=none
TEST=Kraken on ARM

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 11:53:15 +00:00
vegorov@chromium.org
64c897b5cb Extend gdb-jit support (OSX/locals+parameters/prettyprint)
Generate Mach-O in-memory objects for OSX. Dump locals and parameters
for non-optimized frames.

Unfortunately, it seems like more-recent-GDB on OSX there is a little
temperamental (eg, the version from macports will be missing symbols
from gdb-integration_g when the version included in xcode will not--
and this is with --gdbjit off).

Includes some Python scripts to make dealing with V8 values in gdb more
pleasant.

Patch by Luke Zarko.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 11:52:00 +00:00
svenpanne@chromium.org
233a8dc237 Cleaned up calling-related methods in the ARM assembler.
Generalized Call macro instruction to handle AST IDs, too, making things more
similar to the Intel assemblers. Removed unused methods. Minor signature
cleanup. Simplified assertions.
Review URL: http://codereview.chromium.org/7284029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 11:26:15 +00:00
kmillikin@chromium.org
3f84fcf6c9 Fix a bug in Object.defineProperty.
There was a bug in Object.defineProperty when used to add an indexed
property to an arguments object.  When converting the elements backing
store to dictionary mode, the parameter map in front of the backing
store does not change.

R=ager@chromium.org,karlklose@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 11:11:19 +00:00
ager@chromium.org
47ca7358e6 MIPS: stub out Support debugger inspection of locals in optimized frames
Added Deoptimizer::FillInputFrame as UNIMPLEMENTED method.

Ported r8464 (34f38d1)

BUG=
TEST=

Review URL: http://codereview.chromium.org/7284026
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 09:25:29 +00:00
jkummerow@chromium.org
39b06d8850 Add support for dictionary elements to polymorphic crankshaft code.
Review URL: http://codereview.chromium.org/7285001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 08:40:31 +00:00
kmillikin@chromium.org
7d189d848e MIPS: port Explicitly pass the closure when allocating a catch or with context.
Ported r8453 (59dd697)

Original commit message:
Before: allocation of a catch or with context fetched the closure to store
in the context from the previous context in the context chain. Now: the
closure is passed explicitly.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 08:34:10 +00:00
kmillikin@chromium.org
861d18032a MIPS: port Remove the fcontext field from all contexts.
Ported 8452 (8a2a360)

Original commit message:
Before: every context cached the nearest enclosing function context. This
assumed that for nested contexts (i.e., with and catch contexts) the
enclosing function had a materialized link in the context chain.
Now: when necessary, we loop up the context chain to find such a context.
This enables catch contexts without forcing the enclosing function to
allocate its own context.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 08:32:59 +00:00
ager@chromium.org
3a5788915f Fix platform-solaris after isolate changes.
Patch from http://code.google.com/p/v8/issues/detail?id=1509.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 07:24:49 +00:00
ager@chromium.org
2b286a3128 Remove --strict developer flag from V8.
It makes V8 not have JavaScript semantics by throwing exception all
the time. Even our own natives JavaScript code cannot run using that.

R=ricow@chromium.org
BUG=v8:1511

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 06:58:13 +00:00
vitalyr@chromium.org
90c9f1b989 Suspend runtime profiler as soon as we exit JS.
Lots of web pages have really frequently firing timers that keep the
profiler thread spinning if we require a period of JS inactivity
before suspending the profiler. While it's possible to throttle it by
increasing the sleep delay and adjusting the duration of the required
inactive period, it seemed much simpler to just stop it immediately on
exiting JS.

Stopping the profiler this way effectively turned off two optimization
heuristics: 1) eager optimization (it's reset on waking up the
profiler and now the profiler wakes up much more frequently) and 2)
optimization throttling based on JS to non-JS state ratio (the ratio
is now 100%). I removed these two heuristics and found no performance
regressions so far.

R=ager@chromium.org
BUG=crbug.com/77625
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 14:56:08 +00:00
svenpanne@chromium.org
b6869174c6 Simplify EmitCallIC.
Move the identification of the corresponding StatsCounter where it belongs,
namely into the Code class. Use the null pattern to signal "no inlined Smi
code". Removed a few unused counters.
Review URL: http://codereview.chromium.org/7273066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 13:43:24 +00:00
sgjesse@chromium.org
c4f28bf274 Temporarily add more test output to help locate test failure
R=ricow@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 13:40:23 +00:00
jkummerow@chromium.org
6cd99953f1 Using KeyedStoreIC_Generic_Strict must prevent polymorphic case.
TEST=Fewer deopts in existing tests.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 13:32:27 +00:00
sgjesse@chromium.org
3878096ed8 Fix compilation of all combinations of disassembler=on/off and objectprint=on/off
R=jkummerow@chromium.org

BUG=v8:1473
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 13:17:02 +00:00
sgjesse@chromium.org
7d2be7c0e0 Support debugger inspection of locals in optimized frames
Optimized frames are now handled by the debugger. When discovering optimized frames during stack inspection in the debugger they are "deoptimized" using the normal deoptimization code and the deoptimizer output information is used to provide frame information to the debugger.

Before this change the debugger reported each optimized frame as one frame no matter the number of inlined functuions that might have been called inside of it. Also all locals where reported as undefined. Locals can still be reposted as undefined when their value is not "known" by the optimized frame.

As the structures used to calculate the output frames when deoptimizing are not GC safe the information for the debugger is copied to another structure (DeoptimizedFrameInfo) which is registered with the global deoptimizer data and processed during GC.

R=fschneider@chromium.org

BUG=v8:1140
TEST=test/mjsunit/debug-evaluate-locals-optimized*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 13:02:00 +00:00
vegorov@chromium.org
cd9356baa6 Prepare push to trunk. Now working on 3.4.9.
R=ager@chromium.org
Review URL: http://codereview.chromium.org/7282005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 11:21:23 +00:00
svenpanne@chromium.org
ac7fca826d Simplify the way we call UnaryOpStubs, saving one unused no-op after the call itself.
Review URL: http://codereview.chromium.org/7280005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 11:12:12 +00:00
sandholm@chromium.org
f9c82bf3a3 Improve JSON.parse to use less memory when using escaped and non-ascii
characters.
Review URL: http://codereview.chromium.org/7241023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 10:54:20 +00:00
sgjesse@chromium.org
39ed137e10 ARM: Improve register allocation and constraints (try 2).
Gives ~20% boost for Crypto benchmark on A9.

BUG=none
TEST=added to mjsunit/div-mod.js

Review URL: http://codereview.chromium.org//7276034
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 10:51:06 +00:00
jkummerow@chromium.org
6f66664386 Error checking for length parameter of external array constructors in shell
BUG=v8:1501

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 10:27:14 +00:00
yangguo@chromium.org
61c7b030e9 reverting revision r8454
Review URL: http://codereview.chromium.org/7218042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 08:45:22 +00:00
erik.corry@gmail.com
f8fdc62c19 Improvement to SmiLexicalCompare. Landing http://codereview.chromium.org/7261008 for Stephen Adams
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 08:35:10 +00:00
kmillikin@chromium.org
81e8b42e1b Fix lint failure.
TBR=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 08:32:12 +00:00
yangguo@chromium.org
e6dbce1190 added the --test option for d8 into tools/test.py
TEST= tools/test.py --shell d8 -v

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 08:22:36 +00:00
kmillikin@chromium.org
96bbcaf416 Explicitly pass the closure when allocating a catch or with context.
Before: allocation of a catch or with context fetched the closure to store
in the context from the previous context in the context chain.  Now: the
closure is passed explicitly.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 07:41:42 +00:00
kmillikin@chromium.org
5e7da7f04f Remove the fcontext field from all contexts.
Before: every context cached the nearest enclosing function context.  This
assumed that for nested contexts (i.e., with and catch contexts) the
enclosing function had a materialized link in the context chain.

Now: when necessary, we loop up the context chain to find such a context.
This enables catch contexts without forcing the enclosing function to
allocate its own context.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 15:22:08 +00:00
fschneider@chromium.org
2760bd2927 Slightly improved register assignment for %_IsObject on IA32 and ARM.
The new approach uses one temp register instead of two on IA32. The ARM
instructions are modified so the input can be UseAtStart again.
Review URL: http://codereview.chromium.org/7274025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 14:21:55 +00:00
kmillikin@chromium.org
e859416b9f Better placement of argument pushing for a few hydrogen call instructions.
Where it's simple to do so (keyed calls, calls to unknown global variables,
calls to local variables and non-property/non-variable expressions), end the
live range of argument subexpressions immediately after the last use of the
expression rather than at the call.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 12:51:21 +00:00
keuchel@chromium.org
3f70c456eb Fix "illegal access" when calling parseInt with a radix that is not a smi.
BUG=v8:1246
TEST=regress-1246.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 12:31:42 +00:00
fschneider@chromium.org
c9eefb3f88 Fix bug in register assignment of IsObjectAndBranch.
Make sure that input and temp registers don't overlap.
Review URL: http://codereview.chromium.org/7273026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 09:09:07 +00:00
ager@chromium.org
3f6043d370 Cleanup to HEnvironment::CopyForInlining
* src/hydrogen.cc (HEnvironment::CopyForInlining): As the code for both
  the ::HYDROGEN and ::LITHIUM compilation phases is the same, just use
  one code path and remove the arg.

* src/hydrogen.h (HEnvironment): Remove now-unused CompilationPhase
  enum type and arg to CopyForInlining.

* src/arm/lithium-arm.cc (LChunkBuilder::DoEnterInlined):
* src/ia32/lithium-ia32.cc (LChunkBuilder::DoEnterInlined):
* src/x64/lithium-x64.cc (LChunkBuilder::DoEnterInlined): Adapt
  callers.

* AUTHORS: Add Igalia.

BUG=
TEST=I ran tools/test.py.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 08:54:09 +00:00
fschneider@chromium.org
b59f2b700b Fix a bug in %_GetCachedArrayIndex.
This inline runtime function had the wrong super class.
It did not cause any problems since it is only used in
our natives and never in a test context.
Review URL: http://codereview.chromium.org/7253004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 08:49:01 +00:00
sgjesse@chromium.org
26e53ac042 MIPS: port Fix receiver check in arguments ICs.
Ported r8429 (60a2787)

BUG=
TEST=

Review URL: http://codereview.chromium.org//7276027
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 07:54:01 +00:00
sgjesse@chromium.org
b6afa34afa MIPS: Long branch implementation and trampoline improvement.
Improve the branch and branch-trampoline mechanism to automatically
use long-jumps when function size grows large. Reduce size of emitted
trampoline pools.

Now passes mozilla regress-80981.js.

BUG=
TEST=

Review URL: http://codereview.chromium.org//7239020
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 07:31:42 +00:00
ager@chromium.org
614e542869 Ensure 16-byte stack alignment on Solaris.
GCC generates instructions such as movdqa that requires 16-byte alignment.

R=ricow@chromium.org
BUG=v8:1505
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 07:07:09 +00:00
ager@chromium.org
a8e4b0cfb1 Prepare push to trunk. Now working on version 3.4.8.
R=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-27 13:16:07 +00:00
ager@chromium.org
89cc886ba7 Fix receiver check in arguments ICs.
The receiver needs to be checked in the same way as all other KeyedLoadICs to take non-JSObject and objects that require access checks or has interceptors into account.

R=sgjesse@chromium.org
BUG=87478
TEST=mjsunit/regress/regress-crbug-87478.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-27 13:02:51 +00:00
sgjesse@chromium.org
54d6072332 Change the handling of stack check on backward branches
The hydrogen stack check instruction is now added to each loop and the stack check handling on the back edge has been removed.

This change causes regression on small tight loops as the stack check is now at the top of the loop instead of at the bottom, and that requires one additional unconditional jump per loop iteration. However the reason for this change is to avoid worse regressions for upcoming changes to correctly support debugger break in optimized code.

R=fschneider@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-27 12:12:27 +00:00
sgjesse@chromium.org
b7850c06d1 MIPS: port Better codegen for '<expression> === void <literal>'.
Ported r8420 (fd2ddbb)

Original commit message:
Detect the pattern in both, the full compiler and crankshaft and generate direct pointer
comparisons. Along the way I cleaned up 'typeof <expression> == <string literal>' comparisons
as well by lifting platform independent code and checking the symmetric case.
BUG=v8:1440
TEST=cctest/test-api.cc

Review URL: http://codereview.chromium.org//7262026
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-27 10:45:54 +00:00
lrn@chromium.org
fb4a2d160d Cleanup of return types and names in factory.
Review URL: http://codereview.chromium.org/7240025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-27 09:02:34 +00:00