Commit Graph

2309 Commits

Author SHA1 Message Date
kmillikin@chromium.org
f37f6e88ca Fix a bug in scope analysis.
Function declarations inside catch are hoisted to the nearest enclosing
function scope, but we compiled their bodies as if occurring inside the
catch scope.

BUG=chrome:91120
TEST=regress/regress-91120 attached

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 15:04:31 +00:00
danno@chromium.org
b333719607 Properly handle FixedDoubleArrays in sort()
R=jkummerow@chromium.org
BUG=91008
TEST=regress-91008.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 14:05:11 +00:00
vegorov@chromium.org
9226cfe5b7 Ensure that GenerateStoreFastDoubleElement returns stored value on all paths.
BUG=chromium:91013
TEST=test/mjsunit/regress/regress-91013.js
Review URL: http://codereview.chromium.org/7551009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 13:36:38 +00:00
vegorov@chromium.org
a547d333f0 Check for phi-uses of arguments object before eliminating dead phi's.
HGraphBuilder::TryArgumentsAccess does not emit any uses for receiver and will generate incorrect code when receiver for a property access is defined by a phi that returns either arguments object or something else.
 
BUG=v8:1582
TEST=test/mjsunit/regress/regress-1582.js
Review URL: http://codereview.chromium.org/7553006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 09:32:28 +00:00
danno@chromium.org
008f834117 Properly handle FastDoubleArrays in Runtime_MoveArrayContents
BUG=91013
TEST=regress91013.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-02 09:28:55 +00:00
jkummerow@chromium.org
15c979eeaa Make window.{undefined,NaN,Infinity} read-only
as per ES5.

BUG=89490
TEST=es5conform 15.1.*, 15.2.3.*; mjsunit/undeletable-functions

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 12:18:03 +00:00
mstarzinger@chromium.org
eef3e8739e Reintroduced dictionary that can use objects as keys.
R=vitalyr@chromium.org
TEST=cctest/test-dictionary

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 17:21:22 +00:00
keuchel@chromium.org
dfb195550f Fix calculation of 'scope_calls_eval' when 'eval' is within a nested catch.
BUG=
TEST=mjsunit/scope-calls-eval.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-28 12:17:36 +00:00
ricow@chromium.org
950feb6940 Switch from sample shell to d8 for unit test
Landing for yangguo to coordinate with buildbot update.

Original codereview: http://codereview.chromium.org/7282008/
Review URL: http://codereview.chromium.org/7495033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-26 05:56:45 +00:00
jkummerow@chromium.org
0aab25fabf Fix: FunctionTemplate::SetPrototypeAttributes broke prototype object
BUG=v8:1539
TEST=cctest test-api/SetPrototypeAttributes

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-25 15:01:45 +00:00
mikhail.naganov@gmail.com
6894716121 v8: Move DeleteEmpty test to test-list.cc
BUG=None
TEST=None

Signed-off-by: Thiago Farina <tfarina@chromium.org>

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-24 17:59:59 +00:00
danno@chromium.org
1f9801bb9e Fix bug in ARM pixel array clamping
Properly handle undefined conversion to zero in Crankshaft.

R=yangguo@chromium.org
BUG=none
TEST=regress-1563.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 16:01:53 +00:00
danno@chromium.org
3e7d642d0a Remaining changes to fully support FastDoubleArray.
R=ager@chromium.org
BUG=none
TEST=cctests, unboxed-double-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 09:04:16 +00:00
svenpanne@chromium.org
8d47a6f625 Fixed an off-by-one error in SplitConstantsInFullCompiler test.
The test tried to disassemble the last entry in a constant pool, which only
worked by accident until address randomization was introduced.
Review URL: http://codereview.chromium.org/7489005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-22 09:03:55 +00:00
rossberg@chromium.org
3f5bc11c55 Implement Object.prototype.{hasOwnProperty, propertyIsEnumerable} for proxies.
Refactor trap invocation.
Test other Object.prototype functionality for proxies.

R=ager@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 11:20:27 +00:00
danno@chromium.org
92fc85b480 Implement support for getters/setter on FixedDoubleArrays.
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 13:41:50 +00:00
danno@chromium.org
8bc3254e4b Implement for..in for FastDoubleArrays
Also add tests for apply on FastDoubleArrays.

R=ager@chromium.org
BUG=none
TEST=unboxed-double-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 10:54:58 +00:00
jkummerow@chromium.org
9de5255b60 Revert "Make window.undefined, window.NaN, window.Infinitiy read-only (ES5 section 15.1.1)"
This reverts r8691.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 10:51:11 +00:00
jkummerow@chromium.org
6768c5e24e Make window.undefined, window.NaN, window.Infinitiy read-only (ES5 section 15.1.1)
BUG=89490
TEST=manual: "Infinity = 42;" doesn't change the value of "Infinity"

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 10:06:53 +00:00
danno@chromium.org
a85a493f70 Reland 8636: Implement setting the length property for FixedDoubleArrays.
R=ager@chromium.org
BUG=none
TEST=unboxed-double-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 09:11:38 +00:00
danno@chromium.org
a1e851e916 Rollback 8683: Implement setting the length property for FixedDoubleArrays
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 16:34:17 +00:00
danno@chromium.org
837d83ebf3 Implement setting the length property for FixedDoubleArrays.
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 16:06:17 +00:00
danno@chromium.org
11c7b47430 Crankshaft support for FixedDoubleArrays
BUG=none
TEST=unboxed-double-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 13:04:00 +00:00
rossberg@chromium.org
f7ff89ea02 Implement `in' for proxies.
R=ager@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 09:38:59 +00:00
ager@chromium.org
85f5afb717 Correctly mark functions from our natives files during compilation.
When creating a CompilationInfo we always have the script and can
determine if it is a natives script.

Now that all natives functions are recognized as such, many of them
are called with undefined as the receiver. We have to use different
filtering for builtins functions when printing stack traces.

Also, fixed one call of CALL_NON_FUNCTION to be correctly marked as a
method call (with fixed receiver). Now that CALL_NON_FUNCTION is
marked as a native function this caused the receiver to be undefined.

R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-19 08:19:31 +00:00
ager@chromium.org
645bb1b1ba Add GetPropertyAttribute method for Object in the API
Patch by Peter Varga.

BUG=none
TEST=cctest/test-api/PropertyAttributes

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 17:44:57 +00:00
jkummerow@chromium.org
7ac9dfcc81 Revert "Make GYP build usable for day-to-day work"
This reverts r8674 due to failures on the buildbots.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 16:39:41 +00:00
ager@chromium.org
6098abf46e Fix the debugger for strict-mode functions.
undefined is passed unchanged as the receiver for strict-mode
functions through call and apply. Also, if a strict-mode function is
called without an explicit receiver, undefined is passed as the
receiver (not the global object as for other functions).

R=vegorov@chromium.org
BUG=89236
TEST=mjsunit/debug-scopes.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 14:29:50 +00:00
jkummerow@chromium.org
93c5c5fa23 Make GYP build usable for day-to-day work
- Introduce a global Makefile that triggers GYP-based building
- Some fixes to .gyp[i] files to make everything work
- tools/test-wrapper-gypbuild.py as a temporary solution for easy testing

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 14:19:48 +00:00
rossberg@chromium.org
5e62e325ac Implement sealing, freezing, and related functions for proxies.
R=ager@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 13:04:52 +00:00
vitalyr@chromium.org
3d323c691b Avoid TLS load in AstNode constructor.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 16:57:35 +00:00
mstarzinger@chromium.org
2a225a3717 Fixed bug in array filter and reduce functions.
R=danno@chromium.org
BUG=v8:1559
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 11:07:18 +00:00
rossberg@chromium.org
75a2c49c1d Implement delete trap for proxies.
R=ager@chromium.org
BUG=1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 09:10:20 +00:00
jkummerow@chromium.org
8e70bc14cc Fix gyp build
by replicating changes to SConscript from r8654 to cctest.gyp

TEST=cctest compiles with gyp/make.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-15 08:09:20 +00:00
jkummerow@chromium.org
d4779286b6 Add map check for COW elements to crankshaft array handling code.
BUG=1560
TEST=mjsunit/regress/regress-1560.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 14:45:20 +00:00
mikhail.naganov@gmail.com
e1e2b369eb Convert *.js files of cctest/test-log into "resources".
This allows running cctest from anywhere.

I was to rename single-letter variables in my script due to an encountered issue
in JSMin (http://code.google.com/p/v8/issues/detail?id=1557).

R=svenpanne@chromium.org,sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:38:18 +00:00
vegorov@chromium.org
615add8463 Expose APIs for detecting boxed primitives, native errors and Math.
While implementing structured clone I found that I need support
for detecting and creating objects using the builtin Number, String
and Boolean constructors; this CL adds this support. I also need
to be able to detect entities of "native object type (e.g., Error)",
hence the new IsNativeError() calls.

(ref: http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#safe-passing-of-structured-data)

Patch by Luke Zarko.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 11:00:04 +00:00
danno@chromium.org
391ef3be33 Implement ICs for FastDoubleArray loads and stores
Implemented on ia32, x64, ARM. Stubbed out with UNIMPLEMENTED on MIPS.

BUG=none
TEST=unbox-double-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 13:50:27 +00:00
sgjesse@chromium.org
be1eee7063 Support scope information and evaluation in optimized frames
R=svenpanne@chromium.org

BUG=v8:1140
TEST=test/mjsunit/debug-evaluate-locals-optimized.js,test/mjsunit/debug-evaluate-locals-optimized-double.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 12:49:27 +00:00
rossberg@chromium.org
ddb782dcb8 Implement Object.getOwnPropertyDescriptor for proxies.
Fix bug in compilation of calls with proxy receivers.

R=kmillikin@chromium.org,ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:57:15 +00:00
mikhail.naganov@gmail.com
5c57d0d643 Remove support for logging into a memory buffer.
The only usage of it was in logging tests, I've switched them for
using a file.

I've left out support for "--logfile=*" for now, as Chromium uses it.
Will be removed after the next V8 roll.

R=sgjesse@chromium.org
BUG=859
TEST=mjsunit/log-*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:31:22 +00:00
whesse@chromium.org
b2e8d72bf5 Revert r8619 because of Webkit failures.
Review URL: http://codereview.chromium.org/7351014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:13:40 +00:00
rossberg@chromium.org
6e2da733da Implement Object.keys for proxies.
R=kmillikin@chromium.org,ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 11:01:17 +00:00
mikhail.naganov@gmail.com
e4f7860a68 Clean up conditionals in tests after r8622.
R=sgjesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 10:08:52 +00:00
sgjesse@chromium.org
8a6108de95 Remove the ability to compile without logging and profiling
The preprocessor defines ENABLE_LOGGING_AND_PROFILING and ENABLE_VMSTATE_TRACKING has been removed as these where required to be turned on for Crankshaft to work. To re-enable reducing the binary size by leaving out heap and CPU profiler a new set of defines needs to be created.

R=ager@chromium.org

BUG=v8:1271
TEST=all

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-13 09:09:04 +00:00
yangguo@chromium.org
c0044bb7e2 Added dictionary that can use objects as keys.
R=vegorov@chromium.org
TEST=cctest/test-dictionary

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-12 15:13:57 +00:00
sgjesse@chromium.org
54e81c351f Add source position recording for variable loads
This provides more precise source to generated code mapping as variable loads can be handled using IC calls.

R=kmillikin@chromium.org

BUG=v8:1527
TEST=test/message/regress/regress-1527

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 15:20:17 +00:00
kmillikin@chromium.org
890bc1607a Fix a potential crash in const declaration.
Declaration of const lookup slots would trigger an assertion if there was a
setter somewhere in the prototype chain, and that setter was shadowed by a
non-readonly data property also in the prototype chain.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 14:07:12 +00:00
sgjesse@chromium.org
2fe5a976c9 Lower the number of threads for some threading tests when testing on ARM to avoid timeouts
R=ricow@chromium.org

BUG=none
TEST=cctest/test-lockers/LockerUnlocker,cctest/test-lockers/LockTwiceAndUnlock,cctest/test-lockers/SeparateIsolatesLocksNonexclusive

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 12:17:10 +00:00
ricow@chromium.org
1df86537f2 Remove passing tests from test262 status file
Review URL: http://codereview.chromium.org/7326038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 12:00:28 +00:00
svenpanne@chromium.org
c71cf782e8 Drastically reduce the transitive dependencies of jsregexp.h, making it (almost)
architecture-independent.

jsregexp.h is itself included transitively quite a lot, and by getting rid of 19
of its dependencies (which even included things like src/cpu.h, the various
assemblers, etc.), the recompilation behaviour is a bit less funny than it was.
Review URL: http://codereview.chromium.org/7331014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 09:12:17 +00:00
kmillikin@chromium.org
cbaf1bc98b Allow JSObject::PreventExtensions to work for arguments objects.
R=karlklose@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 06:48:19 +00:00
ricow@chromium.org
a15d865210 Updated status file for test262 to latest revision.
Landing for mstarzinger, orginal cl at:
http://codereview.chromium.org/7329016/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-09 07:29:32 +00:00
danno@chromium.org
f894b7a3b3 Fix polymorphic array test
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 10:59:20 +00:00
danno@chromium.org
07def3cb1e Unify handling of element IC stubs.
In the process, add shared stubs for DictionaryValue lookups that are handled in the same way as fast elements and external array elements.

Includes code for MIPS, which compiles and run polymorph-arrays.js successfully.

R=jkummerow@chromium.org
BUG=none
TEST=test/mjsunit/polymorph-arrays.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 10:46:10 +00:00
sgjesse@chromium.org
7cbf0a4d48 Add inspection of whether frame is a construct frame to optimized frames
Also avoid that calling Debug::IsBreakAtReturn causes a full doptimization when there are no break points set. The full deoptimization is caused by Debug::IsBreakAtReturn calling Debug::EnsureDebugInfo which will assume that a break point is now set.

R=svenpanne@chromium.org

BUG=v8:1140
TEST=test/mjsunit/debug-evaluate-locals-optimized.js,test/mjsunit/debug-
evaluate-locals-optimized-doubles.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 08:55:26 +00:00
kmillikin@chromium.org
fe23339bdd Fix a bug in for/in iteration of arguments objects.
We did not properly combine the property names from the parameter map
and the arguments backing store.  They could overwrite each other and
be unsorted.

Also fix an unrelated bug: deleting from a dictionary-mode arguments
backing store could corrupt the parameter map.

R=rossberg@chromium.org
BUG=1531
TEST=mjsunit/regress/regress-1531.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-08 07:31:48 +00:00
sgjesse@chromium.org
8ccb47f57e Add inspection of arguments for optimized frames
R=svenpanne@chromium.org

BUG=v8:1140
TEST=test/mjsunit/debug-evaluate-locals-optimized.js,test/mjsunit/debug-
evaluate-locals-optimized-doubles.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 14:29:16 +00:00
rossberg@chromium.org
58b913f9f0 Implement Object.defineProperty for proxies.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 12:41:20 +00:00
ricow@chromium.org
82e53270dc Ensure that regexps always have code object, even if GC happened while running multiple times in runtime.
Review URL: http://codereview.chromium.org/7316018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-07 10:04:56 +00:00
sgjesse@chromium.org
53a5b07992 Add inspection of function for optimized frames
R=svenpanne@chromium.org

BUG=none
TEST=test/mjsunit/debug-evaluate-locals-optimized.js,test/mjsunit/debug-evaluate-locals-optimized-doubles.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 13:02:17 +00:00
vegorov@chromium.org
29801d4e9b Correctly propagate toolchain setting in SConstruct.
Patch by Bert Belder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 12:36:05 +00:00
sgjesse@chromium.org
ca3787f395 Fix debug break on binary boolean operators
The syntax checker finding breakable statements did not take into account that the right hand side of a boolean binary opration might never get evaluated.

R=svenpanne@chromium.org

BUG=v8:1523
TEST=test/mjsunit/regress/regress-1523.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 10:16:57 +00:00
lrn@chromium.org
57b7a67dba Revert preparser duplicate detection.
Doesn't work on Windows yet.
Crashes some layout-tests.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 09:15:10 +00:00
lrn@chromium.org
57760b8275 Make preparser detect duplicate parameters and object literal properties.
This is a fix and reapply of r8516 with some comments addressed and more
tests added.
The difference from r8516 is that canonicalization of number literals is
no performed using the same methods as in v8, to avoid false positives/negatives
when detecting duplicates.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 08:32:48 +00:00
ricow@chromium.org
1fff78036e In preperation of using d8 for running tests: Don't run d8-os when running with --isolates.
When used with d8 this can potentially interfer with the writing,
reading and deletion of files is the isolates flags makes the same
test run concurrently.
Review URL: http://codereview.chromium.org/7308006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 08:20:30 +00:00
sgjesse@chromium.org
10bb16f495 Add support for lazy deoptimization from deferred stack checks
The debugger can be entered from the deferred stack check in optimized code. This can cause both lazy deoptimization and debugger deoptimization (setting the first break point and inspecting the stack for optimized code respectively). This required deoptimization support from the deferred stack check.

The lazy deoptimiztion call is inserted when the deferred code is done including restoring the registers. The bailout to the full code is the begining of the loop body as that is where the stack check is sitting in the optimized code. The bailout is not to the stack check in the full code as that is sitting at the end of the loop.

R=kmillikin@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 13:21:29 +00:00
vitalyr@chromium.org
8f60208324 Fix bug 1529: check for NULL handle in v8::TryCatch::StackTrace.
Internal HandleScope::CloseAndEscape crashes on NULL handles.

R=kmillikin@chromium.org
BUG=v8:1529
TEST=mjsunit/regress/regress-1529

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 13:29:56 +00:00
kmillikin@chromium.org
57c29c1f29 Fix a bug in with and catch context allocation.
We were only looking one level up the scope chain to decide which
closure to use in the fresh context.  Instead, we should look to the
first non-catch scope.

R=vegorov@chromium.org
BUG=1528
TEST=regress-1528

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 09:34:47 +00:00
sgjesse@chromium.org
9cc5b94c2e Correctly handle the constant pool in constant pool splitting test
The constant pool was not taken into account in the test test-compiler/SplitConstantsInFullCompiler which caused random failures.

This also reverts the test code added in r8469 and r8471.

R=ricow@chromium.org

BUG=none
TEST=test-compiler/SplitConstantsInFullCompiler

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-04 08:57:43 +00:00
lrn@chromium.org
4f1e60cc75 Revert r8516.
Revision 8516 contained a temporary hack that doesn't work on Windows.

TBR: ricow

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 15:44:21 +00:00
kmillikin@chromium.org
a48c03bb2a Fix an issue with optimization of functions inside catch.
When optimizing a function defined inside a catch, we did not count
the catch context as part of the context chain.

R=vegorov@chromium.org
BUG=1521
TEST=regress-1521

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 14:05:46 +00:00
lrn@chromium.org
b6779044c9 Add duplicate parameter detection to preparser.
Add tests for duplicate properties of object initialisers to preparser.

TEST=preparser

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 13:46:52 +00:00
vitalyr@chromium.org
fe7bdf1fe8 Remove unmarked entries from per context map caches.
Made "map_cache" a weak field of global context and added a pass over
all caches late in the marking phase.

R=vegorov@chromium.org
BUG=v8:1516
TEST=cctest/test-api/Regress1516

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 12:47:18 +00:00
yangguo@chromium.org
77a3c7226b exposing a few boolean queries from objects.h
TEST=start with ./d8 --allow-natives-syntax and try %ObjectHasFastElements({})

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 11:47:55 +00:00
lrn@chromium.org
ff9ce1abd4 Make date parser handle all ES5 Date Time Strings correctly.
This means that ES5 Date Time Strings will default to UTC if timezone is absent.
Handle as many legacy strings as possible the same way as before

BUG=v8:1498
TEST=mjsunit/date

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 11:41:45 +00:00
jkummerow@chromium.org
f2a9026d9a Fix flakiness of optimization assertion on slow ARM builders
(if the test ran too slow, optimization kicked in earlier than expected by the test)

TEST=mjsunit/assert-opt-and-deopt.js no longer flaky

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 11:12:27 +00:00
mikhail.naganov@gmail.com
33177880c8 Remove "modules" and "tags" of the logging CPU profiler.
Modules now makes a little sense, as there is only one module.
Tags was a simplistic attempt of supporting nested profiles.

R=sgjesse@chromium.org
BUG=859

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 09:35:16 +00:00
karlklose@chromium.org
c0e2268c8c Fix problem with arguments object ICs not checking for dictionary mode elements.
R=kmillikin@chromium.org
BUG=1514
TEST=mjsunit/regress/regress-1513.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 14:56:06 +00:00
kmillikin@chromium.org
f4c4df2d9a Introduce scopes to keep track of catch blocks at compile time.
The catch variable is bound in the catch scope.  For simplicity in this
initial implementation, it is always allocated even if unused and always
allocated to a catch context even if it doesn't escape.  The presence of
catch is no longer treated as a with.

In this change, care must be taken to distinguish between the scope where a
var declaration is hoisted to and the scope where the initialization occurs.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 14:37:55 +00:00
ager@chromium.org
8a3d8b41e8 Exclude %_IsNativeOrStrictMode from natives fuzzer.
R=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 13:36:52 +00:00
ager@chromium.org
0d8c343c90 Do not pass the global object as the receiver to strict-mode and
builtin replace and sort functions.

R=ricow@chromium.org
BUG=v8:1360
TEST=mjsunit/regress/regress-1360.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 12:29:19 +00:00
kmillikin@chromium.org
6543526a9d Remove failing test while working on a fix.
TBR=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 12:07:33 +00:00
kmillikin@chromium.org
3f84fcf6c9 Fix a bug in Object.defineProperty.
There was a bug in Object.defineProperty when used to add an indexed
property to an arguments object.  When converting the elements backing
store to dictionary mode, the parameter map in front of the backing
store does not change.

R=ager@chromium.org,karlklose@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 11:11:19 +00:00
ager@chromium.org
90a01f626d Update test expectations for sputnik to match new revision.
We should coordinate landing this with an update of the tests on the
buildbots.

R=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 06:10:12 +00:00
jkummerow@chromium.org
d2f08851f0 Fix build on x64
Review URL: http://codereview.chromium.org/7284011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 14:28:41 +00:00
sgjesse@chromium.org
c4f28bf274 Temporarily add more test output to help locate test failure
R=ricow@chromium.org

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 13:40:23 +00:00
sgjesse@chromium.org
7d2be7c0e0 Support debugger inspection of locals in optimized frames
Optimized frames are now handled by the debugger. When discovering optimized frames during stack inspection in the debugger they are "deoptimized" using the normal deoptimization code and the deoptimizer output information is used to provide frame information to the debugger.

Before this change the debugger reported each optimized frame as one frame no matter the number of inlined functuions that might have been called inside of it. Also all locals where reported as undefined. Locals can still be reposted as undefined when their value is not "known" by the optimized frame.

As the structures used to calculate the output frames when deoptimizing are not GC safe the information for the debugger is copied to another structure (DeoptimizedFrameInfo) which is registered with the global deoptimizer data and processed during GC.

R=fschneider@chromium.org

BUG=v8:1140
TEST=test/mjsunit/debug-evaluate-locals-optimized*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 13:02:00 +00:00
sgjesse@chromium.org
39ed137e10 ARM: Improve register allocation and constraints (try 2).
Gives ~20% boost for Crypto benchmark on A9.

BUG=none
TEST=added to mjsunit/div-mod.js

Review URL: http://codereview.chromium.org//7276034
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 10:51:06 +00:00
erik.corry@gmail.com
f8fdc62c19 Improvement to SmiLexicalCompare. Landing http://codereview.chromium.org/7261008 for Stephen Adams
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 08:35:10 +00:00
keuchel@chromium.org
3f70c456eb Fix "illegal access" when calling parseInt with a radix that is not a smi.
BUG=v8:1246
TEST=regress-1246.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-28 12:31:42 +00:00
ager@chromium.org
89cc886ba7 Fix receiver check in arguments ICs.
The receiver needs to be checked in the same way as all other KeyedLoadICs to take non-JSObject and objects that require access checks or has interceptors into account.

R=sgjesse@chromium.org
BUG=87478
TEST=mjsunit/regress/regress-crbug-87478.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-27 13:02:51 +00:00
keuchel@chromium.org
5d8443c4cb Updated test expectations of future reserved keyword tests.
Review URL: http://codereview.chromium.org/7237027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 16:54:47 +00:00
keuchel@chromium.org
ab3d4cf7b8 Proper handling of future reserved words in strict and normal mode.
BUG=86442
TEST=mjsunit/keywords-and-reserved_words.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 14:59:51 +00:00
keuchel@chromium.org
628a2e2a1f Better codegen for '<expression> === void <literal>'.
Detect the pattern in both, the full compiler and crankshaft and generate direct pointer
comparisons. Along the way I cleaned up 'typeof <expression> == <string literal>' comparisons
as well by lifting platform independent code and checking the symmetric case.

BUG=v8:1440
TEST=cctest/test-api.cc

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 14:30:10 +00:00
mikhail.naganov@gmail.com
f4bf8f8fee Remove obsolete aggregating and non-working producers heap profilers.
2000 LOC are gone!

R=sgjesse@chromium.org
BUG=1481

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 11:38:47 +00:00
ricow@chromium.org
840e31a0b3 Add regression test for optimized version of Math.abs.
This issue was already fixed on bleeding edge, but adding regression
test to get coverage and to make sure it works on the branches.
Review URL: http://codereview.chromium.org/7237022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 07:46:57 +00:00
fschneider@chromium.org
4bc671c2b0 Add missing write barrier for arguments store ICs.
Review URL: http://codereview.chromium.org/7207006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-23 09:20:07 +00:00
lrn@chromium.org
1eb34e542c Make extensions in different tests have different names.
In the threaded test, they influenced each other.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-23 08:28:23 +00:00
mikhail.naganov@gmail.com
0a12f5dcf8 Fix issue 1354: Bad function name inference.
R=kmillikin@chromium.org, vitalyr@chromium.org
BUG=1354
TEST=test-func-name-inference

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-22 20:23:48 +00:00
jkummerow@chromium.org
1e1387f12c Add possibility to configure 'prototype' property via FunctionTemplate
BUG=v8:1479
TEST=test-api/SetPrototypeProperties

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-22 12:39:45 +00:00
lrn@chromium.org
e378829b24 Combined identical classes V8JavaScriptScanner and StandAloneJavaScriptScanner.
Now only uses the common superclass of the two scanner classes.
Updated comment on KeywordMatcher.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-22 09:06:03 +00:00
lrn@chromium.org
12c3e7799c Make multi-line comments not count when checking whether --> is first on a line.
A multi-line comment containing a newline is considered a line-terminator for
other purposes, but a "-->" following such a comment is considered as being
on the same line as the text preceeding the multi-line comment.
This behavior matches JSC matching Firefox.

TEST=cctest/test-parsing/ScanHTMLEndComments

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-21 13:34:16 +00:00
karlklose@chromium.org
c5a24f64c4 Fix wrong bounds check on arguments object.
TEST=added to test/mjsunit/arguments.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-21 09:27:38 +00:00
ager@chromium.org
a96b9156a3 Correctly handle non-array receivers in Array length setter.
BUG=v8:1491
TEST=mjsunit/regress/regress-1491.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-21 08:07:45 +00:00
mikhail.naganov@gmail.com
bf9b2f8c2c Heap profiler: add an ability to iterate over snapshot's nodes.
This is a preparation for removing aggregated heap snapshots.
W/o this API, counting object instances in a snapshot is very hard.

R=sgjesse@chromium.org
BUG=1481
TEST=cctest/test-heap-profiler/NodesIteration

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-21 08:02:34 +00:00
lrn@chromium.org
8c538d9012 Made parser not accept unicode escapes inside "native" when used as a keyword.
This is a regression relative to the original behavior, when "native" was a keyword,
since keywords cannot contain esacpes.

Added tests for escapes and for not allowing line-terminators betwen "native" and "function".

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-20 11:52:24 +00:00
lrn@chromium.org
480ec43c4e Make "native" not a keyword.
We now only recognize "native function" when it occurs in extension scripts
(parsing with a non-NULL extension), and only if there is no line-terminator
between "native" and "function" (so that it would otherwise be a Syntax Error).
Preparsing never recognizes native functions, which is acceptable since we
never preparse extension scripts (because we don't allow lazy functions
anyway).

BUG=v8:1097

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-20 10:20:57 +00:00
kasperl@chromium.org
5a547ac413 Generalized Stephen's patch from http://codereview.chromium.org/7044100/ and
added a few test cases.
Review URL: http://codereview.chromium.org/7212006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-20 07:40:42 +00:00
mikhail.naganov@gmail.com
973fca1689 Fix issue 1417: check for script source availability when enumerating optimized functions.
R=kasperl@chromium.org,kmillikin@chromium.org
BUG=1417
TEST=test-log/Issue23768

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 08:40:30 +00:00
lrn@chromium.org
7ba9fea8b5 Fix mozilla test-expectatations to match the new behavior of multi-line comments.
Review URL: http://codereview.chromium.org/7189030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 08:20:27 +00:00
erik.corry@gmail.com
c95ecb1fcd Refix issue 1472. The previous fix worked for the example in the bug
report, but was not general enough to catch all cases.  This is a new
approach.  Includes regression test!
Review URL: http://codereview.chromium.org/7193007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 08:01:12 +00:00
lrn@chromium.org
ee59eff127 Make line-terminators inside multi-line comments count.
Now follows the specification. Follows WebKit change in revision 89100.

BUG=86431
TEST=regress-892742

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-17 07:23:07 +00:00
karlklose@chromium.org
f4e4bc43a8 Merge arguments branch to bleeding edge (second try).
Review URL: http://codereview.chromium.org/7187007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 14:12:58 +00:00
karlklose@chromium.org
cc19d1e278 Revert "Merge arguments branch to bleeding merge."
This reverts commit ceb31498b9d69edca3260820fb4047045891ce6d.

TBR=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 06:37:49 +00:00
vegorov@chromium.org
14bf246dfa Add missing branches in code generated for LModI with power-of-2 divisor.
BUG=v8:1476
TEST=test/mjsunit/regress/regress-1476.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 19:57:39 +00:00
karlklose@chromium.org
6cfeb2d400 Merge arguments branch to bleeding merge.
Review URL: http://codereview.chromium.org/7167006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 15:09:28 +00:00
ricow@chromium.org
4032d2165e Make name and message non-enumerable on Error object (this is a partial fix for issue 1215)
Review URL: http://codereview.chromium.org/7172011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 13:54:40 +00:00
ager@chromium.org
939011bb25 Add a number of old tests to the mjsunit test suite.
R=kasperl@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 13:33:10 +00:00
ricow@chromium.org
23d0aa614b Ensure that bound functions does not have a prototype (fixes issue 794)
Review URL: http://codereview.chromium.org/7148014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 10:47:37 +00:00
ricow@chromium.org
40fa4a761b Correctly set ReadOnly flag on indexed properties when using the API Set method (fixes issue 1470)
Review URL: http://codereview.chromium.org/7149015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 06:44:57 +00:00
ricow@chromium.org
38a75cf731 Geve correct error message when Object.isExtensible is called on a non object (fixes issue 1452)
Review URL: http://codereview.chromium.org/7146010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-14 11:28:14 +00:00
mikhail.naganov@gmail.com
70c4d58b5a Skip test-debug/DebuggerAgent on ARM. Issue 945.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 13:43:48 +00:00
ager@chromium.org
b7a93d417d Add GetOwnPropertyNames method for Object in the API
Patch by Peter Varga.

BUG=none
TEST=cctest/test-api/PropertyEnumeration

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:33:55 +00:00
mikhail.naganov@gmail.com
508b22c436 "Deiceolate" Thread classes.
Thread class was receiving an isolate parameter by default.
This approact violates the assumption that only VM threads
can have an associated isolate, and can lead to troubles,
because accessing the same isolate from different threads
leads to race conditions.

This was found by investigating mysterious failures of the
CPU profiler layout test on Linux Chromium. As almost all
threads were associated with some isolate, the sampler was
trying to sample them.

As a side effect, we have also fixed the DebuggerAgent test.

Thanks to Vitaly for help in fixing isolates handling!

R=vitalyr@chromium.org
BUG=none
TEST=none

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:54:04 +00:00
ager@chromium.org
aa7ad8ee9d Fix issue 1447 by not redefining properties unneccesarily in seal and freeze.
This avoids attempting to redefine function.arguments with a different
value than the current one. function.arguments returns a new copy on
each invocation.

R=lrn@chromium.org
BUG=v8:1447
TEST=mjsunit/regress/regress-1447.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:45:02 +00:00
mikhail.naganov@gmail.com
47248cc5fe Revert accidental r8254..r8256
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:42:08 +00:00
mikhail.naganov@gmail.com
e1db94c0cb trying to fix test
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:36:35 +00:00
mikhail.naganov@gmail.com
6891dd204c tests compile but crash
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:36:18 +00:00
ager@chromium.org
8ec22db350 Correct the limit of local variables in a optimized functions.
The encoding constraint is that we have 128 values. We use [-64,0] for
parameters and [0,63] for locals. However, for locals we restricted to
64 and not 63.

R=kmillikin@chromium.org
TEST=mjsunit/compiler/regress-max-locals-for-osr.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 14:52:58 +00:00
sgjesse@chromium.org
827be16b35 GYP: Make the ARM simulator build with GYP again
Updated the armu.gypi to set values for variables which does not have a default. These variables was recently added to v8.gyp.

Moved the what will be shared between building the v8 library and the cctests to a separate include file. For now this file is currently only used by cctest.gyp. the reason is that the cctests are not just using the API but also internal functions so the C++ defines and optons needs to be the same when compiling the cctests files as when compiling the v8 library files.

R=jkummerow@chromium.org
Review URL: http://codereview.chromium.org/7134039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 12:48:11 +00:00
whesse@chromium.org
c40aa827bf Add boolean flag to HChange and LNumberUntagD to not convert undefined to NaN.
This is needed so that HCompare, optimized for double inputs, works correctly on undefined inputs.
BUG=v8:1434
TEST=mjsunit/bugs/bug-1434.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 12:27:28 +00:00
kmillikin@chromium.org
c8b9f3ab7b Update the blacklist in fuzz-natives.
Runtime functions were renamed in r8231.

R=ager@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 11:40:22 +00:00
fschneider@chromium.org
68eab4a8d8 Fix bug with GVN on array loads.
This fixes a bug where an array load was incorrectly hoisted by GVN.

BUG=85177
TEST=mjsunit/regress/regress-85177.js
Review URL: http://codereview.chromium.org/7003054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 11:15:03 +00:00
danno@chromium.org
4de3bb500c Implement core support for FixedDoubleArrays.
Under a flag without IC or Crankshaft support.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 10:03:35 +00:00
ager@chromium.org
626cdffaef Fix Array.prototype.{reduce,reduceRight} to pass undefined as receiver for strict mode callbacks.
Propagate strict mode information from pre-parser to parser for lazily compiled functions.

R=lrn@chromium.org
BUG=v8:1436
TEST=mjsunit/regress/regress-1436.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 09:05:15 +00:00
lrn@chromium.org
bd826d54f5 Fix bug in Object.defineProperty where a growing lements dictionary was ignored.
TEST=mjsunit/object-define-property

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 08:13:31 +00:00
danno@chromium.org
ad98d142cc Add failing test case for bug 1434
BUG=1434
TEST=test/mjsunit/bugs/bug-1434.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 07:45:37 +00:00
vitalyr@chromium.org
2bc305cd9a Fix bug 1433: clear the global thread table when an isolate is disposed.
R=ager@chromium.org
BUG=v8:1433
TEST=test-lockers/Regress1433

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 18:33:03 +00:00
whesse@chromium.org
1ea14c2041 Limit the number of arguments in a function call to 32766.
Limit the number of arguments in a function call to 32766.  This is identical
to the limit on the number of parameters to a function.

BUG=v8:1413
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 08:15:47 +00:00
mikhail.naganov@gmail.com
3b2470d296 Fix presubmit errors catched by a more recent version of cpplint.py.
Mainly, there were errors concerning blank lines before and after class access
control sections [whitespace/blank_line].

BEFORE an access control section (e.g. public:, private:) there should be a
blank line (except for the section right after the class declaration).

AFTER an access control section there should be no blank line.

TBR=ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 07:17:46 +00:00
fschneider@chromium.org
7c9cf0b3a1 Re-land r8140: Deoptimize on never-executed code-paths.
Original cl: http://codereview.chromium.org/7105015

I'm removing the test GlobalLoadICGC test that was introduced for testing
inlined global cell loads (in the classic backend) and has an invalid assumption
about the number of global objects referenced from a v8 context. We don't have
this feature with Crankshaft anymore.
Review URL: http://codereview.chromium.org/7112032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 14:57:25 +00:00
kmillikin@chromium.org
6a81642f31 Fix a bug in Lithium environment iteration.
The Advance() function of the class responsible for iterating
environment uses didn't always advance as far as it could (relying on
the HasNext predicate to finish advancing).  This is brittle.

The HasNext predicate also didn't advance as far as it could when it
was at the end of an environment level.  This is a bug.

R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 11:30:17 +00:00
ager@chromium.org
74db440d9f MIPS: Fixed FPU rounding checks and related errors in the Simulator.
Removed some unnecessary shifts when reading FCSR error flags.
Fixed some FCSR-related bugs.
Fixed some un-related style issues.

With this commit, mips build is still broken. Two more commits to come.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6993054
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 08:43:15 +00:00
erik.corry@gmail.com
0023cacc22 Fix traversal of the map transition tree to take the prototype
transitions into account.
Review URL: http://codereview.chromium.org/7074052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 14:48:09 +00:00
ager@chromium.org
22b5dfd395 Reapply: "Make instanceof and Object.getPrototypeOf work for proxies,
plus a few other tweaks."

The problem with the original patch was that it did not take hidden
prototype objects into account in Runtime_GetPrototype.

R=kmillikin@chromium.org,rossberg@chromium.org
TEST=es5conform

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-03 10:15:49 +00:00
ager@chromium.org
ece7700d7c Revert "Make instanceof and Object.getPrototypeOf work for proxies, plus a few other tweaks."
This change caused errors in es5conform tests for getPrototypeOf.

TBR=rossberg@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-02 10:12:00 +00:00
mikhail.naganov@gmail.com
b4c152545d Revert "Fix Issue 1320: LiveEdit: text differencer fails with out of memory on large files"
Breaks compilation on Linux.

This reverts commit e72c5b1d69fb2cb2d5973f172666dd5d477e6f7e.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 23:11:10 +00:00
rossberg@chromium.org
2255860992 Make instanceof and Object.getPrototypeOf work for proxies, plus a few other tweaks.
R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 17:44:08 +00:00
peter.rybin@gmail.com
d7b7d7f844 Fix Issue 1320: LiveEdit: text differencer fails with out of memory on large files
Review URL: http://codereview.chromium.org/7080029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 17:05:35 +00:00