Commit Graph

2278 Commits

Author SHA1 Message Date
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
fschneider@chromium.org
ff76d1ab0c Revert r8140.
It breaks test when running with nosnapshot.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/7027029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 13:34:15 +00:00
fschneider@chromium.org
0aa422923c Eagerly deoptimize on never-executed code-paths.
If type-feedback indicates that an expression was never executed in
the non-optimized code, we insert a forced deoptimization right away
to enable re-optimization if we ever hit this path.

With this change we still continue to build the graph. As a next step, we
should remove the dead code after the deoptimize.

I had to remove one assert about the optimization status in a test since
we now immediately deoptimize after exiting the loop that triggers OSR.

Also remove a restriction that control-flow from an inlined function in a
test context always reaches both true- and false-target.
Review URL: http://codereview.chromium.org/7105015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 11:04:40 +00:00
peter.rybin@gmail.com
8f2274c841 LiveEdit: Optimize compare by stripping common suffix and prefix.
Review URL: http://codereview.chromium.org/7087031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 20:58:21 +00:00
rossberg@chromium.org
670f947a5c Implement set trap for proxies, and revamp class hierarchy in preparation:
- Introduce a class JSReceiver, that is a common superclass of JSObject and
  JSProxy. Use JSReceiver where appropriate (probably lots of places that we
  still have to migrate, but we will find those later with proxy test suite).

- Move appropriate methods to JSReceiver class (SetProperty,
  GetPropertyAttribute, Get/SetPrototype, Lookup, and so on).

- Introduce new JSFunctionProxy subclass of JSProxy. Currently only a stub.

- Overhaul enum InstanceType:
  * Introduce FIRST/LAST_SPEC_OBJECT_TYPE that ranges over all types that
    represent JS objects, and use that consistently to check language types.
  * Rename FIRST/LAST_JS_OBJECT_TYPE and FIRST/LAST_FUNCTION_CLASS_TYPE
    to FIRST/LAST_[NON]CALLABLE_SPEC_OBJECT_TYPE for clarity.
  * Eliminate the overlap over JS_REGEXP_TYPE.
  * Also replace FIRST_JS_OBJECT with FIRST_JS_RECEIVER, but only use it where
    we exclusively talk about the internal representation type.
  * Insert JS_PROXY and JS_FUNCTION_PROXY in the appropriate places.

- Fix all checks concerning classification, especially for functions, to
  use the CALLABLE_SPEC_OBJECT range (that includes funciton proxies).

- Handle proxies in SetProperty (that was the easiest part :) ).

- A few simple test cases.

R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 16:38:40 +00:00
kmillikin@chromium.org
00f2ff321e Support optimization of named function literals.
Introduce a Hydrogen value for the value denoted by the function name.

R=fschneider@chromium.org,mnaganov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 11:54:46 +00:00
ager@chromium.org
544191e718 Update apply with arguments optimization for strict mode functions and builtins.
Do not convert to object for values for strict-mode functions and
builtins.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 10:38:41 +00:00
ager@chromium.org
a01b45df58 Fix a number of tests that incorrectly used assertUnreachable.
Our testing infrastructure uses exceptions to indicate
errors. assertUnreachable therefore throws an exception to indicate
that it was reached. Therefore, it cannot be used to check that an
exception was thrown using the pattern:

try {
  shouldThrow();
  assertUnreachable();
} catch(e) {
}

Such a test will always pass because assertUnreachable will throw an
exception if shouldThrow does not.

R=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 08:08:42 +00:00
ager@chromium.org
bfa2ef1f11 Fix receiver for calls to strict-mode and builtin functions that are
potentially shadowed by eval.

R=sgjesse@chromium.org
TEST=mjsunit/regress/regress-124.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 07:57:22 +00:00
mikhail.naganov@gmail.com
cd67929b0b Heap profiler: fetch document.URL of global objects.
This allows to distinguish DOMWindow objects in browser from each other.

R=vitalyr@chromium.org,sgjesse@chromium.org
BUG=https://bugs.webkit.org/show_bug.cgi?id=61177
TEST=cctest/test-heap-profiler/DocumentURL

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 14:31:47 +00:00
ager@chromium.org
017935408d Reapply change to Pass undefined to JS builtins when called with
implicit receiver.

A couple of corner cases have to be treated specially to not break
everything: eval and getter/setter definitions.

R=fschneider@chromium.org
BUG=v8:1365
TEST=mjsunit/regress/regress-1365.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 13:49:22 +00:00
ager@chromium.org
cc4a2d7e76 Fix a number of IC stubs to correctly set the call kind.
Make the call kind and call wrapper arguments explicit to force
developers to make a choice. This would have avoided the bug in the
first case.

R=fschneider@chromium.org
TEST=mjsunit/strict-mode-implicit-receiver.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 13:23:17 +00:00
fschneider@chromium.org
5083dec67f Fix timeout and a small bug in a regression test.
Review URL: http://codereview.chromium.org/7085031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 12:48:35 +00:00
fschneider@chromium.org
e0985887bf Simple support for const variables in Crankshaft.
The approach is to handle the common case in the optimizing
compiler and to bailout for the rare corner cases.

This is done by initializing all local const-variables with
the hole value and disallowing any use of the hole value statically.
Review URL: http://codereview.chromium.org/6026006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 11:31:41 +00:00
sandholm@chromium.org
ba229754ea Fix JSON issue with arrays.
Review URL: http://codereview.chromium.org/7089003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 10:47:38 +00:00
ricow@chromium.org
7eb6f5c1ba Correctly set the length of string before creating filler object in the json parser (fixes crbug 84186).
Testcase created based on the supplied test case from the bug report, but using json parse directly instead of through the chrome javascript console. 
Review URL: http://codereview.chromium.org/7084023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 06:04:36 +00:00
danno@chromium.org
c2394e0a71 Prevent deopt on double value assignment to typed arrays
Implement truncation of double and tagged values when assigning to an element of a typed arrays in order to avoid depots.

BUG=1313
TEST=test/mjsunit/external-array.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 12:07:22 +00:00
ager@chromium.org
c832c467a4 Revert "Pass undefined to JS builtins when called with implicit receiver."
Presubmit and failing test.

TBR=lrn@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 11:22:29 +00:00
kmillikin@chromium.org
f8b01f369e Add a simple test for inlining of arguments accesses.
R=whesse@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 11:17:15 +00:00
ager@chromium.org
19b718fe73 Pass undefined to JS builtins when called with implicit receiver.
A couple of corner cases have to be treated specially to not break
everything: eval and getter/setter definitions.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 11:07:48 +00:00
lrn@chromium.org
02c4e8bfcb Make RegExp objects not callable.
Review URL: http://codereview.chromium.org/6930006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 07:35:09 +00:00
erik.corry@gmail.com
fbf76fc86a Fix GC-unsafe corner case in bit-not on ARM
Review URL: http://codereview.chromium.org/6987009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 10:35:00 +00:00
ricow@chromium.org
f675db651d Change calls to undefined property setters to not throw (fixes issue 1355).
We currently throw when there is only a getter defined on the
property, but this should only be the case in strict mode.
Review URL: http://codereview.chromium.org/7064027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-25 08:37:38 +00:00
lrn@chromium.org
b97da90453 Add tests for function statements in strict mode.
Small fixes.
Added test for const declaration in strict mode.

TEST=preparser/strict-function-statement

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 14:02:59 +00:00
ager@chromium.org
6f775f2fb0 Fix calls of strict mode function with an implicit receiver.
Only IA32 version for now. I'll start porting.

Strict mode functions are to get 'undefined' as the receiver when
called with an implicit receiver. Modes are bad! It forces us to have
checks on all function calls.

This change attempts to limit the cost by passing information about
whether or not a call is with an implicit or explicit receiver in ecx
as part of the calling convention. The cost is setting ecx on all
calls and checking ecx on entry to strict mode functions.

Implicit/explicit receiver state has to be maintained by ICs. Various
stubs have to not clobber ecx or save and restore it.

CallFunction stub needs to check if the receiver is implicit when it
doesn't know from the context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 14:01:36 +00:00
sgjesse@chromium.org
eff2946b9b Handle changes to the Object prototype in fast handling of arrays
R=ager@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 12:28:10 +00:00
ricow@chromium.org
ab67432ed0 Change strict mode poison pill to be the samme type error function (fixes issue 1387).
We are now following the spec, and with regards to the error message we are following firefox (webkit still has different type errors in their nightly)
Review URL: http://codereview.chromium.org/7067017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 11:07:06 +00:00
sgjesse@chromium.org
fbd106d9cd MIPS: arch-independent changes to support mips.
This change supports all non-crankshaft features except serialization.

This must be built after the changes in http://codereview.chromium.org/6966031
are landed.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 07:56:20 +00:00
vitalyr@chromium.org
179702df03 Inline more zone stuff.
R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 22:23:50 +00:00
danno@chromium.org
780df33019 SMI checks for receiver in KeyedLoad/Store (done right this time)
R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 13:42:33 +00:00
sgjesse@chromium.org
825a433900 Add regression test for issue 1401
R=ager@chromium.org

BUG=v8:1401
TEST=test/regress/regress-1401.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 13:03:45 +00:00
lrn@chromium.org
dc69639e4c Remove newlines from preparser command line parameters to make Windows happy.
Review URL: http://codereview.chromium.org/6974009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 12:56:00 +00:00