Commit Graph

695 Commits

Author SHA1 Message Date
ricow@chromium.org
eff34b9952 Update JSON.stringify to floor the space parameter (fixes issue 753).
Review URL: http://codereview.chromium.org/2877004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-29 07:22:40 +00:00
whesse@chromium.org
363060ca23 Ensure that ToPrimitive is called on all objects involved in comparisons <, <=, >, >=. Ensures that ToPrimitive is called when comparing an object to undefined. Fixes bugs on all platforms.
Review URL: http://codereview.chromium.org/2834022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-29 06:47:19 +00:00
podivilov@chromium.org
b2b140a525 Provide actual breakpoints locations in response to setBreakpoint and listBreakpoints requests.
Review URL: http://codereview.chromium.org/2799037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-28 12:09:29 +00:00
erik.corry@gmail.com
bcfaba24c1 Do integer mod via sum-of-digits technique. This benefits the date
code.
Review URL: http://codereview.chromium.org/2876011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-28 11:47:23 +00:00
ricow@chromium.org
faaf524445 Fixes bug in Array.prototype.lastIndexOf when called with null or undefined as fromIndex argument. (fixes issue 754).
Review URL: http://codereview.chromium.org/2840021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-25 09:28:38 +00:00
ager@chromium.org
b71fe5b61e Fix bug in JSON.stringify where Boolean objects are incorrectly
unwrapped.

This fixes issue 752.
Review URL: http://codereview.chromium.org/2845023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-25 07:45:52 +00:00
lrn@chromium.org
7b46a1f49d Fix bug in regexp exec with global regexps.
Review URL: http://codereview.chromium.org/2826020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-25 07:00:29 +00:00
whesse@chromium.org
d0a9f76261 Fix error in for-in on x64 platform using full compiler with keyed store IC.
BUG=v8:748

http://code.google.com/p/v8/issues/detail?id=748

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 14:02:36 +00:00
erik.corry@gmail.com
ca8298273a ARM: Fix bug introduced in 4783 (2.2.15) that caused the
result of 1 << x to be miscalculated for some inputs.
Review URL: http://codereview.chromium.org/2848021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-23 13:44:11 +00:00
ricow@chromium.org
be531accc0 Add regression test for the code flushing in issue 474 (which was
fixed in revision 4921).

This also enables codeflushing by default.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-23 08:02:06 +00:00
lukezarko
aade86e044 Make the apply.js unit test more resilient to differing stack positions.
More information is at http://code.google.com/p/v8/issues/detail?id=742

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-22 22:20:58 +00:00
vitalyr@chromium.org
3cafa65462 Track ascii-ness of data in externalized strings.
If a two-byte string only contains ascii characters, then we can save
memory when flattening a cons string containing it. Similarly we can
use this in Array.prototype.join implementation. To track this a new
bit is added to instance type. This bit is used as a hint in generated
code and in runtime functions.

To enable testing a new V8 extension is added controlled by
--expose-externalize-string flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-17 16:19:28 +00:00
podivilov@chromium.org
7808d45af5 Fix a bug when top level break points fall into the last function in script.
Review URL: http://codereview.chromium.org/2824007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-17 12:47:08 +00:00
podivilov@chromium.org
f5fdef253b Save actual break point location to script break point object.
Review URL: http://codereview.chromium.org/2864003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 14:50:07 +00:00
kaznacheev@chromium.org
b251f14782 Port KeyedCallIC implementation to x64 and ARM.
Also edited ic-ia32.cc for clarity and better formatting.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 10:03:47 +00:00
ricow@chromium.org
de512af068 Add support for elements and array indices in Object.defineProperty
(fixes bug 619).

This also fixes a bug in GetOwnProperty in runtime.cc discovered by
the new test cases. That part of the code was not testable before
since we had no way of correctly defining properties on elements.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 13:55:38 +00:00
sgjesse@chromium.org
e045ca6898 Better handling of stepping out of a function
With the change in r4820 all return statements are now breakable like any statement, so stepping will stop before the return statement actually returning from a function. With this change the position when breaking in the function return (after executing the return statement) will be the actual end of the function. At this point the return value is available as it saved to the stack by the debug break at return handling. Added information on the actual value returned from the function to the debugger.
Review URL: http://codereview.chromium.org/2783002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-10 09:02:16 +00:00
kaznacheev@chromium.org
1dec9199ca Add logic from KeyedLoadIC generic stub to KeyedCallIC megamorphic stub.
This should make access faster for arrays of functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-10 05:06:39 +00:00
sgjesse@chromium.org
634fb9152c More precise break points and stepping when debugging
Added support for more precise break points when debugging and stepping. To achieve that additional nop instructions are inserted where breaking would otherwise be impossible. The number of nop instructions inserted are sufficient to make place for patching with a call to a debug break code stub. On Intel that is 5 nop's for 32-bit and 13 for 64-bit. Om ARM 3 nop instructions (12 bytes) are required.

In order to avoid inserting nop's in to many places a simple ast checker have been added to check whether there are breakable code in a statement or expression. If it is possible to break in an expression no additional break enabeling code is inserted.

Added break locations to the true and false part of a conditional expression.

Added stepping tests to cover more constructs.

These changes are only in the full compiler.

Changed the default value for the option --debugger in teh d8 shell from true to false. The reason for this is that with --debugger turned on the full compiler will be used for all code in when running d8, which can be unexpeceted.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:04:49 +00:00
ricow@chromium.org
e0bbcf1e6e Fix bug in mjsunit/const-eval-init causing objects to be initialized to undefined.
In mjsunit/const-eval-init - testInitSlowCaseExtension a range of objects are initialized to undefined instead of a value because the variable i is within quotes (i.e., the source becommes "a1 = i" instead of "a1 = 1".

This should have no impact on the test, I just stumbled over this on
an unrelated matter.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 11:20:36 +00:00
vegorov@chromium.org
1d932dcc6e Add regression tests for issues 728, 732
TBR=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 10:54:42 +00:00
kaznacheev@chromium.org
ff61618c4b Extend CallIC to support non-constant names.
This speeds up constructs like this: 
var zz='replace'; '123'[zz]('3','4');

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:27:32 +00:00
ager@chromium.org
723bed3105 Optimize calls to evals. Most of the time there is no reason to
perform a context lookup in the runtime system for the 'eval'
function. Instead load the 'eval' function from the global context in
generated code if it is not shadowed.

Will port to other platforms as a separate change.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 10:19:19 +00:00
vitalyr@chromium.org
6c74d30f83 Fix double to integer conversions in runtime string indexing.
Review URL: http://codereview.chromium.org/2577001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-03 11:31:19 +00:00
vitalyr@chromium.org
3ec0b86495 Make StringCharCodeAt runtime function do what it name implies and not
just indexed string access.

The difference is that String.prototype.charCodeAt accepts any number
as an index, whereas string[] only accepts array indices.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-03 09:32:07 +00:00
whesse@chromium.org
019b8c4511 Change the interface of LoadIC on the x64 platform to take its arguments in registers.
Review URL: http://codereview.chromium.org/2330003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-31 13:26:12 +00:00
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
vitalyr@chromium.org
ad0e38909f Custom call IC-s for String.prototype.{charAt,charCodeAt}.
These string methods can be composed from two basic blocks: charCodeAt
and fromCharCode, both of which have fast cases for certain types of
inputs. In this patch these two blocks are refactored to allow
generating the fast cases without having to jump around the slow
cases. In the slow cases since they can now be invoked both from
inline runtime functions and from IC stubs we either have to
save/restore state of the current frame or enter/leave a new internal
frame. This is handled by new RuntimeCallHelper interface. Its
implementation for virtual frame is based on FrameRegisterState class
extracted from DeferredCode class.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 14:23:19 +00:00
ricow@chromium.org
95939ada29 Fix issue 720 making Object.defineProperty handle existing writable flags correctly.
The existing version will overwrite the existing writable flag with
false even in the case where no new value is given and the existing
writable flag is true.

The reason for the issue is that there is no check to see if the
provided descriptor actually has a writable attribute. This causes us
to use the default value (false) even in the case where nothing was
provided. In addition, the existing tests makes wrong assumptions (that writable is always set to false if not provided) and has been changed to follow the specification.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 08:31:57 +00:00
ricow@chromium.org
7bbfc8fc53 Refactor the samevalue internal method and add tests for this method.
Noticing that the only difference between samevalue and strict equality is on
numbers we can simplify SameValue.

The old version did not return a correct answer if called on two strings since 
StringEquals (from runtime.cc) returns an answer that is the negated value 
(if treated as a boolean).


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 10:35:55 +00:00
ricow@chromium.org
fb58bc06c6 Fixes issue 712 causing non-configurable accessors to be overwritable by using
Object.defineProperty with empty property descriptor.

The issue is fixed by implementing step 5 and 6 from DefineOwnProperty in the
specification (ES5 8.12.9).

This also fixes a bug in SameValue when used on boolean values (it
would priorly return a number - not a boolean).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 06:25:27 +00:00
whesse@chromium.org
ac60f498d2 Change keyed store IC interface on x64 to take value, key, and receiver in registers rather than on the stack.
Review URL: http://codereview.chromium.org/2111011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 15:09:21 +00:00
vitalyr@chromium.org
3260fb9465 Add stack traces to mjsunit tests.
Review URL: http://codereview.chromium.org/2094005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-14 10:00:24 +00:00
peter.rybin@gmail.com
07f95278e7 Apply "Update mjsunit.status rules for LiveEdit test" again
Review URL: http://codereview.chromium.org/2015017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 14:46:09 +00:00
antonm@chromium.org
e8e35eccac Properly process arrays with overridden prototype in various Array's functions.
Bailout to JS Array builtins if array's prototype is different from
Array.prototype.  Otherwise there might be inherited elements coming
from this prototype.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 12:22:09 +00:00
peter.rybin@gmail.com
b49b954d32 Revert "Update mjsunit.status rules for LiveEdit test"
Review URL: http://codereview.chromium.org/2019007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 17:57:42 +00:00
peter.rybin@gmail.com
0b9fb1e0aa Update mjsunit.status rules for LiveEdit test
Review URL: http://codereview.chromium.org/1952001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 17:09:38 +00:00
ager@chromium.org
f54b7767c6 Implement fast load and call of arguments in the presence of eval.
Load the arguments object from the context if there are no extensions
objects on the way. Then load the argument with a keyed load ic.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 12:20:06 +00:00
ricow@chromium.org
8d51195778 Fixed issue 619 allowing Object.create to be called with a function.
This change allows Object.create to take a function as input in the
proto argument. The spec says that Type(O) for the proto argument
should be true but our IS_OBJECT does not check for this. I will make a
IS_SPEC_OBJECT in macros.py and refactor v8natives in another CL.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-09 08:43:59 +00:00
ricow@chromium.org
fb3e01a306 Correct issue 696 with Date.parse returning a value when called on a non date string.
The error was introduced in revision 4557 where support was added for
ES5 date time format strings. Because there was no check for a valid
year a random string starting with a non-digit character would be
parsed.

This change disallows ES5 formatted dates where there is no date
fraction (i.e., with only a timestamp). Since none of the other
browsers support Date.parse on only timestamps I have disabled this
totally instead of just correcting the parser.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 11:53:20 +00:00
ager@chromium.org
856135af42 Implement fast calls of functions in the presence of eval (if the eval
calls do not introduce new bindings).

The infrastructure is already in place for fast loads from context
slots in the presence of eval.  This change simply uses that
infrastructure for calls as well as loads.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 10:25:11 +00:00
erik.corry@gmail.com
d18b73c2fe Add a single-element global positive and negative cache to
the implementation of instanceof.
Review URL: http://codereview.chromium.org/1765012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 09:35:18 +00:00
whesse@chromium.org
1f13b58b97 Correct bug with left shift on X64 platform from change 4571 (http://code.google.com/p/v8/source/detail?r=4571). Speed up left shift with a constant left hand side on X64 platform. Add unit test for this bug. Remove unused failure target argument from MacroAssembler::SmiShiftLeft and MacroAssembler::SmiShiftLeftConstant.
Review URL: http://codereview.chromium.org/1934004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 08:15:15 +00:00
lrn@chromium.org
4fdf57ace0 X64: Faster push/pop implementation.
Also snuck in an intended optimization for fast api call preparation and a few indentation fixes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 13:23:58 +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
ricow@chromium.org
6ceb02e6eb Added support for ES5 date time string format to Date.parse.
Review URL: http://codereview.chromium.org/1704016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 06:43: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
dgozman@chromium.org
a0c1310479 Make Empty function to have no prototype and use it as __proto__ for all functions without prototype.
Review URL: http://codereview.chromium.org/1769013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 10:39:36 +00:00
podivilov@chromium.org
1872574f4d Port string keyed load IC improvements (r4444) to x64.
http://compute1.aar:9013/golem/r4502-v8-podivilov-string-char-at2-x64-vs-4502-v8-x64.html
Review URL: http://codereview.chromium.org/1750017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 17:16:51 +00:00
peter.rybin@gmail.com
6f099e4ce6 LiveEdit: clean JS sources a bit
Review URL: http://codereview.chromium.org/1697016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 13:29:07 +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
lrn@chromium.org
1a0bb51069 Fix bug in word-boundary-lookahead followed by end-of-input assertion.
Review URL: http://codereview.chromium.org/1712013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 15:10:42 +00:00
antonm@chromium.org
6acdd84a61 Current custom call generators cannot cope with the case when receiver is not a JSArray.
Add a support for bailout from custom call generators (just return undefined).

BUG=684

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 15:08:07 +00:00
ricow@chromium.org
f066a9af40 Added regression test for crbug 40931 http://crbug.com/40931
Review URL: http://codereview.chromium.org/1756013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 13:26:11 +00:00
ricow@chromium.org
457d9024c6 Double max-new-space-size to 2^18 in binary-op-newspace to make the test run on linux 64 with snapshots on.
Review URL: http://codereview.chromium.org/1735014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 13:25:17 +00:00
ricow@chromium.org
1f5e78073a Change max-new-space-size to 2^17 (from 2^16) to make binary-op-newspace test run on linux 64.
Review URL: http://codereview.chromium.org/1780003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 12:58:20 +00:00
erik.corry@gmail.com
ed6817d58c Fix a bug where a GC at an unlucky moment caused a wrong
calculation on ARM.
Review URL: http://codereview.chromium.org/1733016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 11:06:37 +00:00
ager@chromium.org
c0f1f18f80 Fix bug in KeyedLoadIC generic stub where signed instead of unsigned
comparison was used.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 12:57:41 +00:00
whesse@chromium.org
5db2af4873 Fix error in static type information computation for bitwise shift.
Review URL: http://codereview.chromium.org/1756007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 09:02:10 +00:00
sgjesse@chromium.org
968a524432 Add inlining of property load on ARM
Generate inlined named property load for in-object properties. This uses the same mechanism as on the Intel platforms with the map check and load instruction of the inlined code being	patched by the inline cache code. The map check is patched through the normal constant pool patching and the load instruction is patched in place.
Review URL: http://codereview.chromium.org/1715003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 07:18:30 +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
0adfe842a5 Fix incorrect handling of global RegExp properties for nested replace-regexp-with-function.
Review URL: http://codereview.chromium.org/1695002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 08:33:04 +00:00
vitalyr@chromium.org
b8ba4deacc Reapply: Inline fast cases in string keyed load IC.
(Fixed handling of out-of-bounds keys.)

String keyed load used to call STRING_CHAR_AT builtin that performs
two steps (get a char code, construct a one-char string from the
code), both of which have fast cases implemented as inline runtime
functions. In this chage most of the code from these functions is
extracted to a set of common generator functions in StringStubBase and
the fast cases are grouped together in the IC code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 17:33:14 +00:00
ager@chromium.org
c678e44805 Add missing smi check in IC for nonexistent properties.
Add regression test.

BUG=v8:681
Review URL: http://codereview.chromium.org/1673005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 10:20:39 +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
ager@chromium.org
afc15bb48f Reapply load ICs for nonexistent properties.
We need to be careful to check global property cells for the property
encountered during lookup.  Therefore, the ICs have to be specific to
the name of the property if global objects are involved.  In
principle, this means that we could get a large number of monomorphic
ICs for the same map if there is a global object in the prototype
chain.  However, since this is only done for normal load ICs and not
for keyed load ICs I do not expect this to be a problem.  I will
experiment with it once this goes in.

BUG=675
Review URL: http://codereview.chromium.org/1559033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 11:25:41 +00:00
peter.rybin@gmail.com
0e9149c543 Make a namespace for LiveEdit
Review URL: http://codereview.chromium.org/1549041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 14:53:00 +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
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
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
vitalyr@chromium.org
9b54227cc7 Land patch by Pavel Podivilov (podivilov@chromium.org).
Port string stub for keyed loads to x64 and ARM.

BUG=566
TBR=ager@chromium.org
TEST=test/mjsunit/string-index.js

Original code review: http://codereview.chromium.org/1628003

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 14:16:39 +00:00
peter.rybin@gmail.com
560baa5eb4 Let LiveEdit accept a full new script source (rather than diff)
Review URL: http://codereview.chromium.org/1584008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-02 11:03:49 +00:00
mikhail.naganov@gmail.com
c2df9cc8c8 Support setting brekpoint by script name set in //@ scriptURL= comment,
in case script name is missing.

BUG=http://crbug.com/39290

Author: Andrey Kosyakov (caseq@chromium.org)
Original issue: http://codereview.chromium.org/1303003

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-01 16:25:07 +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
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
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
17eece5748 Fix bug in string replace regexp with function when returning non-string.
Review URL: http://codereview.chromium.org/1528005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-29 21:12:54 +00:00
serya@chromium.org
9e76d99fb9 Percise rounding parsing octal and hexadecimal strings.
Rounding happens when the number exceeds 53 bits of floating point mantissa. Current implemetation ignores digits after some limits. 0x1000000000000081 was rounded to 0x1000000000000100 while 0x100000000000008000001 was rounded to 0x100000000000000000000.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-29 15:46:58 +00:00
serya@chromium.org
0b42d25c72 Optimization for parsing integers of limited length (in digits).
Review URL: http://codereview.chromium.org/1367004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-29 11:17:34 +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
serya@chromium.org
203ba181ad StringToDouble rewritten not using String::Get and memory allocations.
It converts the number to "canonical" form removing insignificant digits,
leading zerroes and spaces what guarantees to fit a fixed size buffer and
does not changes result of strtod.
Review URL: http://codereview.chromium.org/1216005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 14:39:39 +00:00
sgjesse@chromium.org
6a63910650 Re-apply "Inline floating point compare"
This re-applies r4220 and r4233, which was reverted in r4254 due to a bug. This bug has now been fixed, with the only change being line 2884 changed from

  __ SmiTag(left_side->reg());

to

  __ SmiTag(operand->reg());

Added a regression test.

BUG=http://crbug.com/39160
TEST=test/mjsunit/regress/regress-crbug-39160.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 12:04:34 +00:00
whesse@chromium.org
244513555c Avoid calling ToRegister(register) when result is in register already, and register is shared.
Review URL: http://codereview.chromium.org/1325004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 11:52:42 +00:00
ager@chromium.org
71e792a82c Revert revisions 4241, 4243 and 4247 because of Windows build errors
and test failures.

TBR=serya@chromium.org
Review URL: http://codereview.chromium.org/1269003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 11:48:01 +00:00
serya@chromium.org
b5127faa57 Fix conform test.
Review URL: http://codereview.chromium.org/1217007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 11:11:33 +00:00
serya@chromium.org
2bd9919788 StringToDouble rewritten not using String::Get and memory allocations.
It converts the number to "canonical" form removing insignificant digits,
leading zerroes and spaces what guarantees to fit a fixed size buffer and
does not changes result of strtod.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 08:51:03 +00:00
oleg@chromium.org
2b5c05ed79 Make the new Date test independent of the timezone in which it is run.
Review URL: http://codereview.chromium.org/1084018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 15:28:58 +00:00
whesse@chromium.org
c3b5e22764 Fix an error in optimized modulus operator, add unit test.
Review URL: http://codereview.chromium.org/1118008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 15:18:00 +00:00
oleg@chromium.org
fe6522e80d Fix bug http://code.google.com/p/v8/issues/detail?id=659. Move the limits check for date before the time zone offset is applied.
Review URL: http://codereview.chromium.org/1075016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 14:47:02 +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
fschneider@chromium.org
03089b6644 Fix code generation for fast smi loops to support parameters as well.
This change fixes an assert we hit when we recognized a fast smi loop
with a parameter as the loop variable.

BUG=650


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-22 11:55:12 +00:00
fschneider@chromium.org
ec974ddb50 Fix bug when generating a fast smi loop.
We may encounter an invalid frame after generating code
for the loop body in case the loop body ends in an unconditional
return. Before setting the type information for the loop variable
we need to check for a valid frame.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 14:32:02 +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
fschneider@chromium.org
34faea85db Add test cases for fast smi loops.
Review URL: http://codereview.chromium.org/1014007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-18 09:08:24 +00:00