Commit Graph

402 Commits

Author SHA1 Message Date
ricow@chromium.org
5058db86c4 Add support for getOwnPropertyDescriptor on array indices (fixes issue 599).
This fix adds support for retriving a property descriptor on elements. The
new version supports both fast and slow case elements. In the fast case
we always default configurable, writable, enumerable to true (we don't have
PropertyDetails for fast elements).

A few new tests are added to get-own-property-descriptor.js, I will
add a lot more to object-define-property when I add support for indices in
Object.defineProperty.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 07:43:43 +00:00
vitalyr@chromium.org
64bc39a726 Fix: make string indexing work with Infinity.
NumberToUint32 that I was trying to use maps -0 to +0 (as desired) but
also maps +/-Infinity to +0, which made +/-Infinity a valid string
index. I fixed it by introducing a new runtime function with the right
semantics.

TEST=LayoutTests/fast/js/char-at.html,mjsunit/string-charat.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 16:11:30 +00:00
vegorov@chromium.org
e268fbdaba Revert r4715.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2274001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 09:24:44 +00:00
vegorov@chromium.org
675e711f1c Cardmarking writebarrier.
- New сardmarking write barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code).
- Changes to enable oldspaces iteration without maps decoding:
-- layout change for FixedArrays: length is stored as a smis (initial patch by
Kevin Millikin)
-- layout change for SharedFunctionInfo: integer fields are stored as smi on
arm, ia32 and rearranged on x64.
-- layout change for String: meaning of LSB bit is fliped (1 now means hash not
computed); on x64 padding is added.
-- layout of maps is _not_ changed. Map space is currently iterated in a special
way.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 13:15:16 +00:00
vegorov@chromium.org
2241d2af45 Reverting r4703.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2073018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 17:37:47 +00:00
vegorov@chromium.org
8879691793 Cardmarking writebarrier.
Reapplication of r4685 (reviewed http://codereview.chromium.org/2101002) with minor modifications:

- Fix compilation problems on Win64.
- Improve heap verification pass: search for garbage pointers to new space not only in dirty regions but in all regions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 15:52:38 +00:00
vegorov@chromium.org
955828e437 Reverting r4685, r4686, r4687
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2071020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 14:02:51 +00:00
vegorov@chromium.org
b38a0a719a - Changes to enable oldspaces iteration without maps decoding:
-- layout change for FixedArrays: length is stored as a smis (initial patch by Kevin Millikin)
-- layout change for SharedFunctionInfo: integer fields are stored as smi on arm, ia32 and rearranged on x64.
-- layout change for String: meaning of LSB bit is fliped (1 now means hash not computed); on x64 padding is added.
-- layout of maps is _not_ changed. Map space is currently iterated in a special way.
- Cardmarking write barrier. New barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 13:10:38 +00:00
vitalyr@chromium.org
4724826f4a Refactored custom call IC generators:
* All generators are listed in a single place.
 * Generators are installed as a separate pass in the bootstrapper.
 * Replaced pointers to generator functions with integer ids.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 13:21:53 +00:00
antonm@chromium.org
4501cea97b Throw an exception when wrong arguments are passed into SwapElements.
This runtime function should operate on elements and thus 'receiver'
must be JSObject and indices should be numbers.

TBR=lrm@chromium.org,ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 17:24:41 +00:00
peter.rybin@gmail.com
5435396701 Make LiveEdit natives fuzzy
Review URL: http://codereview.chromium.org/1687022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 13:07:36 +00:00
antonm@chromium.org
8e56358e1d Use ScopedVector instead of dynamically allocated array.
This ensures that it'll be released on any control path leaving
the function thanks to desctuctor semantics.

BUG=42925

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-30 10:27:25 +00:00
antonm@chromium.org
55e32d2f3b Introduce faster swapping primitives.
Keyed store stub sits high in sorting profiles.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 15:14:39 +00:00
oleg@chromium.org
c98c930b1f Simplify double to number convertion.
Review URL: http://codereview.chromium.org/1694004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 14:01:37 +00:00
dgozman@chromium.org
8fee5e810a Added ability to remove prototype from function. In this case, [[Construct]] from function will not be allowed.
Added runtime function %FunctionRemovePrototype for this.
Removed prototypes from all builtin functions.
Some sputnik tests marked as fixed.
Added test to check builtins behavior.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 12:05:40 +00:00
peter.rybin@gmail.com
80453231fe LiveEdit: breakpoints updates and fixes for related problems
Review URL: http://codereview.chromium.org/1800007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 11:38:43 +00:00
erik.corry@gmail.com
3206d70dec Fix search-for-string and replace global to avoid hangs
and spurious exceptions.
Review URL: http://codereview.chromium.org/1687013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 11:45:08 +00:00
peter.rybin@gmail.com
af63e61605 Support multi-chunk differences
Review URL: http://codereview.chromium.org/1672006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 16:59:58 +00:00
antonm@chromium.org
0710de75c0 Fix one off error.
Proper condition to start eviction is when next possible index is equal
to cache length.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 11:13:53 +00:00
lrn@chromium.org
1e46286091 Add missing check to StringBuilderConcat runtime function.
Review URL: http://codereview.chromium.org/1578036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 13:10:18 +00:00
peter.rybin@gmail.com
8fdc7a5ae1 LiveEdit: calculate a real script difference
Review URL: http://codereview.chromium.org/1652008

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 14:46:15 +00:00
lrn@chromium.org
7bca61c11d Fix build problems on Windows 64-bit by casting.
Gave the root register a name for reference.

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-13 09:31:03 +00:00
antonm@chromium.org
400b1be449 Faster invocation of custom comparator function.
Review URL: http://codereview.chromium.org/1623004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 07:05:24 +00:00
peter.rybin@gmail.com
4e6a738e63 LiveEdit: update breakpoint positions for non-changed functions
Review URL: http://codereview.chromium.org/1090003

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 17:58:28 +00:00
serya@chromium.org
eb04a6a95f JS implementation of isFinite.
Review URL: http://codereview.chromium.org/1608003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 10:40:25 +00:00
serya@chromium.org
9877ea8b90 Parsing some kinds of integers and junk values in Runtime_NumberToString. For that values the string is converted into int and then into SMI. It lets to avoid floating point operations.
Committed: http://code.google.com/p/v8/source/detail?r=4331
Review URL: http://codereview.chromium.org/1572004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-05 08:00:28 +00:00
serya@chromium.org
93477c22d3 StringToInt rewritten. This version doesn't allocate memory for long decimals and uses percise rounding if radix 10 or a power of 2 (in other cases rounding error still may occur). Handling special values moved from Runtime_StringParseInt into StringToInt in order to make it consistent with StringToDouble.
Committed: http://code.google.com/p/v8/source/detail?r=4329
Review URL: http://codereview.chromium.org/1529004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-31 17:19:05 +00:00
serya@chromium.org
4db3400782 Parsing some kinds of integers and junk values in Runtime_NumberToString. For that values the string is converted into int and then into SMI. It lets to avoid floating point operations.
Review URL: http://codereview.chromium.org/1572004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-31 12:00:57 +00:00
serya@chromium.org
704eca9aca Reverting r4329 due to failure in webkit tests.
Review URL: http://codereview.chromium.org/1579004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-31 11:13:42 +00:00
serya@chromium.org
dcd96d1fa0 StringToInt rewritten. This version doesn't allocate memory for long decimals and uses percise rounding if radix 10 or a power of 2 (in other cases rounding error still may occur). Handling special values moved from Runtime_StringParseInt into StringToInt in order to make it consistent with StringToDouble.
Review URL: http://codereview.chromium.org/1529004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-31 10:11:33 +00:00
vitalyr@chromium.org
c51c67d9c0 Make link happy.
TBR=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-30 14:02:40 +00:00
lrn@chromium.org
ce1d3ca80a Fix bug in string replace with nonparticipating captures.
Review URL: http://codereview.chromium.org/1565004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-30 13:26:13 +00:00
lrn@chromium.org
845fd15dd6 Pre-create properties on JSRegExp objects
Initialize properties in single runtime call.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-26 14:19:47 +00:00
lrn@chromium.org
498b074bd0 Run string replace regexp with function in C++ code loop.
Reuses the result array to save on allocation.
Matches Safari's behavior.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 12:57:58 +00:00
erik.corry@gmail.com
3672624b45 Fix pop push optimization to work with partial snapshots (correct
registration of external references in Proxy objects).
I moved the declaration of the two functions to stub-cache.h
because with all the types they use it's hard to declare them
anywhere else.  But the actual definition is still in runtime.cc
near to the place where they are used.
Review URL: http://codereview.chromium.org/1079012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 14:33:42 +00:00
kasperl@chromium.org
7d6a3b433f Merge the partial_snapshots branch back into bleeding_edge. For
now, the custom call generator stuff is disabled.
Review URL: http://codereview.chromium.org/1094014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 11:40:38 +00:00
iposva@chromium.org
a1ec99c05d - Remove function boilerplate objects and use SharedFunctionInfos in
their place.
- Add one field to the SharedFunctionInfo to remember the number of
  literals used in this function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 06:04:44 +00:00
ager@chromium.org
103db91e12 Add parens to DateYMDFromTimeSlow to clearify.
BUG=649
Review URL: http://codereview.chromium.org/1132002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 08:00:52 +00:00
oleg@chromium.org
825a5d741f Improve Math.round(). Fix the bug in r4146. Further improve performance by checking the exponent instead of comparing doubles. Add several tests for numbers near the limits of SMI and several tests from WebKit.
Review URL: http://codereview.chromium.org/1008004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 13:00:57 +00:00
vitalyr@chromium.org
494ba3a4c8 Fix windows build again: one more memchr call.
Review URL: http://codereview.chromium.org/1109001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:38:30 +00:00
vitalyr@chromium.org
c3972d21fb Fix windows build.
On windows memchr returns const void* instead of void*.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:27:15 +00:00
vitalyr@chromium.org
b148282b56 String search performance improvements:
* Using memchr for first/only char lookup is faster than hand-coded
   loop. It processes one machine word per iteration so it helps even
   more on x64.

 * Tweaked badness computation in simple search. We pay only for the
   first char memchr scans, not for all of them.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:01:08 +00:00
erik.corry@gmail.com
dda96b61c6 Fix formatting around * and &.
Review URL: http://codereview.chromium.org/1000007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 14:53:16 +00:00
fschneider@chromium.org
38d6470fca Revert r4146. Add a special case in Math.round for a SMI result. Also change the imp...
TBR=ager@chromium.org, 
Review URL: http://codereview.chromium.org/1042006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 09:58:28 +00:00
oleg@chromium.org
78f19f1ae9 Add a special case in Math.round for a SMI result. Also change the implementation for non-SMI case.
Review URL: http://codereview.chromium.org/981002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 13:23:41 +00:00
vitalyr@chromium.org
6a10a837c0 Add heuristic for flattening strings before comparing them.
Also switched to using CompareChars instead of memcmp since it's
faster than gcc's builtin and on par with msvc's builtin.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 12:30:04 +00:00