Commit Graph

618 Commits

Author SHA1 Message Date
sgjesse@chromium.org
5a3ea1c83e Add some comments to the ia32 code generator
Review URL: http://codereview.chromium.org/1918002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 06:57:41 +00:00
serya@chromium.org
16d3811d50 Changing string length field type from int to SMI. It will make it be a regular field. Code generated in EmitNamedLoad could be patched for faster access to string.length.
Review URL: http://codereview.chromium.org/1706013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 14:49:50 +00:00
lrn@chromium.org
4fdf57ace0 X64: Faster push/pop implementation.
Also snuck in an intended optimization for fast api call preparation and a few indentation fixes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 13:23:58 +00:00
whesse@chromium.org
852cebb1cb Improve static type information in (constant SHL smi) computation.
Review URL: http://codereview.chromium.org/1910002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 11:17:45 +00:00
ager@chromium.org
6230f5397d Port inline swapping of elements for the sort function in array.js
from ia32 to arm.

Original change: http://codereview.chromium.org/1709008


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 11:06:59 +00:00
sandholm@chromium.org
5affd79e77 Reverting 2635
Review URL: http://codereview.chromium.org/1940001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 08:41:26 +00:00
whesse@chromium.org
1f9fef3d51 Add inlined code for (constant SHL smi), ported from ia32 to x64. Improve type information on ia32 version of code.
Review URL: http://codereview.chromium.org/1869001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 08:10:05 +00:00
ager@chromium.org
cf54120a58 Port inlined version of swap primitive for sorting from ia32 to x64.
Original code review for ia32 version: http://codereview.chromium.org/1709008
Review URL: http://codereview.chromium.org/1858002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 18:18:25 +00:00
whesse@chromium.org
130d6adf78 Change calling convention of BinaryOperation code generation functions on x64 platform to match ia32 platform.
Review URL: http://codereview.chromium.org/1844002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 10:53:03 +00:00
ager@chromium.org
b83486c5f6 Port handling of heap numbers in deferred code for binary ops from
ia32 to x64.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 08:46:23 +00:00
antonm@chromium.org
55e32d2f3b Introduce faster swapping primitives.
Keyed store stub sits high in sorting profiles.

Swapping allows to save us additional type checks as we could both read and
write elmenets (on fast path) without them.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 15:14:39 +00:00
sgjesse@chromium.org
0b4c1efd18 Improve the success rate for inline keyed store on x64
Added a simple new space check on the elements fixed array which can allow
updating with other values than smis without updating the remembered set.

Also combined the positive smi and range check so that a separate smi check can be avoided when the key is known to be a smi.

This is a port of r4543.
Review URL: http://codereview.chromium.org/1702013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 12:52:09 +00:00
sgjesse@chromium.org
22a8a1e770 Improve the success rate for inline keyed store
Added a simple new space check on the elements fixed array which can allow updating with other valies than smis without updating the remembered set.
Review URL: http://codereview.chromium.org/1692014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 07:47:56 +00:00
podivilov@chromium.org
1872574f4d Port string keyed load IC improvements (r4444) to x64.
http://compute1.aar:9013/golem/r4502-v8-podivilov-string-char-at2-x64-vs-4502-v8-x64.html
Review URL: http://codereview.chromium.org/1750017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 17:16:51 +00:00
ager@chromium.org
62e8d5a789 Port inline version of Math.sqrt and Math.pow from ia32 to x64.
Review URL: http://codereview.chromium.org/1774010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 14:43:51 +00:00
podivilov@chromium.org
c973f99ce4 Port inlining of type checks in call ICs for API functions to x64 and arm (issue 602, r3825).
Review URL: http://codereview.chromium.org/1650011


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 14:06:35 +00:00
sgjesse@chromium.org
ff0775c38f Minor tweaks to the ia32 inlined keyed store.
Review URL: http://codereview.chromium.org/1810001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 11:14:58 +00:00
antonm@chromium.org
6acdd84a61 Current custom call generators cannot cope with the case when receiver is not a JSArray.
Add a support for bailout from custom call generators (just return undefined).

BUG=684

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 15:08:07 +00:00
vitalyr@chromium.org
559ba2ccf0 Don't share function result caches between contexts.
A reference to the caches array was embedded directly into the builtin
code and this allowed sharing objects between contexts.

Unfortunately, clearing the cache on GC won't prevent sharing so we
either have to have per-context builtin code or load the cache
indirectly from the current context. This change implements the second
approach. The first approach may be interesting to consider in the
future for some perfomance critical functions, and the current
approach can still be improved by putting the caches directly into the
global context (or even global objects).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-25 10:31:52 +00:00
whesse@chromium.org
6f34ff44e3 Fix typo - remove stray character from change 4481
Review URL: http://codereview.chromium.org/1753008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 08:14:11 +00:00
whesse@chromium.org
07f68ec357 Compute static type information for remaining expression types on x64 platform.
Review URL: http://codereview.chromium.org/1751008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 08:05:13 +00:00
whesse@chromium.org
5db2af4873 Fix error in static type information computation for bitwise shift.
Review URL: http://codereview.chromium.org/1756007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 09:02:10 +00:00
sgjesse@chromium.org
49d685684a Minor formatting changes.
Review URL: http://codereview.chromium.org/1766005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 07:35:43 +00:00
whesse@chromium.org
9cf54367e9 Port inlined quick equality check for non-NaN to x64.
Review URL: http://codereview.chromium.org/1756002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 13:33:36 +00:00
vitalyr@chromium.org
b8ba4deacc Reapply: Inline fast cases in string keyed load IC.
(Fixed handling of out-of-bounds keys.)

String keyed load used to call STRING_CHAR_AT builtin that performs
two steps (get a char code, construct a one-char string from the
code), both of which have fast cases implemented as inline runtime
functions. In this chage most of the code from these functions is
extracted to a set of common generator functions in StringStubBase and
the fast cases are grouped together in the IC code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 17:33:14 +00:00
ager@chromium.org
c678e44805 Add missing smi check in IC for nonexistent properties.
Add regression test.

BUG=v8:681
Review URL: http://codereview.chromium.org/1673005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 10:20:39 +00:00
vitalyr@chromium.org
fae2b0f175 Revert r4444 "Inline fast cases in string keyed load IC."
Review URL: http://codereview.chromium.org/1633024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 09:26:32 +00:00
vitalyr@chromium.org
e504873d2a Inline fast cases in string keyed load IC.
String keyed load used to call STRING_CHAR_AT builtin that performs
two steps (get a char code, construct a one-char string from the
code), both of which have fast cases implemented as inline runtime
functions. In this chage most of the code from these functions is
extracted to a set of common generator functions in StringStubBase and
the fast cases are grouped together in the IC code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 08:27:48 +00:00
erik.corry@gmail.com
e1b3b92a2c Make not sucking at regexp the default
(remove V8_NATIVE_REGEXP flag, add
V8_INTERPRETED_REGEXP flag).
Review URL: http://codereview.chromium.org/1635001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 19:30:11 +00:00
ager@chromium.org
07db17ce1b Remove some remaining references to boilerplate functions.
Review URL: http://codereview.chromium.org/1605037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 12:39:07 +00:00
vegorov@chromium.org
ab6394b274 Fix constant offset check for inlined write barrier to work in cases when offset is given from tagged object pointer.
Review URL: http://codereview.chromium.org/1646008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 14:43:32 +00:00
sgjesse@chromium.org
88fc8f1fb5 Add tracking of loop nesting to ARM code.
Review URL: http://codereview.chromium.org/1645008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 14:06:57 +00:00
sgjesse@chromium.org
f6cce43255 Add stack alignment check to ia32 and x64
The stack is now checked for proper alignment before calling into C code when the flag --debug-code is turned on.
Review URL: http://codereview.chromium.org/1637015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 12:41:30 +00:00
ager@chromium.org
afc15bb48f Reapply load ICs for nonexistent properties.
We need to be careful to check global property cells for the property
encountered during lookup.  Therefore, the ICs have to be specific to
the name of the property if global objects are involved.  In
principle, this means that we could get a large number of monomorphic
ICs for the same map if there is a global object in the prototype
chain.  However, since this is only done for normal load ICs and not
for keyed load ICs I do not expect this to be a problem.  I will
experiment with it once this goes in.

BUG=675
Review URL: http://codereview.chromium.org/1559033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 11:25:41 +00:00
sgjesse@chromium.org
09aa20da08 Ensure stack alignment in ARM port
In the CEntryStub keep track of the actual skew from the correct alignment to ensure proper alignment before calling the runtime. Add checks to test the expected skew when running on hardware.

Use the PrepareCallCFunction/CallCFunction in a few other places.

Add check to the ARM simulator for correct alignment.

Add option --sim-stack-alignment to set the stack alignment in the simulator. Currntly only values 4 and 8 makes sense. 8 is the default to make snapshots generated with the simulator work on hardware requiring 8 byte stack alignment.
Review URL: http://codereview.chromium.org/1530043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 09:34:47 +00:00
vitalyr@chromium.org
1d8ec1e47b One less dependent load in InvokeBuiltin.
Review URL: http://codereview.chromium.org/1638006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 20:16:19 +00:00
antonm@chromium.org
a713b27428 Introduce fast native caches and use it in String.search.
Review URL: http://codereview.chromium.org/1563005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 14:46:15 +00:00
whesse@chromium.org
518481d5e6 Revert change 4401.
Review URL: http://codereview.chromium.org/1589035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 11:45:03 +00:00
sgjesse@chromium.org
d74a8a8014 Port direct call to native RegExp from JavaScript to ARM
The ia32 version was implemented in r3542 and r3543. The x64 was implementeed in r3740, r3741 and r3742.

Minor tweaks to the is32 and x64 code as well.
Review URL: http://codereview.chromium.org/1575035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 09:25:33 +00:00
ager@chromium.org
aa8818560d Add inline caches for loading non-existing properties.
Review URL: http://codereview.chromium.org/1539034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 06:25:11 +00:00
whesse@chromium.org
f720592ac3 Port optimized comparison of a string to a constant single character string to X64 platform. Fix small mistake on ia32 platform.
Review URL: http://codereview.chromium.org/1627014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-13 13:42:45 +00:00
lrn@chromium.org
285d5bc48a Native construction of RegExp result objects, with in-object index and input.
Avoid cloning using CloneRegExpResult for results that are just arrays.
Made a more direct path for string.match with string argument.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-13 09:31:03 +00:00
antonm@chromium.org
bc8f979e40 Faster comparison of identical objects.
Review URL: http://codereview.chromium.org/1558040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 15:05:55 +00:00
whesse@chromium.org
a8e817161a Optimize the assembly code generated for Math.random()
Review URL: http://codereview.chromium.org/1631008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 10:07:50 +00:00
antonm@chromium.org
400b1be449 Faster invocation of custom comparator function.
Review URL: http://codereview.chromium.org/1623004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 07:05:24 +00:00
kaznacheev@chromium.org
d265cc8e9b Removing BinaryOpIC::Clear. This method relied on some less-than-obvious hack,
and there was zero (or small negative) performance advantage.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-08 13:41:11 +00:00
sgjesse@chromium.org
c0976e9276 Add number string cache lookup for heap numbers to generatred code (on top of the already existing smi lookup)
Added a number to string runtime function which does not try to do a cache lookup as the number is known to not be in the cahce.
Review URL: http://codereview.chromium.org/1602010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-07 11:13:05 +00:00
whesse@chromium.org
c33886c9b7 Change Math.random() to return 32 bits of random goodness, instead of 30 random bits. Math.random now allocates a HeapNumber inline, and calls a C funciton directly to put the random bits into it.
Review URL: http://codereview.chromium.org/1599019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-07 08:18:51 +00:00
peter.rybin@gmail.com
be5bb26e38 LiveEdit: implement frame dropping
Review URL: http://codereview.chromium.org/1118007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 17:58:28 +00:00
mikhail.naganov@gmail.com
889f6cce74 C++ profiles processor: wire up to VM.
If 'shell' is compiled with 'cppprofilesprocessor=on' and run
with '--prof' flag, top-down and bottom-up call trees are printed
on shell exit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 10:36:38 +00:00