fschneider@chromium.org
e91a352d02
Fix a regression in character-at stub when doing a keyed load on a string.
...
Loading from out-of-range has to go to the runtime system to check if there
exists a property with that index in the prototype.
Review URL: http://codereview.chromium.org/3410011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-16 09:18:08 +00:00
lrn@chromium.org
84d8115ecf
Fix bug in Array.prototype.indexOf/lastIndexOf when called on non-sparse non-arrays.
...
Review URL: http://codereview.chromium.org/3358025
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-10 08:21:01 +00:00
lrn@chromium.org
ac2ae05f85
make Date.parse properly handle TZ offsets
...
This makes, e.g., Date.parse("2010-08-31T22:35:36-09:00") work as
expected. Without this change, the "-9:00" timezone-offset portion
causes V8 to fail to properly parse that string into a date.
BUG=http://code.google.com/p/v8/issues/detail?id=857
TEST=Try Date.parse("2010-08-31T22:35:36-09:00") and make sure
that it gets parsed without errors and does not return NaN.
Review URL: http://codereview.chromium.org/3318017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-10 07:00:28 +00:00
vitalyr@chromium.org
624b13a804
Custom call IC for String.fromCharCode.
...
Review URL: http://codereview.chromium.org/3291015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-09 13:38:01 +00:00
lrn@chromium.org
d1a674f7c1
Add sparse array handling to Array.protoype.indexOf/lastIndexOf.
...
Review URL: http://codereview.chromium.org/3132046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-09 12:57:32 +00:00
kaznacheev@chromium.org
73c02394bf
Avoid pushing arguments twice in GenericBinaryOpStub.
...
Under some conditions (ADD, non-number arguments passed in registers)
GenerateRegisterArgumentsPush was called twice and the stack broke.
Review URL: http://codereview.chromium.org/3290012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-07 13:33:40 +00:00
serya@chromium.org
e54ad9ee86
Removing a wrong check.
...
A strings which represents an array index with length 8 and 9 digits do not pass this check. However generated hash is valid.
Review URL: http://codereview.chromium.org/3295017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-07 11:32:20 +00:00
vitalyr@chromium.org
62f7cd8500
Handle argument conversion in StringAddStub.
...
In case one of the arguments is known to be a string we emit a few
fast conversion attempts for the other. This allows using the
StringAddStub instead of STRING_ADD_{LEFT,RIGHT} builtins.
Review URL: http://codereview.chromium.org/3338007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-03 12:10:44 +00:00
lrn@chromium.org
6670c0ad38
Make JSON.stringify not quote non-ASCII characters. Fix bug 855.
...
Review URL: http://codereview.chromium.org/3336001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-02 07:09:28 +00:00
erik.corry@gmail.com
663f378da5
Get gcc to check that we don't ignore return values of functions that can
...
fail to allocate because we need a GC.
Review URL: http://codereview.chromium.org/3274008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-31 08:05:42 +00:00
ager@chromium.org
d955b212b5
Follow Safari and Firefox in returning empty array from array splice
...
with no arguments.
Review URL: http://codereview.chromium.org/3277005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-30 18:08:50 +00:00
vegorov@chromium.org
3d60cc34af
Fix regress-851.js to use assertNull instead of assertFalse.
...
Review URL: http://codereview.chromium.org/3232002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-27 13:23:14 +00:00
vegorov@chromium.org
f059093562
Check result of JSObject::NormalizeElements() in JSObject::PreventExtensions().
...
Normalization requires allocation so Failure object can be returned.
BUG=http://code.google.com/p/v8/issues/detail?id=851
TEST=test/mjsunit/regress/regress-851.js
Review URL: http://codereview.chromium.org/3262001
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-27 13:06:50 +00:00
serya@chromium.org
71548e969b
Using array index hash code for string-to-number conversion.
...
Review URL: http://codereview.chromium.org/3141022
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-27 11:47:12 +00:00
ricow@chromium.org
7672338bc9
Fixes bug in Object.freeze and Object.seal causing them to misbehave when Array.prototype has changed.
...
Object.freeze and Object.seal uses GetOwnPropertyNames which
returns an array with local property names. This array will also have
the additional properties defined on Array.prototype or
Object.prototype.
Note that, the implementation of GetOwnPropertyNames (when used as
Object.getOwnPropertyNames) is correct, since the spec says to create
a new Array (which would also have these properties).
Review URL: http://codereview.chromium.org/3137041
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-26 08:35:49 +00:00
ricow@chromium.org
3543dd53a4
Refactor the tools/test.py script and related testcfg.py files.
...
This makes it possible to run several variants of the tests (with different flags that is) by adding extra lists to the VARIANT_FLAGS list. In addition, there is a number of smaller refactorings.
Review URL: http://codereview.chromium.org/3164023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-24 13:34:59 +00:00
erik.corry@gmail.com
8682804746
Fix an issue in the ARM port where a left shift was predicted to have a Smi result when it had an int32 result. This is a commit of http://codereview.chromium.org/3195004 for Rodolph Perfetta. Part 2
...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-23 09:04:31 +00:00
lrn@chromium.org
0210df5848
Use Copy-on-write arrays for cached regexp results.
...
Review URL: http://codereview.chromium.org/3158020
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-20 09:37:22 +00:00
erik.corry@gmail.com
702780ee9a
Make the Integer32 type info only cover the signed 32 bit integers.
...
Fix some bit op bugs introduced last week on IA32:
http://code.google.com/p/chromium/issues/detail?id=52096
Review URL: http://codereview.chromium.org/3151017
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-16 15:08:32 +00:00
erik.corry@gmail.com
e18d07b604
ARM: Ensure that we are not in a spilled scope when calling
...
Load() or constructing a reference.
Review URL: http://codereview.chromium.org/3125011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-16 11:43:30 +00:00
peter.rybin@gmail.com
6fa44eb979
LiveEdit: implement stack manipulations for x64
...
Review URL: http://codereview.chromium.org/3120011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-13 13:54:28 +00:00
sgjesse@chromium.org
56e0221754
Handle accessors when generating Error.stack
...
BUG=http://code.google.com/p/v8/issues/detail?id=798
TEST=test/mjsunit/regress/regress-798.js
Review URL: http://codereview.chromium.org/3082012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-13 08:31:52 +00:00
sgjesse@chromium.org
5cd4a9b78d
Remove runtime function from fuzzing
...
Don't do fuzzing of _IsStringWrapperSafeForDefaultValueOf as it expects a non-smi as its first argument.
Review URL: http://codereview.chromium.org/3109010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-12 14:38:50 +00:00
sgjesse@chromium.org
8e0cd6db8a
Handle overwriting valueOf on String objects correctly when adding
...
This adds a check to the fast case string add to ensure that the String object still have the default valueOf function. The default valueOf is sitting on a hidden prototype of String.prototype.
Before using the fast case valueOf the object is checked for a local valueOf property. For slow case objects this check always reports true (the dictionary is not probed, so valueOf might be there) and for fast case objects the descriptor array is checked for the valueOf symbol (just liniar scan). After that the prototype is checked for beeing the initial value of String.prototype. If this all pass (that is the default valueOf is still in place) this result is cached on the map making the check fast the next time.
This is only implemented in the optimizing compiler, as the two usages of %_IsStringWrapperSafeForDefaultValueOf is never hit by the full compiler.
I will port to x64 and ARM when this has been reviewed for ia32.
I will remove the performance counters prior to final commit.
BUG=http://code.google.com/p/v8/issues/detail?id=760
TEST=test/mjsunit/regress/regress-760-1.js
TEST=test/mjsunit/regress/regress-760-2.js
Review URL: http://codereview.chromium.org/3117006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-12 13:43:08 +00:00
sgjesse@chromium.org
fcfe6d74d9
Minor change to for-in
...
Return (smi) 0 instead of object null from the FILTER_KEY builtin.
Add a test which tests keys being deleted during for-in.
Review URL: http://codereview.chromium.org/3170004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-11 13:46:10 +00:00
lrn@chromium.org
6267578925
Removed support for object literal get/set with number/string property name.
...
It doesn't work correctly for array indices.
Review URL: http://codereview.chromium.org/3109002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-10 12:44:13 +00:00
erik.corry@gmail.com
bdfdf8bee9
Fix fuzzer-found error where left and right were the same register in bitops.
...
Review URL: http://codereview.chromium.org/3115004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-10 12:30:14 +00:00
ricow@chromium.org
44425bcc03
Change dos line endings to unix line endings in a number of mjsunit test files.
...
Review URL: http://codereview.chromium.org/3072031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-09 12:21:50 +00:00
lrn@chromium.org
53e22e386c
Create a new RegExp object for every evaluation of a RegExp literal.
...
Changes necessary to following ES5 semantics and matching Safari - in ES3
the same RegExp object was generated by each evaluation of the RegExp literal.
Fixes bug 704.
Review URL: http://codereview.chromium.org/3034060
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-06 13:04:27 +00:00
sgjesse@chromium.org
88b19a9d0c
Re-apply r5165 (Added support for ES5's propertyname production)
...
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/3073031
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-06 08:03:44 +00:00
sgjesse@chromium.org
1844e149ab
Revert r5165 (Added support for ES5's propertyname production)
...
This is to test in Chromium without this change.
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/3027043
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 14:46:34 +00:00
sgjesse@chromium.org
a1a3aa46a2
Object.seal(obj) and Object.freeze(obj) should return the input obj.
...
BUG=http://code.google.com/p/v8/issues/detail?id=809
TEST=Seal/freeze an object and check if Object.seal and Object.freeze returns the given object.
Burcu Dogan <burcujdogan@gmail.com>
Review URL: http://codereview.chromium.org/3056049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 10:56:15 +00:00
lrn@chromium.org
24cf5459f5
Added support for ES5's propertyname production.
...
Object initialisers and dot-notation property access allows keywords in ES5.
Also allowed non-identifiers after "get" or "set" in an object initialiser.
Review URL: http://codereview.chromium.org/3047038
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-02 12:09:10 +00:00
vegorov@chromium.org
4a2f05ce35
Fix issue 806.
...
Ensure that we are not using r12 as a receiver in inlined NamedStore code.
Review URL: http://codereview.chromium.org/3081007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-02 09:14:44 +00:00
podivilov@chromium.org
c115a39942
Add debugger protocol request for setting global flags.
...
Review URL: http://codereview.chromium.org/2880011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-28 15:50:05 +00:00
podivilov@chromium.org
52762e4c59
Breakpoint position should be inside function body.
...
Review URL: http://codereview.chromium.org/2883042
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-28 13:02:03 +00:00
whesse@chromium.org
3607a9e78e
Fix error in optimized x.apply(y, arguments) code generation on ARM. Fixes issue 784. Adds regression test.
...
Review URL: http://codereview.chromium.org/3048035
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-28 12:50:27 +00:00
peter.rybin@gmail.com
30b85b3962
Fix break position not to be outside of the script
...
Review URL: http://codereview.chromium.org/3017021
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-23 17:21:55 +00:00
ricow@chromium.org
e084e56129
Implement Function.prototype.bind (ES5 15.3.4.5).
...
Please note that we do not implement correctly the setting of caller
and arguments on the returned objects, since we already have these
properties on function objects (and they are non-configurable).
Also corrects indention in DefineOwnProperty.
Review URL: http://codereview.chromium.org/3046010
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-23 10:08:55 +00:00
whesse@chromium.org
9991a4b226
Fix issue 785. For-in now works on strings: for (var i in "asdf") now works
...
all the time, not just the first time it is run.
Review URL: http://codereview.chromium.org/3037008
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-19 12:45:21 +00:00
ricow@chromium.org
f5f0b80363
Implement ES5 Object.seal and Object.isSealed.
...
This change adds the ES5 Object.seal 15.2.3.8 and Object.isSealed 15.2.3.11 methods.
Review URL: http://codereview.chromium.org/2993006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 07:51:14 +00:00
serya@chromium.org
1b9391be7a
Fix GenerateNegativeLookup to work with non-symbols as a dictionary key.
...
Review URL: http://codereview.chromium.org/2928009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 06:17:45 +00:00
whesse@chromium.org
cb1eedd269
Fix error in x64 fast smi loops, change 4998.
...
Review URL: http://codereview.chromium.org/2925012
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 13:22:47 +00:00
ricow@chromium.org
e2fab5fd9f
Fix bug in Object.isFrozen which always classifies non-extensible objects as frozen.
...
Since out internal representation of a property descriptor does not have configurable and writable
attributes Object.isFrozen returns true whenever an object is not extensible.
This change makes use of the right method calls on our internal representation (isWritable() and
isConfigurable()). Tests added directly to the mjsunit test.
Review URL: http://codereview.chromium.org/2904015
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 13:15:43 +00:00
ricow@chromium.org
325fd42c3f
Add ES5 Object.freeze and Object.isFrozen methods.
...
This change adds ES5 15.2.3.9 Object.freeze and
15.2.3.12 Object.isFrozen
Review URL: http://codereview.chromium.org/2944016
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 12:58:02 +00:00
ager@chromium.org
0f4a330508
Fix JSON.parse typo which causes the input not to be string converted.
...
Review URL: http://codereview.chromium.org/2981004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 10:57:45 +00:00
ager@chromium.org
f6e049b0ce
Remove the special error message for overflows when using
...
Function.prototype.apply. This avoids having more than one error
message for stack overflow situations which makes testing a pain.
Review URL: http://codereview.chromium.org/2967003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 15:29:25 +00:00
whesse@chromium.org
f7c85755ba
Prevent invalid pre-parsing data passed in through the API from crashing V8.
...
Review URL: http://codereview.chromium.org/2876046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-07 10:28:22 +00:00
erik.corry@gmail.com
118a421067
Simplify the transitions in the Binary Op ICs. Now a single call
...
to the runtime will both patch in the more specialized binary op
stub and calculate the answer. This eliminates the need to call
both the rest of the binary op and the patching runtime call. The
runtime routines are altered to be more agressive in returning
Smis so we don't get spurious heap numbers as inputs to binary ops
while we are patching the binary op ICs.
Review URL: http://codereview.chromium.org/2843049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-06 12:56:55 +00:00
vitalyr@chromium.org
7b521af105
Fix crash: handle all flat string types in regexp replace.
...
Review URL: http://codereview.chromium.org/2868046
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-06 12:22:19 +00:00