kasperl@chromium.org [Tue, 22 Dec 2009 10:16:27 +0000 (10:16 +0000)]
Add fast case stub for BIT_NOT.
Review URL: http://codereview.chromium.org/503079
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3513
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 22 Dec 2009 09:48:55 +0000 (09:48 +0000)]
Check for undefined in the binary operation stub when convertion to
int32 for bitops. undefined converts to zero in ToInt32 conversions.
Review URL: http://codereview.chromium.org/508020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3512
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Mon, 21 Dec 2009 15:09:26 +0000 (15:09 +0000)]
Very experimental fix for issue 555.
Review URL: http://codereview.chromium.org/508006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3509
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Mon, 21 Dec 2009 15:04:00 +0000 (15:04 +0000)]
Optimize implementation of Math.floor a little by special casing
the comparison it uses in the code generator. Use Math.floor for
date operations.
Review URL: http://codereview.chromium.org/509007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3508
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Mon, 21 Dec 2009 13:30:10 +0000 (13:30 +0000)]
Remove complicated Math.sin and Math.cos optimizations that do not buy
us much.
Review URL: http://codereview.chromium.org/509006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3507
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Mon, 21 Dec 2009 12:08:59 +0000 (12:08 +0000)]
Optimize sine and cosine by checking up front if the fsin or fcos
operation can throw an exception.
Review URL: http://codereview.chromium.org/504073
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3506
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Mon, 21 Dec 2009 10:24:11 +0000 (10:24 +0000)]
The number of heap slots stored in a scope includes the
fixed contexts slots. Take this into account when using
the new, fast context creation path to avoid allocating
too many slots (wasteful).
Review URL: http://codereview.chromium.org/501148
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3505
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Mon, 21 Dec 2009 08:32:20 +0000 (08:32 +0000)]
Bring back the fisttp instruction on machines with SSE3, but check the
input so we don't have to check the exception flags afterwards.
Review URL: http://codereview.chromium.org/509001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3504
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Sun, 20 Dec 2009 08:40:13 +0000 (08:40 +0000)]
Disallow garbage collection at another site in the LoadCallback ICs.
MacroAssembler::PopHandleScope emits a runtime call (through a stub),
which should not be allowed to perform a GC but return a failure
instead.
BUG=30790
TEST=none
Review URL: http://codereview.chromium.org/504071
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3501
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
peter.rybin@gmail.com [Fri, 18 Dec 2009 20:30:29 +0000 (20:30 +0000)]
Reapply "wait for connection" feature implementation
Review URL: http://codereview.chromium.org/491079
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3500
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Fri, 18 Dec 2009 13:47:58 +0000 (13:47 +0000)]
Recommit r3494 after fixing stupid mistake where the deferred code stub didn't know it was reversed.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3499
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Fri, 18 Dec 2009 13:38:28 +0000 (13:38 +0000)]
Fast-codegen: Adding support for try/catch and throw.
Still no support for lookup-variables, so we bailout if using the catch variable.
Review URL: http://codereview.chromium.org/501076
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3498
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
antonm@chromium.org [Fri, 18 Dec 2009 13:38:09 +0000 (13:38 +0000)]
Force mark sweep instead of compcation if size of map space is too big to allow forward pointers encoding.
Review URL: http://codereview.chromium.org/507025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3497
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Fri, 18 Dec 2009 13:14:37 +0000 (13:14 +0000)]
Revert r3495 - some weird corner case is broken.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3496
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Fri, 18 Dec 2009 13:07:02 +0000 (13:07 +0000)]
Improve code generated for left shifts where the left side
is a constant by avoiding a few checks.
Review URL: http://codereview.chromium.org/504057
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3495
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Fri, 18 Dec 2009 11:20:25 +0000 (11:20 +0000)]
Convert the rest of the sar(xxx, kSmiTagSize) to SmiUntag(xxx).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3494
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Fri, 18 Dec 2009 11:13:33 +0000 (11:13 +0000)]
Refactor smi tagging and untagging on IA-32.
Review URL: http://codereview.chromium.org/501113
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3493
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Fri, 18 Dec 2009 09:33:24 +0000 (09:33 +0000)]
Optimize bitops with non-Smi inputs. Instead of converting both inputs
to floating point and then converting back we convert directly to a
32 bit integer. In addition the bit twiddling implementation of float-
to-integer conversion has been ported from ARM. Testing has shown that
this runs faster than the x87 or SSE3 rounding instructions. This change
is IA32 only. There may be a smaller benefit from doing the same on x64.
Review URL: http://codereview.chromium.org/506052
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3492
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Fri, 18 Dec 2009 08:21:21 +0000 (08:21 +0000)]
Prepare push to trunk. We are now working on version 2.0.6
Review URL: http://codereview.chromium.org/504056
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3489
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
bak@chromium.org [Fri, 18 Dec 2009 06:58:45 +0000 (06:58 +0000)]
added else
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3488
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
bak@chromium.org [Fri, 18 Dec 2009 06:38:12 +0000 (06:38 +0000)]
-Inlined double variant of compare iff one of the sides is a constant smi and it is not a for loop condition.
Review URL: http://codereview.chromium.org/507040
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3487
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
iposva@chromium.org [Fri, 18 Dec 2009 01:43:50 +0000 (01:43 +0000)]
- Handle HeapNumbers in deferred code instead of jumping to stub
for DeferredInlineBinaryOperations.
Review URL: http://codereview.chromium.org/502067
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3486
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Thu, 17 Dec 2009 15:35:15 +0000 (15:35 +0000)]
Optimize the allocation of small, non-nested literal
arrays and argument objects on IA-32.
Review URL: http://codereview.chromium.org/503042
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3485
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Thu, 17 Dec 2009 10:23:20 +0000 (10:23 +0000)]
Streamline the calling convention of the call ICs by passing the
property name in a register rather than on the stack below the
receiver and arguments.
Implemented only for IA32, passing the name in the ecx register to
match the calling convention of the load ICs.
Review URL: http://codereview.chromium.org/502028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3484
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Thu, 17 Dec 2009 09:16:44 +0000 (09:16 +0000)]
Don't bother callling into the ProducerHeapProfile methods
if logging producers is turned off.
Review URL: http://codereview.chromium.org/500092
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3483
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Thu, 17 Dec 2009 08:53:19 +0000 (08:53 +0000)]
Enable fast allocation of context objects on IA-32.
Review URL: http://codereview.chromium.org/507035
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3482
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Thu, 17 Dec 2009 08:53:18 +0000 (08:53 +0000)]
Extend the maximum size map space
On 32-bit the maps are now aligned on a 32-byte boundary in order to encode more maps during compacting GC. The actual size of a map on 32-bit is 28 bytes making this change waste 4 bytes per map.
On 64-bit the encoding for compacting GC is now using more than 32-bits and the maps here are still pointer size aligned. The actual size of a map on 64-bit is 48 bytes and this change does not intruduce any waste.
My choice of 16 bits for kMapPageIndexBits for 64-bit should give the same maximum number of pages (8K) for map space. As maps on 64-bit are larger than on 32-bit the total number of maps on 64-bit will be smaller than on 32-bit. We could consider raising this to 17 or 18.
I moved the kPageSizeBits to globals.h as the calculation of the encoding really depended on this.
There are still an #ifdef/#endif in objects.h and this constant could be moved to globaks.h as well, but I kept it together with the related constants.
All the tests run in debug mode with additional options --gc-global --always-compact as well (except for a few tests on which also fails before this change when run with --gc-global --always-compact).
BUG=http://code.google.com/p/v8/issues/detail?id=524
BUG=http://crbug.com/29428
TEST=test/mjsunit/regress/regress-524.js
Review URL: http://codereview.chromium.org/504026
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3481
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Thu, 17 Dec 2009 07:35:12 +0000 (07:35 +0000)]
Fix ARM and x64 tests in debug mode after r3477.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/500090
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3480
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
iposva@chromium.org [Thu, 17 Dec 2009 07:18:05 +0000 (07:18 +0000)]
- Fix x64 build.
Review URL: http://codereview.chromium.org/500089
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3479
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
iposva@chromium.org [Thu, 17 Dec 2009 06:21:50 +0000 (06:21 +0000)]
- Undo unfortunate renaming of StaticType.
Review URL: http://codereview.chromium.org/506050
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3478
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Wed, 16 Dec 2009 15:43:20 +0000 (15:43 +0000)]
Improve performance of allocating closures for nested
functions by allocating them in new space without
entering the runtime system.
Review URL: http://codereview.chromium.org/506037
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3477
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Wed, 16 Dec 2009 15:23:25 +0000 (15:23 +0000)]
Prepare push to trunk. We are now working on version 2.0.5.
Review URL: http://codereview.chromium.org/502031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3474
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Wed, 16 Dec 2009 09:51:07 +0000 (09:51 +0000)]
Fast codegen: Implement with.
Review URL: http://codereview.chromium.org/491077
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3473
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
yurys@chromium.org [Tue, 15 Dec 2009 09:34:00 +0000 (09:34 +0000)]
Fix presubmit error: remove whitespace
TBR=sgjesse
Review URL: http://codereview.chromium.org/504012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3466
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
yurys@chromium.org [Tue, 15 Dec 2009 09:17:15 +0000 (09:17 +0000)]
Ignore debug break events when bootstrapper is active. Collecting debug data when the context is not yet setup may lead to subtle errors like in the following Chromium bug: crbug.com/28933
Review URL: http://codereview.chromium.org/497006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3465
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
vitalyr@chromium.org [Mon, 14 Dec 2009 17:05:38 +0000 (17:05 +0000)]
stats-viewer.py: support passing test_shell pid.
Review URL: http://codereview.chromium.org/496010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3464
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
vitalyr@chromium.org [Mon, 14 Dec 2009 16:13:52 +0000 (16:13 +0000)]
Updated stats-viewer.py to work with chromium.
Review URL: http://codereview.chromium.org/473002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3463
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Mon, 14 Dec 2009 12:18:20 +0000 (12:18 +0000)]
Do a fast check for undefined values when comparing.
Review URL: http://codereview.chromium.org/496008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3462
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Mon, 14 Dec 2009 11:09:25 +0000 (11:09 +0000)]
Fast-codegen: Implementing try/finally on top of nesting context.
Review URL: http://codereview.chromium.org/492002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3461
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Mon, 14 Dec 2009 10:20:35 +0000 (10:20 +0000)]
Modified SConstruct to enable building of shared library
with hidden visibility on Mac OS X. Patch from
Abdulla Kamar. http://codereview.chromium.org/475002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3460
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Mon, 14 Dec 2009 09:54:13 +0000 (09:54 +0000)]
Try to make the contextuality check in the IC code faster
by checking if the receiver is a global object before diving
into traversing reloc info.
Review URL: http://codereview.chromium.org/491075
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3459
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Mon, 14 Dec 2009 07:51:59 +0000 (07:51 +0000)]
Reverted r3457
Caused compilation errors in cctests and on ARM platform.
TBR=peter.rybin@gmail.com
Review URL: http://codereview.chromium.org/491074
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3458
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
peter.rybin@gmail.com [Sun, 13 Dec 2009 21:15:02 +0000 (21:15 +0000)]
Implement "wait for connection" feature
Review URL: http://codereview.chromium.org/489005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3457
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Fri, 11 Dec 2009 22:48:14 +0000 (22:48 +0000)]
Fix lint error.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/491063
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3456
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Fri, 11 Dec 2009 16:09:16 +0000 (16:09 +0000)]
Adding compound assignments to the top-level compiler.
Review URL: http://codereview.chromium.org/486008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3455
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Fri, 11 Dec 2009 10:40:01 +0000 (10:40 +0000)]
Give the binary op stubs better names to make profiles more informative.
Review URL: http://codereview.chromium.org/488017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3454
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
mikhail.naganov@gmail.com [Fri, 11 Dec 2009 09:12:56 +0000 (09:12 +0000)]
Correct mistyped file name for svn:ignore property.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3453
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
mikhail.naganov@gmail.com [Fri, 11 Dec 2009 09:01:38 +0000 (09:01 +0000)]
Add '.cpplint-cache' to ignore lists for SVN and Git. This change also sets 'ignore' property on '.', although this change isn't visible in Rietveld.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/489011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3452
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
iposva@chromium.org [Thu, 10 Dec 2009 18:33:34 +0000 (18:33 +0000)]
- Ensure the stack trace limit is not negative.
- Enable fuzzing of the CollectStackTrace runtime call.
Review URL: http://codereview.chromium.org/491005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3451
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
antonm@chromium.org [Thu, 10 Dec 2009 17:46:45 +0000 (17:46 +0000)]
Use uint64_t to keep 64 MacOS happy.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3450
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 10 Dec 2009 15:10:50 +0000 (15:10 +0000)]
Reapply keyed load cache probing in generated code. I introduced a
bug just before committing which broke snapshot builds. The code is
nearly identical to the previous submit.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/491004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3449
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Thu, 10 Dec 2009 14:06:08 +0000 (14:06 +0000)]
Fast codegen: Working break and continue.
Started framework for all intra-functional outward control transfers,
including handling of try/finally.
Review URL: http://codereview.chromium.org/466033
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3448
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Thu, 10 Dec 2009 13:12:13 +0000 (13:12 +0000)]
Disible the toplevel compiler for code containing for loops.
Review URL: http://codereview.chromium.org/492003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3447
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 10 Dec 2009 12:52:28 +0000 (12:52 +0000)]
Revert keyed load cache probing in generated code.
Crashes on Windows.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/488006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3446
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 10 Dec 2009 09:21:23 +0000 (09:21 +0000)]
Probe keyed load cache in generic keyed load stub.
Only implemented on ia32 and x64 for now. The generic keyed load stub
on arm is falling behind and it is time to fix that, but that will be
a separate change.
Review URL: http://codereview.chromium.org/460142
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3445
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Thu, 10 Dec 2009 08:33:09 +0000 (08:33 +0000)]
Fix extra slash typo in comment.
Review URL: http://codereview.chromium.org/487007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3444
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
iposva@chromium.org [Wed, 9 Dec 2009 17:20:51 +0000 (17:20 +0000)]
- Drop the executable bit of SConstruct.
Review URL: http://codereview.chromium.org/467057
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3443
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Wed, 9 Dec 2009 16:40:54 +0000 (16:40 +0000)]
Fix Win64 build problem.
Review URL: http://codereview.chromium.org/475003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3442
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Wed, 9 Dec 2009 15:34:57 +0000 (15:34 +0000)]
Fix arm and x64 build.
The ApiGetterEntryStub is not implemented on arm or x64, but the
platform-specific implementations need to change to match the change
to the platform-independent signatures.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/471009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3441
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Wed, 9 Dec 2009 14:54:34 +0000 (14:54 +0000)]
Fix a crash caused by garbage collection during generation of a
callback load (or keyed load) IC.
The problem was that the IC code calls a stub, which can allocate and
thus trigger a GC if the stub is not already generated. Problem is
solved by adding the ability to "try" to call a stub, trying to
generate the stub code if necessary but signaling an allocation
failure if generating the code is not possible.
Review URL: http://codereview.chromium.org/472002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3440
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
vitalyr@chromium.org [Wed, 9 Dec 2009 14:32:45 +0000 (14:32 +0000)]
External string table.
Instead of weak handles external strings use a separate table. This
table uses 5 times less memory than weak handles. Moreover, since we
don't have to follow the weak handle callback protocol we can collect
the strings faster and even on scavenge collections.
Review URL: http://codereview.chromium.org/467037
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3439
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Wed, 9 Dec 2009 13:56:58 +0000 (13:56 +0000)]
Add Object.create from ECMAScript5. Supports value, writable, enumerable, get
and set. Doesn't support configurable yet. See
http://code.google.com/p/v8/issues/detail?id=460
Review URL: http://codereview.chromium.org/463040
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3438
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Wed, 9 Dec 2009 13:06:08 +0000 (13:06 +0000)]
Create literal boilerplate as part of cloning in the top-level compiler.
When generating code for object and array literals we performed
the check if the a boilerplate already exists in generated code.
In the top-level compiler we now do this check in a new runtime
function. This makes the generated code more compact for top-level code.
Review URL: http://codereview.chromium.org/465148
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3437
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Wed, 9 Dec 2009 12:56:42 +0000 (12:56 +0000)]
Create the framework for adding a thumb2 backend for ARM. See codereview.chromium.org/464070
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3436
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Wed, 9 Dec 2009 11:14:45 +0000 (11:14 +0000)]
Fix for bug 512 from Subrato De, CodeAurora.
Review URL: http://codereview.chromium.org/464016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3435
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Wed, 9 Dec 2009 09:35:41 +0000 (09:35 +0000)]
Perform string add in generated code on X64 platform
This is a port of the IA-32 version from r3400 (http://code.google.com/p/v8/source/detail?r=3400). In the X64 version the additional registers are used to avoid loading the instance type and arguments several times.
Review URL: http://codereview.chromium.org/460109
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3434
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Tue, 8 Dec 2009 10:18:28 +0000 (10:18 +0000)]
Fix subtle bug in Math.min and Math.max with non-Smi zero.
See http://codereview.chromium.org/470001
From sra.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3433
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Tue, 8 Dec 2009 09:43:51 +0000 (09:43 +0000)]
Fix for issue 545: don't reuse this VariableProxy.
Review URL: http://codereview.chromium.org/464069
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3432
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Mon, 7 Dec 2009 15:10:39 +0000 (15:10 +0000)]
Adding ThisFunction expression to top-level compiler.
Review URL: http://codereview.chromium.org/466056
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3430
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Mon, 7 Dec 2009 13:31:47 +0000 (13:31 +0000)]
The toplevel code generator assumed that declarations did not shadow
parameters. This could case the initial value to be lost or worse, a
crash.
Fix by handling the case of a declaration shadowing both
stack-allocated parameters and those in the arguments object.
This is related to V8 issue 540.
http://code.google.com/p/v8/issues/detail?id=540
BUG=29565
Review URL: http://codereview.chromium.org/469006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3429
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Mon, 7 Dec 2009 08:38:20 +0000 (08:38 +0000)]
Performance improvement for Math.max and Math.min
Patch from sra.
http://codereview.chromium.org/470001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3427
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
christian.plesner.hansen@gmail.com [Fri, 4 Dec 2009 14:35:33 +0000 (14:35 +0000)]
Fixed operator precedence bug in heap stat recording.
Review URL: http://codereview.chromium.org/465055
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3426
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Fri, 4 Dec 2009 14:30:27 +0000 (14:30 +0000)]
Refactor code for generating assignments in the fast compiler.
1. Refactor the structure of VisitAssignment: The existing code is not ideal
to be extended with support for compound assignments.
2. Reuse common code for keyed property assigments: Now variables rewritten
to a property (.arguments access) are treated like normal keyed property
assignments. This allows us to remove some code duplication.
Review URL: http://codereview.chromium.org/456024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3425
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Fri, 4 Dec 2009 12:17:02 +0000 (12:17 +0000)]
Remove passing of argc in r0 when calling builtins on ARM as it is not used
Review URL: http://codereview.chromium.org/466031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3422
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Fri, 4 Dec 2009 11:59:09 +0000 (11:59 +0000)]
Fix issue 540 by handling the case that a declaration is in the
arguments object.
See http://code.google.com/p/v8/issues/detail?id=540
Review URL: http://codereview.chromium.org/460070
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3421
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Fri, 4 Dec 2009 11:50:27 +0000 (11:50 +0000)]
Prepare push to trunk. Now working on 2.0.4.
Review URL: http://codereview.chromium.org/462034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3420
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Fri, 4 Dec 2009 11:46:20 +0000 (11:46 +0000)]
Add a test that was left off my last submit.
Review URL: http://codereview.chromium.org/466003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3419
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Fri, 4 Dec 2009 10:22:41 +0000 (10:22 +0000)]
Add alignment check to object allocated in generated code for x64 and ARM
Review URL: http://codereview.chromium.org/460068
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3418
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
christian.plesner.hansen@gmail.com [Fri, 4 Dec 2009 10:18:30 +0000 (10:18 +0000)]
Changed recording of heap stats on OOM to store data directly in local
variables rather than in a stack-allocated struct. The struct field
values turned out not to be available in minidumps.
Review URL: http://codereview.chromium.org/460069
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3417
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Fri, 4 Dec 2009 09:58:05 +0000 (09:58 +0000)]
String check for binary add on x64 and ARM
The checking for strings when performing binary add was missing on x64 and ARM. This is a prerequisite for adding string add in generated code for these two platforms.
Review URL: http://codereview.chromium.org/465028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3416
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Fri, 4 Dec 2009 07:43:40 +0000 (07:43 +0000)]
Better handling of allocation alignment in generated code
Calculate the aligned size of strings when allocating from generated code using kObjectAlignmentMask
Add native code assert to make sure allocation from generated code keeps alignment.
Review URL: http://codereview.chromium.org/462025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3415
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 3 Dec 2009 11:34:45 +0000 (11:34 +0000)]
Fix Windows build.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/466018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3410
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 3 Dec 2009 10:24:16 +0000 (10:24 +0000)]
Move for-in cache validity check to generated code.
Review URL: http://codereview.chromium.org/464002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3407
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
christian.plesner.hansen@gmail.com [Thu, 3 Dec 2009 10:16:37 +0000 (10:16 +0000)]
Added recording of heap and global handle stats in a stack-allocated
struct on fatal out of memory. This should cause the information to
be included in minidumps so we can get a better idea of the state of
v8 on OOMs.
Review URL: http://codereview.chromium.org/462019
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3406
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Thu, 3 Dec 2009 09:29:21 +0000 (09:29 +0000)]
Move function nan_value to POSIX platform file
Strictly speaking NAN from math.h is not in a POSIX standard but in C99. However it seems that all our POSIX platforms have it.
Review URL: http://codereview.chromium.org/464015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3405
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Thu, 3 Dec 2009 08:48:32 +0000 (08:48 +0000)]
Check return code from fwrite
BUG=http://code.google.com/p/v8/issues/detail?id=453
TEST=none
Review URL: http://codereview.chromium.org/458016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3404
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
mikhail.naganov@gmail.com [Thu, 3 Dec 2009 08:44:33 +0000 (08:44 +0000)]
When executing 'profile' request, delegate to api function, not to internal one.
Review URL: http://codereview.chromium.org/466006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3403
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Thu, 3 Dec 2009 08:32:04 +0000 (08:32 +0000)]
Fix compilation errors on some compilers
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/462018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3402
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Thu, 3 Dec 2009 08:23:10 +0000 (08:23 +0000)]
Add missing function CpuFeaturesImpliedByPlatform to OpenBSD platform file
Review URL: http://codereview.chromium.org/465025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3401
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Thu, 3 Dec 2009 07:56:21 +0000 (07:56 +0000)]
Perform string add in generated code on IA-32 platforms
This adds a code stub which can do most of what Heap::AllocateConsString can do. It bails out if the result cannot fit in new space or if the result is a short (flat) string and one argument is an ascii string and the other a two byte string. It also bails out if adding two one character strings as Heap::AllocateConsString has special handling of this utilizing the symbol table. The stub is used both for the binary add operation and for StringAdd calls from runtime JavaScript files. Extended the string add test to cover all sizes of flat result stings.
Review URL: http://codereview.chromium.org/442024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3400
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kbr@chromium.org [Wed, 2 Dec 2009 19:26:16 +0000 (19:26 +0000)]
Fixed register usage in 64-bit version of
KeyedLoadIC::GenerateExternalArray which was causing it to go to the
slow case all the time.
Review URL: http://codereview.chromium.org/458008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3399
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Wed, 2 Dec 2009 13:38:50 +0000 (13:38 +0000)]
Initial OpenBSD support
Patch by Peter Valchev <pvalchev@gmail.com>.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/465002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3398
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Wed, 2 Dec 2009 12:58:10 +0000 (12:58 +0000)]
Fix adding short external ascii strings
BUG=http://code.google.com/p/v8/issues/detail?id=536
TEST=cctest/test-strings/ExternalShortStringAdd
Review URL: http://codereview.chromium.org/466001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3397
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Tue, 1 Dec 2009 15:52:02 +0000 (15:52 +0000)]
Fix debug build
Missed out on reflecting changes to Script object layout in objects-debug.cc.
Also fixed http://codereview.chromium.org/450034/diff/2006/2010.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/456021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3394
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Tue, 1 Dec 2009 14:36:45 +0000 (14:36 +0000)]
Remove the last context dependent reference from the Script object
For scripts originating from a call to eval the Script object used to hold a reference to the function from where the eval was called together with the code offset within that function of the eval call. This is used by the stack trace and is part of the debugger protocol. In order to avoid storing the function the script, the position within the script and the name of the function calling eval is stored instead. This avoids holding context dependent objects in the script object.
The calculation of the position of the eval in the script holding the eval is now done when the eval script is compiled as it is not possible to postpone this unless a reference is kept to the generated code for the function calling eval.
BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=cctest/test-api/Regress528
Review URL: http://codereview.chromium.org/450034
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3393
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Tue, 1 Dec 2009 14:19:23 +0000 (14:19 +0000)]
Fix toLocaleString-related breakage on buildbot.
TBR=ager
Review URL: http://codereview.chromium.org/449055
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3392
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Tue, 1 Dec 2009 12:54:36 +0000 (12:54 +0000)]
Speed up join on arrays.
Review URL: http://codereview.chromium.org/457021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3391
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Tue, 1 Dec 2009 11:16:21 +0000 (11:16 +0000)]
Fix presubmit errors
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/449053
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3390
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 1 Dec 2009 10:25:29 +0000 (10:25 +0000)]
Remove some of the cache validity checks for for-in enumeration. We
can check for these cases before caching the property names instead.
Review URL: http://codereview.chromium.org/455020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3389
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 1 Dec 2009 09:54:47 +0000 (09:54 +0000)]
Fix megamorphic load regression on ARM caused by the string
length/hash change.
Review URL: http://codereview.chromium.org/454018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3388
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00