vitalyr@chromium.org [Fri, 15 Jan 2010 12:25:24 +0000 (12:25 +0000)]
Optimized calling of C++ builtins (and HandleApiCall
in particular).
* Called function is passed on the stack instead of
using a static variable.
* Builtins that don't need the called function don't
get it.
* Made is_construct statically known to HandleApiCall
by setting custom construct stub for API functions.
Review URL: http://codereview.chromium.org/536065
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3613
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Fri, 15 Jan 2010 12:00:59 +0000 (12:00 +0000)]
Fix issue 541 and some refactoring of the top-level compiler.
* Refactor VisitProperty to use the platform-specific methods for emitting the IC calls.
* Refactor recording of source positions in the top-level compiler.
* Correct the recorded source positions for assignments and property loads.
* Fix bug on x64 where source positions were not recorded before a calling a call-IC.
* Correct some inconsistencies between IA-32 and X64 top-level code generator.
We now pass all regression tests with
--always-fast-compiler.
Review URL: http://codereview.chromium.org/550043
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3612
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Fri, 15 Jan 2010 12:00:21 +0000 (12:00 +0000)]
Fix bug in keyed load stub for strings.
Instead of returning the empty string when indexing
a string out of bounds we now correctly return undefined.
Review URL: http://codereview.chromium.org/542089
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3611
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Thu, 14 Jan 2010 17:22:59 +0000 (17:22 +0000)]
Fix a problem when compiling built-ins with the top-level compiler.
Replace runtime call to NumberAdd with call to binary op stub.
Until now the top-level compiler always called a runtime function
for count operations.
In some places we expected in the JS builtins smis as arguments.
If we perform a count operation before all smis would get converted into
heap numbers by the runtime number add function and result in a runtime
assert.
Also: Add missing debugger information in the top-level compiler for
do-while loops.
Review URL: http://codereview.chromium.org/548029
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3610
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Thu, 14 Jan 2010 15:09:43 +0000 (15:09 +0000)]
Push to trunk. Now working on 2.0.7.
Review URL: http://codereview.chromium.org/548041
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3607
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Thu, 14 Jan 2010 14:46:31 +0000 (14:46 +0000)]
* Improve the interface to the memory-reservation functionality.
* Add a test case that generates a serialization of a single flat string.
Review URL: http://codereview.chromium.org/542073
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3606
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 14 Jan 2010 14:32:19 +0000 (14:32 +0000)]
Fix crash when using Object.getOwnPropertyDescriptor on an API defined
callback property.
Return undefined for Object.getOwnPropertyDescriptor on an API defined
callback properties for now.
Review URL: http://codereview.chromium.org/542074
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3605
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 14 Jan 2010 12:51:38 +0000 (12:51 +0000)]
Change return type of MapSpace::NeedsCompaction from int to bool.
Fixes compiler warnings on Windows.
TBR=antonm@chromium.org
Review URL: http://codereview.chromium.org/549049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3604
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ricow@chromium.org [Thu, 14 Jan 2010 12:05:48 +0000 (12:05 +0000)]
Removed check on element in case it is undefined in ArrayIndexOf - according to spec this is OK.
Review URL: http://codereview.chromium.org/545056
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3603
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 14 Jan 2010 09:05:52 +0000 (09:05 +0000)]
Fix the tests that change because of change to toISOString format.
Review URL: http://codereview.chromium.org/543057
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3602
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 14 Jan 2010 08:55:15 +0000 (08:55 +0000)]
Fix Date.prototype.toISOString for NaN dates and add milliseconds for
compatibility with Safari.
Review URL: http://codereview.chromium.org/543056
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3601
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
antonm@chromium.org [Wed, 13 Jan 2010 19:16:07 +0000 (19:16 +0000)]
Compact map space when doing mark-sweep if after collection size of map space would
drop below threshold.
Review URL: http://codereview.chromium.org/509035
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3600
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Wed, 13 Jan 2010 16:21:06 +0000 (16:21 +0000)]
Remove an inlined ASSERT made obsolete by r3598.
Review URL: http://codereview.chromium.org/549035
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3599
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Wed, 13 Jan 2010 16:01:15 +0000 (16:01 +0000)]
Remove a pair of problematic uses of the Reference utility class from
the code generators.
These uses broke the rules of the class because it was safe to do so,
but there was no real reason to do it that way.
Review URL: http://codereview.chromium.org/543041
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3598
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Wed, 13 Jan 2010 13:26:31 +0000 (13:26 +0000)]
Revert r3583 which seems to degrade performance.
Review URL: http://codereview.chromium.org/536042
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3597
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Wed, 13 Jan 2010 12:13:37 +0000 (12:13 +0000)]
Fix bug in top-level code generator with global receiver.
We did not correcty pass the global receiver object in some cases.
This change fixes this bug on all three platforms.
Review URL: http://codereview.chromium.org/542053
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3596
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ricow@chromium.org [Wed, 13 Jan 2010 12:10:57 +0000 (12:10 +0000)]
Enabled es5conform tests for new array methods and corrected errors that was discovered by enabling these.
Added new es5 methods:
GetOwnPropertyDescriptor
GetOwnProperty
FromPropertyDescriptor
Review URL: http://codereview.chromium.org/546032
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3595
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Wed, 13 Jan 2010 11:29:08 +0000 (11:29 +0000)]
Cleanup the handling of control flow in the toplevel code generator.
Do abstract the setting and restoring of 'argument' state into a
function that takes arguments.
Do not set the argument state in the code generator unless it
represents arguments to a recursive call to Visit.
Review URL: http://codereview.chromium.org/550010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3594
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Wed, 13 Jan 2010 10:27:54 +0000 (10:27 +0000)]
Fix bug in the ARM port of FastNewContextStub. Load the function from
the stack instead of popping it - it is needed by the slow case.
Review URL: http://codereview.chromium.org/546031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3593
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Wed, 13 Jan 2010 08:16:02 +0000 (08:16 +0000)]
Port FastNewContextStub to x64 and arm.
BUG=551
Review URL: http://codereview.chromium.org/541027
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3592
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Wed, 13 Jan 2010 07:45:53 +0000 (07:45 +0000)]
Fix ARM thumb/debug build
Landing http://codereview.chromium.org/548007
TBR=piman@chromium.org
Review URL: http://codereview.chromium.org/549033
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3591
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Wed, 13 Jan 2010 07:35:31 +0000 (07:35 +0000)]
Fix ARM cross compiles generated from gyp.
Landing of http://codereview.chromium.org/549018.
TBR=piman@chromium.org
Review URL: http://codereview.chromium.org/546030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3590
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
antonm@chromium.org [Tue, 12 Jan 2010 23:42:36 +0000 (23:42 +0000)]
Reverting temporary reverts 3586 and 3588 back.
TBR=kasperl@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3589
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
antonm@chromium.org [Tue, 12 Jan 2010 19:36:09 +0000 (19:36 +0000)]
Temporary backing out r3536 to see impact on DOM benchmarks.
TBR=kasperl@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3588
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Tue, 12 Jan 2010 17:22:57 +0000 (17:22 +0000)]
Fix a problem with const initialization in the top-level code generator.
When initializing the special local variable containing the reference to the enclosing
function in named functions we now (correctly) emit an INIT_CONST instead of INIT_VAR,
and we correctly bail out in the top-level code generator.
Also part of this change is adding missing statement position information
for some statements in the top-level code generator.
Review URL: http://codereview.chromium.org/536029
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3587
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
antonm@chromium.org [Tue, 12 Jan 2010 16:57:18 +0000 (16:57 +0000)]
Temporary backing out r3538 to see impact on DOM benchmarks.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3586
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Tue, 12 Jan 2010 15:36:43 +0000 (15:36 +0000)]
Fix float conversion warning from some gcc versions.
Review URL: http://codereview.chromium.org/541026
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3585
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Tue, 12 Jan 2010 15:16:23 +0000 (15:16 +0000)]
Add some interfaces to the GC that allow us to reserve space. This is needed
for partial snapshots. After reserving space we can be sure that allocations
will happen linearly (no GCs and no free-list allocation). This change also
contains the start of the partial snapshot support, which, however is not yet
completed or tested.
Review URL: http://codereview.chromium.org/545026
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3584
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 12 Jan 2010 11:56:19 +0000 (11:56 +0000)]
Reapply the parts of revision 3545 that did not work because of broken
fixups code on ARM.
Review URL: http://codereview.chromium.org/545025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3583
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 12 Jan 2010 11:54:19 +0000 (11:54 +0000)]
Change the ARM fixup code to handle the use of the following
instruction sequence for jumps:
mov(ip, Operand(target, rmode), LeaveCC, cond);
bx(ip, cond)
Changed a JS call in the compare stub to a tail call to avoid GC
problems where the pushed return address is not updated on GC.
Review URL: http://codereview.chromium.org/549022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3582
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Tue, 12 Jan 2010 09:58:50 +0000 (09:58 +0000)]
Fix lint error. I must have been following the Standard ML style
guide.
Review URL: http://codereview.chromium.org/541024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3581
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Tue, 12 Jan 2010 08:48:26 +0000 (08:48 +0000)]
Some cleanup of the toplevel code generator:
* Rename the operation of filling a context with a value. Formerly it
was 'Move', now it's 'Apply' so as to avoid confusion with various
other Moves (eg, in the toplevel codegen, in the macro assemblers).
* Use the abstraction Drop rather than math on the stack pointer.
* Add a predicate on AST expression nodes to abstract a repeated test
whether we should us a regular (named) IC or a keyed IC.
Review URL: http://codereview.chromium.org/546006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3580
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 12 Jan 2010 08:31:00 +0000 (08:31 +0000)]
Fix variable name when build with oprofile agent.
BUG=572
Review URL: http://codereview.chromium.org/549020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3579
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 12 Jan 2010 07:16:49 +0000 (07:16 +0000)]
Port FastNewClosureStub introduced for ia32 in r3477 to x64 and arm.
BUG=552
Review URL: http://codereview.chromium.org/543010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3578
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Mon, 11 Jan 2010 15:19:53 +0000 (15:19 +0000)]
Add missing instructions to the IA-32 disasembler
Added newly added instructions to test-disasem-ia32.cc and implemented the missi
ng ones in the disasembler.
Added some asserts to 8-bit instructions which only work with eax, ebx, ecx and
edx (al, bl, cl and dl).
Removed the loope instruction.
Review URL: http://codereview.chromium.org/548002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3577
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Mon, 11 Jan 2010 12:59:17 +0000 (12:59 +0000)]
Added two missing instructions to disassembler.
The subb and the loop instructions are also added to the IA-32 disassembler.
Review URL: http://codereview.chromium.org/541008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3576
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
christian.plesner.hansen@gmail.com [Mon, 11 Jan 2010 12:13:24 +0000 (12:13 +0000)]
Added ScriptData::HasError.
Review URL: http://codereview.chromium.org/542010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3575
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Mon, 11 Jan 2010 10:00:07 +0000 (10:00 +0000)]
Fix building of D8
This fixes building D8 when SCons cannot figure the build environment and it is passed using the env argument. This is usually only used when building with Visual Studio 2008.
Review URL: http://codereview.chromium.org/542009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3574
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Mon, 11 Jan 2010 07:35:32 +0000 (07:35 +0000)]
Fix wrong assert in compare stub minor key computation.
TBR=erik.corry
Review URL: http://codereview.chromium.org/536010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3573
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Fri, 8 Jan 2010 14:17:26 +0000 (14:17 +0000)]
Fixed wrong cmov operand order
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/518082
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3572
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Fri, 8 Jan 2010 13:48:27 +0000 (13:48 +0000)]
Fix same Windows compiler error in another place.
Review URL: http://codereview.chromium.org/518081
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3571
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Fri, 8 Jan 2010 12:42:58 +0000 (12:42 +0000)]
Fix Windows build.
Review URL: http://codereview.chromium.org/527031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3570
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Fri, 8 Jan 2010 11:58:15 +0000 (11:58 +0000)]
Add generated code for ascii string comparison
Careted a stub for string comparison and used part of the code from that to inline string comparison in the compare stub.
Review URL: http://codereview.chromium.org/525115
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3569
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Fri, 8 Jan 2010 11:27:37 +0000 (11:27 +0000)]
Fix potential length-miscalculation in %StringBuilderConcat.
Review URL: http://codereview.chromium.org/521074
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3568
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Fri, 8 Jan 2010 10:41:25 +0000 (10:41 +0000)]
Lint, schmlint!
Review URL: http://codereview.chromium.org/525114
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3567
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Fri, 8 Jan 2010 09:54:11 +0000 (09:54 +0000)]
Speed up compares with characters ie single-character strings.
Make use of it when we know that something can't be a NaN.
Review URL: http://codereview.chromium.org/524059
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3566
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Fri, 8 Jan 2010 07:49:07 +0000 (07:49 +0000)]
Inline a number of simple date computations.
The minifier has been updated to have better recognition of regular
expressions.
Review URL: http://codereview.chromium.org/521057
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3565
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Fri, 8 Jan 2010 06:40:09 +0000 (06:40 +0000)]
Make sure to use the CHECK_PARSE_ERROR macro (and thereby
the static CheckParse function) even in release builds.
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/518079
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3564
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Thu, 7 Jan 2010 19:01:23 +0000 (19:01 +0000)]
Attempt to make \b\w+ faster. Slight performance increase on, e.g., string unpacking.
Review URL: http://codereview.chromium.org/507051
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3563
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Thu, 7 Jan 2010 14:04:56 +0000 (14:04 +0000)]
Forgot patch to make it compiler on Linux.
Review URL: http://codereview.chromium.org/525087
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3562
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Thu, 7 Jan 2010 13:17:37 +0000 (13:17 +0000)]
Fix wrong asserts from r3554
Review URL: http://codereview.chromium.org/523128
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3561
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Thu, 7 Jan 2010 13:17:18 +0000 (13:17 +0000)]
Fixed potential length miscalculations by limiting max size of arrays and strings.
Review URL: http://codereview.chromium.org/525064
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3560
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Thu, 7 Jan 2010 12:31:45 +0000 (12:31 +0000)]
Fix runtime function StringCharAt where an argument was not checked.
Review URL: http://codereview.chromium.org/523126
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3559
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Thu, 7 Jan 2010 12:18:56 +0000 (12:18 +0000)]
Make String.prototype.replace a tiny bit faster by avoiding
ToString conversions for strings.
Review URL: http://codereview.chromium.org/518059
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3558
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Thu, 7 Jan 2010 11:38:43 +0000 (11:38 +0000)]
Fix x64 and arm build.
Review URL: http://codereview.chromium.org/524058
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3557
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Thu, 7 Jan 2010 10:25:20 +0000 (10:25 +0000)]
Improve keyed loads on strings by using a new stub.
Instead of going through a runtime function for keyed loads
on strings we invoke a separate specialized stub that
assumes string as receiver type and the key to be a number.
The stub calls a JS builtin function to return the corresponding one-character string.
Review URL: http://codereview.chromium.org/521041
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3556
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ricow@chromium.org [Thu, 7 Jan 2010 10:01:24 +0000 (10:01 +0000)]
Added ES5 15.2.3.2 Object.getPrototypeOf.
Review URL: http://codereview.chromium.org/523124
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3555
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Thu, 7 Jan 2010 09:59:37 +0000 (09:59 +0000)]
Use generated code to create sub strings.
Added a stub to allocate and fill a string object with a substring from another string.
Use the rep movs instruction to copy the string data as it turned out to be the fastest way.
While preparing this I experimented with some SSE2 instructions, so the instructions movdqa and movdqu are still in the IA-32 assembler even though they are not used.
Review URL: http://codereview.chromium.org/525085
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3554
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Thu, 7 Jan 2010 09:40:50 +0000 (09:40 +0000)]
Improve the performance of String.prototype.concat and the slow-case
for compare operations.
Review URL: http://codereview.chromium.org/521054
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3553
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Wed, 6 Jan 2010 15:50:34 +0000 (15:50 +0000)]
Quick fix to ARM fixup issue introduced in r3545. The fixup code
seems somewhat broken on ARM, but this solves the issue for now.
I'll look into the code patching tomorrow.
Review URL: http://codereview.chromium.org/525068
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3546
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Wed, 6 Jan 2010 14:40:21 +0000 (14:40 +0000)]
Improve performance of Array.prototype.join and String.prototype.substring
by tweaking the JavaScript implementation of these functions.
Review URL: http://codereview.chromium.org/519061
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3545
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Wed, 6 Jan 2010 12:21:28 +0000 (12:21 +0000)]
Make the direct call to native RegExp work
Single glitch in r3542 which caused the direct call to native regexp code to always bail out to the runtime system.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/523091
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3544
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
bak@chromium.org [Wed, 6 Jan 2010 11:19:28 +0000 (11:19 +0000)]
- Adjust the number to string cache based on the max semispace size.
Flushed at compacting mark sweep.
- Simplified FindEntry by eliminating the counter.
Review URL: http://codereview.chromium.org/527006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3543
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Wed, 6 Jan 2010 11:09:30 +0000 (11:09 +0000)]
Direct call to native RegExp code from JavaScript.
Calls to RegExp no longer have to be via a call to the runtime system. A new stub have been added which can handle this call in generated code. The stub checks all the parameters and creates RegExp entry frame in the same way as it is created by the runtime system. Bailout to the runtime system is done whenever an uncommon situation is encountered or when the static data used is not initialized. After running the native RegExp code the last match info is updated like in the runtime system.
Currently only ASCII strings are handled.
Added another argument to the RegExp entry frame. It indicated whether the call is direct from JavaScript code or through the runtime system. This information is used when RegExp execution is interrupted. If an interruption happens when RegExp code is called directly a retry is issued causing the interruption to be handled via the runtime system. The reason for this is that the direct call to RegExp code does not support garbage collection.
Review URL: http://codereview.chromium.org/521028
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3542
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Wed, 6 Jan 2010 09:22:36 +0000 (09:22 +0000)]
Update the result size for ResolvePossiblyDirectEval from 1 to 2
following the change submitted in r3533.
Review URL: http://codereview.chromium.org/525063
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3541
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
bak@chromium.org [Tue, 5 Jan 2010 12:33:55 +0000 (12:33 +0000)]
- Fixed a bug in the array concat implementation causing the elements in the result to be lost.
Review URL: http://codereview.chromium.org/523055
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3538
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Tue, 5 Jan 2010 12:02:18 +0000 (12:02 +0000)]
Use cmov instructions to avoid some conditional branches in stub code.
This change improves the ConstructStub and the ArgumentsAccessStub slightly
by using the cmov instruction (if available) to eliminate a
conditional branch. It only applies to the IA-32 and X64 platforms.
Review URL: http://codereview.chromium.org/519035
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3537
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
bak@chromium.org [Tue, 5 Jan 2010 11:38:36 +0000 (11:38 +0000)]
Added rehashing of hash tables when there are too many deleted elements.
Review URL: http://codereview.chromium.org/525024
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3536
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Tue, 5 Jan 2010 11:30:05 +0000 (11:30 +0000)]
Simplify checking during allocation when Heap::always_allocate() is
true. The rules are:
1. Heap::AllocateRaw can normally handle allocation requests in new
space even when always_allocate() is true. It properly retries
failed allocation in the second 'retry' space.
2. Heap::Allocate can normally handle allocation requests in new
space.
3. We only need to check always_allocate() when explicitly requesting
allocation in new space via Heap::new_space().AllocateRaw().
4. The exception to these rules is fixed arrays with size such that
MaxObjectSizeInPagedSpace < size <= MaxObjectSizeInNewSpace (ie,
those that will be allocated in new space and promoted to large
object space). They cannot be allocated in new space via
Heap::Allocate or Heap::AllocateRaw, because the retry logic does
not know to allocate extra remembered set bits when retrying in
large object space.
Review URL: http://codereview.chromium.org/518007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3535
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Tue, 5 Jan 2010 11:29:27 +0000 (11:29 +0000)]
More cleanup of slot handling in the nonoptimizing code generator.
Rename CreateSlotOperand so that it's clear it can emit code. Use it
where possible.
Review URL: http://codereview.chromium.org/523052
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3534
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Tue, 5 Jan 2010 09:38:02 +0000 (09:38 +0000)]
Make the ResolvePossiblyDirectEval faster by avoiding the
stack traversal code.
Review URL: http://codereview.chromium.org/523051
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3533
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Tue, 5 Jan 2010 09:11:10 +0000 (09:11 +0000)]
Style cleanup of switches over Slot::Type in the nonoptimizing code
generator.
The Slot::Type enumeration has four values. It should never be
necessary to use a default to handle the case of a value out of range
of the enumeration. Doing so silences a useful warning when one of
the enumeration values is actually forgotten or when a new enumeration
value is added.
Review URL: http://codereview.chromium.org/521019
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3532
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Mon, 4 Jan 2010 14:15:47 +0000 (14:15 +0000)]
Improve count operation in top-level compiler on ARM.
Save one instruction by using stm instead of push.
Review URL: http://codereview.chromium.org/517027
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3531
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Mon, 4 Jan 2010 13:56:31 +0000 (13:56 +0000)]
Added general pre- and postfix count operations to top-level compiler.
Until now we only supported postfix operations on global variables.
This change add generic count operations to the top-level compiler.
I tried to re-use code from the code generator used for assignment expressions
where possible.
Review URL: http://codereview.chromium.org/496009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3530
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Mon, 4 Jan 2010 11:24:03 +0000 (11:24 +0000)]
Remove unused function and function declaration.
Review URL: http://codereview.chromium.org/523036
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3529
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Mon, 28 Dec 2009 13:01:03 +0000 (13:01 +0000)]
Faster handling of string indexing using [] with a SMI index.
Instead of falling back to calling GetObjectProperty we call GetCharAt
directly if the object is a string and the key in a SMI.
Review URL: http://codereview.chromium.org/522015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3528
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Mon, 28 Dec 2009 09:21:23 +0000 (09:21 +0000)]
Second attempt at fixing issue 559.
Review URL: http://codereview.chromium.org/519007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3525
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Mon, 28 Dec 2009 08:19:23 +0000 (08:19 +0000)]
Land codereview.chromium.org/509029 (slightly simplified).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3522
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Wed, 23 Dec 2009 15:06:21 +0000 (15:06 +0000)]
Use a loop in generated code to allocate stack slots for function with many local variables.
If a function contains more than a certain number of locals (IA32: 9, X64: 6, ARM: 4)
a loop for initializing the locals with 'undefined' is more compact.
For less locals we unroll that loop by emitting a sequence of push instructions.
Review URL: http://codereview.chromium.org/515012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3521
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
bak@chromium.org [Wed, 23 Dec 2009 13:27:58 +0000 (13:27 +0000)]
- Reordered the instructions in the inlined allocation code to space dependent instructions.
- Replaced the or instruction with lea.
Review URL: http://codereview.chromium.org/521003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3520
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Tue, 22 Dec 2009 13:34:02 +0000 (13:34 +0000)]
When promoting objects during a copying collection, promote all
non-large objects that cannot contain non-map-word pointers to other
heap objects into the old data space.
Review URL: http://codereview.chromium.org/502100
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3519
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Tue, 22 Dec 2009 13:10:24 +0000 (13:10 +0000)]
Make the FastCloneShallowArrayStub a bit prettier.
TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/507069
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3518
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 22 Dec 2009 13:07:27 +0000 (13:07 +0000)]
Revert r3514 and r3515. The new cache is too large for some tests
that attempt to run with a small heap. Additionally, it can
potentially keep a lot of string data alive and it is never flushed.
Can we make it grow dynamically if used so that we can still start the
VM with a small heap size?
Review URL: http://codereview.chromium.org/503081
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3517
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
fschneider@chromium.org [Tue, 22 Dec 2009 12:41:45 +0000 (12:41 +0000)]
Use one runtime call for creating object/array literals in
the code generator.
The runtime function checks if it needs to create a boilerplate
object or if it can clone from an existing boilerplate.
This is already done in the top-level compiler.
Review URL: http://codereview.chromium.org/507036
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3516
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kasperl@chromium.org [Tue, 22 Dec 2009 12:39:56 +0000 (12:39 +0000)]
Fix linto.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3515
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
bak@chromium.org [Tue, 22 Dec 2009 11:35:05 +0000 (11:35 +0000)]
- Increased size of number string cache.
- Change the instruction order for inlined allocation.
Review URL: http://codereview.chromium.org/501170
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3514
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
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