platform/upstream/v8.git
12 years agoRemove the static qualifier from functions in header files.
kmillikin@chromium.org [Tue, 29 Nov 2011 10:56:11 +0000 (10:56 +0000)]
Remove the static qualifier from functions in header files.

This shaves 416+ KB, just under 1% off the size of the debug d8 executable
on Linux (mostly because the CheckHelper functions for assertions were
getting separate copies for each compilation unit).  The difference in
release builds is negligible---a size reduction of 0.1%.

Also, change namespace-level 'static const' variables to remove the static
storage class as it's the default.

R=danno@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoWhen scavenging update source slot before migrating object it points to.
vegorov@chromium.org [Tue, 29 Nov 2011 10:02:38 +0000 (10:02 +0000)]
When scavenging update source slot before migrating object it points to.

Source slot might belong to a dead old object and we might allocate a new object over it when evacuating a new space object this slot points to. In this case if we update slot after migrating object we will write into migrated object.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix assertion while marking Harmony weak maps.
mstarzinger@chromium.org [Tue, 29 Nov 2011 08:48:51 +0000 (08:48 +0000)]
Fix assertion while marking Harmony weak maps.

R=erik.corry@gmail.com
BUG=v8:1845
TEST=mjsunit/harmony/proxies-example-membrane

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReapply "Fix the ScopeIterator reimplementation".
keuchel@chromium.org [Tue, 29 Nov 2011 08:43:14 +0000 (08:43 +0000)]
Reapply "Fix the ScopeIterator reimplementation".

This reapplies a fixed version of r10076 that also works on arm. Patch set one is r10076 reapplied and patch set 2 contains the new fix.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMake let/const outside of the extended mode early errors (under harmony flag).
keuchel@chromium.org [Tue, 29 Nov 2011 06:38:04 +0000 (06:38 +0000)]
Make let/const outside of the extended mode early errors (under harmony flag).

The ES.next drafts require that source code that matches the productions for
let and const bindings outside the extended mode trigger early syntax
errors. This CL adapts the parser / preparser accordingly under the harmony
scoping flag.

Summary:
* Harmony scoping flag not set: Old semantics allowing const in classic mode
with function level scope. Const binding in strict mode and let bindings in
classic and strict mode trigger early syntax errors.
* Harmony scoping is set: Use new harmony const and let in
extended mode and old const in classic mode. This is to preserve
compatibility with current web pages that already use
non-standard implementations of const. An early syntax error is
thrown on const in strict mode and on let in classic and strict
mode.

This depends on:
http://codereview.chromium.org/8562002/

TEST=mjsunit/harmony/block-early-errors.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReintroduce fast path in full-codegen for VisitArrayLiteral.
danno@chromium.org [Mon, 28 Nov 2011 17:17:46 +0000 (17:17 +0000)]
Reintroduce fast path in full-codegen for VisitArrayLiteral.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRevert r10076 due to arm build failures.
keuchel@chromium.org [Mon, 28 Nov 2011 14:01:13 +0000 (14:01 +0000)]
Revert r10076 due to arm build failures.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoThe ScopeIterator uses recorded scope position - as detailed in scopes.h - and
keuchel@chromium.org [Mon, 28 Nov 2011 12:47:39 +0000 (12:47 +0000)]
The ScopeIterator uses recorded scope position - as detailed in scopes.h - and
source code positions it gets from the program counter to recreate the scope
chain by reparsing the function or program.

This CL includes the following changes
* Adds source code positions for the assignment added by the rewriter.
* Run the preparser over global code first.
* Use the ScopeType from the ScopeInfo to determine if the code being debugged
  is eval, function or global code instead of looking up the '.result' symbol.

TEST=mjsunit/debug-stepout-scope.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoDump counters sorted by name on d8 exit.
ulan@chromium.org [Mon, 28 Nov 2011 12:12:00 +0000 (12:12 +0000)]
Dump counters sorted by name on d8 exit.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoClean up JavaScript files to better follow coding standard.
lrn@chromium.org [Mon, 28 Nov 2011 12:11:00 +0000 (12:11 +0000)]
Clean up JavaScript files to better follow coding standard.

Multiline conditionals must use braces.
Semicolons are not optional.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSkip test for known failure tracked by issue 1845.
mstarzinger@chromium.org [Mon, 28 Nov 2011 11:58:53 +0000 (11:58 +0000)]
Skip test for known failure tracked by issue 1845.

R=keuchel@chromium.org
BUG=v8:1845
TEST=mjsunit/harmony/proxies-example-membrane

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImplement high promotion mode for new space.
mstarzinger@chromium.org [Fri, 25 Nov 2011 14:41:38 +0000 (14:41 +0000)]
Implement high promotion mode for new space.

This mode drastically decreases pause times by limiting maximum capacity
of the young generation when mutators generate many long-lived objects.
It shrinks new space back to the initial capacity and keeps it at that
capacity until survival rate decreases again.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoShorten FP register pops where possible.
yangguo@chromium.org [Fri, 25 Nov 2011 14:26:54 +0000 (14:26 +0000)]
Shorten FP register pops where possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd external strings support to regexp in generated code.
yangguo@chromium.org [Fri, 25 Nov 2011 14:04:47 +0000 (14:04 +0000)]
Add external strings support to regexp in generated code.

TEST=test/mjsunit/string-external-cached.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFixing build errors on arm.
yangguo@chromium.org [Fri, 25 Nov 2011 13:38:43 +0000 (13:38 +0000)]
Fixing build errors on arm.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix assertion broken by recent revision.
mstarzinger@chromium.org [Fri, 25 Nov 2011 13:21:56 +0000 (13:21 +0000)]
Fix assertion broken by recent revision.

R=yangguo@chromium.org
TEST=mjsunit/keyed-call-ic

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImplement Math.tan in generated code.
yangguo@chromium.org [Fri, 25 Nov 2011 13:15:31 +0000 (13:15 +0000)]
Implement Math.tan in generated code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoDon't preparse large files to find boundaries of lazy functions.
lrn@chromium.org [Fri, 25 Nov 2011 09:36:31 +0000 (09:36 +0000)]
Don't preparse large files to find boundaries of lazy functions.

Instead use the preparser inline to parse only the lazy function
bodies.

This is still disabled for small files.
More measurements are needed to determine if lazy-compiling small
sources is worth it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCatch non-string subject in RegExpExecStub.
yangguo@chromium.org [Thu, 24 Nov 2011 18:36:24 +0000 (18:36 +0000)]
Catch non-string subject in RegExpExecStub.

There is no test case to trigger any crash. This is only to guard against the case that the native function is called with unsafe arguments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMake the parser track the language mode instead of keeping its own harmony flag.
keuchel@chromium.org [Thu, 24 Nov 2011 15:58:09 +0000 (15:58 +0000)]
Make the parser track the language mode instead of keeping its own harmony flag.

So far the parser had its own harmony flag to disable the harmony scoping
feature when parsing native functions. With the introduction of the extended
language mode this becomes unnecessary because native functions will never enter
the extended mode. The parser can thus track FLAG_harmony_scoping and the
language mode of the current scope to see if harmony features are allowed. The
scanner and preparser have to keep their flag, because they can't use
FLAG_harmony_scoping as it is not available for the preparser-process
executable.

This depends on:
http://codereview.chromium.org/8417035/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoIntroduce extended mode.
keuchel@chromium.org [Thu, 24 Nov 2011 15:17:04 +0000 (15:17 +0000)]
Introduce extended mode.

This CL introduces a third mode next to the non-strict
(henceforth called 'classic mode') and 'strict mode'
which is called 'extended mode' as in the current
ES.next specification drafts. The extended mode is based on
the 'strict mode' and adds new functionality to it. This
means that most of the semantics of these two modes
coincide.

The 'extended mode' is entered instead of the 'strict mode'
during parsing when using the 'strict mode' directive
"use strict" and when the the harmony-scoping flag is
active. This should be changed once it is fully specified how the 'extended mode' is entered.

This change introduces a new 3 valued enum LanguageMode
(see globals.h) corresponding to the modes which is mostly
used by the frontend code. This includes the following
components:
* (Pre)Parser
* Compiler
* SharedFunctionInfo, Scope and ScopeInfo
* runtime functions: StoreContextSlot,
  ResolvePossiblyDirectEval, InitializeVarGlobal,
  DeclareGlobals

The old enum StrictModeFlag is still used in the backend
when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes:
* SetProperty runtime function, Delete builtin
* StoreIC and KeyedStoreIC
* StubCache

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImplement crankshaft support for nested object literals.
mstarzinger@chromium.org [Thu, 24 Nov 2011 13:42:52 +0000 (13:42 +0000)]
Implement crankshaft support for nested object literals.

This generates optimized code for deep-copying of nested object literal
boilerplates which are statically known. Most of the boilerplates have
already been generated at crankshaft time, so this optimization should
kick in for virtually every object literal. Only nested object literal
graphs up to a certain depth and containing up to a certain total number
of properties are considered for this optimization. This will prevent
explosion of code size due to large object literals (e.g. eval on JSON).
Improves splay performance because object literals are created often.

R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd histogram timer scope for preparsing.
lrn@chromium.org [Thu, 24 Nov 2011 13:24:30 +0000 (13:24 +0000)]
Add histogram timer scope for preparsing.

Currently the parser benchmark doesn't count preparsing, since it doesn't
know when it's preparsing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPorting r10023 and r10054 to arm (pointer cache for external strings).
yangguo@chromium.org [Thu, 24 Nov 2011 11:07:39 +0000 (11:07 +0000)]
Porting r10023 and r10054 to arm (pointer cache for external strings).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPorting r10023 and r10054 to x64 (pointer cache for external strings).
yangguo@chromium.org [Thu, 24 Nov 2011 10:16:39 +0000 (10:16 +0000)]
Porting r10023 and r10054 to x64 (pointer cache for external strings).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoUpstream Android V8 change.
jkummerow@chromium.org [Wed, 23 Nov 2011 17:32:34 +0000 (17:32 +0000)]
Upstream Android V8 change.

Fix the Mac build. "_toolset" needs to be tested inside target_conditions now.

And there is no need to have -llog any more.

Review URL: http://codereview.chromium.org/8631012
Patch from Jing Zhao <jingzhao@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoARM: Implement code stub for object literal creation.
mstarzinger@chromium.org [Wed, 23 Nov 2011 15:01:20 +0000 (15:01 +0000)]
ARM: Implement code stub for object literal creation.

This just ports r10036 to the ARM codegenerator. Please see the original
revision for a detailed description.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRefactor Heap::SymbolMapForString to use switch/case.
yangguo@chromium.org [Wed, 23 Nov 2011 13:31:26 +0000 (13:31 +0000)]
Refactor Heap::SymbolMapForString to use switch/case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRecommit introducing short external strings.
yangguo@chromium.org [Wed, 23 Nov 2011 13:08:28 +0000 (13:08 +0000)]
Recommit introducing short external strings.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.7.11.
mstarzinger@chromium.org [Wed, 23 Nov 2011 11:56:52 +0000 (11:56 +0000)]
Prepare push to trunk.  Now working on version 3.7.11.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRolling back r10049 due to webkit failures.
yangguo@chromium.org [Wed, 23 Nov 2011 10:41:12 +0000 (10:41 +0000)]
Rolling back r10049 due to webkit failures.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoIntroduce short external strings without pointer cache.
yangguo@chromium.org [Wed, 23 Nov 2011 09:58:58 +0000 (09:58 +0000)]
Introduce short external strings without pointer cache.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Reduced the number of threads in cctest test-lockers.
ricow@chromium.org [Wed, 23 Nov 2011 08:36:03 +0000 (08:36 +0000)]
MIPS: Reduced the number of threads in cctest test-lockers.

Some MIPS boards could not handle the large number of threads and failed these tests.

BUG=
TEST=
Review URL: http://codereview.chromium.org/8506008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoDecrease number of threads in ExtensionRegistration tests for mips, current number...
ricow@chromium.org [Wed, 23 Nov 2011 08:06:13 +0000 (08:06 +0000)]
Decrease number of threads in ExtensionRegistration tests for mips, current number is causing OOMs.

This was fixed for arm in revision 10045
Review URL: http://codereview.chromium.org/8662003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSet the code age field of SharedFunctionInfo correctly.
ulan@chromium.org [Tue, 22 Nov 2011 19:46:00 +0000 (19:46 +0000)]
Set the code age field of SharedFunctionInfo correctly.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix ExtensionsRegistration cctest on ARM.
dslomov@chromium.org [Tue, 22 Nov 2011 18:51:53 +0000 (18:51 +0000)]
Fix ExtensionsRegistration cctest on ARM.
Reduced the number of created threads on ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSet maximum length of FixedArray in terms of elements instead an absolute number...
fschneider@chromium.org [Tue, 22 Nov 2011 16:02:26 +0000 (16:02 +0000)]
Set maximum length of FixedArray in terms of elements instead an absolute number of bytes.

This sets the limit to 128M elements on all platforms. Before allocating a large array may
cause an OutOfMemory on x64 whereas it would not on ia32.

Also remove an unused constant from the FreeSpace class.

BUG=103103
Review URL: http://codereview.chromium.org/8637015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Landing: [hydrogen] optimize switch with string clauses.
fschneider@chromium.org [Tue, 22 Nov 2011 13:51:56 +0000 (13:51 +0000)]
MIPS: Landing: [hydrogen] optimize switch with string clauses.

Port r10019 (9bbb78bf)

Original commit message:
Patch by Fedor Indutny <fedor.indutny@gmail.com>.

BUG=
TEST=
Review URL: http://codereview.chromium.org/8574073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemove unused runtime functions for literals.
mstarzinger@chromium.org [Tue, 22 Nov 2011 10:15:00 +0000 (10:15 +0000)]
Remove unused runtime functions for literals.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMinimal changes required to build d8 for Android
jkummerow@chromium.org [Mon, 21 Nov 2011 15:01:52 +0000 (15:01 +0000)]
Minimal changes required to build d8 for Android

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAlways create deopt data when using full-codegen if the function is optimizable
ricow@chromium.org [Mon, 21 Nov 2011 14:07:46 +0000 (14:07 +0000)]
Always create deopt data when using full-codegen if the function is optimizable
Review URL: http://codereview.chromium.org/8611003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Add a level of indirection to exception handler addresses.
kmillikin@chromium.org [Mon, 21 Nov 2011 14:05:18 +0000 (14:05 +0000)]
MIPS: Add a level of indirection to exception handler addresses.

Port r9977 (9aded78be4).
Note: This is the port of the reapplied patch, not the original.

Original commit message:

To support deoptimization of exception handlers, the handler address in the
stack is converted to a pair of code object and an index into a separate
table of code offsets.  The index part is invariant under deoptimization.
The index is packed into the handler state field so that handler size does
not change.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8557003
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix presubmit error for recent revision.
mstarzinger@chromium.org [Mon, 21 Nov 2011 14:04:41 +0000 (14:04 +0000)]
Fix presubmit error for recent revision.

R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImplement code stub for object literal creation.
mstarzinger@chromium.org [Mon, 21 Nov 2011 13:27:44 +0000 (13:27 +0000)]
Implement code stub for object literal creation.

This generates code stubs for cloning of shallow object literal
boilerplates that have no elements and only fast properties. Improves
splay performance because object literals are created frequently.

R=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.7.10.
erikcorry [Mon, 21 Nov 2011 13:06:13 +0000 (13:06 +0000)]
Prepare push to trunk. Now working on version 3.7.10.
Review URL: http://codereview.chromium.org/8612001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPropagate and combine constants in Hydrogen
fschneider@chromium.org [Mon, 21 Nov 2011 10:18:47 +0000 (10:18 +0000)]
Propagate and combine constants in Hydrogen

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8473002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPartially revert r9734 due to crashes in dev and canary channel.
keuchel@chromium.org [Mon, 21 Nov 2011 08:44:02 +0000 (08:44 +0000)]
Partially revert r9734 due to crashes in dev and canary channel.

This reverts the changes to the ScopeIterator from r9734 to the
previous implementation. The other changes in the commit to Parser,
Scope and (Serialized)ScopeInfo are retained.

BUG=104522,v8:1824,v8:1826

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemove more superfluous write barriers.
erik.corry@gmail.com [Fri, 18 Nov 2011 14:09:41 +0000 (14:09 +0000)]
Remove more superfluous write barriers.
Review URL: http://codereview.chromium.org/8595008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd flag --collect-megamorphic-maps-from-stub-cache to help diagnose a
erik.corry@gmail.com [Fri, 18 Nov 2011 14:08:57 +0000 (14:08 +0000)]
Add flag --collect-megamorphic-maps-from-stub-cache to help diagnose a
memory leak.
Review URL: http://codereview.chromium.org/8599006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReally fix missing HandleScope to prevent local handles to DOMWindow leaking.
mikhail.naganov@gmail.com [Fri, 18 Nov 2011 11:42:39 +0000 (11:42 +0000)]
Really fix missing HandleScope to prevent local handles to DOMWindow leaking.

A follow-up to r9994.

R=vitalyr@chromium.org
BUG=102895
TEST=cctests/test-heap-profiler/NoHandleLeaks

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix debug builds.
yangguo@chromium.org [Fri, 18 Nov 2011 11:16:58 +0000 (11:16 +0000)]
Fix debug builds.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAvoid explicitly using built-in new operator where possible to appease Windows build.
yangguo@chromium.org [Fri, 18 Nov 2011 11:08:46 +0000 (11:08 +0000)]
Avoid explicitly using built-in new operator where possible to appease Windows build.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Change generated code for substring not to bail out to runtime system.
yangguo@chromium.org [Fri, 18 Nov 2011 09:13:01 +0000 (09:13 +0000)]
MIPS: Change generated code for substring not to bail out to runtime system.

Port r10012 (09c6bcba81).

Original commit message:
There is no need to bail out to runtime system when creating sliced strings of external strings since the string content is unimportant.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFixing compiler warning on gcc 4.6.1.
yangguo@chromium.org [Fri, 18 Nov 2011 09:10:19 +0000 (09:10 +0000)]
Fixing compiler warning on gcc 4.6.1.

BUG=v8:1831

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemoving exit time destructors by leaking static members.
yangguo@chromium.org [Fri, 18 Nov 2011 08:59:33 +0000 (08:59 +0000)]
Removing exit time destructors by leaking static members.

Note that some cctests and d8 still contain statical members with exit time destructors.

BUG=v8:1828

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoOptimize array literal boilerplate copy for fast cases.
danno@chromium.org [Thu, 17 Nov 2011 17:22:21 +0000 (17:22 +0000)]
Optimize array literal boilerplate copy for fast cases.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd pointer cache field to external string for access in generated code.
yangguo@chromium.org [Thu, 17 Nov 2011 17:05:12 +0000 (17:05 +0000)]
Add pointer cache field to external string for access in generated code.

TEST=test/mjsunit/string-externalize.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd version of x64 FastCloneShallowArrayStub that copies all boilerplate kinds
danno@chromium.org [Thu, 17 Nov 2011 15:08:59 +0000 (15:08 +0000)]
Add version of x64 FastCloneShallowArrayStub that copies all boilerplate kinds

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd ia32 FastCloneShallowArrayStub that copies all boilerplate kinds.
danno@chromium.org [Thu, 17 Nov 2011 14:55:26 +0000 (14:55 +0000)]
Add ia32 FastCloneShallowArrayStub that copies all boilerplate kinds.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Fix lazy deoptimization at HInvokeFunction and enable target-recording call...
fschneider@chromium.org [Thu, 17 Nov 2011 14:33:49 +0000 (14:33 +0000)]
MIPS: Fix lazy deoptimization at HInvokeFunction and enable target-recording call-function stub.

Port r10006 (4b344a03).

Original commit message:

Changes the way we do lazy deoptimization:

1. For side-effect instructions, we insert the lazy-deopt call at
the following LLazyBailout instruction.

     CALL
     GAP
     LAZY-BAILOUT ==> lazy-deopt-call

2. For other instructions (StackCheck) we insert it right after the
instruction since the deopt targets an earlier deoptimization environment.

   STACK-CHECK
   GAP ==> lazy-deopt-call

The pc of the lazy-deopt call that will be patched in is recorded in the
deoptimization input data. Each Lithium instruction can have 0..n safepoints.
All safepoints get the deoptimization index of the associated LAZY-BAILOUT
instruction. On lazy deoptimization we use the return-pc to find the safepoint.
The safepoint tells us the deoptimization index, which in turn finds us the
PC where to insert the lazy-deopt-call.

Additional changes:
* RegExpLiteral marked it as having side-effects so that it
  gets an explicitlazy-bailout instruction (instead of
  treating it specially like stack-checks)
* Enable target recording CallFunctionStub to achieve
  more inlining on optimized code.

BUG=
TEST=
Review URL: http://codereview.chromium.org/8587008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoLanding: [hydrogen] optimize switch with string clauses. Patch by Fedor Indutny ...
fschneider@chromium.org [Thu, 17 Nov 2011 13:57:55 +0000 (13:57 +0000)]
Landing: [hydrogen] optimize switch with string clauses. Patch by Fedor Indutny <fedor.indutny@gmail.com>.

Original code review: http://codereview.chromium.org/8373029/
Review URL: http://codereview.chromium.org/8589019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Cleaned up an unused declaration in lithium-codegen-mips.h.
danno@chromium.org [Thu, 17 Nov 2011 13:36:27 +0000 (13:36 +0000)]
MIPS: Cleaned up an unused declaration in lithium-codegen-mips.h.

DoDeferredBinaryOpStub is not used (or even defined) anywhere.
MIPS can handle special cases of div, which is the only place it's used in the ARM version.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8588005
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Fixed a minor inconsistency in lithium-codegen-mips.cc
danno@chromium.org [Thu, 17 Nov 2011 13:35:15 +0000 (13:35 +0000)]
MIPS: Fixed a minor inconsistency in lithium-codegen-mips.cc

EmitIsObject is only called from one function, DoIsObjectAndBranch.
DoIsObjectAndBranch now passes the temp2 register to EmitIsObject
instead of simply relying on the two functions using the same
lithium scratch register.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8588004
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Re-work DoModI.
danno@chromium.org [Thu, 17 Nov 2011 13:33:56 +0000 (13:33 +0000)]
MIPS: Re-work DoModI.

Changes:
-separated the two code-paths (constant power of 2 divisor similar to ARM and everything else)
-replaced a bailout condition with faster handling (negative modulo result)
-removed a possibly useless mov instruction from one path
-replaced the IsConstantOperand condition with the more meaningful HasPowerOf2Divisor (although in this specific case they're equivalent)

BUG=
TEST=

Review URL: http://codereview.chromium.org/8591002
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10016 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Fix for Ins macro-assembler instruction for non-mips32r2 platforms.
danno@chromium.org [Thu, 17 Nov 2011 13:31:26 +0000 (13:31 +0000)]
MIPS: Fix for Ins macro-assembler instruction for non-mips32r2 platforms.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8520023
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Implement runtime function for array literal transitions.
danno@chromium.org [Thu, 17 Nov 2011 13:27:58 +0000 (13:27 +0000)]
MIPS: Implement runtime function for array literal transitions.

Port r9979(0cf0570a).

Original commit message:

Also simplify ia32 and x64 handing of the trace_elements_transition flag.

BUG=
TEST=

Review URL: http://codereview.chromium.org/8557004
Patch from Gergely Kis <gregely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoChange generated code for substring not to bail out to runtime system.
yangguo@chromium.org [Thu, 17 Nov 2011 08:40:40 +0000 (08:40 +0000)]
Change generated code for substring not to bail out to runtime system.

There is no need to bail out to runtime system when creating sliced strings of external strings since the string content is unimportant.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.7.9.
ricow@chromium.org [Thu, 17 Nov 2011 08:10:30 +0000 (08:10 +0000)]
Prepare push to trunk. Now working on version 3.7.9.
Review URL: http://codereview.chromium.org/8568042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReset allocation info when we are releasing the page that contains allocation top.
vegorov@chromium.org [Wed, 16 Nov 2011 22:25:56 +0000 (22:25 +0000)]
Reset allocation info when we are releasing the page that contains allocation top.

R=erik.corry@gmail.com
BUG=103587

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdding NetBSD support for scons build.
yangguo@chromium.org [Wed, 16 Nov 2011 14:35:47 +0000 (14:35 +0000)]
Adding NetBSD support for scons build.

BUG=v8:1678

Review URL: http://codereview.chromium.org/8513012
Patch from Matthew Sporleder <msporleder@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoUse safe version (i.e. using write barrier) of set_map in ReinitializeJSReceiver.
ricow@chromium.org [Wed, 16 Nov 2011 10:40:50 +0000 (10:40 +0000)]
Use safe version (i.e. using write barrier) of set_map in ReinitializeJSReceiver.

We pass in the object that we set the map on.
Review URL: http://codereview.chromium.org/8486005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix lazy deoptimization at HInvokeFunction and enable target-recording call-function...
fschneider@chromium.org [Wed, 16 Nov 2011 08:44:30 +0000 (08:44 +0000)]
Fix lazy deoptimization at HInvokeFunction and enable target-recording call-function stub.

Changes the way we do lazy deoptimization:

1. For side-effect instructions, we insert the lazy-deopt call at
the following LLazyBailout instruction.

     CALL
     GAP
     LAZY-BAILOUT ==> lazy-deopt-call

2. For other instructions (StackCheck) we insert it right after the
instruction since the deopt targets an earlier deoptimization environment.

   STACK-CHECK
   GAP ==> lazy-deopt-call

The pc of the lazy-deopt call that will be patched in is recorded in the
deoptimization input data. Each Lithium instruction can have 0..n safepoints.
All safepoints get the deoptimization index of the associated LAZY-BAILOUT
instruction. On lazy deoptimization we use the return-pc to find the safepoint.
The safepoint tells us the deoptimization index, which in turn finds us the
PC where to insert the lazy-deopt-call.

Additional changes:
 * RegExpLiteral marked it as having side-effects so that it
   gets an explicitlazy-bailout instruction (instead of
   treating it specially like stack-checks)
 * Enable target recording CallFunctionStub to achieve
   more inlining on optimized code.

BUG=v8:1789
TEST=jslint and uglify run without crashing, mjsunit/compiler/regress-lazy-deopt.js
Review URL: http://codereview.chromium.org/8492004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRe-added missing return in HInferRepresentation::TryChange.
svenpanne@chromium.org [Wed, 16 Nov 2011 07:46:19 +0000 (07:46 +0000)]
Re-added missing return in HInferRepresentation::TryChange.

It mysteriously disappeared about 800 revisions ago... :-} Thanks to Jakob for spotting this!

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix presubmit errors introduced by r10002.
vegorov@chromium.org [Wed, 16 Nov 2011 01:44:17 +0000 (01:44 +0000)]
Fix presubmit errors introduced by r10002.

TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/8520031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPresubmit failures fixed
dslomov@chromium.org [Tue, 15 Nov 2011 23:26:22 +0000 (23:26 +0000)]
Presubmit failures fixed

TBR=vitalyr@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoIntroduce non auto-scaling mode in spinning balls benchmark.
vegorov@chromium.org [Tue, 15 Nov 2011 22:52:38 +0000 (22:52 +0000)]
Introduce non auto-scaling mode in spinning balls benchmark.
Review URL: http://codereview.chromium.org/8570017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoExtension state made per-siolate in genesis
dslomov@chromium.org [Tue, 15 Nov 2011 22:48:55 +0000 (22:48 +0000)]
Extension state made per-siolate in genesis

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoElide superfluous write barriers.
erik.corry@gmail.com [Tue, 15 Nov 2011 14:01:02 +0000 (14:01 +0000)]
Elide superfluous write barriers.
Review URL: http://codereview.chromium.org/8468005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoStatic resolution of outer variables in eval code.
keuchel@chromium.org [Tue, 15 Nov 2011 13:48:40 +0000 (13:48 +0000)]
Static resolution of outer variables in eval code.

So far free variables references in eval code are not statically
resolved. For example in
    function foo() { var x = 1; eval("y = x"); }
the variable x will get mode DYNAMIC and y will get mode DYNAMIC_GLOBAL,
i.e. free variable references trigger dynamic lookups with a fast case
handling for global variables.

The CL introduces static resolution of free variables references in eval
code. If possible variable references are resolved to bindings belonging to
outer scopes of the eval call site.

This is achieved by deserializing the outer scope chain using
Scope::DeserializeScopeChain prior to parsing the eval code similar to lazy
parsing of functions. The existing code for variable resolution is used,
however resolution starts at the first outer unresolved scope instead of
always starting at the root of the scope tree.

This is a prerequisite for statically checking validity of assignments in
the extended code as specified by the current ES.next draft which will be
introduced by a subsequent CL. More specifically section 11.13 of revision 4
of the ES.next draft reads:
* It is a Syntax Error if the AssignmentExpression is contained in extended
  code and the LeftHandSideExpression is an Identifier that does not
  statically resolve to a declarative environment record binding or if the
  resolved binding is an immutable binding.

TEST=existing tests in mjsunit

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoWe might decide to start incremental marking immediately after finishing one cycle.
vegorov@chromium.org [Tue, 15 Nov 2011 13:01:52 +0000 (13:01 +0000)]
We might decide to start incremental marking immediately after finishing one cycle.

In this case uncommiting marking deque is impossible.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd -e to echo in push-to-trunk.sh to print \t properly
jkummerow@chromium.org [Tue, 15 Nov 2011 12:47:37 +0000 (12:47 +0000)]
Add -e to echo in push-to-trunk.sh to print \t properly

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix test failures introduced by last revision.
mstarzinger@chromium.org [Tue, 15 Nov 2011 12:34:55 +0000 (12:34 +0000)]
Fix test failures introduced by last revision.

R=erik.corry@gmail.com
TEST=mjsunit/array-elements-from-array-prototype-chain

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAvoid write barrier when writing an external pointer to an internal field.
erik.corry@gmail.com [Tue, 15 Nov 2011 12:18:24 +0000 (12:18 +0000)]
Avoid write barrier when writing an external pointer to an internal field.
Review URL: http://codereview.chromium.org/8572003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix missing HandleScope to prevent local handles to DOMWindow leaking.
mikhail.naganov@gmail.com [Tue, 15 Nov 2011 10:10:35 +0000 (10:10 +0000)]
Fix missing HandleScope to prevent local handles to DOMWindow leaking.

R=erik.corry@gmail.com
BUG=102895
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemove hidden prototype for builtin functions.
mstarzinger@chromium.org [Tue, 15 Nov 2011 09:44:57 +0000 (09:44 +0000)]
Remove hidden prototype for builtin functions.

This is a deliberate non-conformity introduced more than 2 years ago to
be compatible with JSC. The current state is that all other browsers
perform ES5 conform in that regard.

R=erik.corry@gmail.com
BUG=chromium:1717,chromium:39662
TEST=test262/15.2.3.6-4-6??,mjsunit/undeletable-functions

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.7.8.
jkummerow@chromium.org [Mon, 14 Nov 2011 13:31:57 +0000 (13:31 +0000)]
Prepare push to trunk.  Now working on version 3.7.8.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSpeedup unit test to avoid timeout on slow ARM simulator.
fschneider@chromium.org [Mon, 14 Nov 2011 12:33:44 +0000 (12:33 +0000)]
Speedup unit test to avoid timeout on slow ARM simulator.

This test depends on OSR being triggered. That's why I can't
use %OptimizeFunctionOnNextCall.
Review URL: http://codereview.chromium.org/8555004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix static const weirdness in both gcc and msvs compatible way.
mikhail.naganov@gmail.com [Mon, 14 Nov 2011 11:36:04 +0000 (11:36 +0000)]
Fix static const weirdness in both gcc and msvs compatible way.

Afterpatch for r9985.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix missing fast property accessors in heap snapshots.
mikhail.naganov@gmail.com [Mon, 14 Nov 2011 11:13:29 +0000 (11:13 +0000)]
Fix missing fast property accessors in heap snapshots.

Implementation for this case

var x = {};
x.__defineGetter__("y", function Y() { return 42; });

BUG=v8:1818
TEST=cctest/test-heap-profiler/FastCaseGetter

Review URL: http://codereview.chromium.org/8491041
Patch from Ilya Tikhonovsky <loislo@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMake eval compilation cache calling scope sensitive.
keuchel@chromium.org [Mon, 14 Nov 2011 08:58:47 +0000 (08:58 +0000)]
Make eval compilation cache calling scope sensitive.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFixing build errors.
yangguo@chromium.org [Fri, 11 Nov 2011 17:48:40 +0000 (17:48 +0000)]
Fixing build errors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCatch OOM when sparse array join results in too large array.
yangguo@chromium.org [Fri, 11 Nov 2011 17:21:16 +0000 (17:21 +0000)]
Catch OOM when sparse array join results in too large array.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoARM: Implement runtime function for array literal transitions.
danno@chromium.org [Fri, 11 Nov 2011 14:49:16 +0000 (14:49 +0000)]
ARM: Implement runtime function for array literal transitions.

Also simplify ia32 and x64 handing of the trace_elements_transition flag.

R=jkummerow@chromium.org
BUG=none
TEST=array-literal-transitions.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImprove push-to-trunk.sh
jkummerow@chromium.org [Fri, 11 Nov 2011 14:48:16 +0000 (14:48 +0000)]
Improve push-to-trunk.sh

1) Make sure that commits sneaking in before the "Prepare Push" CL is landed are included in the push.
2) Easy-to-copy output at the end.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReapply "Add a level of indirection to exception handler addresses."
kmillikin@chromium.org [Fri, 11 Nov 2011 13:48:14 +0000 (13:48 +0000)]
Reapply "Add a level of indirection to exception handler addresses."

Original commit message:

Add a level of indirection to exception handler addresses.

To support deoptimization of exception handlers, the handler address in the
stack is converted to a pair of code object and an index into a separate
table of code offsets.  The index part is invariant under deoptimization.
The index is packed into the handler state field so that handler size does
not change.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRevert "Add a level of indirection to exception handler addresses."
kmillikin@chromium.org [Fri, 11 Nov 2011 13:13:35 +0000 (13:13 +0000)]
Revert "Add a level of indirection to exception handler addresses."

This reverts r9975.  This change broke (at least) snapshots on x64.

TBR=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd a level of indirection to exception handler addresses.
kmillikin@chromium.org [Fri, 11 Nov 2011 12:51:42 +0000 (12:51 +0000)]
Add a level of indirection to exception handler addresses.

To support deoptimization of exception handlers, the handler address in the
stack is converted to a pair of code object and an index into a separate
table of code offsets.  The index part is invariant under deoptimization.
The index is packed into the handler state field so that handler size does
not change.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRefactor embedded pointer visitors for the serializer
mstarzinger@chromium.org [Fri, 11 Nov 2011 12:28:42 +0000 (12:28 +0000)]
Refactor embedded pointer visitors for the serializer

This patch continues the refactoring that started in r9597 and
extends it with support for the serializer.
This is required for MIPS support in the serializer.

Review URL: http://codereview.chromium.org/8467010
Patch from Gergely Kis <gergely@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix mistake in comment for last revision.
mstarzinger@chromium.org [Fri, 11 Nov 2011 11:50:05 +0000 (11:50 +0000)]
Fix mistake in comment for last revision.

TBR=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.7.7.
danno@chromium.org [Fri, 11 Nov 2011 11:44:16 +0000 (11:44 +0000)]
Prepare push to trunk.  Now working on version 3.7.7.

R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00