Commit Graph

1517 Commits

Author SHA1 Message Date
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
lrn@chromium.org
b1e27e2cd5 Created collector class and used it to collect identifiers during scanning.
The collector class automatically expands to hold the values added to it,
like a List, but doesn't ensure that the backing store is contiguous, which
allows it to avoid copying back and forth as the buffer grows.

This is in preparation for identifyng identical symbols during preparsing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-24 10:53:44 +00:00
kasperl@chromium.org
3527e29e8e Remove the full codegen syntax checker completely but be
careful to avoid making code with loops run too slowly.
Review URL: http://codereview.chromium.org/3107033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-24 09:04:17 +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
ricow@chromium.org
7fc3fd76e3 Re-enable test-api/RegExpInterruption on arm.
This test has been disabled for a very long time, and the fix in
http://code.google.com/p/v8/source/detail?r=5308 should make this go
away.

I will watch the buildbot continuously over the next few days to make
sure it does not appear again. If it does not I will close bug 240.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-20 13:00:22 +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
vitalyr@chromium.org
103d7c7993 Fix local handle leak in RegExpStringModificationTest.
Review URL: http://codereview.chromium.org/3133027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-19 14:00:58 +00:00
vitalyr@chromium.org
b5bbf957a8 Make instance_size immediately useful for all fixed size objects.
For variable sized objects this field doesn't really make any sense so
by putting a special value there we can improve SizeFromMap().

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-18 13:00:38 +00:00
mikhail.naganov@gmail.com
e839a1ca58 Heap profiler: allow returning aggregated snapshots via the new API.
This is intended for smoother migration to the new API in Chromium.
Also, aggregated heap snapshots can be used for cheaply obtaining
heap statistics, e.g. in tests.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-18 08:19:29 +00:00
vegorov@chromium.org
7113163145 Fix presubmit and check failures introduced by r5284.
Review URL: http://codereview.chromium.org/3141021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-17 12:10:27 +00:00
vegorov@chromium.org
9ed501d95f Merge flush code phase into marking phase.
Review URL: http://codereview.chromium.org/3135026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-17 11:44:01 +00:00
sgjesse@chromium.org
1c1f416158 Fix breakpoints on inlined named stores in code from the optimizing compiler
Review URL: http://codereview.chromium.org/3164018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-17 11:06:12 +00:00
erik.corry@gmail.com
6b20299bef Add support for vstr for single precision VFP register. This is a commit of http://codereview.chromium.org/3064045 for Rodolph Perfetta
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-17 08:43:45 +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
antonm@chromium.org
0d8ec2a8d8 Remove temporary support for two indexed property query APIs.
Review URL: http://codereview.chromium.org/3143015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-16 11:53:52 +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
erik.corry@gmail.com
a2d1dad441 Add rcr to disassembler.
Review URL: http://codereview.chromium.org/3108023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-16 11:18:42 +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
ager@chromium.org
d40abe3313 Allow allocation in FailedAccessCheckCallback to allow embedders to
for instance throw exceptions in case of failed access checks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-13 06:55:44 +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
mikhail.naganov@gmail.com
0765b6ea3e Fix issue 822: handling of JSObject::elements in CalculateNetworkSize.
BUG=822
TEST=test-heap-profiler/Issue822

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-11 09:03:23 +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
mikhail.naganov@gmail.com
4bbf058d53 Fix CPU profiler crash in start / stop sequence when non-existent name is passed
BUG=51594
TEST=test-cpu-profiler/CrashIfStoppingLastNonExistentProfile

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-10 12:06:42 +00:00
antonm@chromium.org
57769489d5 First phase of migration to new indexed property query callbacks.
Eventually indexed property query callbacks will return attributes
(as an integer) or an empty handle if property is not intercepted.

To gradually migrate to this new API, USE_NEW_QUERY_CALLBACK
macro would control if old or new style API is used.

So the migration plan is:

1) introduce new API which should be explictily enabled;
2) switch to new API defining USE_NEW_QUERY_CALLBACK before
include of <v8.h> (that would require changes to client code as well)
3) remove old API from v8
4) remove #define USE_NEW_QUERY_CALLBACK from clients.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-10 10:05:18 +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
mikhail.naganov@gmail.com
1695003bb9 Heap profiler: reduce heap snapshots size.
The size of a snapshot is now 65-80% of the JS heap size (tested on
GMail and Wave), previously it was >200%.

BUG=783

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-09 11:37:24 +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
vegorov@chromium.org
bed254fac9 Do not apply JS_RETURN and DEBUG_BREAK_SLOT relocations on x64.
Improve tests for debug API to check behavior of JS_RETURN and DEBUG_BREAK_SLOT relocations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 13:38:27 +00:00
vegorov@chromium.org
2ba27d2201 Add RelocInfo::DEBUG_BREAK_SLOT to RelocInfo::kApplyMask on ia32/x64 to ensure that debug break slots get relocated correctly during compacting GC.
Review URL: http://codereview.chromium.org/3058048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 11:39:01 +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
lrn@chromium.org
1d24f5f56b Updated unicode library.
Added Nl category to letters predicate (as requried for JS identifiers).
Changed/simplified representation of canonicalization ranges.
Truncated tables to code points in the BMP (all that is used by JS).
Reformatted tables to avoid excessively long lines.
Removed duplicate entries from multi-character mapping result tables.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-30 07:10:22 +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
ager@chromium.org
74f9789f61 Landing for Rodolph Perfetta.
Add support for saturation instruction (ARMv6 or above).
The byte array clamping code has been updated accordingly.

Review URL: http://codereview.chromium.org/3036008/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-21 07:42:51 +00:00
antonm@chromium.org
793d0a92b9 Add a check that weak object handle is not in NEAR_DEATH state after weak callback invocation.
If object enters NEAR_DEATH state, it must be explicitly cleared and/or disposed, otherwise
it would retain JS object forever.  Note as well that parameter is reset to NULL on first
invocation so weak handle callback would be in hard situation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-19 13:26:25 +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
mikhail.naganov@gmail.com
3471e873ab Fix presubmit errors in test-heap-profiler.cc
I tried adding CheckNonEqualsHelper for int64_t, but this causes
another avalanche of function resolving ambuguities. So, I ended
up fooling linter.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 15:01:42 +00:00
mikhail.naganov@gmail.com
522faec553 Fix compile errors on Linux x64 and Windows.
Will fix test-heap-profiler in the next change.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 14:28:52 +00:00
mikhail.naganov@gmail.com
c98ac6e82c Heap profiler: implement diffing of snapshots.
To trace objects between snapshots, an external map of object tags is
maintained. After the first heap snapshot has been taken, the map is
updated by reporting object moves from the GC. If no snapshots were
taken, there is no overhead (except for flag checking).

I considered graph comparison algorithms that doesn't require using
object tags, but they are all of a high computational complexity, and
will still fail to detect object moves properly, even for trivial
cases, so using tags looks like unavoidable.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-15 13:21:50 +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
mikhail.naganov@gmail.com
84ffa5610b Debugger: introduce parametrized debug break, the parameter is passed
back to EventListener to be able to dynamically specify behavior
on asynchronously enforced VM breakouts.

Review URL: http://codereview.chromium.org/2962007/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-14 08:23:35 +00:00
kaznacheev@chromium.org
0243bc875c Move serialized scope info from Code object to SharedFunctionInfo.
The scope info is now stored in a FixedArray referenced from SharedFunctionInfo.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 13:06:33 +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
ricow@chromium.org
328715cf50 Fix presubmit.
Review URL: http://codereview.chromium.org/2974008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 11:38:30 +00:00
ricow@chromium.org
ce28f58a03 Fix memory leaks in test-api.cc to make valgrind happy.
The memory leaks are all from the tests, not actually in V8.

I will put a nightly valgrind run on the fuzzer.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 11:31:47 +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
ad5e73fb85 Fix preparsing from a source string that is not external.
This fixes issue 775.
Review URL: http://codereview.chromium.org/2959007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-13 10:29:31 +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
yurys@chromium.org
abaf8347a5 Allow to capture stack trace for uncaught exceptions
Review URL: http://codereview.chromium.org/2961003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 13:17:27 +00:00
erik.corry@gmail.com
8c767e02f9 ARM: Add support for the VFP mov literal instruction and mov
between single VFP registers.  Math.pow implementation has
been updated with the new instructions.  This is a commit
of http://codereview.chromium.org/2813046/show for Rodolph
Perfetta.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-08 12:38:02 +00:00
whesse@chromium.org
91ce5a4ffd Test for correct exception message in invalid preparse data test in test-api.cc
Review URL: http://codereview.chromium.org/2829049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-07 11:31:33 +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
peter.rybin@gmail.com
6563b3a2fc Describe LiveEdit changes and support preview mode
Review URL: http://codereview.chromium.org/2883020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 20:46:04 +00:00
ager@chromium.org
06a28cbe57 Fix bug in date code (issue 736) where -0 was not mapped to 0. This caused the
runtime system to throw an exception because it expected smi arguments.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5013 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 20:09:33 +00:00
ricow@chromium.org
eed4ed99c8 Add ES5 Object.isExtensible and Object.preventExtensions.
Review URL: http://codereview.chromium.org/2819034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 14:36:34 +00:00
serya@chromium.org
c56b92d65d This change allows generating call-stubs for objects with normal (non-fast) objects in the prototype chain. StubCompiler::CheckPrototypes does ne
If the top level object is a normal object the stub is stored in its prototype map.

Lookup result of type NORMAL is not covered (since the normal stub currently doesn't check the prototype chain).
Review URL: http://codereview.chromium.org/2801018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 14:15:04 +00:00
lrn@chromium.org
04da7b90c9 X64: Added register holding Smi::FromInt(1).
Don't use r15 for anything any more.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-02 14:09:35 +00:00
podivilov@chromium.org
9added5953 Clear function breakpoints in Debug::HandleWeakDebugInfo callback.
When removing debug_info from SharedFunctionInfo, clear all breakpoints associated with that debug_info.
This is needed because function will live in heap until next gc, and therefore can be found
by Runtime::FindSharedFunctionInfoInScript.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-01 11:48:45 +00:00
sgjesse@chromium.org
97ecc50377 ARM: Correctness fix to Math.pow optimization
The change in r4990 contained a bug in Math.pow when then exponent was a large negative smi. In that case calculating 1/Math.pow(x,-y) did not provide the correct result as Math.pow(x,-y) would overflow ti infinity. This was caught by Sputnik test S8.5_A13_T1.
Review URL: http://codereview.chromium.org/2815039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 15:19:06 +00:00
ager@chromium.org
6044b33766 Implement IC for storing to dictionary case objects.
The IC stub is completely generic, so there will only be one such stub
in the system.

Added a new overloaded version of the macro assembler RecordWrite
method for cases where we have the address we store to computed up
front.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 12:27:49 +00:00
sgjesse@chromium.org
ff6c4fe680 ARM: Special code for raising to the power of an integer
When calculating Math.pow where the exponent is a smi use a simple loop to calculate the result.

Added support for the vmov instruction moving from one doubleword extension register to another.

Added some Math.pow tests which partially covers what is in the Sputnik tests.
Review URL: http://codereview.chromium.org/2804033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 12:22:15 +00:00
sgjesse@chromium.org
fd5a7b37a2 ARM: Fix disassembly of double registers
Added a few disassembler tests for vadd, vsub, vmul and vdiv.
Review URL: http://codereview.chromium.org/2823036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 08:46:19 +00:00
lrn@chromium.org
0653689450 Fix Chromium issue 47824.
In rare cases a two-byte string was mistaken for an ascii-string.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 07:40:40 +00:00
ricow@chromium.org
a23a17bc08 Update the mozilla tests to the newest version.
This includes an update to the test expectations, and a new bug found
when investigating the new failures introduced by the updated tests
(http://code.google.com/p/v8/issues/detail?id=762)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-30 06:51:38 +00:00
vitalyr@chromium.org
6328df4fa2 Type info: fix three bit representation of smi type.
Review URL: http://codereview.chromium.org/2802022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-29 13:48:20 +00:00
sgjesse@chromium.org
65018d9123 ARM: Use the vsqrt instruction when available
vsqrt is used to calculate Math.sqrt(x), Math.pow(x, 0.5) and Math.pow(x, -0.5). Code size doesn't matter, as %_MathSqrt and %_MathPow are only called in one place each.
Review URL: http://codereview.chromium.org/2885002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-29 09:40:36 +00:00
ricow@chromium.org
7f816486f2 Even more cleanup of es5 test expectations.
Removed expectations for tests that was removed in the latest
revision. Also changed FAIL_OK to FAIL for test that we should
implement but currently don't (thanks to lasse for noticing this).


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-29 09:00:20 +00:00
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
ricow@chromium.org
4ad3fdb1f4 Update the ES5 conformance tests to the latest version and fix test
expectations.

We are currently using a rather old version of the ES5 conformance
tests and there has been a range of bug fixes in the test set. This
change brings us up to date. 

In addition, our current test expectations discards the all chapters
but chapter 15. I have enabled the other chapters, cleaned up the
tests that we no longer fail on, and filed bugs for tests that we fail on.

It seems some of the bugs on the es5 conformance bug-tracker has been
fixed but not marked fixed. I will file bugs for the newly discovered
test bugs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4970 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-29 05:56:15 +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
yurys@chromium.org
7832dd1b97 Fix 15.2.3.4 es5conform test
TBR=mnaganov,sgjesse
Review URL: http://codereview.chromium.org/2832029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-28 09:25:09 +00:00
yurys@chromium.org
8896e45dec Object.getOwnPropertyNames should be free of duplicates
BUG=41243
Review URL: http://codereview.chromium.org/2825026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4958 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-28 08:31:31 +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
mikhail.naganov@gmail.com
e2dc1e3870 fixed
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 10:05:57 +00:00
mikhail.naganov@gmail.com
52a257499a Make SampleRateCalculator test resilient to float precision issues.
Tested with kSamplingIntervalMs values 2 and 4.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 08:57:24 +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
mikhail.naganov@gmail.com
b6e6ab6972 Heap profiler: perform a GC round before taking a snapshot
to get rid of global object loaded from a snapshot. This
eliminates the "double global object" issue. Thanks to Mads
for suggesting this!

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-22 14:58:08 +00:00
erik.corry@gmail.com
53340b2624 Add movw and movt support for ARMv7. This includes some code from
Zhang Kun.  For now we only emit movw and movt in places where no
relocation is needed.  Small performance boost (around 0.5%).
Also adds support for turning ALU operations (eor etc.) with
large immediates into mvn or movw followed by a register-based
ALU operation.
Review URL: http://codereview.chromium.org/2821014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-22 08:38:32 +00:00
sgjesse@chromium.org
685cae6021 API: Resolve linker issues with using V8 as a DLL
This changes the way the constants kJSObjectType, kFirstNonstringType and kProxyType are made available to the inlined part of the V8 API. This change to fixed constants resolves linker this linker error Windows

error LNK2001: unresolved external symbol "public: static int v8::internal::Internals::kJSObjectType" (?kJSObjectType@Internals@internal@v8@@2HA)

when linking against a V8 DLL.

This change also makes it possible to build all the C++ tests with ENABLE_DEBUGGER_SUPPORT not defined. Now C++ tests run ENABLE_DEBUGGER_SUPPORT not defined, and only the JavaScript tests which tests the debugger fails when ENABLE_DEBUGGER_SUPPORT is not defined.
Review URL: http://codereview.chromium.org/2820016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-18 10:52:59 +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
mikhail.naganov@gmail.com
93387f272e Heap profiler: add a missing link between a function closure and shared function info.
Review URL: http://codereview.chromium.org/2846012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-17 12:56:55 +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
ager@chromium.org
2043956c54 Remove the comisd instruction from the ia32 and x64 assemblers. We
should always use ucomisd.

Add missing pop from floating-point stack in case of allocation failure.
Review URL: http://codereview.chromium.org/2831009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4878 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 12:32:34 +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
antonm@chromium.org
52975ae407 Remove old named property query API.
Review URL: http://codereview.chromium.org/2742007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 17:01:02 +00:00
mikhail.naganov@gmail.com
a4cc374d37 Fix HeapSnapshot test in the case when snapshotting is enabled.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 12:28:25 +00:00
mikhail.naganov@gmail.com
f213b096bc Heap profiler: publish API and add test.
Review URL: http://codereview.chromium.org/2822009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 11:44:07 +00:00
ager@chromium.org
31cb9f7090 Add external references used for regexp execution to the serializer.
Review URL: http://codereview.chromium.org/2838001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 21:03:59 +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
d3fc2db9f6 Fix Mac build of r4860
Build error:
test/cctest/test-api.cc: In function 'void ExternalArrayInfoTestHelper(v8::ExternalArrayType)':
test/cctest/test-api.cc:10069: warning: control may reach end of non-void function 'int ExternalArrayElementSize(v8::ExternalArrayType)' being inlined

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2826002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 13:19:16 +00:00
sgjesse@chromium.org
76e24831a6 API: Added functions to retreive information on indexed properties managed by the embedding layer
BUG=737
TEST=test-api/PixelArrayInfo, test-api/ExternalArrayInfo
Review URL: http://codereview.chromium.org/2818003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 13:09:27 +00:00
erik.corry@gmail.com
142de62819 ARM: Be more smart about switching instructions when immediates
don't fit in the instruction.  Use ubfx and sbfx more.
Review URL: http://codereview.chromium.org/2826001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 11:20:36 +00:00
ricow@chromium.org
407aaa9823 Only perform code flusing test if we actually do code flushing.
Puts a check into the code flushing test to only perform this if the
flush_code flag is set to true. 


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-11 08:52:36 +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
whesse@chromium.org
b93382d9ff Add test_b(Operand, imm8) to ia32 disassembler.
Review URL: http://codereview.chromium.org/2765001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:44:24 +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
mikhail.naganov@gmail.com
a217c50ab2 Move token-related constants from CodeEntry to TokenEnumerator.
Review URL: http://codereview.chromium.org/2745002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 11:27:00 +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
sgjesse@chromium.org
c7ab2b6aa3 Remove the SetExternalStringDiposeCallback API
Changed the disposal of external string resources to call a virtual Dispose method on the resource. The default inplementation of Dispose deletes the object and will capture the delete operator matching the new operator used to allocate the object.
Review URL: http://codereview.chromium.org/2658008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 09:35:47 +00:00
ager@chromium.org
6dc72b690c Add an overloaded PreCompile method that takes a Handle<String>.
Code review URL: http://codereview.chromium.org/2633004/show


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 06:20:49 +00:00
ricow@chromium.org
316092c364 Flushing of code from functions that we expect not to use again.
This adds an additional step to full gc, removing code from functions
that are no longer in the compilation cache. The code is replaced with
a lazy compile version enabling us to recompile the function in case
we do actually need it again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 15:39:10 +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
sgjesse@chromium.org
09acdc8446 Add an API to control the disposal of external string resources
A new callback have been added which - if set - will be called to dispose of external string resources passed from the embedder to the V8 engine.
Review URL: http://codereview.chromium.org/2645004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:49:07 +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
antonm@chromium.org
12f6306420 First phase of migration to new named property query callbacks.
Eventually named property query callbacks will return attributes
(as an integer) or an empty handle if property is not intercepted.

To gradually migrate to this new API, USE_NEW_QUERY_CALLBACK
macro would control if old or new style API is used.

So the migration plan is:

1) introduce new API which should be explictily enabled;
2) switch to new API defining USE_NEW_QUERY_CALLBACK before
  include of <v8.h> (that would require changes to client code as well)
3) remove old API from v8
4) remove #define USE_NEW_QUERY_CALLBACK from clients.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:49:44 +00:00
lrn@chromium.org
d3d295efa7 Add optimized version of memcpy on ia32.
Only used in one place right now.
Still room for tweaking.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:30:55 +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
lrn@chromium.org
c3b4097f28 Fix bug in test case that made it fail to compile in non-debug mode.
Using ASSERT_EQ instead of CHECK_EQ means that a variable becomes unused.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 11:05:06 +00:00
lrn@chromium.org
5b7e77acea Fix bug that could cause a string to be incorrectly tagged as an array index.
We should only mark a string as an array index if we can store the entire value
of the number in the hash field. We sometimes failed to reject larger numbers.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 09:31:01 +00:00
mikhail.naganov@gmail.com
cdc09c5073 CPU profiler: sample call stack on profiling start.
This simplifies writing tests a lot, because it is now possible
to guarantee that certain function will present in a profile by
starting profiler from inside it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:52:49 +00:00
mikhail.naganov@gmail.com
f939ccbc26 Unreviewed. Revert r4766, r4767.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:42:48 +00:00
mikhail.naganov@gmail.com
d32c918fb4 started adding test
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:35:44 +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
antonm@chromium.org
ebba43f37a Make intercepted properties retrievable only by getter to be not enumerable.
Currently if there is no query callback, V8 finds out intercepted properties'
attributes using getter: if getter returns not empty handle V8 treats
such a property as property with NONE attribues which means this property
is enumerable.

However, if there is no enumerator, this property cannot be enumerated.
Thus I think we should treat such properties as not enumerable.

Drawback of this approach is now one has to implement both query and enumerator
callbacks to implement enumerable intercepted properties.

BUG=725

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-28 11:54:58 +00:00
erik.corry@gmail.com
67c0ec6f17 Update and improve support for ARMv7 bitfield instructions.
This is a commit of http://codereview.chromium.org/2124022
for Rodolph Perfetta.  I changed the test in
test-assembler-arm.cc so it only runs if ARMv7 is supported.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 13:46:18 +00:00
vegorov@chromium.org
fc7c5f789a Cardmarking writebarrier.
Reapply r4715 with fixes reviewed in http://codereview.chromium.org/2276002.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 12:30:45 +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
antonm@chromium.org
3e88d0d2af Various refactorings in interceptor calling and loading.
1) do not push receiver early---that simplifies tail call preparation
on ia32/x64 and renders special cleanup unnecessary;
2) do not do second map check if interceptor's and cached holder
are the same;
3) do not push/pop receiver if receiver and holder registers are the same
(means that receiver is interceptor's holder);
4) do batch pushes on arm;
5) minor cosmetic improvements.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 14:04:37 +00:00
lrn@chromium.org
4afc3d3c4f X64: Make smi memory operations work directly on the embedded value.
Adds Operand-relative Operand constructor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 10:02:07 +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
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