Commit Graph

6914 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
7e6a69cfa8 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
2011-11-23 11:56:52 +00:00
yangguo@chromium.org
922aee5a02 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
2011-11-23 10:41:12 +00:00
yangguo@chromium.org
21edc7c30b 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
2011-11-23 09:58:58 +00:00
ulan@chromium.org
e951d38261 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
2011-11-22 19:46:00 +00:00
fschneider@chromium.org
23e948b8a7 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
2011-11-22 16:02:26 +00:00
fschneider@chromium.org
be1a94b626 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
2011-11-22 13:51:56 +00:00
mstarzinger@chromium.org
de389f1d23 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
2011-11-22 10:15:00 +00:00
jkummerow@chromium.org
ceea4fe6ee 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
2011-11-21 15:01:52 +00:00
ricow@chromium.org
ec04dcfa0c 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
2011-11-21 14:07:46 +00:00
kmillikin@chromium.org
29b5ceb897 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
2011-11-21 14:05:18 +00:00
mstarzinger@chromium.org
561b5716d7 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
2011-11-21 14:04:41 +00:00
mstarzinger@chromium.org
d7e099889e 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
2011-11-21 13:27:44 +00:00
erikcorry
fa7ae22f4f 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
2011-11-21 13:06:13 +00:00
fschneider@chromium.org
8ebd1999f5 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
2011-11-21 10:18:47 +00:00
keuchel@chromium.org
c4dfef9432 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
2011-11-21 08:44:02 +00:00
erik.corry@gmail.com
296afb3e5d 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
2011-11-18 14:09:41 +00:00
erik.corry@gmail.com
5c1044bb54 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
2011-11-18 14:08:57 +00:00
mikhail.naganov@gmail.com
a0f3c5d451 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
2011-11-18 11:42:39 +00:00
yangguo@chromium.org
bbab532699 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
2011-11-18 11:16:58 +00:00
yangguo@chromium.org
5c23e4e57a 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
2011-11-18 11:08:46 +00:00
yangguo@chromium.org
f0878c8424 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
2011-11-18 09:13:01 +00:00
yangguo@chromium.org
0bd29a1af6 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
2011-11-18 09:10:19 +00:00
yangguo@chromium.org
6551e8d47d 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
2011-11-18 08:59:33 +00:00
danno@chromium.org
f808f4ae7b 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
2011-11-17 17:22:21 +00:00
yangguo@chromium.org
5a82d78948 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
2011-11-17 17:05:12 +00:00
danno@chromium.org
be923eed32 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
2011-11-17 15:08:59 +00:00
danno@chromium.org
371841b270 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
2011-11-17 14:55:26 +00:00
fschneider@chromium.org
aa3004d21f 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
2011-11-17 14:33:49 +00:00
fschneider@chromium.org
8fbf1d5017 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
2011-11-17 13:57:55 +00:00
danno@chromium.org
3c5b91029b 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
2011-11-17 13:36:27 +00:00
danno@chromium.org
b079140101 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
2011-11-17 13:35:15 +00:00
danno@chromium.org
bef75b3496 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
2011-11-17 13:33:56 +00:00
danno@chromium.org
e99b92723d 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
2011-11-17 13:31:26 +00:00
danno@chromium.org
cfc54e4dac 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
2011-11-17 13:27:58 +00:00
yangguo@chromium.org
85b693c9e8 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
2011-11-17 08:40:40 +00:00
ricow@chromium.org
08f69647d3 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
2011-11-17 08:10:30 +00:00
vegorov@chromium.org
34b8e11d10 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
2011-11-16 22:25:56 +00:00
ricow@chromium.org
22db7b1eaf 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
2011-11-16 10:40:50 +00:00
fschneider@chromium.org
8480569467 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
2011-11-16 08:44:30 +00:00
svenpanne@chromium.org
ee2cd4289b 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
2011-11-16 07:46:19 +00:00
dslomov@chromium.org
e3ec8b20fc 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
2011-11-15 23:26:22 +00:00
dslomov@chromium.org
963ccfdaea 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
2011-11-15 22:48:55 +00:00
erik.corry@gmail.com
2792e9ed79 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
2011-11-15 14:01:02 +00:00
keuchel@chromium.org
08c9629f80 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
2011-11-15 13:48:40 +00:00
vegorov@chromium.org
4c41d327da 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
2011-11-15 13:01:52 +00:00
mstarzinger@chromium.org
f8706ec995 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
2011-11-15 12:34:55 +00:00
erik.corry@gmail.com
abd895a7cb 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
2011-11-15 12:18:24 +00:00
mikhail.naganov@gmail.com
6bb5e10fb1 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
2011-11-15 10:10:35 +00:00
mstarzinger@chromium.org
330cd2205c 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
2011-11-15 09:44:57 +00:00
jkummerow@chromium.org
daecf27aca 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
2011-11-14 13:31:57 +00:00
mikhail.naganov@gmail.com
d771d09d23 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
2011-11-14 11:36:04 +00:00
mikhail.naganov@gmail.com
007ad200f8 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
2011-11-14 11:13:29 +00:00
keuchel@chromium.org
b153dcfebf 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
2011-11-14 08:58:47 +00:00
yangguo@chromium.org
7c209a555f 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
2011-11-11 17:48:40 +00:00
yangguo@chromium.org
0e47d6e417 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
2011-11-11 17:21:16 +00:00
danno@chromium.org
8bdb3ffbca 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
2011-11-11 14:49:16 +00:00
kmillikin@chromium.org
e49d533b50 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
2011-11-11 13:48:14 +00:00
kmillikin@chromium.org
66ff8828a0 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
2011-11-11 13:13:35 +00:00
kmillikin@chromium.org
1635117db9 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
2011-11-11 12:51:42 +00:00
mstarzinger@chromium.org
5834284848 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
2011-11-11 12:28:42 +00:00
mstarzinger@chromium.org
95eda367f1 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
2011-11-11 11:50:05 +00:00
danno@chromium.org
137dd66648 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
2011-11-11 11:44:16 +00:00
erik.corry@gmail.com
f3eeeeaedc 8-byte align zone allocations of objects that may require it.
Review URL: http://codereview.chromium.org/8539008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 11:23:39 +00:00
mstarzinger@chromium.org
9dcf002f31 Fix filtering of store buffer for large object pages.
Our Heap::FreeQueuedChunks generates fake inner chunks in large object
pages queued for freeing, so that StoreBuffer::Filter can recognize them
as pages to be freed. This also relies on MemoryChunk::Contains to work
properly, which is why the size field needs to be initialized as well.

R=vegorov@chromium.org
BUG=v8:1817
TEST=mozilla/js1_5/Regress/regress-360969-05

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 09:45:12 +00:00
erik.corry@gmail.com
58870fa9e5 ARM: Check that address given to __ RecordWrite is correct.
Review URL: http://codereview.chromium.org/8511052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-11 08:23:06 +00:00
rossberg@chromium.org
830763bda4 Fixing test cases for correct assertSame.
Leaving out derived construct trap for now, which I'm working on separately.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 15:48:07 +00:00
fschneider@chromium.org
cff105b17d Make LiveRange objects 1 word smaller by using a bool instead of enum for register kind.
Review URL: http://codereview.chromium.org/8462016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 15:37:24 +00:00
yangguo@chromium.org
1dcbdfd2e1 Fixing build error on Win64.
Review URL: http://codereview.chromium.org/8508058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9958 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 15:16:57 +00:00
yangguo@chromium.org
85d4c862f2 Fixing presubmit failure in r9955.
Review URL: http://codereview.chromium.org/8517007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 14:32:29 +00:00
yangguo@chromium.org
07ee3e6e5c Fixing generated hash function on all platforms.
BUG=v8:1808
TEST=cctest/test-hashing.cc

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 14:26:57 +00:00
yangguo@chromium.org
6bd8d27a65 MIPS: Fixed a bug in StringHelper::GenerateTwoCharacterSymbolTableProbe.
r9871 (5baeaf57) changed the fill value for deleted entries in hash tables from null_value to the_hole_value.
This commit changes an assertion in MIPS code that expects this value.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 14:13:32 +00:00
rossberg@chromium.org
8caa6eb732 Fix instanceof a function proxy.
R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 13:39:22 +00:00
vegorov@chromium.org
b8dc77ab9a Fix Heap::Shrink to ensure that it does not free pages that are still in use.
Heap::Shrink is called from EnsureFromSpaceIsCommitted at the very start of the GC. At this moment live bytes counts on pages are in inconsistent states. Some pages might have been already swept but have not been yet reached by an incremental marker (or incremental marker is not in progress) and have live bytes count set to 0. Thus we can't rely only on LiveBytes to determine which pages can be released to the OS.

R=mstarzinger@chromium.org
BUG=100414

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 13:24:00 +00:00
fschneider@chromium.org
33682c6b34 Implement inline runtime function %_SetValueOf for Crankshaft.
It is frequently used inside our builtins and is implemented purely
by HIR instructions: a smi check, an instance-type check and an
in-object property store for storing to the value field.
Review URL: http://codereview.chromium.org/8507016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 12:32:39 +00:00
danno@chromium.org
922700a696 Prepare push to trunk. Now working on version 3.7.6.
R=erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 11:26:27 +00:00
yangguo@chromium.org
2e5cb9b49f MIPS: Simplify StringCharCodeAt in non-crankshaft codegen.
Port r9936 (61034d).

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 08:07:39 +00:00
yangguo@chromium.org
462f6b16dc MIPS: Repeat last debugger command in the arm simulator when command input is empty.
Port r9937 (c263a9e).

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-10 08:01:23 +00:00
vitalyr@chromium.org
0ec3ba8fe4 Tighten handling of pthread_create errors on Linux.
The return value of pthread_create is now checked to be 0.
Tests on MIPS boards had some silent and hard to find timeouts and errors related to this.
This ensures a proper error message and shutdown if a thread could not be started.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 19:02:41 +00:00
vitalyr@chromium.org
8a074ba183 MIPS: Enable the ll_prof profiler on MIPS.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 18:36:31 +00:00
kmillikin@chromium.org
cefa4cc148 Get rid of CodeStub::TryGetCode.
This function is no longer needed.  It was only used (overly defensively)
when fetching the stack check stub for on-stack replacement patching.

R=vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 15:44:13 +00:00
vegorov@chromium.org
3bb1da0ff0 Fix Win64 compilation problems introduced by r9932.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 15:40:08 +00:00
yangguo@chromium.org
8dcfcdd7da Fixing presubmit.
Review URL: http://codereview.chromium.org/8510012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 15:06:10 +00:00
yangguo@chromium.org
8a782f26aa Removing outdated assertions.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:47:12 +00:00
yangguo@chromium.org
97798860a0 Repeat last debugger command in the arm simulator when command input is empty.
Review URL: http://codereview.chromium.org/8506015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:37:04 +00:00
yangguo@chromium.org
6157562994 Simplify StringCharCodeAt in non-crankshaft codegen.
TEST=test/mjsunit/string-slices.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:32:51 +00:00
yurys@chromium.org
8b7bcc4e80 Add getters for column number and script id to v8::Function
Review URL: http://codereview.chromium.org/8508008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:18:30 +00:00
vegorov@chromium.org
aff88ef399 Fix presubmit error introduced by r9932.
R=erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 14:04:56 +00:00
kmillikin@chromium.org
7664133e87 A small collection of cleanup in the parser and AST.
* Remove a couple of unused fields from the FunctionLiteral, ensure that all
  the bools are packed.
* Rename SaveScope and LexicalScope in the parser.
* Use an enum to generate the numbers 0..N and the dependent count, rather
  than static const ints.  This is simpler to extend (coming in a future
  change).

R=danno@chromium.org,keuchel@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 13:54:26 +00:00
vegorov@chromium.org
9f50147031 Ensure that promotion queue does not overlap with objects relocated to ToSpace.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 13:48:43 +00:00
svenpanne@chromium.org
b16e02e823 Made PropertyType handling even more explicit.
Replaced FIRST_PHANTOM_PROPERTY_TYPE by a predicate. Removed the (hopefully)
last default cases for switches on PropertyType. Benchmarks show that both
changes are performace-neutral.

Now every value of PropertyType should either be handled by an explicit case in
a switch or by an equality operator. Therefore, the C++ compiler should finally
be able to tell us which places to touch when changing PropertyType.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:47:15 +00:00
yangguo@chromium.org
bf98b6f2ed MIPS: Make _CallFunction proxy-aware.
Port r9916 (d2195670)

Original commit message:
Change calling convention for CallFunction stub. Some fixes regarding strict mode call traps.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:19:26 +00:00
mikhail.naganov@gmail.com
49df2a6ddc A page created a number of ConsStrings that refer to one big string.
Each such string requires small amount of heap memory.
Heap snapshot generator copies all the strings into internal hash map for future use.
The each copy requires much more memory than original v8 string.

I made a workaround for this. The snapshot will copy only first 1024 symbols.
A simple drive-by fix was made for a performance problem in ToCString implementation.

BUG=v8:1816
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:15:35 +00:00
erik.corry@gmail.com
034eb17387 sync the OpenBSD code with Linux. Committing http://codereview.chromium.org/8499016/ for Robert Nagy
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 12:01:45 +00:00
yangguo@chromium.org
09e97c41f2 MIPS: Enable the V8 profiler on MIPS.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 11:57:05 +00:00
kmillikin@chromium.org
de0db0f598 Remove ast-inl.h. This file is not necessary.
R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 11:32:54 +00:00
kmillikin@chromium.org
6cb5ae7ad9 MIPS: Tighten the code for MacroAssembler::ThrowUncatchable.
Port r9909 (56c8728aa).

Original commit message:
Test at the bottom in the unwind loop.  Eliminate the possibility of a
useless move to the eax/rax/r0 register (currently impossible because
this function has two call sites).  Do not explicitly zero the context
because we've already saved 0 as the context in the handler.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 11:04:41 +00:00
mstarzinger@chromium.org
5e0ff8b2e0 Fix size of store buffer to depend on pointer size.
This makes the store buffer size depend on the pointer size so that
store buffers can hold the same number of entries on all architectures.
The number of pages marked scan-on-scavenge should decrease on x64 and
performance of splay should drastically improve on x64.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-09 09:51:54 +00:00
yangguo@chromium.org
53c6077cee Fixing issue 103259.
BUG=103259
TEST=regress-103259.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 14:59:40 +00:00
rossberg@chromium.org
f936aac43e Make _CallFunction proxy-aware.
Change calling convention for CallFunction stub.
Some fixes regarding strict mode call traps.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 14:39:37 +00:00
keuchel@chromium.org
72dba271eb Reapply r9870 "Remove some initialization checks based on source positions.".
This reverts r9896 "Revert r9870 due to browser-test failures." See below for
the diff from the previous version for the ia32 platform. The code for other
platforms has been changed accordingly.

TEST=mjsunit/compiler/lazy-const-lookup.js

diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
index 2cbf518..1990f2f 100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -1258,13 +1258,17 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
         // binding is initialized:
         //   function() { f(); let x = 1; function f() { x = 2; } }
         //
-        // Check that we always have valid source position.
-        ASSERT(var->initializer_position() != RelocInfo::kNoPosition);
-        ASSERT(proxy->position() != RelocInfo::kNoPosition);
-        bool skip_init_check =
-            var->mode() != CONST &&
-            var->scope()->DeclarationScope() == scope()->DeclarationScope() &&
-            var->initializer_position() < proxy->position();
+        bool skip_init_check;
+        if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
+          skip_init_check = false;
+        } else {
+          // Check that we always have valid source position.
+          ASSERT(var->initializer_position() != RelocInfo::kNoPosition);
+          ASSERT(proxy->position() != RelocInfo::kNoPosition);
+          skip_init_check = var->mode() != CONST &&
+              var->initializer_position() < proxy->position();
+        }
+
         if (!skip_init_check) {
           // Let and const need a read barrier.
           Label done;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 13:28:53 +00:00
danno@chromium.org
76a9340482 Fix removed return parameter count.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 13:16:56 +00:00
danno@chromium.org
93559bb6c9 Attempt to fix Windows x64 build.
R=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 13:07:14 +00:00
ulan@chromium.org
0d536dec26 Shrink the new space and uncommit marking deque on low memory notification.
BUG=v8:1669
TEST=cctest/test-heap/CollectingAllAvailableGarbageShrinksNewSpace

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 12:42:02 +00:00
mstarzinger@chromium.org
e24c612a5e Fix setting array length to be ES5 conform.
This also refactors the way we set the length of an arrays' backing
store to use the new elements accessor interface. The actual fix is in
DictionaryElementsAccessor::SetLengthWithoutNormalize() where we first
search for non-deletable elements according to ES5 section 15.4.5.2
specifications.

Snippet from the specification: Attempting to set the length property of
an Array object to a value that is numerically less than or equal to the
largest numeric property name of an existing array indexed non-deletable
property of the array will result in the length being set to a numeric
value that is one greater than that largest numeric property name.

R=danno@chromium.org
TEST=test262/15.4.4.??-7-b-16

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 11:59:56 +00:00
erik.corry@gmail.com
9b968b7db9 Another 64->32 bit warning from the Windows compiler.
Review URL: http://codereview.chromium.org/8503010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 11:24:44 +00:00
kmillikin@chromium.org
aee8ae0548 Tighten the code for MacroAssembler::ThrowUncatchable.
Test at the bottom in the unwind loop.  Eliminate the possibility of a
useless move to the eax/rax/r0 register (currently impossible because
this function has two call sites).  Do not explicitly zero the context
because we've already saved 0 as the context in the handler.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 11:09:00 +00:00
erik.corry@gmail.com
59a472a742 Try to fix compile error on Windows.
Review URL: http://codereview.chromium.org/8497010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:57:34 +00:00
svenpanne@chromium.org
fbc0a9cd6f Disentangle header dependecies a bit by moving PropertyDetails-related types into a separate header
This moves PropertyType and its related predicate out of v8globals.h, where it didn't belong.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:43:25 +00:00
erik.corry@gmail.com
cd8d915c72 Clean up the marking speed heuristics. This reduces the
max heap size on 64 bit from ca. 300Mbytes to ca. 200Mbytes
on Ulan's splay variant.  On 32 bit not much change.
Review URL: http://codereview.chromium.org/8494012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:28:58 +00:00
fschneider@chromium.org
2a1f08a1c2 Improve dominator computation to avoid worst-case quadratic time.
In case of a degenerated CFG like in the example below processing
predecessors in the wrong order yields n^2 runtime.

  do {
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    if (x) break;
    // etc.
  } while (false);

Reversing iteration order avoids this.
Review URL: http://codereview.chromium.org/8502012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:18:25 +00:00
danno@chromium.org
3628c9347c Upstream Android V8 change.
Review URL: http://codereview.chromium.org/8351073
Patch from Jing Zhao <jingzhao@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:14:03 +00:00
danno@chromium.org
3d8b0a606a Create stub and runtime function for x64 full-codegen array literal element initialization.
R=svenpanne@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 10:10:24 +00:00
fschneider@chromium.org
4627023b38 Revert r9901 to make tree green again.
There was a test failure on x64 mozilla tests.

TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/8495011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 09:56:09 +00:00
fschneider@chromium.org
cac3008437 [hydrogen] optimize switch with string clauses
Hydrogen should optimize not only SMI clauses, but clauses with string literals
too.

Patch from fedor.indutny <fedor.indutny@gmail.com>.

R=vegorov@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8373029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 09:08:33 +00:00
svenpanne@chromium.org
36b715b1bd Refactoring only: Make the handling of PropertyType more explicit.
Do not rely on 'default' clauses or 'if's when analysing a PropertyType, because
this makes it hard to find the relevant places when a new type is added. Note
that the detection of "phantom property types" is left untouched, because this
might have a performance impact, especially for the GC (to be investigated).

This is a preliminary step for introducing a new kind of map transition.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-08 08:42:13 +00:00
erik.corry@gmail.com
b9a2d181a1 Revert accidental commit that messed up the incremental speed heuristics.
Review URL: http://codereview.chromium.org/8467014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 14:00:02 +00:00
keuchel@chromium.org
c0d0bf863a Revert r9870 due to browser-test failures.
This reverts commit 4d5b5f12aac932ad892c7b6f152b6168708d4210.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 12:33:58 +00:00
ricow@chromium.org
3a41613340 Optimize format message to not use DefineOwnProperty and freeze, do these inline
Review URL: http://codereview.chromium.org/8494005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:50:39 +00:00
erik.corry@gmail.com
52b1457fac Don't set the limit that triggers the next GC higher than the max
old space size.
Review URL: http://codereview.chromium.org/8491009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:35:24 +00:00
yangguo@chromium.org
cfc6f31e59 MIPS: Adding assertions to fast elements conversion.
Port r9875 (97dc1e0e).

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:31:54 +00:00
jkummerow@chromium.org
5bbd86bc22 Prepare push to trunk. Now working on version 3.7.5.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 10:08:24 +00:00
keuchel@chromium.org
aad9e50fb4 MIPS: Remove some initialization checks based on source positions.
Port r9870 (959ec43).

Original commit message:

This depends on
http://codereview.chromium.org/8352039 and
http://codereview.chromium.org/8423005 .

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 09:42:54 +00:00
ricow@chromium.org
086ae44213 Optimize DefineOneShotAccessor in messages.js to not call DefineOwnProperty.
Review URL: http://codereview.chromium.org/8490008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 09:30:28 +00:00
jkummerow@chromium.org
9fa02bc5dd MIPS: Cleanup: use JumpIf[Not]Smi() whenever we can
Port r8322 (7b8b4a951f).

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-07 08:41:47 +00:00
mstarzinger@chromium.org
bca8d42e3b Revert r9596 due to page-cycler regressions.
R=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-04 13:05:16 +00:00
jkummerow@chromium.org
9625d5d4a0 Fix Array.{splice,slice} to set proper ElementsKind of result
TEST=mjsunit/elements-kind.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-04 12:47:58 +00:00
jkummerow@chromium.org
f2787a42b0 Fix JSObject::EnsureCanContainElements to correctly iterate over Arguments
TEST=mjsunit/elements-kind.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-04 12:31:44 +00:00
jkummerow@chromium.org
8450c60d47 Fix Runtime_ArrayConcat to handle FAST_DOUBLE_ELEMENTS
TEST=mjsunit/elements-kind.js; stanford-crypto-sha256-iterative in debug mode

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-04 12:19:35 +00:00
yangguo@chromium.org
2944545888 Adding assertions to fast elements conversion.
Review URL: http://codereview.chromium.org/8437092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 16:24:24 +00:00
keuchel@chromium.org
48fed9a8ab Clean up Scope::CollectUsedVariables.
Review URL: http://codereview.chromium.org/8438071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:50:19 +00:00
mstarzinger@chromium.org
0bbfb46aa6 Fix Harmony sets and maps to allow undefined as keys.
This uses a global sentinel as a replacement for undefined keys, which
are not supported internally but required for Harmony sets and maps.

R=rossberg@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:33:58 +00:00
keuchel@chromium.org
ea18539244 Tune context allocation for variables accessed from inner scopes.
After introduction of with scopes we have enough static information to omit
context allocation in the case that a variable is accessed from a nested block
or catch scope of the same function. Only variables accessed from the inside of
a nested function or with scope are forced to be allocated in the context.

This essentially reverts
http://code.google.com/p/v8/source/detail?r=9281 .
which in turn reverted an earlier change.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:33:46 +00:00
mstarzinger@chromium.org
79cadcc947 Fix Harmony sets and maps to allow null as key.
This changes the internal convention for marking deleted entries in hash
tables from null_value to the_hole_value, which is consistent with other
usages of the_hole.

R=rossberg@chromium.org,kmillikin@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 14:17:05 +00:00
keuchel@chromium.org
fd21937812 Remove some initialization checks based on source positions.
This depends on
http://codereview.chromium.org/8352039 and
http://codereview.chromium.org/8423005 .

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 12:05:48 +00:00
keuchel@chromium.org
58123bff56 Remove some unnecessary binding initialization checks.
This depends on http://codereview.chromium.org/8352039/ .

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 11:59:51 +00:00
keuchel@chromium.org
7385fef2ca Cleanup ScopeInfo and SerializedScopeInfo.
Both classes have been merged into a single ScopeInfo
class that implements the functionality from both.

This CL does not adapt the broken gdb-jit interface.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 10:36:55 +00:00
keuchel@chromium.org
80d1b898fb Fix gcc-4.6 warnings.
BUG=v8:1806

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:59:01 +00:00
kmillikin@chromium.org
224bbad462 MIPS: Add and use ElementsKind side effect
Port r9847 (fc7590).

Original commit message:

Also partition side effects into observable and not observable, with only observable requiring Simulates and non-observable changes able to participate in GVN and code hoisting.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:58:37 +00:00
kmillikin@chromium.org
7dac2367c0 MIPS: Remove the forward-bailout stack from the non-optimizing compiler.
Port r9863 (0996dc77)

Original commit message:
This was pretty heavyweight.  It was kept in just for a few corner cases
that assumed it was there.  We can work around them by making sure that the
expression in a reified test context is always really the expression that
was visited in that context; and by inspecting the context manually and
consing up a pair of extra AST IDs for the unusual case of unary not in a
value AST context.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:57:56 +00:00
yangguo@chromium.org
aaba9d8f9d Implement VirtualMemory on FreeBSD to fix build.
BUG=v8:1807

Review URL: http://codereview.chromium.org/8439068
Patch from Ben Noordhuis <info@bnoordhuis.nl>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-03 08:33:06 +00:00
kmillikin@chromium.org
4e4a901d96 Remove the forward-bailout stack from the non-optimizing compiler.
This was pretty heavyweight.  It was kept in just for a few corner cases
that assumed it was there.  We can work around them by making sure that the
expression in a reified test context is always really the expression that
was visited in that context; and by inspecting the context manually and
consing up a pair of extra AST IDs for the unusual case of unary not in a
value AST context.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-02 16:53:32 +00:00
ulan@chromium.org
307b589e61 Fix error introduced in r9431, which leads to redundant lookup when setting property with handler.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-02 13:04:59 +00:00
fschneider@chromium.org
f3f16dc17a Make non-templatized versions of LIR printing functions.
This avoid duplicating the code for each template instance.

Also remove dead code from different places in our code base.

Removed some verification code from release builds.
Review URL: http://codereview.chromium.org/8387070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-02 08:32:40 +00:00
fschneider@chromium.org
acf8fd28bd MIPS: Merge IR classes for different bitwise operations AND, OR and XOR into one class.
Port r9846 (4cd055a).

Original commit message:

Since we already have only one LIR class, it does not make much sense to separate them at the HIR level.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 16:13:05 +00:00
fschneider@chromium.org
aa34b432de Remove one-line helper used in two places.
Review URL: http://codereview.chromium.org/8387067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 12:25:18 +00:00
whesse@chromium.org
7a25c43a07 Remove stack height tracking from ia32 non-optimizing code generator.
Review URL: http://codereview.chromium.org/8340023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 12:20:46 +00:00
fschneider@chromium.org
d418a11fdd Use placement-new for zone-allocation in the Lithium classes.
This avoid calling Isolate::Current on each zone-allocation of
a Lithium object.
Review URL: http://codereview.chromium.org/8429001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 11:49:31 +00:00
fschneider@chromium.org
97c3750fd8 Fix bug introduced by my refactoring of bitwise HIR instructions.
DataEquals was not overridden properly.
Review URL: http://codereview.chromium.org/8387066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 11:35:54 +00:00
lrn@chromium.org
65b9ab93af Merged Scanner and JavaScriptScanner.
JavaScriptScanner had become the only concrete subclass of Scanner, so there
was no longer a need for the distinction.

Also fixed up comments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 07:47:15 +00:00
vegorov@chromium.org
858320725b Split incremental marking write barrier into fast and slow paths.
Force inlining of the fast path.

Force inlining LiteralBuffer::AddChar and Scanner::AddLiteralChar.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 20:59:28 +00:00
keuchel@chromium.org
6b533c315a Fix unwanted implicit conversion from bool to int.
We have the following signatures:
VariableProxy* Scope::NewUnresolved(Handle<String> name,
                                    int position = RelocInfo::kNoPosition);

bool Parser::inside_with() const;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 15:04:27 +00:00
danno@chromium.org
75585d9643 Create stub and runtime function for ia32 full-codegen array literal element initialization.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 14:42:06 +00:00
jkummerow@chromium.org
669bfc0363 Optimize JS date implementation for smi-only arrays
Review URL: http://codereview.chromium.org/8409010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 14:39:21 +00:00
danno@chromium.org
0766a138a6 Add and use ElementsKind side effect
Also partition side effects into observable and not observable, with only observable requiring Simulates and non-observable changes able to participate in GVN and code hoisting.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 14:15:10 +00:00
fschneider@chromium.org
0df9569fe5 Merge IR classes for different bitwise operations AND, OR and XOR into one class.
Since we already have only one LIR class, it does not make much sense to separate
them at the HIR level.
Review URL: http://codereview.chromium.org/8426005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 13:06:26 +00:00
kmillikin@chromium.org
d00b82ff91 MIPS: updated atomic operations.
Specifically:
-fixed a bug in CompareAndSwap that caused randomly occuring timeouts on MIPS boards.
-added gcc inline asm control push/pop instructions to correctly save/restore the reorder setting instead of simply assuming it should be enabled.
-reordered/optimized some instructions to utilize MIPS-specific pipelining features (branch delay slot).
-fixed improper usage of write barriers

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 12:47:02 +00:00
kmillikin@chromium.org
ee3197d309 MIPS: Handlify CompileConstructStub and the remaining CallStubCompiler functions.
Port r9837 (38061af).
Port r9834 (95ac04).

Original commit message (r9834):
Also, handlify functions for loading with interceptors and callbacks.
Remove some unneeded code.  Rename Foreign::address() because it
confusingly shadows HeapObject::address() which does something quite
different.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 12:36:11 +00:00
kmillikin@chromium.org
3ba063197d MIPS: Fixed wrong register usage in StringDictionaryLookupStub::GenerateNegativeLookup.
This fixes a lot of test failures triggered by r9834, for example mjsunit/const-redecl.js.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 12:34:13 +00:00
fschneider@chromium.org
a2240fc52b Eliminate some virtual function from AST classes.
1. Remove unused dead functions.

2. Replace the virtual As-* type cast functions with non-virtual version
that uses node_type().

Result is around 13K reduction in binary size.
Review URL: http://codereview.chromium.org/8335006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 11:11:26 +00:00
lrn@chromium.org
30465596e6 Make eval consider anything on the form eval(args...) a potential direct cal
Previously we omitted all cases where the global eval property was shadowed,
even if by a variable holding the same value. ES5 requires us to treat these
as direct calls.

We still throw if calling indirect eval with a detached global object.

BUG=v8:994
TEST=mjsunit/eval.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-31 09:38:52 +00:00
ulan@chromium.org
fa8a71df9a Handlify CompileConstructStub. Based on 8391045.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 14:08:43 +00:00
vegorov@chromium.org
c933e28935 Make C++ to JS transition faster by avoiding JavaScriptFrameIterator in SaveContext.
R=kmillikin@chromium.org
BUG=v8:1730

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 12:49:09 +00:00
kmillikin@chromium.org
0df252b38b Handlify the remaining CallStubCompiler functions.
Also, handlify functions for loading with interceptors and callbacks.
Remove some unneeded code.  Rename Foreign::address() because it
confusingly shadows HeapObject::address() which does something quite
different.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 12:37:29 +00:00
danno@chromium.org
6d7d6d4e4e Force transition to FAST_ELEMENTS on out-of-bounds KeyedLoads.
Proactively ensure that that objects don't get FAST_DOUBLE_ELEMENTS to reduce the number of double boxing operations when generated code calls the runtime frequently to satisfy KeyedLoad requests.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 10:35:38 +00:00
keuchel@chromium.org
a9a97d010e Remove kInvalidStrictFlag and make gcc-4.5 happy again.
Review URL: http://codereview.chromium.org/8403036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 09:10:29 +00:00
kmillikin@chromium.org
9fd8930a70 Fix presubmit error.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:51:08 +00:00
mstarzinger@chromium.org
cd9bc6c3a6 Fix error handling in Date.prototype.toISOString.
This fixes Date.prototyoe.toISOString to throw a RangeError exception
for invalid time values. It also includes a fix to removes the arbitrary
(and completely bogus) range limit on the date value during construction
of a Date object. Note that we still have bogus range limits on the year
and month values.

R=lrn@chromium.org
BUG=v8:1792
TEST=mjsunit/date,test262/15.9.5.43-0-*

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:45:04 +00:00
kmillikin@chromium.org
f077a41b12 MIPS: crankshaft implementation
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:14:46 +00:00
yangguo@chromium.org
b5b3345799 MIPS: Fixing performance regression in issue 1787.
Port r9812 (c1644a9d)

Note: MIPS already had the fix for this regression.
This commit only adds the extra assertions.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:03:13 +00:00
erik.corry@gmail.com
31834e0f9d Prepare push to trunk. Now working on 3.7.4.
Review URL: http://codereview.chromium.org/8417020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 07:38:27 +00:00
fschneider@chromium.org
8b1494b819 Temporarily disable target recording CallFunctionStub until issue 1789 is fixed.
Review URL: http://codereview.chromium.org/8340029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 15:46:25 +00:00
yangguo@chromium.org
8624fb85d2 Tiny improvements on fast element conversion loops in ia32 and x64.
Review URL: http://codereview.chromium.org/8403035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 14:19:22 +00:00
erik.corry@gmail.com
1dd598387e Prepare push to trunk. Now working on 3.7.3
Review URL: http://codereview.chromium.org/8407001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 14:03:32 +00:00
keuchel@chromium.org
6e767e3f2d Use StrictModeFlag in preparser and preparse data.
Review URL: http://codereview.chromium.org/8396040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 13:08:51 +00:00
fschneider@chromium.org
a5b40e27b8 Revert r9805.
It did not fix the original problem, but instead introduced new ones.

R=vegorov@chromium.org
Review URL: http://codereview.chromium.org/8404037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 12:12:53 +00:00
yangguo@chromium.org
b56466f4da Fixing dead code in empty array init.
TEST=set JSArray::kPreallocatedArrayElements to larger than 4.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 11:11:59 +00:00
kmillikin@chromium.org
9cc75769bc MIPS: Handlify CompileLoad and CompileStore
Port the following 3 stub-cache commits:
r9788   (67147b7)  Handlify CompileLoadGlobal, CompileLoadElement, CompileLoadPolymorphic.
r9791   (b19c694)  Handlify simple functions of [keyed] store stub compiler.
r9803   (e0c3c89)  Handlify CompileStoreCallback, CompileStoreInterceptor.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 09:21:15 +00:00
yangguo@chromium.org
2923136f95 Fixing performance regression in issue 1787.
BUG=v8:1787

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 07:59:12 +00:00
erik.corry@gmail.com
678200bc11 Prepare push to trunk. Now working on 3.7.2
Review URL: http://codereview.chromium.org/8390049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-27 05:27:38 +00:00
yangguo@chromium.org
fdb13b2e56 MIPS: port Implement for-in loop for proxies.
Port r9760 (a1c4dc80)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 15:02:00 +00:00
fschneider@chromium.org
4ded3ccf7c Fix bug in lazy deoptimization after HInvokeFunction.
The full code generator expects the function expression on top
of the stack until after the all. We have to emit the call + the
corresponding simulate before dropping it in the hydrogen code.

BUG=v8:1789
Review URL: http://codereview.chromium.org/8391042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 14:05:18 +00:00
lrn@chromium.org
a9edfefa58 Remove special-casing of calls to RegExp test and exec methods with no argument.
Matches new JSC behavior. Fix issue 75740.

BUG=75740
TEST=mjsunit/regexp-static

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:51:07 +00:00
ulan@chromium.org
405d57fe00 Handlify CompileStoreCallback, CompileStoreInterceptor.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:35:12 +00:00
yangguo@chromium.org
b195db5174 MIPS: port Refactor and clean up array allocation across platforms.
Port r9747 (dc33375)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:35:10 +00:00
mstarzinger@chromium.org
d0ce626477 Fix identity hash code function to respect flag.
The flag passed to JSObject::GetIdentityHash() was not respected so far
and an indentity hash code was generated even when the flag requested
not to do so. This could lead to a rare corner cases (for which a test
case was added) where a GC request would have been dropped.

R=rossberg@chromium.org
TEST=cctest/test-dictionary

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 12:23:40 +00:00
yangguo@chromium.org
70b9d56e06 Fixing issue 1788.
BUG=v8:1788

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 11:34:11 +00:00
ulan@chromium.org
beb0bbe3a9 Handlify simple functions of [keyed] store stub compiler.
Handlified functions: CompileStoreField, CompileStoreGlobal, CompileStoreElement, CompileStorePolymorphic.

Based on 8375053.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:45:24 +00:00
mstarzinger@chromium.org
5a33ffd7e8 Fix Error.prototype.toString to be ES5 conform.
R=lrn@chromium.org
TEST=test262/15.11.4.4-8-1,mjsunit/error-tostring

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:41:52 +00:00
fschneider@chromium.org
2d4bb1803d Fix bug in inlining call-as-function when inlining multiple levels deep.
This change fixes a off-by-one level error when dropping the
function from the environment. The function of the outermost
environment was not dropped.

BUG=v8:1785
TEST=test/mjsunit/compiler/regress-inline-callfunctionstub.js
Review URL: http://codereview.chromium.org/8341019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 10:31:06 +00:00
ulan@chromium.org
a2fff744e0 Handlify CompileLoadGlobal, CompileLoadElement, CompileLoadPolymorphic.
R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:58:32 +00:00
rossberg@chromium.org
f7d56eb602 Handle proxies in KeyedStoreIC::Store, instead of just ignoring them.
R=mstarzinger@chromium.org
BUG=v8:1543
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:31:40 +00:00
lrn@chromium.org
0a896072d2 MIPS: port Moved random generator state to global context.
Port r9753 (28cd67f8)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:30:04 +00:00
ulan@chromium.org
d46c0d899f MIPS: port Handlify simple functions of [keyed] load stub compiler.
Port r9773 (4cf7a453)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 09:21:36 +00:00
keuchel@chromium.org
55b7bfa2da MIPS: port Replace boolean indications of strict mode by an enum value.
Port r9746 (804e4e4)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 08:43:33 +00:00
keuchel@chromium.org
5946475d6d MIPS: port Block scoped const variables.
Port r9764 (9b9689d5)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 08:42:15 +00:00
kmillikin@chromium.org
77c4571aca MIPS: port Handlify CallStubCompiler::CompileCallField.
Port r9769 (db287698)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 08:32:37 +00:00
fschneider@chromium.org
d022406db2 Land two MIPS changes.
Issue 8368021: MIPS: port Fix compilation on ARM and x64 broken by r9738
 Issue 8378001: MIPS: port Avoid static initializers in assember-arm.h.
Review URL: http://codereview.chromium.org/8341048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 08:17:24 +00:00
lrn@chromium.org
93f5bfdb98 Make the irregexp interpreter throw on stack overflow.
BUG=v8:904

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-26 06:37:57 +00:00
vegorov@chromium.org
f8c2d3847f Take loop side-effects into account when collecting side-effects on the path between two blocks.
R=fschneider@chromium.org
BUG=100409
TEST=test/mjsunit/regress/regress-100409.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 15:39:55 +00:00
mstarzinger@chromium.org
622d35dc0e Implement Harmony sets and maps.
This implementation extends the internal ObjectHashTable to be able to
hold arbitrary objects (e.g. Smis, Strings, ...) as keys by applying
specialized hashing functions to primitive types. Equality of keys is
defined using the internal SameValue function.

R=rossberg@chromium.org
BUG=v8:1622
TEST=mjsunit/harmony/collections

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 14:14:56 +00:00
ricow@chromium.org
0442e08095 Print out line number and extension name when compilation of an extension fails. This fixes issue 305.
Review URL: http://codereview.chromium.org/8332029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 13:43:19 +00:00
erikcorry
6950fab332 Remove superfluous assert.
Review URL: http://codereview.chromium.org/8332028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 13:34:52 +00:00
erik.corry@gmail.com
f6fef24118 Move some heap verification code in under the --verify-heap flag to speed
up debug mode tests.
Review URL: http://codereview.chromium.org/8381040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 13:27:46 +00:00
ulan@chromium.org
abeb5a4d93 Handlify simple functions of [keyed] load stub compiler.
Handlified functions: CompileLoadNonexistent, CompileLoadField,
CompileLoadConstant, CompileLoadArrayLength, CompileLoadStringLength,
CompileLoadFunctionPrototype.

R=kmillikin@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 12:26:07 +00:00
erik.corry@gmail.com
b8af27868f Speed up debug mode GC.
Review URL: http://codereview.chromium.org/8380038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 12:13:06 +00:00
erik.corry@gmail.com
2f745a15b5 Get back the performance lost in context creation in 9744.
Review URL: http://codereview.chromium.org/8332026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 11:02:29 +00:00
vegorov@chromium.org
d855e5104c Fix presubmit error introduced by r9767.
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:30:52 +00:00
kmillikin@chromium.org
e05c04e5fa Handlify CallStubCompiler::CompileCallField.
This function relies on a number of helpers for checking prototypes and
probing dictionaries.  It is not possible to wrap these helpers to retry
after allocation failure in a safe way---the assembler has no way to undo
what it has already assembled.

These functions have all been duplicated with handle and raw versions.  The
raw versions will eventually be removed completely.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:24:49 +00:00
vegorov@chromium.org
a8a242ad5a CompileArrayPushCall should not use context register as a scratch.
R=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:07:09 +00:00
vegorov@chromium.org
93f99ec06b Provide fast-path for CHECK macro.
Makes debug build 20% faster.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 09:06:07 +00:00
erik.corry@gmail.com
436fb5318c Fix 9763 for real.
Review URL: http://codereview.chromium.org/8382032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:59:03 +00:00
erik.corry@gmail.com
f008c9e62b Fix 9763 after build bot failures.
Review URL: http://codereview.chromium.org/8382031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:42:38 +00:00
keuchel@chromium.org
e8bccc2cb0 Block scoped const variables.
This implements block scoped 'const' declared variables in harmony mode. They
have a temporal dead zone semantics similar to 'let' bindings, i.e. accessing
uninitialized 'const' bindings in throws a ReferenceError.

As for 'let' bindings, the semantics of 'const' bindings in global scope is not
correctly implemented yet. Furthermore assignments to 'const's are silently
ignored. Another CL will introduce treatment of those assignments as early
errors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:33:08 +00:00
erik.corry@gmail.com
86337d3de7 Get the speed back in new context creation after it was tanked
in 9744.
Review URL: http://codereview.chromium.org/8380035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:24:06 +00:00
erik.corry@gmail.com
69c44d6460 Add missing comment from last commit.
Review URL: http://codereview.chromium.org/8383003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-25 08:23:56 +00:00
rossberg@chromium.org
46dde044de Adapt to latest spec changes for Proxy.create[Function].
R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 16:25:30 +00:00
rossberg@chromium.org
70dc2fe968 Implement for-in loop for proxies.
Fix related corner case for Object.keys.
Remove obsolete GET_KEYS builtin.

R=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 15:56:18 +00:00
yangguo@chromium.org
f92da58e13 Handle COW-arrays correctly when converting smi->double fast elements.
TEST=mjsunit/elements-transition.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 15:06:20 +00:00
fschneider@chromium.org
53e7502fa0 Fix bug in environment simulation after inlined call-as-function.
This change is based on my previous change enabling inlining calls-as-function
fixing the bugs related to deoptimization.

The function value on top of the environment was dropped too late in the old code.
As a result we could get a wrong value on top after deoptimization.

This change includes r9619. It was reverted because of test failures that are fixed
with this patch.
Review URL: http://codereview.chromium.org/8360001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 13:53:08 +00:00
ulan@chromium.org
f630ff0c67 Use handle lists in Map::FindTransitionedMap.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 13:45:19 +00:00
ulan@chromium.org
9ad3058756 Use handle lists instead of raw pointer lists in polymorphic code cache.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 13:11:14 +00:00
erik.corry@gmail.com
3eb3f8cb65 Fix crash in partial snapshot test when running with no boot snapshot.
Review URL: http://codereview.chromium.org/8381003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:39:29 +00:00
lrn@chromium.org
db95436018 Fix typo in type-name and reorder initialization order.
Remember, when coming back to an old CL, do check that it still works.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:19:55 +00:00
lrn@chromium.org
7ab6e55f78 Moved random generator state to global context.
Change Random to take global context, not isolate.

BUG=v8:864

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:12:21 +00:00
lrn@chromium.org
6898ff2780 Remove one static initializer from disasm.
Review URL: http://codereview.chromium.org/8381002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:07:35 +00:00
yangguo@chromium.org
215c26e3d3 Further improvements upon r9747.
Review URL: http://codereview.chromium.org/8372028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 11:16:38 +00:00
kmillikin@chromium.org
ef31d0480a Handlify the remaining stub compiler functions for call ICs.
Handlify StubCompiler functions for CallIC and KeyedCallIC cases
Megamorphic, Arguments, DebugBreak, and DebugPrepareStepIn.

R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 10:55:00 +00:00
kmillikin@chromium.org
ec007b46d1 Handlify call cases for pre-monomorphic, normal, and miss.
These cases turn out to be easy.  There is a lingering raw pointer
implementation of TryCompileCallMiss because it's need by some of the
unconverted call stubs.

R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 09:33:11 +00:00
mstarzinger@chromium.org
f193d87ec4 Fix initialization of allocation timeout value.
The allocation timeout value should not be initialized to 0, that
triggers a collection at the first allocation which breaks assumptions
for some test cases.

R=ricow@chromium.org
TEST=cctest/test-heap/Iteration

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 08:59:34 +00:00
yangguo@chromium.org
5f7f79b012 Refactor and clean up array allocation across platforms.
Review URL: http://codereview.chromium.org/8359034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 07:55:50 +00:00
keuchel@chromium.org
c6464d500b Replace boolean indications of strict mode by an enum value.
Review URL: http://codereview.chromium.org/8344082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 07:47:22 +00:00
yangguo@chromium.org
75c7565d4b MIPS: Porting r9605 to arm (elements kind conversion in generated code).
Port r9690 (857eacf)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 18:40:36 +00:00
erik.corry@gmail.com
9065e95d45 Fix missing write barrier in deserialization. Issue 1783.
Review URL: http://codereview.chromium.org/8352045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 15:20:53 +00:00
danno@chromium.org
f464ad61fb MIPS: port Support array literals with FAST_DOUBLE_ELEMENTS ElementsKind.
Port r9698 (cf0cc54f)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 15:15:47 +00:00
mikhail.naganov@gmail.com
fa0d4ecf43 The detailed heap snapshot generator was slightly adjusted for tracking sliced strings.
BUG=v8:1779
TEST=cctest/test-heap-profiler/HeapSnapshotSlicedString

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 13:05:37 +00:00
ulan@chromium.org
ae6e6a689c Handlify KeyedIC::ComputeStub.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 11:42:54 +00:00
vegorov@chromium.org
9b0626b52a MIPS: port RegExpMacroAssembler::CheckStackGuardState should update input string pointer...
... when it is moved or changed by GC.

Port r9697 (d53382a)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:59:25 +00:00
vegorov@chromium.org
b9f6ae21b8 Fix compilation on ARM and x64 broken by r9738
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:53:02 +00:00
vegorov@chromium.org
6c7a5d12c8 Avoid write-barriers when initializing newly created Code object.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:37:56 +00:00
vegorov@chromium.org
5bb6d386b4 Disable incremental marking when GC extension is exposed.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:33:50 +00:00
vegorov@chromium.org
3474190711 Fix CountLeadingZeros on non-ARMv5 hardware.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:33:12 +00:00
vegorov@chromium.org
af876ee474 Avoid incremental marking write-barrier when constructing descriptor arrays.
R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:32:38 +00:00
keuchel@chromium.org
666c4be29f Reapply r9673 "Scope tree serialization and ScopeIterator cleanup."
This also includes the two fixes from r9674 and r9675. Here's the diff
to the previous CL.

 --- a/src/runtime.cc
 +++ b/src/runtime.cc
 @@ -11133,17 +11133,26 @@ class ScopeIterator {
        context_(Context::cast(frame->context())),
        nested_scope_chain_(4) {

 +    // Catch the case when the debugger stops in an internal function.
 +    Handle<SharedFunctionInfo> shared_info(function_->shared());
 +    if (shared_info->script() == isolate->heap()->undefined_value()) {
 +      if (shared_info->scope_info()->HasContext()) Next();
 +      return;
 +    }
 +
      // Check whether we are in global code or function code. If there is a stack
      // slot for .result then this function has been created for evaluating
      // global code and it is not a real function.
      // Checking for the existence of .result seems fragile, but the scope info
      // saved with the code object does not otherwise have that information.
 -    int index = function_->shared()->scope_info()->
 +    int index = shared_info->scope_info()->
          StackSlotIndex(isolate_->heap()->result_symbol());

      // Reparse the code and analyze the scopes.
      ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
 -    Handle<SharedFunctionInfo> shared_info(function_->shared());
      Handle<Script> script(Script::cast(shared_info->script()));
      Scope* scope;
      if (index >= 0) {

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:26:59 +00:00
kmillikin@chromium.org
937006f761 Handlify StubCompiler::CompileCallInitialize.
CallIC::GenerateInitialize and KeyedCallIC::GenerateInitialize are
verified safe for GC.

R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 10:19:16 +00:00
fschneider@chromium.org
171846dbd1 Avoid static initializers in assember-arm.h.
Patch by joth@chromium.org.

BUG=v8:1784
Review URL: http://codereview.chromium.org/8367001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 09:55:25 +00:00
kmillikin@chromium.org
6c305c244e MIPS: port Handlify the stub cache lookup and patching for CallIC and KeyedCallIC.
Port r9729 (4aa1f5a6)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-21 08:59:32 +00:00
kmillikin@chromium.org
1959409f6d Fix presubmit failure.
TBR=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:28:14 +00:00
kmillikin@chromium.org
e3792a6830 Handlify the stub cache lookup and patching for CallIC and KeyedCallIC.
R=ulan@chromium.org,vegorov@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 17:08:53 +00:00
ulan@chromium.org
a5da9320d2 Reset failure flag before retrying stub compilation.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 16:39:26 +00:00
ulan@chromium.org
997ad6387a Handlify upper layers of KeyedStoreIC.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 13:54:16 +00:00
erik.corry@gmail.com
d66ea04b6c Fix the build on Mac.
Review URL: http://codereview.chromium.org/8354037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 13:47:14 +00:00
svenpanne@chromium.org
627a3ecbd9 Improved printing of Simulate, LoadNamedFieldPolymorphic, LoadNamedGeneric, and StoreNamedField Hydrogen instructions a bit.
Review URL: http://codereview.chromium.org/8352044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:55:31 +00:00
yangguo@chromium.org
bd5e694a9c Refactor elements kind conversion.
Review URL: http://codereview.chromium.org/8355035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:36:45 +00:00
lrn@chromium.org
a47caee095 Make builtin functions be skipped in stack traces.
Does include exposed builtin functions ("native functions").

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:31:33 +00:00
erik.corry@gmail.com
8f9721bbbf Shave 39% from snapshot size.
Review URL: http://codereview.chromium.org/8344079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 12:27:10 +00:00
vegorov@chromium.org
5d72dde98a Switch UnreachableObjectsFilter to use Marking instead of InstrusiveMarking.
GcSafeFindCodeForInnerPointer does not work with intrusive marking now and it is used when roots are iterated.

R=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 11:40:16 +00:00
whesse@chromium.org
388813581e Speed up comparison with a constant.
Improve optimized code for comparison of an int32 against a constant, or comparison of two double constants.  Contributed by m.m.capewell.

Original codereview is http://codereview.chromium.org/7489045/.
This cl is just created in order to commit the change.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 10:26:45 +00:00
danno@chromium.org
c868f0c4a4 Fix x64 and ARM builds.
TBR=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 10:07:54 +00:00
danno@chromium.org
5a5c3e4eae Make sure PrintElementsKind is compiled in release mode.
TBR=jkummerow@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 09:56:18 +00:00
danno@chromium.org
f7563019c7 Add flag to trace element kind transitions
Currently only traces transitions from generated ia32 code.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 09:38:24 +00:00
ulan@chromium.org
f985b15aae Handlify upper layers of KeyedLoadIC.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 09:35:47 +00:00
jkummerow@chromium.org
655b2332d7 ElementsKind transitioning support for keyed loads in Crankshaft
Review URL: http://codereview.chromium.org/8352012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 08:49:01 +00:00
jkummerow@chromium.org
deff312f25 Handle keyed stores after elements transition monomorphically if possible
Review URL: http://codereview.chromium.org/8354003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 08:41:38 +00:00
svenpanne@chromium.org
3edfb4bbbc Make IsGenericDescriptor spec-conformant.
When the descriptor argument is undefined, the spec is very explicit about the
fact that we should return false (not true, like we did previously). I couldn't
come up with a test case for this, but the old code leaves a bad feeling about
corner cases, so better play safe.
Review URL: http://codereview.chromium.org/8356004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-20 07:55:30 +00:00
mstarzinger@chromium.org
67c9a03922 Fix handling Function.apply for non-array arguments.
R=rossberg@chromium.org
TEST=mjsunit/apply,test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 13:56:18 +00:00
mstarzinger@chromium.org
6742176949 Fix Array.filter to use internal array for result.
In built-in code we use arrays for internal computations. This makes it
possible to affect the built-in code by putting getters or setters on
the array prototype chain. Using internal arrays prevents those issues.

Related to: http://code.google.com/p/v8/source/detail?r=7040

R=svenpanne@chromium.org
TEST=test262/15.4.4.20-9-b-6

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 13:44:29 +00:00
svenpanne@chromium.org
aaf3454248 [[DefineOwnProperty]] should always return true/false (or throw an exception), never undefined.
Note that this is not an observable behavior, but following the principle of
least surprise, we should follow the spec. Additional (extremely tiny) bonus:
Some ICs see fewer values => better code.
Review URL: http://codereview.chromium.org/8352004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 13:29:37 +00:00
yangguo@chromium.org
372c16161c Optimize fast element conversion in arm using batch store/loads.
Review URL: http://codereview.chromium.org/8353002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:15:15 +00:00
keuchel@chromium.org
17cc6d313f Revert 9673, 9674 and 9675 because of failing webkit tests.
This reverts commits
r9673: "Scope tree serialization and ScopeIterator cleanup."
r9674: "Use OS::SNPrintF instead of snprintf."
r9675: "Use int instead of size_t, StrLength instead of strlen."

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:15:02 +00:00
jkummerow@chromium.org
3a9d6c04ba Introduce HTransitionElementsKind instruction.
TEST=mjsunit/elements-kind

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:10:18 +00:00
kmillikin@chromium.org
838fc27766 Handlify the runtime lookup of CallIC and KeyedCallIC.
R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 12:04:16 +00:00
mstarzinger@chromium.org
acc0263755 MIPS: port Fix evaluation order of GT and LTE operators.
Port r9641 (2876c37)

Note that this port does not include crankshaft portions of this
commit. They have been included in today's update to
http://codereview.chromium.org/7934002/

Also, this fixes a changed function prototype for:
void Deoptimizer::RevertStackCheckCodeAt()

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:44:38 +00:00
fschneider@chromium.org
2791cd5a2c Allow inlining of named function expressions containing ThisFunction reference.
Named function expression have an implicit local variable that
refers to the current function (ThisFunction). Before we only could inline
anonymous function expressions like:

A.prototype.foo = function() {}

as opposed to

A.prototype.foo = function foo() {}

This change enables inlining function of expressions like this.
Review URL: http://codereview.chromium.org/8346032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:41:22 +00:00
danno@chromium.org
e5f23399b4 Support array literals with FAST_DOUBLE_ELEMENTS ElementsKind.
BUG=none
TEST=test/mjsunit/array-literal.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:36:55 +00:00
vegorov@chromium.org
e27d8fcbdc RegExpMacroAssembler::CheckStackGuardState should update input string pointer when it is moved or changed by GC.
If input string was cons-string it might undergo short-circuiting during GC. This does not change input start if underlying seq-string (first element of cons-string) does not move but this makes input-string pointer on the native regexp's frame invalid.

R=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 11:01:02 +00:00
yangguo@chromium.org
96dc1fde46 Bugfix for r9690.
BUG=arm debug test of mjsunit/elements-transition segfaults

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 10:44:20 +00:00
ricow@chromium.org
1c21a9dc6a Don't allow large object space to grow over the max oldspace limit (fixes issue 1717)
Review URL: http://codereview.chromium.org/8345040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 10:15:09 +00:00
svenpanne@chromium.org
d0fe04447e Fixed evaluation order issue in defineProperties.
This is not covered by test262 yet, but it really makes sense and matches Firefox's behaviour.

TEST=mjsunit/define-properties.js
Review URL: http://codereview.chromium.org/8349031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:52:08 +00:00
mstarzinger@chromium.org
b3eba9e764 Fix handling of non-object receivers for array builtins.
R=svenpanne@chromium.org
BUG=chromium:100702
TEST=mjsunit/regress/regress-100702

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:24:37 +00:00
ulan@chromium.org
80e3843dc3 Handlify upper layers of StoreIC based on 8337008.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:17:01 +00:00
mstarzinger@chromium.org
8b181d4de6 Fix updating of property attributes for elements.
This fixes updating of property attributes for data elements when
attributes are already present on a dictionary element but get removed
by a subsequent redefinition of that element.

R=rossberg@chromium.org
BUG=v8:1772
TEST=test262/15.2.3.6-4-82-18

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:06:15 +00:00
yangguo@chromium.org
8472de004b Porting r9605 to arm (elements kind conversion in generated code).
Review URL: http://codereview.chromium.org/8329022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 09:04:35 +00:00
erik.corry@gmail.com
aa91760570 Fix from Paul Lind that helps post-isolates V8 work with older
Android releases.  See http://code.google.com/p/v8/issues/detail?id=1780
Review URL: http://codereview.chromium.org/8347032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 07:49:47 +00:00
svenpanne@chromium.org
140ae348d2 Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt.
This time, we initially leave the HTypeof instruction in the Hydrogen graph,
even for the special cases. We later try to remove this instruction (and any
HConstant) in the canonicalization pass, if possible. Always removing the
HTypeof during the initial graph construction is wrong if e.g. it is used in an
HSimulate.

The removals can be generalized a bit, but this will happen in a separate CL.

TEST=mjsunit/optimized-typeof.js
Review URL: http://codereview.chromium.org/8334021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-19 07:35:30 +00:00
fschneider@chromium.org
e8a26d1eb1 Add write barrier helper for code patching and refactor stack check patching.
The new helper avoids expensive FindCodeForInnerPointer invocation when we have
the host code object available. It is used when patching stack checks.

Also some comments on the ARM platform are corrected.
Review URL: http://codereview.chromium.org/8330021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 15:07:42 +00:00
vegorov@chromium.org
75dc771098 Increase ARM/MIPS simulators stack safety margin to 512 bytes
R=erik.corry@gmail.com
BUG=v8:1773

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 14:41:45 +00:00
mstarzinger@chromium.org
c4d25c8f37 Fix updating of property attributes for elements.
This fixes updating of property attributes for getters and setters on
dictionary elements while redefining. This just updates the property
details on the existing element.

R=rossberg@chromium.org
BUG=v8:1772
TEST=test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 13:49:19 +00:00
sgjesse@chromium.org
a58c963c67 Reapply "Support for precise stepping in functions compiled before debugging was started (step 2)"
This is reapplying r9501 with this single change which seemed to be causing most (all) of the failures for r9501.

--- a/src/debug.cc
+++ b/src/debug.cc
@@ -2230,6 +2230,7 @@ Debugger::Debugger(Isolate* isolate)
       compiling_natives_(false),
       is_loading_debugger_(false),
       never_unload_debugger_(false),
+      force_debugger_active_(true),
       message_handler_(NULL),
       debugger_unload_pending_(false),
       host_dispatch_handler_(NULL),

R=kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 13:40:33 +00:00
lrn@chromium.org
cefbb1e7f8 Make bound functions have poisoned .caller and .arguments.
Also makes func.caller return null if the caller is a bound function,
matching JSC.
Fix bug preventing poisoned setters from triggering.

TEST=mjsunit/function-bind, mjsunit/strict-mode

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 12:26:53 +00:00
ulan@chromium.org
feeb0b0211 Handlify upper layers of LoadIC.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 12:19:18 +00:00
jkummerow@chromium.org
24bc70b2fb Silence GCC-4.5.3 warning about unused result in d8.cc
TEST=GCC 4.5.3 successfully compiles d8.cc even with -Werror enabled.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 12:10:13 +00:00
fschneider@chromium.org
456e5e00c3 Fix assert by reordering the initialization of the arguments boilerplate.
If a GC happened during initialization (when allocating the elements array)
of the non_strict_arguments_boilerplate, heap verification would fail with the following assert:

ASSERT_EQ((map()->has_fast_elements() || map()->has_fast_smi_only_elements()),
            (elements()->map() == GetHeap()->fixed_array_map() ||
             elements()->map() == GetHeap()->fixed_cow_array_map()));

This was not harmful since the boilerplate was setup 
correctly immediatly afterwards.


Simplified the setup code by removing a call to GetElementsTransitionMap. It always return the same map as 
the input object in this case and is therefore unnecessary.


Added more assertions to verify well-formed non-strict
arguments backing store.

BUG=v8:1520
TEST=no more flaky tests with failing this assert.
 
Review URL: http://codereview.chromium.org/8336021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:32:57 +00:00
lrn@chromium.org
b15cfedf38 Fix bug in instanceof of bound functions on ARM.
Implement same on Mips.

BUG=v8:1774
TEST=mjsunit/function-bind

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:30:29 +00:00
kmillikin@chromium.org
56c763f023 Make the GC aware of JSReceiver pointers in LookupResults.
The LookupResult utility class is used in handlified code, but it can
contain a raw pointer to the lookup's holder object.  Create a per-thread
stack of live LookupResults and iterate all the live ones on GC.

R=vegorov@chromium.org,erik.corry@gmail.com
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 11:18:55 +00:00
keuchel@chromium.org
4e5643a648 Scope tree serialization and ScopeIterator cleanup.
The intention is to store enough scope information for the debugger to
handle stack allocation of block scoped variables introduced by
http://codereview.chromium.org/7860045/ .

This CL is based on
http://codereview.chromium.org/7904008/ .

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-18 08:46:46 +00:00
keuchel@chromium.org
7d89f0f3c8 Replace calls_eval() by calls_non_strict_eval() where possible.
Review URL: http://codereview.chromium.org/8321002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 15:19:34 +00:00
yangguo@chromium.org
d7f3985e33 Rolling back r9662.
Review URL: http://codereview.chromium.org/8321001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 13:39:56 +00:00
erik.corry@gmail.com
b90ec2f384 Change to disable stupid gcc warning.
Review URL: http://codereview.chromium.org/8318003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 13:27:57 +00:00
yangguo@chromium.org
d2434953e2 Changes around ascii-check for strings wrt external strings.
Review URL: http://codereview.chromium.org/8312015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:49:34 +00:00
erikcorry
dac0b853e1 Improve speed of Utf8Write by always flattening the string first and
detecting the ASCII case.  Also rewrite Utf8Length to work on an
unflattened string.  Bug: http://code.google.com/p/v8/issues/detail?id=1665
Review URL: http://codereview.chromium.org/8304021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-17 12:48:31 +00:00