kasperl@chromium.org
8dd3666741
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
2010-01-08 06:40:09 +00:00
lrn@chromium.org
46504c1557
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
2010-01-07 19:01:23 +00:00
lrn@chromium.org
40d6cbca89
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
2010-01-07 14:04:56 +00:00
sgjesse@chromium.org
db64cd9a75
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
2010-01-07 13:17:37 +00:00
lrn@chromium.org
dddadf9f7e
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
2010-01-07 13:17:18 +00:00
fschneider@chromium.org
c4416d628d
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
2010-01-07 12:31:45 +00:00
kasperl@chromium.org
3321d06ccd
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
2010-01-07 12:18:56 +00:00
fschneider@chromium.org
714dfeaece
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
2010-01-07 11:38:43 +00:00
fschneider@chromium.org
903301248e
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
2010-01-07 10:25:20 +00:00
ricow@chromium.org
33079fb851
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
2010-01-07 10:01:24 +00:00
sgjesse@chromium.org
3d36c712aa
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
2010-01-07 09:59:37 +00:00
kasperl@chromium.org
060711ab37
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
2010-01-07 09:40:50 +00:00
kasperl@chromium.org
ba9b59d51f
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
2010-01-06 15:50:34 +00:00
kasperl@chromium.org
1fdbaa1d10
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
2010-01-06 14:40:21 +00:00
sgjesse@chromium.org
99fbea324b
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
2010-01-06 12:21:28 +00:00
bak@chromium.org
1f3eba4470
- 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
2010-01-06 11:19:28 +00:00
sgjesse@chromium.org
429f3cf9f2
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
2010-01-06 11:09:30 +00:00
kasperl@chromium.org
8618b9846b
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
2010-01-06 09:22:36 +00:00
bak@chromium.org
0ba452b5c6
- 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
2010-01-05 12:33:55 +00:00
fschneider@chromium.org
e06c581232
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
2010-01-05 12:02:18 +00:00
bak@chromium.org
9f0997f9bf
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
2010-01-05 11:38:36 +00:00
kmillikin@chromium.org
b74ab45077
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
2010-01-05 11:30:05 +00:00
kmillikin@chromium.org
a1bf879720
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
2010-01-05 11:29:27 +00:00
kasperl@chromium.org
15fe7a8ad6
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
2010-01-05 09:38:02 +00:00
kmillikin@chromium.org
b74daccff0
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
2010-01-05 09:11:10 +00:00
fschneider@chromium.org
1902b76227
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
2010-01-04 14:15:47 +00:00
fschneider@chromium.org
637a21952f
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
2010-01-04 13:56:31 +00:00
kasperl@chromium.org
88ba93d9db
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
2010-01-04 11:24:03 +00:00
fschneider@chromium.org
fd03f6c153
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
2009-12-28 13:01:03 +00:00
kasperl@chromium.org
e56e84bff6
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
2009-12-28 09:21:23 +00:00
kasperl@chromium.org
09805c6962
Land http://codereview.chromium.org/509029 (slightly simplified).
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-28 08:19:23 +00:00
fschneider@chromium.org
f7ef880041
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
2009-12-23 15:06:21 +00:00
bak@chromium.org
c3fa79ab2b
- 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
2009-12-23 13:27:58 +00:00
kmillikin@chromium.org
c114f17efa
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
2009-12-22 13:34:02 +00:00
kasperl@chromium.org
afabb5a9bc
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
2009-12-22 13:10:24 +00:00
ager@chromium.org
2409b4b7ba
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
2009-12-22 13:07:27 +00:00
fschneider@chromium.org
735aee05f0
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
2009-12-22 12:41:45 +00:00
kasperl@chromium.org
f034c31bb2
Fix linto.
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 12:39:56 +00:00
bak@chromium.org
6742d62c30
- 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
2009-12-22 11:35:05 +00:00
kasperl@chromium.org
6ca5876419
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
2009-12-22 10:16:27 +00:00
ager@chromium.org
af6971d883
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
2009-12-22 09:48:55 +00:00
kasperl@chromium.org
8d6a8e2451
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
2009-12-21 15:09:26 +00:00
erik.corry@gmail.com
14975f3dd0
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
2009-12-21 15:04:00 +00:00
ager@chromium.org
fc26307487
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
2009-12-21 13:30:10 +00:00
ager@chromium.org
827575b0e9
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
2009-12-21 12:08:59 +00:00
kasperl@chromium.org
9c627d6ba3
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
2009-12-21 10:24:11 +00:00
erik.corry@gmail.com
73fcafd650
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
2009-12-21 08:32:20 +00:00
kmillikin@chromium.org
e1b13fc351
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
2009-12-20 08:40:13 +00:00
peter.rybin@gmail.com
d3e63a319b
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
2009-12-18 20:30:29 +00:00
kasperl@chromium.org
64e443768e
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
2009-12-18 13:47:58 +00:00