Commit Graph

2586 Commits

Author SHA1 Message Date
ager@chromium.org
cd51fcd35f Land patch to add Solaris platform support.
Patch by Erich Ocean and Ryan Dahl.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 12:37:31 +00:00
whesse@chromium.org
f88e7e82b7 Add vstr and vldr floating point load and store to ARM assembler, disassembler, and simulator.
Review URL: http://codereview.chromium.org/545155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 11:54:10 +00:00
lrn@chromium.org
76774115c0 Ported SubStringStub to X64.
Review URL: http://codereview.chromium.org/555049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 08:55:08 +00:00
kasperl@chromium.org
4f087f279d Change the candidate version on bleeding_edge from 2.0.7 to
2.1.0. This means that the next version pushed to trunk will
be the first version in the 2.1.x series. 
Review URL: http://codereview.chromium.org/551139

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 08:28:39 +00:00
fschneider@chromium.org
4d3a5968a5 Inline smi code in count operations in the full code generator.
We now test for a smi before calling ToNumber and inline
the smi increment/decrement for ++ and --. There only a small
increase in code size but loops in top-level code are
becoming much faster as a result.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-22 14:07:25 +00:00
antonm@chromium.org
c7445d9284 Make KeyedLoadIC::generic_stub go into slow case if receiver has an indexed interceptor.
BUG=589,27967.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-22 13:56:12 +00:00
mikhail.naganov@gmail.com
40fd97c87d A follow-up to fix 553: really report function object moves.
As an afterthought, I realized that I put function objects moves
reporting into a method that deals with only code object moves.  I've
looked up that function objects are allocated in old pointer space and
new space, so I moved logging to the corresponding VM methods.

BUG=553

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-22 09:42:24 +00:00
sgjesse@chromium.org
69915136fa Add support for two byte strings in direct call to RegExp
The stub for calling RegExp directly now also handles two byte strings.

Support for flat cons strings added for both ascii and two byte.

Some code code simplifications and added a few constants.
Review URL: http://codereview.chromium.org/545151

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-22 08:31:33 +00:00
peter.rybin@gmail.com
b400427e10 Fix disable_break parameter
Review URL: http://codereview.chromium.org/552068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 17:41:17 +00:00
mikhail.naganov@gmail.com
999e3fca90 Fix issue 553: function frame is skipped in profile when compare stub is called.
The problem appeared due to a fact that stubs doesn't create a stack
frame, reusing the stack frame of the caller function. When building
stack traces, the current function is retrieved from PC, and its
callees are retrieved by traversing the stack backwards. Thus, for
stubs, the stub itself was discovered via PC, and then stub's caller's
caller was retrieved from stack.

To fix this problem, a pointer to JSFunction object is now captured
from the topmost stack frame, and is saved into stack trace log
record. Then a simple heuristics is applied whether a referred
function should be added to decoded stack, or not, to avoid reporting
the same function twice (from PC and from the pointer.)

BUG=553
TEST=added to mjsunit/tools/tickprocessor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 16:42:41 +00:00
antonm@chromium.org
d587851d7f Fix map compact implementation.
Always invoke HeapObjectIterator::has_next() before invoking HeapObjectIterator::next().
This is necessary as ::has_next() has an important side-effect of going to the next
page when current page is exhausted.

And to find if pointers are encodable use more precise data---top of map space, not a number
of pages, as pages might stay in map space due to chunking.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 14:22:28 +00:00
erik.corry@gmail.com
3feb7e801f Fix Android build.
Review URL: http://codereview.chromium.org/545153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 13:59:15 +00:00
lrn@chromium.org
9c6335929b Implement inline string compare on ARM.
Backport optimizations from x64 version to ia32.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 12:10:56 +00:00
erik.corry@gmail.com
399be5ee13 Revert previous change that activated the full (non-optimizing)
compiler for all code.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 11:28:11 +00:00
erik.corry@gmail.com
c8b3127fcc Enable full (non-optimizing) compiler for testing purposes.
I will revert when the bots have picked this one up.
Review URL: http://codereview.chromium.org/549118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 11:15:02 +00:00
erik.corry@gmail.com
c80cba3bcc Add the for statement back into the set of things the
non-optimizing compiler can cope with.  By default it bails out
to the old compiler on encountering a for loop (for performance)
but with this change the --always-fast-compiler flag will enable
functions with for loops to be compiled in the non-optimizing
compiler.  Also enables the non-optimizing compiler on functions
that can be lazily compiled (again only with the flag).
Review URL: http://codereview.chromium.org/552065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-21 08:31:16 +00:00
whesse@chromium.org
04e9399694 Fix V8 issue 580: Arithmetic on some integer constants gives wrong anwers.
Review URL: http://codereview.chromium.org/545134

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 17:01:34 +00:00
kmillikin@chromium.org
1405258621 Rename the fast-codegen* files to full-codegen*.
Review URL: http://codereview.chromium.org/549109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 16:28:21 +00:00
fschneider@chromium.org
c757fa4604 Refactor GenericBinaryOperation and its helper functions to always return a Result.
This is a preparation step for including number type information
in the virtual frame. We need a common place where we can update
the number type information of the result of a binary operation
since we should not modify the state of the virtual frame elements
directly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 16:13:53 +00:00
kmillikin@chromium.org
6ad58b53f4 Rename the toplevel code generator from "Fast" to "Full". It was
always ambiguous whether it tried to generate fast code, or generate
it quickly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 15:51:03 +00:00
vitalyr@chromium.org
80c81d96d4 Fix issue 582: preserve construct stub on first allocation in case we can't optimize it.
BUG=582
TEST=cctest/test-api/NativeFunctionConstructCall

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 14:43:12 +00:00
kmillikin@chromium.org
453d0a136b Add the unary operators ADD and SUB to the code generator selector.
Review URL: http://codereview.chromium.org/548069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 09:55:32 +00:00
antonm@chromium.org
7baf8bdee6 Temporary disable map compact functionality.
TBD=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 23:03:37 +00:00
antonm@chromium.org
6619154580 A simple test for map compact.
Review URL: http://codereview.chromium.org/543113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 16:34:37 +00:00
sgjesse@chromium.org
f9b80f139c Add conditional counter update to IA-32
Review URL: http://codereview.chromium.org/554001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 14:17:34 +00:00
sgjesse@chromium.org
67f9e191f9 Fix some usage of "this" in builtins
The implementation of Object.prototype.valueOf and Object.prototype.toString now calls ToObject on "this" as mandated by the spec.
Review URL: http://codereview.chromium.org/542112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 14:15:47 +00:00
antonm@chromium.org
73390e61ca Make tests pass.
TBR=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 13:26:40 +00:00
antonm@chromium.org
d89bc5322a Fix a build.
Some tests still fail.

TBR=ager@chromium.org


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 13:15:52 +00:00
ricow@chromium.org
4667efc0df Added Extensible property to objects and made methods for extracting and setting it.
Also added one method to runtime to get the extensible value
Additionally, added a check on the number of arguments in the start of GetOwnProperty.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 12:56:36 +00:00
kmillikin@chromium.org
3e8539d873 First step of refactoring expression contexts in the toplevel code
generator.

Contexts are no longer stored in the AST but in the code generator's
state.  This means that the running the code generator selector is not
required to use the toplevel code generator (for instance, if we
already know that we can and should use it).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 12:41:02 +00:00
lrn@chromium.org
712d108ebf X64: Fix bug that reads from rax instead of correct register.
Crashes if rax doesn't point to readable memory.
Recent change made rax contain garbage due to write-barrier computation.
(The fact that it hasn't crashed before highly suggests that the line does nothing.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 12:27:04 +00:00
vitalyr@chromium.org
ca564dcd54 Fixed issue 582: set the right construct stub for native functions.
TEST=cctest/test-api/NativeFunctionConstructCall
BUG=582

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 10:32:20 +00:00
kmillikin@chromium.org
6f91d1bfd6 Add missing break in continue.
TBR=fschneider@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 23:18:09 +00:00
kmillikin@chromium.org
35c85237f0 Fix a bug in the short-circuit logical operations in the toplevel
code generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 16:23:24 +00:00
mikhail.naganov@gmail.com
37d3972429 Fix issue 571: display descriptive names for code objects from snapshot.
As this is only needed for internal profiling (not for DevTools),
the following approach had been chosen:

 - during snapshot creation, positions of serialized objects inside
   a snapshot are logged;

 - then during V8 initialization, positions of deserealized objects
   are logged;

 - those positions are used for retrieving code objects names from
   snapshot creation log, which needs to be supplied to tick processor
   script.

Positions logging is controlled with the new flag: --log_snapshot_positions.
This flag is turned off by default, and this adds no startup penalty.

To plug this fix to Golem, the following actions are needed:

 - logs created using 'mksnapshot' need to be stored along with VM images;

 - tick processor script needs to be run with '--snapshot-log=...' cmdline
   argument.

BUG=571

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 16:04:25 +00:00
peter.rybin@gmail.com
5d60fa7ac8 Implement issue 549 Make V8 call DebugMessageDispatchHandler with Locker locked
Review URL: http://codereview.chromium.org/505025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 15:48:41 +00:00
sgjesse@chromium.org
8707b36233 Fix GC bug
The patching of the receiver added in r3616 was not GC-safe and could leave a failure object in place of the receiver if allocation of the wrapper JS object failed.
Review URL: http://codereview.chromium.org/546068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 14:13:58 +00:00
sgjesse@chromium.org
ef0743abd7 Trace command in ARM simulator debugger
The ARM simulator debugger now has a 'trace' command which is used to toggle the trace of executed instructions.
Review URL: http://codereview.chromium.org/548068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 14:11:37 +00:00
kmillikin@chromium.org
5e2122c0b1 Fix some of my earlier typos.
TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/543106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 14:09:36 +00:00
kmillikin@chromium.org
9095abb776 Introduce 'top-of-stack caching' to the toplevel code generator by
allowing the value of the rightmost subexpressions to be evaluated
into an accumulator register (eg, eax, rax, or r0) rather than onto
the stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 14:04:55 +00:00
lrn@chromium.org
55177a2644 X64 implementation of native ascii string compare.
Review URL: http://codereview.chromium.org/545108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 11:22:03 +00:00
lrn@chromium.org
eee6c6405e RegExp bitmap test for word character.
Review URL: http://codereview.chromium.org/547024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 09:49:50 +00:00
erik.corry@gmail.com
a5ac66628d Small optimization of ARM compare stub. Reverse all references to
left and right sides of the comparison to reflect reality.  Don't
check explicitly for NaNs when using VFP3 since the compare
operation can signal this case with the v flag.  Use cmp instead
of tst in the fast compilers since tst leaves the v flag unchanged
and thus can only work by accident on non-equality comparisons.
Review URL: http://codereview.chromium.org/551048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 08:36:06 +00:00
peter.rybin@gmail.com
6d7ce68102 Make debugger unloading deferred operation
This CL should make debugger handler setting an asynchronous operation for real.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 22:40:57 +00:00
peter.rybin@gmail.com
ec86bea132 Implement issue 554 Add "ProcessDebuggerRequests" call to Debug Agent API
Review URL: http://codereview.chromium.org/549057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 21:14:56 +00:00
peter.rybin@gmail.com
ccd760ae5d Add diagnostic print to debug agent if it fails to open port
Review URL: http://codereview.chromium.org/549061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 18:11:12 +00:00
mikhail.naganov@gmail.com
a3c0f20035 Submit Object.getOwnPropertyNames patch by Pavel Feldman. See http://codereview.chromium.org/549050.
Add copyright to regression test to fix build broken by r3619.

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 15:34:32 +00:00
erik.corry@gmail.com
4a90166dde Implement enough of the partial snapshots that we can deserialize
a single string.
Review URL: http://codereview.chromium.org/536077

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 14:20:31 +00:00
vitalyr@chromium.org
8207788047 Fix ARM build.
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 13:43:28 +00:00
sgjesse@chromium.org
562f90d375 Ensure correct boxing of values when calling functions on them
When a function is called with a value type as the receiver this is now boxed as an object.

This is a low-impact solution where the receiver is only boxed when required. For IC calls to the V8 builtins values are not boxed and as most of the functions on String.prototype, Number.prototype and Boolean.prototype are sitting there most IC calls on values will not need any boxing of the receiver.

For calls which are not IC calls but calls through the CallFunctionStub a flag is used to determine whether the receiver might be a value and only when that is the case will the receiver be boxed.

No changtes to Function.call and Function.apply - they already boxed values. According to the ES5 spec the receiver should not be boxed for these functions, but current browsers have not adopted that change yet.

BUG=223
TEST=test/mjsunit/value-wrapper.js
TEST=test/mjsunit/regress/regress-crbug-3184.js
Review URL: http://codereview.chromium.org/542087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 13:42:32 +00:00
vitalyr@chromium.org
bd06358b93 Optimized calling of C++ builtins (and HandleApiCall
in particular).

  * Called function is passed on the stack instead of
    using a static variable.

  * Builtins that don't need the called function don't
    get it.

  * Made is_construct statically known to HandleApiCall
    by setting custom construct stub for API functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 12:25:24 +00:00
fschneider@chromium.org
1cc579ff4e Fix issue 541 and some refactoring of the top-level compiler.
* Refactor VisitProperty to use the platform-specific methods for emitting the IC calls.
* Refactor recording of source positions in the top-level compiler.
* Correct the recorded source positions for assignments and property loads.
* Fix bug on x64 where source positions were not recorded before a calling a call-IC.
* Correct some inconsistencies between IA-32 and X64 top-level code generator.

We now pass all regression tests with 
--always-fast-compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 12:00:59 +00:00
fschneider@chromium.org
d234b0e2ad Fix bug in keyed load stub for strings.
Instead of returning the empty string when indexing
a string out of bounds we now correctly return undefined.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-15 12:00:21 +00:00
fschneider@chromium.org
acf74b04a7 Fix a problem when compiling built-ins with the top-level compiler.
Replace runtime call to NumberAdd with call to binary op stub.

Until now the top-level compiler always called a runtime function
for count operations. 

In some places we expected in the JS builtins smis as arguments.
If we perform a count operation before all smis would get converted into
heap numbers by the runtime number add function and result in a runtime 
assert.

Also: Add missing debugger information in the top-level compiler for 
do-while loops.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 17:22:59 +00:00
fschneider@chromium.org
102950693b Push to trunk. Now working on 2.0.7.
Review URL: http://codereview.chromium.org/548041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 15:09:43 +00:00
erik.corry@gmail.com
bc334df1a8 * Improve the interface to the memory-reservation functionality.
* Add a test case that generates a serialization of a single flat string.
Review URL: http://codereview.chromium.org/542073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 14:46:31 +00:00
ager@chromium.org
41475c17ff Fix crash when using Object.getOwnPropertyDescriptor on an API defined
callback property.

Return undefined for Object.getOwnPropertyDescriptor on an API defined
callback properties for now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 14:32:19 +00:00
ager@chromium.org
bdf58eda27 Change return type of MapSpace::NeedsCompaction from int to bool.
Fixes compiler warnings on Windows.

TBR=antonm@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 12:51:38 +00:00
ricow@chromium.org
8cf3521acb Removed check on element in case it is undefined in ArrayIndexOf - according to spec this is OK.
Review URL: http://codereview.chromium.org/545056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 12:05:48 +00:00
ager@chromium.org
bfb111b9ed Fix Date.prototype.toISOString for NaN dates and add milliseconds for
compatibility with Safari.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 08:55:15 +00:00
antonm@chromium.org
51a0cf8a71 Compact map space when doing mark-sweep if after collection size of map space would
drop below threshold.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 19:16:07 +00:00
kmillikin@chromium.org
9dec8f3c74 Remove an inlined ASSERT made obsolete by r3598.
Review URL: http://codereview.chromium.org/549035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 16:21:06 +00:00
kmillikin@chromium.org
ede65c19a1 Remove a pair of problematic uses of the Reference utility class from
the code generators.

These uses broke the rules of the class because it was safe to do so,
but there was no real reason to do it that way.
Review URL: http://codereview.chromium.org/543041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 16:01:15 +00:00
ager@chromium.org
9f60238c35 Revert r3583 which seems to degrade performance.
Review URL: http://codereview.chromium.org/536042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 13:26:31 +00:00
fschneider@chromium.org
3dd2420511 Fix bug in top-level code generator with global receiver.
We did not correcty pass the global receiver object in some cases. 
This change fixes this bug on all three platforms.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 12:13:37 +00:00
ricow@chromium.org
19e49e1740 Enabled es5conform tests for new array methods and corrected errors that was discovered by enabling these.
Added new es5 methods:
GetOwnPropertyDescriptor
GetOwnProperty
FromPropertyDescriptor

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 12:10:57 +00:00
kmillikin@chromium.org
39b9f57f19 Cleanup the handling of control flow in the toplevel code generator.
Do abstract the setting and restoring of 'argument' state into a
function that takes arguments.

Do not set the argument state in the code generator unless it
represents arguments to a recursive call to Visit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 11:29:08 +00:00
ager@chromium.org
4ed9eb18ea Fix bug in the ARM port of FastNewContextStub. Load the function from
the stack instead of popping it - it is needed by the slow case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 10:27:54 +00:00
ager@chromium.org
bac8b21ff0 Port FastNewContextStub to x64 and arm.
BUG=551
Review URL: http://codereview.chromium.org/541027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 08:16:02 +00:00
sgjesse@chromium.org
0d01d17b98 Fix ARM thumb/debug build
Landing http://codereview.chromium.org/548007

TBR=piman@chromium.org
Review URL: http://codereview.chromium.org/549033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 07:45:53 +00:00
antonm@chromium.org
4377037336 Reverting temporary reverts 3586 and 3588 back.
TBR=kasperl@chromium.org



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 23:42:36 +00:00
antonm@chromium.org
fada07aecc Temporary backing out r3536 to see impact on DOM benchmarks.
TBR=kasperl@chromium.org



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 19:36:09 +00:00
fschneider@chromium.org
fdba189730 Fix a problem with const initialization in the top-level code generator.
When initializing the special local variable containing the reference to the enclosing 
function in named functions we now (correctly) emit an INIT_CONST instead of INIT_VAR,
and we correctly bail out in the top-level code generator.

Also part of this change is adding missing statement position information 
for some statements in the top-level code generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 17:22:57 +00:00
antonm@chromium.org
6cabd63572 Temporary backing out r3538 to see impact on DOM benchmarks.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 16:57:18 +00:00
erik.corry@gmail.com
612d9b82f0 Add some interfaces to the GC that allow us to reserve space. This is needed
for partial snapshots.  After reserving space we can be sure that allocations
will happen linearly (no GCs and no free-list allocation).  This change also
contains the start of the partial snapshot support, which, however is not yet
completed or tested.
Review URL: http://codereview.chromium.org/545026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 15:16:23 +00:00
ager@chromium.org
b63f5cf4d9 Reapply the parts of revision 3545 that did not work because of broken
fixups code on ARM.
Review URL: http://codereview.chromium.org/545025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 11:56:19 +00:00
ager@chromium.org
61a1c089e4 Change the ARM fixup code to handle the use of the following
instruction sequence for jumps:

  mov(ip, Operand(target, rmode), LeaveCC, cond);
  bx(ip, cond)

Changed a JS call in the compare stub to a tail call to avoid GC
problems where the pushed return address is not updated on GC.
Review URL: http://codereview.chromium.org/549022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 11:54:19 +00:00
kmillikin@chromium.org
c891a7a683 Fix lint error. I must have been following the Standard ML style
guide.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 09:58:50 +00:00
kmillikin@chromium.org
f0b8c2d97a Some cleanup of the toplevel code generator:
* Rename the operation of filling a context with a value.  Formerly it
  was 'Move', now it's 'Apply' so as to avoid confusion with various
  other Moves (eg, in the toplevel codegen, in the macro assemblers).

* Use the abstraction Drop rather than math on the stack pointer.

* Add a predicate on AST expression nodes to abstract a repeated test
  whether we should us a regular (named) IC or a keyed IC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 08:48:26 +00:00
ager@chromium.org
55b73d9415 Fix variable name when build with oprofile agent.
BUG=572
Review URL: http://codereview.chromium.org/549020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 08:31:00 +00:00
ager@chromium.org
c1cafb7cf1 Port FastNewClosureStub introduced for ia32 in r3477 to x64 and arm.
BUG=552
Review URL: http://codereview.chromium.org/543010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 07:16:49 +00:00
sgjesse@chromium.org
658ca2f174 Add missing instructions to the IA-32 disasembler
Added newly added instructions to test-disasem-ia32.cc and implemented the missi
ng ones in the disasembler.

Added some asserts to 8-bit instructions which only work with eax, ebx, ecx and
edx (al, bl, cl and dl).

Removed the loope instruction.
Review URL: http://codereview.chromium.org/548002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 15:19:53 +00:00
fschneider@chromium.org
c860533020 Added two missing instructions to disassembler.
The subb and the loop instructions are also added to the IA-32 disassembler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 12:59:17 +00:00
christian.plesner.hansen@gmail.com
41e1d6a6a5 Added ScriptData::HasError.
Review URL: http://codereview.chromium.org/542010


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 12:13:24 +00:00
ager@chromium.org
35fae75f01 Fix wrong assert in compare stub minor key computation.
TBR=erik.corry
Review URL: http://codereview.chromium.org/536010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-11 07:35:32 +00:00
sgjesse@chromium.org
8c2620112c Fixed wrong cmov operand order
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/518082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 14:17:26 +00:00
erik.corry@gmail.com
1670dce1bf Fix same Windows compiler error in another place.
Review URL: http://codereview.chromium.org/518081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 13:48:27 +00:00
erik.corry@gmail.com
a5247c039c Fix Windows build.
Review URL: http://codereview.chromium.org/527031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 12:42:58 +00:00
sgjesse@chromium.org
91cfb3730a Add generated code for ascii string comparison
Careted a stub for string comparison and used part of the code from that to inline string comparison in the compare stub.
Review URL: http://codereview.chromium.org/525115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 11:58:15 +00:00
lrn@chromium.org
2cb1f8271f Fix potential length-miscalculation in %StringBuilderConcat.
Review URL: http://codereview.chromium.org/521074


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 11:27:37 +00:00
erik.corry@gmail.com
dcd89af437 Lint, schmlint!
Review URL: http://codereview.chromium.org/525114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 10:41:25 +00:00
erik.corry@gmail.com
eb6b3f601a Speed up compares with characters ie single-character strings.
Make use of it when we know that something can't be a NaN.
Review URL: http://codereview.chromium.org/524059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 09:54:11 +00:00
ager@chromium.org
d73f2efcf3 Inline a number of simple date computations.
The minifier has been updated to have better recognition of regular
expressions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-08 07:49:07 +00:00
lrn@chromium.org
46504c1557 Attempt to make \b\w+ faster. Slight performance increase on, e.g., string unpacking.
Review URL: http://codereview.chromium.org/507051


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 19:01:23 +00:00
lrn@chromium.org
40d6cbca89 Forgot patch to make it compiler on Linux.
Review URL: http://codereview.chromium.org/525087


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 14:04:56 +00:00
sgjesse@chromium.org
db64cd9a75 Fix wrong asserts from r3554
Review URL: http://codereview.chromium.org/523128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 13:17:37 +00:00
lrn@chromium.org
dddadf9f7e Fixed potential length miscalculations by limiting max size of arrays and strings.
Review URL: http://codereview.chromium.org/525064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 13:17:18 +00:00
fschneider@chromium.org
c4416d628d Fix runtime function StringCharAt where an argument was not checked.
Review URL: http://codereview.chromium.org/523126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 12:31:45 +00:00
kasperl@chromium.org
3321d06ccd Make String.prototype.replace a tiny bit faster by avoiding
ToString conversions for strings.
Review URL: http://codereview.chromium.org/518059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 12:18:56 +00:00
fschneider@chromium.org
714dfeaece Fix x64 and arm build.
Review URL: http://codereview.chromium.org/524058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 11:38:43 +00:00
fschneider@chromium.org
903301248e Improve keyed loads on strings by using a new stub.
Instead of going through a runtime function for keyed loads
on strings we invoke a separate specialized stub that
assumes string as receiver type and the key to be a number.

The stub calls a JS builtin function to return the corresponding one-character string.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 10:25:20 +00:00
ricow@chromium.org
33079fb851 Added ES5 15.2.3.2 Object.getPrototypeOf.
Review URL: http://codereview.chromium.org/523124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 10:01:24 +00:00
sgjesse@chromium.org
3d36c712aa Use generated code to create sub strings.
Added a stub to allocate and fill a string object with a substring from another string.

Use the rep movs instruction to copy the string data as it turned out to be the fastest way.

While preparing this I experimented with some SSE2 instructions, so the instructions movdqa and movdqu are still in the IA-32 assembler even though they are not used.
Review URL: http://codereview.chromium.org/525085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 09:59:37 +00:00
kasperl@chromium.org
060711ab37 Improve the performance of String.prototype.concat and the slow-case
for compare operations.
Review URL: http://codereview.chromium.org/521054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 09:40:50 +00:00
kasperl@chromium.org
ba9b59d51f Quick fix to ARM fixup issue introduced in r3545. The fixup code
seems somewhat broken on ARM, but this solves the issue for now.
I'll look into the code patching tomorrow.
Review URL: http://codereview.chromium.org/525068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 15:50:34 +00:00
kasperl@chromium.org
1fdbaa1d10 Improve performance of Array.prototype.join and String.prototype.substring
by tweaking the JavaScript implementation of these functions.
Review URL: http://codereview.chromium.org/519061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 14:40:21 +00:00
sgjesse@chromium.org
99fbea324b Make the direct call to native RegExp work
Single glitch in r3542 which caused the direct call to native regexp code to always bail out to the runtime system.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 12:21:28 +00:00
bak@chromium.org
1f3eba4470 - Adjust the number to string cache based on the max semispace size.
Flushed at compacting mark sweep.
- Simplified FindEntry by eliminating the counter.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 11:19:28 +00:00
sgjesse@chromium.org
429f3cf9f2 Direct call to native RegExp code from JavaScript.
Calls to RegExp no longer have to be via a call to the runtime system. A new stub have been added which can handle this call in generated code. The stub checks all the parameters and creates RegExp entry frame in the same way as it is created by the runtime system. Bailout to the runtime system is done whenever an uncommon situation is encountered or when the static data used is not initialized. After running the native RegExp code the last match info is updated like in the runtime system.

Currently only ASCII strings are handled.

Added another argument to the RegExp entry frame. It indicated whether the call is direct from JavaScript code or through the runtime system. This information is used when RegExp execution is interrupted. If an interruption happens when RegExp code is called directly a retry is issued causing the interruption to be handled via the runtime system. The reason for this is that the direct call to RegExp code does not support garbage collection.
Review URL: http://codereview.chromium.org/521028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 11:09:30 +00:00
kasperl@chromium.org
8618b9846b Update the result size for ResolvePossiblyDirectEval from 1 to 2
following the change submitted in r3533.
Review URL: http://codereview.chromium.org/525063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 09:22:36 +00:00
bak@chromium.org
0ba452b5c6 - Fixed a bug in the array concat implementation causing the elements in the result to be lost.
Review URL: http://codereview.chromium.org/523055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 12:33:55 +00:00
fschneider@chromium.org
e06c581232 Use cmov instructions to avoid some conditional branches in stub code.
This change improves the ConstructStub and the ArgumentsAccessStub slightly
by using the cmov instruction (if available) to eliminate a 
conditional branch. It only applies to the IA-32 and X64 platforms.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 12:02:18 +00:00
bak@chromium.org
9f0997f9bf Added rehashing of hash tables when there are too many deleted elements.
Review URL: http://codereview.chromium.org/525024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 11:38:36 +00:00
kmillikin@chromium.org
b74ab45077 Simplify checking during allocation when Heap::always_allocate() is
true.  The rules are:

1. Heap::AllocateRaw can normally handle allocation requests in new
   space even when always_allocate() is true.  It properly retries
   failed allocation in the second 'retry' space.

2. Heap::Allocate can normally handle allocation requests in new
   space.

3. We only need to check always_allocate() when explicitly requesting
   allocation in new space via Heap::new_space().AllocateRaw().

4. The exception to these rules is fixed arrays with size such that
   MaxObjectSizeInPagedSpace < size <= MaxObjectSizeInNewSpace (ie,
   those that will be allocated in new space and promoted to large
   object space).  They cannot be allocated in new space via
   Heap::Allocate or Heap::AllocateRaw, because the retry logic does
   not know to allocate extra remembered set bits when retrying in
   large object space.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 11:30:05 +00:00
kmillikin@chromium.org
a1bf879720 More cleanup of slot handling in the nonoptimizing code generator.
Rename CreateSlotOperand so that it's clear it can emit code.  Use it
where possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 11:29:27 +00:00
kasperl@chromium.org
15fe7a8ad6 Make the ResolvePossiblyDirectEval faster by avoiding the
stack traversal code.
Review URL: http://codereview.chromium.org/523051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 09:38:02 +00:00
kmillikin@chromium.org
b74daccff0 Style cleanup of switches over Slot::Type in the nonoptimizing code
generator.

The Slot::Type enumeration has four values.  It should never be
necessary to use a default to handle the case of a value out of range
of the enumeration.  Doing so silences a useful warning when one of
the enumeration values is actually forgotten or when a new enumeration
value is added.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-05 09:11:10 +00:00
fschneider@chromium.org
1902b76227 Improve count operation in top-level compiler on ARM.
Save one instruction by using stm instead of push.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-04 14:15:47 +00:00
fschneider@chromium.org
637a21952f Added general pre- and postfix count operations to top-level compiler.
Until now we only supported postfix operations on global variables.
This change add generic count operations to the top-level compiler.

I tried to re-use code from the code generator used for assignment expressions
where possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-04 13:56:31 +00:00
kasperl@chromium.org
88ba93d9db Remove unused function and function declaration.
Review URL: http://codereview.chromium.org/523036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-04 11:24:03 +00:00
fschneider@chromium.org
fd03f6c153 Faster handling of string indexing using [] with a SMI index.
Instead of falling back to calling GetObjectProperty we call GetCharAt
directly if the object is a string and the key in a SMI.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-28 13:01:03 +00:00
kasperl@chromium.org
e56e84bff6 Second attempt at fixing issue 559.
Review URL: http://codereview.chromium.org/519007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-28 09:21:23 +00:00
kasperl@chromium.org
09805c6962 Land http://codereview.chromium.org/509029 (slightly simplified).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-28 08:19:23 +00:00
fschneider@chromium.org
f7ef880041 Use a loop in generated code to allocate stack slots for function with many local variables.
If a function contains more than a certain number of locals (IA32: 9, X64: 6, ARM: 4) 
a loop for initializing the locals with 'undefined' is more compact. 
For less locals we unroll that loop by emitting a sequence of push instructions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-23 15:06:21 +00:00
bak@chromium.org
c3fa79ab2b - Reordered the instructions in the inlined allocation code to space dependent instructions.
- Replaced the or instruction with lea. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-23 13:27:58 +00:00
kmillikin@chromium.org
c114f17efa When promoting objects during a copying collection, promote all
non-large objects that cannot contain non-map-word pointers to other
heap objects into the old data space.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 13:34:02 +00:00
kasperl@chromium.org
afabb5a9bc Make the FastCloneShallowArrayStub a bit prettier.
TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/507069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 13:10:24 +00:00
ager@chromium.org
2409b4b7ba Revert r3514 and r3515. The new cache is too large for some tests
that attempt to run with a small heap.  Additionally, it can
potentially keep a lot of string data alive and it is never flushed.
Can we make it grow dynamically if used so that we can still start the
VM with a small heap size?
Review URL: http://codereview.chromium.org/503081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 13:07:27 +00:00
fschneider@chromium.org
735aee05f0 Use one runtime call for creating object/array literals in
the code generator.

The runtime function checks if it needs to create a boilerplate
object or if it can clone from an existing boilerplate.

This is already done in the top-level compiler. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 12:41:45 +00:00
kasperl@chromium.org
f034c31bb2 Fix linto.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 12:39:56 +00:00
bak@chromium.org
6742d62c30 - Increased size of number string cache.
- Change the instruction order for inlined allocation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 11:35:05 +00:00
kasperl@chromium.org
6ca5876419 Add fast case stub for BIT_NOT.
Review URL: http://codereview.chromium.org/503079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 10:16:27 +00:00
ager@chromium.org
af6971d883 Check for undefined in the binary operation stub when convertion to
int32 for bitops.  undefined converts to zero in ToInt32 conversions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 09:48:55 +00:00
kasperl@chromium.org
8d6a8e2451 Very experimental fix for issue 555.
Review URL: http://codereview.chromium.org/508006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 15:09:26 +00:00
erik.corry@gmail.com
14975f3dd0 Optimize implementation of Math.floor a little by special casing
the comparison it uses in the code generator.  Use Math.floor for
date operations.
Review URL: http://codereview.chromium.org/509007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 15:04:00 +00:00
ager@chromium.org
fc26307487 Remove complicated Math.sin and Math.cos optimizations that do not buy
us much.
Review URL: http://codereview.chromium.org/509006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 13:30:10 +00:00
ager@chromium.org
827575b0e9 Optimize sine and cosine by checking up front if the fsin or fcos
operation can throw an exception.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 12:08:59 +00:00
kasperl@chromium.org
9c627d6ba3 The number of heap slots stored in a scope includes the
fixed contexts slots. Take this into account when using
the new, fast context creation path to avoid allocating
too many slots (wasteful).
Review URL: http://codereview.chromium.org/501148

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 10:24:11 +00:00
erik.corry@gmail.com
73fcafd650 Bring back the fisttp instruction on machines with SSE3, but check the
input so we don't have to check the exception flags afterwards.
Review URL: http://codereview.chromium.org/509001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-21 08:32:20 +00:00
kmillikin@chromium.org
e1b13fc351 Disallow garbage collection at another site in the LoadCallback ICs.
MacroAssembler::PopHandleScope emits a runtime call (through a stub),
which should not be allowed to perform a GC but return a failure
instead.

BUG=30790
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-20 08:40:13 +00:00
peter.rybin@gmail.com
d3e63a319b Reapply "wait for connection" feature implementation
Review URL: http://codereview.chromium.org/491079


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 20:30:29 +00:00
kasperl@chromium.org
64e443768e Recommit r3494 after fixing stupid mistake where the deferred code stub didn't know it was reversed.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:47:58 +00:00
lrn@chromium.org
9b0a967cae Fast-codegen: Adding support for try/catch and throw.
Still no support for lookup-variables, so we bailout if using the catch variable.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:38:28 +00:00
antonm@chromium.org
f8b9e6dd5b Force mark sweep instead of compcation if size of map space is too big to allow forward pointers encoding.
Review URL: http://codereview.chromium.org/507025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:38:09 +00:00
kasperl@chromium.org
12866185ea Revert r3495 - some weird corner case is broken.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:14:37 +00:00
kasperl@chromium.org
0b4e755047 Improve code generated for left shifts where the left side
is a constant by avoiding a few checks.
Review URL: http://codereview.chromium.org/504057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:07:02 +00:00
kasperl@chromium.org
56a6b0cdff Convert the rest of the sar(xxx, kSmiTagSize) to SmiUntag(xxx).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 11:20:25 +00:00
kasperl@chromium.org
546b99b79f Refactor smi tagging and untagging on IA-32.
Review URL: http://codereview.chromium.org/501113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 11:13:33 +00:00
erik.corry@gmail.com
0553c7feb9 Optimize bitops with non-Smi inputs. Instead of converting both inputs
to floating point and then converting back we convert directly to a
32 bit integer.  In addition the bit twiddling implementation of float-
to-integer conversion has been ported from ARM.  Testing has shown that
this runs faster than the x87 or SSE3 rounding instructions.  This change
is IA32 only.  There may be a smaller benefit from doing the same on x64.
Review URL: http://codereview.chromium.org/506052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 09:33:24 +00:00
sgjesse@chromium.org
c7c821fdfb Prepare push to trunk. We are now working on version 2.0.6
Review URL: http://codereview.chromium.org/504056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 08:21:21 +00:00
bak@chromium.org
93bbe2acdc added else
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 06:58:45 +00:00
bak@chromium.org
07742f5672 -Inlined double variant of compare iff one of the sides is a constant smi and it is not a for loop condition.
Review URL: http://codereview.chromium.org/507040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 06:38:12 +00:00
iposva@chromium.org
13febb2585 - Handle HeapNumbers in deferred code instead of jumping to stub
for DeferredInlineBinaryOperations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 01:43:50 +00:00
kasperl@chromium.org
914d4f801d Optimize the allocation of small, non-nested literal
arrays and argument objects on IA-32.
Review URL: http://codereview.chromium.org/503042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 15:35:15 +00:00
kmillikin@chromium.org
6af6a82ae3 Streamline the calling convention of the call ICs by passing the
property name in a register rather than on the stack below the
receiver and arguments.

Implemented only for IA32, passing the name in the ecx register to
match the calling convention of the load ICs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 10:23:20 +00:00
kasperl@chromium.org
a3aa9e96ef Don't bother callling into the ProducerHeapProfile methods
if logging producers is turned off.
Review URL: http://codereview.chromium.org/500092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 09:16:44 +00:00
kasperl@chromium.org
f4251cc42c Enable fast allocation of context objects on IA-32.
Review URL: http://codereview.chromium.org/507035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 08:53:19 +00:00
sgjesse@chromium.org
44b7c59eb5 Extend the maximum size map space
On 32-bit the maps are now aligned on a 32-byte boundary in order to encode more maps during compacting GC. The actual size of a map on 32-bit is 28 bytes making this change waste 4 bytes per map.

On 64-bit the encoding for compacting GC is now using more than 32-bits and the maps here are still pointer size aligned. The actual size of a map on 64-bit is 48 bytes and this change does not intruduce any waste.

My choice of 16 bits for kMapPageIndexBits for 64-bit should give the same maximum number of pages (8K) for map space. As maps on 64-bit are larger than on 32-bit the total number of maps on 64-bit will be smaller than on 32-bit. We could consider raising this to 17 or 18.

I moved the kPageSizeBits to globals.h as the calculation of the encoding really depended on this.

There are still an #ifdef/#endif in objects.h and this constant could be moved to globaks.h as well, but I kept it together with the related constants.

All the tests run in debug mode with additional options --gc-global --always-compact as well (except for a few tests on which also fails before this change when run with --gc-global --always-compact).

BUG=http://code.google.com/p/v8/issues/detail?id=524
BUG=http://crbug.com/29428
TEST=test/mjsunit/regress/regress-524.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 08:53:18 +00:00
kasperl@chromium.org
51aa605e62 Fix ARM and x64 tests in debug mode after r3477.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/500090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 07:35:12 +00:00
iposva@chromium.org
1fa340ff9c - Fix x64 build.
Review URL: http://codereview.chromium.org/500089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 07:18:05 +00:00
iposva@chromium.org
4380812b39 - Undo unfortunate renaming of StaticType.
Review URL: http://codereview.chromium.org/506050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 06:21:50 +00:00
kasperl@chromium.org
b1721d4c3e Improve performance of allocating closures for nested
functions by allocating them in new space without
entering the runtime system.
Review URL: http://codereview.chromium.org/506037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-16 15:43:20 +00:00
kmillikin@chromium.org
e7fd8bb56e Prepare push to trunk. We are now working on version 2.0.5.
Review URL: http://codereview.chromium.org/502031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-16 15:23:25 +00:00
lrn@chromium.org
482d434f4d Fast codegen: Implement with.
Review URL: http://codereview.chromium.org/491077


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-16 09:51:07 +00:00
yurys@chromium.org
e88df5b792 Ignore debug break events when bootstrapper is active. Collecting debug data when the context is not yet setup may lead to subtle errors like in the following Chromium bug: http://crbug.com/28933
Review URL: http://codereview.chromium.org/497006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-15 09:17:15 +00:00
kasperl@chromium.org
f0b00d7f02 Do a fast check for undefined values when comparing.
Review URL: http://codereview.chromium.org/496008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 12:18:20 +00:00
lrn@chromium.org
9ff5f9daed Fast-codegen: Implementing try/finally on top of nesting context.
Review URL: http://codereview.chromium.org/492002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 11:09:25 +00:00
kasperl@chromium.org
4839eb611f Try to make the contextuality check in the IC code faster
by checking if the receiver is a global object before diving
into traversing reloc info.
Review URL: http://codereview.chromium.org/491075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 09:54:13 +00:00
sgjesse@chromium.org
f74429b917 Reverted r3457
Caused compilation errors in cctests and on ARM platform.

TBR=peter.rybin@gmail.com
Review URL: http://codereview.chromium.org/491074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 07:51:59 +00:00
peter.rybin@gmail.com
a8cab84e04 Implement "wait for connection" feature
Review URL: http://codereview.chromium.org/489005


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-13 21:15:02 +00:00
fschneider@chromium.org
4c9874195d Fix lint error.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/491063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-11 22:48:14 +00:00
fschneider@chromium.org
c25151faa6 Adding compound assignments to the top-level compiler.
Review URL: http://codereview.chromium.org/486008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-11 16:09:16 +00:00
erik.corry@gmail.com
a4ad7b8bf3 Give the binary op stubs better names to make profiles more informative.
Review URL: http://codereview.chromium.org/488017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-11 10:40:01 +00:00
iposva@chromium.org
fe952d7237 - Ensure the stack trace limit is not negative.
- Enable fuzzing of the CollectStackTrace runtime call.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 18:33:34 +00:00
ager@chromium.org
483828660d Reapply keyed load cache probing in generated code. I introduced a
bug just before committing which broke snapshot builds.  The code is
nearly identical to the previous submit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 15:10:50 +00:00
lrn@chromium.org
aef02ccccb Fast codegen: Working break and continue.
Started framework for all intra-functional outward control transfers,
including handling of try/finally.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 14:06:08 +00:00
kmillikin@chromium.org
b4e7472028 Disible the toplevel compiler for code containing for loops.
Review URL: http://codereview.chromium.org/492003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 13:12:13 +00:00
ager@chromium.org
1a6893cda9 Revert keyed load cache probing in generated code.
Crashes on Windows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 12:52:28 +00:00
ager@chromium.org
87496c61aa Probe keyed load cache in generic keyed load stub.
Only implemented on ia32 and x64 for now.  The generic keyed load stub
on arm is falling behind and it is time to fix that, but that will be
a separate change.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 09:21:23 +00:00
lrn@chromium.org
5e2295574c Fix extra slash typo in comment.
Review URL: http://codereview.chromium.org/487007


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 08:33:09 +00:00
lrn@chromium.org
c773148bb9 Fix Win64 build problem.
Review URL: http://codereview.chromium.org/475003


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 16:40:54 +00:00
kmillikin@chromium.org
1d57c13b8c Fix arm and x64 build.
The ApiGetterEntryStub is not implemented on arm or x64, but the
platform-specific implementations need to change to match the change
to the platform-independent signatures.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 15:34:57 +00:00
kmillikin@chromium.org
0672938b88 Fix a crash caused by garbage collection during generation of a
callback load (or keyed load) IC.

The problem was that the IC code calls a stub, which can allocate and
thus trigger a GC if the stub is not already generated.  Problem is
solved by adding the ability to "try" to call a stub, trying to
generate the stub code if necessary but signaling an allocation
failure if generating the code is not possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 14:54:34 +00:00
vitalyr@chromium.org
41eb2f22d0 External string table.
Instead of weak handles external strings use a separate table.  This
table uses 5 times less memory than weak handles.  Moreover, since we
don't have to follow the weak handle callback protocol we can collect
the strings faster and even on scavenge collections.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 14:32:45 +00:00
erik.corry@gmail.com
67f6ea675f Add Object.create from ECMAScript5. Supports value, writable, enumerable, get
and set.  Doesn't support configurable yet.  See
http://code.google.com/p/v8/issues/detail?id=460
Review URL: http://codereview.chromium.org/463040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 13:56:58 +00:00
fschneider@chromium.org
4dee8d81bd Create literal boilerplate as part of cloning in the top-level compiler.
When generating code for object and array literals we performed
the check if the a boilerplate already exists in generated code.

In the top-level compiler we now do this check in a new runtime
function. This makes the generated code more compact for top-level code.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 13:06:08 +00:00
erik.corry@gmail.com
264c055b2f Create the framework for adding a thumb2 backend for ARM. See http://codereview.chromium.org/464070
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 12:56:42 +00:00
erik.corry@gmail.com
593c388b39 Fix for bug 512 from Subrato De, CodeAurora.
Review URL: http://codereview.chromium.org/464016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 11:14:45 +00:00
sgjesse@chromium.org
584cc1732c Perform string add in generated code on X64 platform
This is a port of the IA-32 version from r3400 (http://code.google.com/p/v8/source/detail?r=3400). In the X64 version the additional registers are used to avoid loading the instance type and arguments several times.
Review URL: http://codereview.chromium.org/460109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 09:35:41 +00:00
erik.corry@gmail.com
db87b6011b Fix subtle bug in Math.min and Math.max with non-Smi zero.
See http://codereview.chromium.org/470001
From sra.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-08 10:18:28 +00:00
lrn@chromium.org
5bbb1d7bd6 Fix for issue 545: don't reuse this VariableProxy.
Review URL: http://codereview.chromium.org/464069


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-08 09:43:51 +00:00
fschneider@chromium.org
2c9b2ab78a Adding ThisFunction expression to top-level compiler.
Review URL: http://codereview.chromium.org/466056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-07 15:10:39 +00:00
kmillikin@chromium.org
0bf2822266 The toplevel code generator assumed that declarations did not shadow
parameters.  This could case the initial value to be lost or worse, a
crash.

Fix by handling the case of a declaration shadowing both
stack-allocated parameters and those in the arguments object.

This is related to V8 issue 540.
http://code.google.com/p/v8/issues/detail?id=540

BUG=29565
Review URL: http://codereview.chromium.org/469006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-07 13:31:47 +00:00
erik.corry@gmail.com
d4787a1855 Performance improvement for Math.max and Math.min
Patch from sra.
http://codereview.chromium.org/470001


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-07 08:38:20 +00:00
christian.plesner.hansen@gmail.com
873b25ba47 Fixed operator precedence bug in heap stat recording.
Review URL: http://codereview.chromium.org/465055


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 14:35:33 +00:00
fschneider@chromium.org
7a3a043eb2 Refactor code for generating assignments in the fast compiler.
1. Refactor the structure of VisitAssignment: The existing code is not ideal 
to be extended with support for compound assignments.

2. Reuse common code for keyed property assigments: Now variables rewritten 
to a property (.arguments access) are treated like normal keyed property
assignments. This allows us to remove some code duplication.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 14:30:27 +00:00
sgjesse@chromium.org
a5aedaea96 Remove passing of argc in r0 when calling builtins on ARM as it is not used
Review URL: http://codereview.chromium.org/466031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 12:17:02 +00:00
kmillikin@chromium.org
7266bd0b9a Fix issue 540 by handling the case that a declaration is in the
arguments object.

See http://code.google.com/p/v8/issues/detail?id=540
Review URL: http://codereview.chromium.org/460070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 11:59:09 +00:00
sgjesse@chromium.org
f2ad9083ce Prepare push to trunk. Now working on 2.0.4.
Review URL: http://codereview.chromium.org/462034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 11:50:27 +00:00
sgjesse@chromium.org
eabf5c89a9 Add alignment check to object allocated in generated code for x64 and ARM
Review URL: http://codereview.chromium.org/460068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 10:22:41 +00:00
christian.plesner.hansen@gmail.com
cbce986ff0 Changed recording of heap stats on OOM to store data directly in local
variables rather than in a stack-allocated struct.  The struct field
values turned out not to be available in minidumps.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 10:18:30 +00:00
sgjesse@chromium.org
96e70f6b93 String check for binary add on x64 and ARM
The checking for strings when performing binary add was missing on x64 and ARM. This is a prerequisite for adding string add in generated code for these two platforms.
Review URL: http://codereview.chromium.org/465028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 09:58:05 +00:00
sgjesse@chromium.org
f95746cbee Better handling of allocation alignment in generated code
Calculate the aligned size of strings when allocating from generated code using kObjectAlignmentMask

Add native code assert to make sure allocation from generated code keeps alignment.
Review URL: http://codereview.chromium.org/462025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 07:43:40 +00:00
ager@chromium.org
2707fc2eb8 Fix Windows build.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/466018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 11:34:45 +00:00
ager@chromium.org
f568fc6d13 Move for-in cache validity check to generated code.
Review URL: http://codereview.chromium.org/464002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 10:24:16 +00:00
christian.plesner.hansen@gmail.com
1d9eac1b7c Added recording of heap and global handle stats in a stack-allocated
struct on fatal out of memory.  This should cause the information to
be included in minidumps so we can get a better idea of the state of
v8 on OOMs.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 10:16:37 +00:00
sgjesse@chromium.org
2cfb4941a1 Move function nan_value to POSIX platform file
Strictly speaking NAN from math.h is not in a POSIX standard but in C99. However it seems that all our POSIX platforms have it.
Review URL: http://codereview.chromium.org/464015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 09:29:21 +00:00
sgjesse@chromium.org
14066c0e0e Check return code from fwrite
BUG=http://code.google.com/p/v8/issues/detail?id=453
TEST=none
Review URL: http://codereview.chromium.org/458016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 08:48:32 +00:00
mikhail.naganov@gmail.com
d84d47961a When executing 'profile' request, delegate to api function, not to internal one.
Review URL: http://codereview.chromium.org/466006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 08:44:33 +00:00
sgjesse@chromium.org
6437fc86cc Add missing function CpuFeaturesImpliedByPlatform to OpenBSD platform file
Review URL: http://codereview.chromium.org/465025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 08:23:10 +00:00
sgjesse@chromium.org
53fbd5932a Perform string add in generated code on IA-32 platforms
This adds a code stub which can do most of what Heap::AllocateConsString can do. It bails out if the result cannot fit in new space or if the result is a short (flat) string and one argument is an ascii string and the other a two byte string. It also bails out if adding two one character strings as Heap::AllocateConsString has special handling of this utilizing the symbol table. The stub is used both for the binary add operation and for StringAdd calls from runtime JavaScript files. Extended the string add test to cover all sizes of flat result stings.
Review URL: http://codereview.chromium.org/442024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 07:56:21 +00:00
kbr@chromium.org
73ebe80bda Fixed register usage in 64-bit version of
KeyedLoadIC::GenerateExternalArray which was causing it to go to the
slow case all the time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-02 19:26:16 +00:00
sgjesse@chromium.org
209035c996 Initial OpenBSD support
Patch by Peter Valchev <pvalchev@gmail.com>.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-02 13:38:50 +00:00
sgjesse@chromium.org
9487ef7b9b Fix adding short external ascii strings
BUG=http://code.google.com/p/v8/issues/detail?id=536
TEST=cctest/test-strings/ExternalShortStringAdd
Review URL: http://codereview.chromium.org/466001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-02 12:58:10 +00:00
sgjesse@chromium.org
508e54d465 Fix debug build
Missed out on reflecting changes to Script object layout in objects-debug.cc.

Also fixed http://codereview.chromium.org/450034/diff/2006/2010.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 15:52:02 +00:00
sgjesse@chromium.org
fc713930ed Remove the last context dependent reference from the Script object
For scripts originating from a call to eval the Script object used to hold a reference to the function from where the eval was called together with the code offset within that function of the eval call. This is used by the stack trace and is part of the debugger protocol. In order to avoid storing the function the script, the position within the script and the name of the function calling eval is stored instead. This avoids holding context dependent objects in the script object.

The calculation of the position of the eval in the script holding the eval is now done when the eval script is compiled as it is not possible to postpone this unless a reference is kept to the generated code for the function calling eval.

BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=cctest/test-api/Regress528
Review URL: http://codereview.chromium.org/450034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 14:36:45 +00:00
erik.corry@gmail.com
a0e12a3124 Fix toLocaleString-related breakage on buildbot.
TBR=ager
Review URL: http://codereview.chromium.org/449055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 14:19:23 +00:00
erik.corry@gmail.com
f9e150b78b Speed up join on arrays.
Review URL: http://codereview.chromium.org/457021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 12:54:36 +00:00
ager@chromium.org
a8db297d14 Remove some of the cache validity checks for for-in enumeration. We
can check for these cases before caching the property names instead.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 10:25:29 +00:00
ager@chromium.org
0ee41eec90 Fix megamorphic load regression on ARM caused by the string
length/hash change.
Review URL: http://codereview.chromium.org/454018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-01 09:54:47 +00:00
fschneider@chromium.org
5debbc3693 Move CPU-specific constants from debug.h into the platform-specific directories.
The constant for the return sequence length (JSReturnSequenceLength) was
defined in debug.h. Since this constant are also needed outside the debugger code
I moved them into assembler-xxx.h. Otherwise compiling with debuggersupport=off
would fail on ARM.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 15:09:49 +00:00
mikhail.naganov@gmail.com
dd38c22699 Add pause / resume profiling commands to debugger protocol.
This allows to profile "unresponsive" web pages in the same way
as it is possible to break into them with the debugger.

BUG=http://code.google.com/p/chromium/issues/detail?id=28689

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 14:56:20 +00:00
fschneider@chromium.org
c76856c292 Introduce flag for using the fast compiler where possible.
We use the fast compiler only for top-level code right now.
When always_fast_compiler is set to true, we compile with
the fast compiler whereever possible.

By default this flag is set to false. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 13:35:59 +00:00
kasperl@chromium.org
402e356e82 Clear the compilation cache just before starting to do mark-sweep
garbage collections when receiving idle notifications. This allows
us to get rid of source code strings and generated code in the
heap that would otherwise be kept around in idle V8 instances.
Review URL: http://codereview.chromium.org/450007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-30 07:57:32 +00:00
sgjesse@chromium.org
6d163d9fd0 Remove usage of JSArray in Script object
Storing a JSArray in the Script object could cause an indirect reference from the compilation cache to a global object to be created. Now the line ends are only stored as a FixedArrya and when that is needed in JavaScript a JSArray copy is created. Changed some of the JavaScript code to cache the line ends in a local variable for better performance.

BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=test/test-api/Bug528
Review URL: http://codereview.chromium.org/434117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 14:10:48 +00:00
sgjesse@chromium.org
5764362d6f Add test to expose bug 528
BUG=http://code.google.com/p/v8/issues/detail?id=528
TEST=cctest/test-api/Bug528
Review URL: http://codereview.chromium.org/443021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 07:57:45 +00:00
fschneider@chromium.org
3a21aafa7c Added fast compiler support for calling JS runtime functions.
Also added a simple test that invokes a JS runtime function
in top-level code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-27 00:28:06 +00:00
fschneider@chromium.org
1c90793581 Fix bug in the fast compiler's object literal code
Fixes issue 526:

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

The object literals code in the fast compiler returned an incorrect result 
when getter or setters are defined together with computed properties.

Added a regression test that captures the most reduced version of this
problem. 

Also added a test for object literals with getters/setters and 
prototype properties.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-26 21:13:20 +00:00
lrn@chromium.org
eded148caf Fast-codegen: Arguments object working on all platforms.
This time it's true.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-26 10:28:32 +00:00
kbr@chromium.org
c135f2de07 Fixed incorrect instruction usage in KeyedLoadIC for byte and word
external array types. Added regression test based on real-world
failing code and verified that it would have caught this error.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 20:29:11 +00:00
ager@chromium.org
7a6ebbdd6d Do not crash if a V8 extension fails to compile or throws an exception
when the code is run.

Instead, return an empty context handle so the failure to create a
context can be handled.

BUG=http://crbug.com/28486
Review URL: http://codereview.chromium.org/442005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 16:46:56 +00:00
mikhail.naganov@gmail.com
2af151ee63 Include getters and setters callbacks invocations in CPU profiler log.
Logging getters and setters from DOM API is extremely useful for web
developers as setting (and getting!) several properties can cause
page relayouts which take significant time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 16:39:18 +00:00
antonm@chromium.org
93d6199de0 When processing global vars initialization account for the case of splitted
global object (using hidden prototypes):

1) setters might be not on the global object itself, but on its prototypes;
2) if property on one of prototypes is readonly, we could shadow it.
Review URL: http://codereview.chromium.org/434035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 15:45:37 +00:00
erik.corry@gmail.com
c5052399e4 Fix 64 bit build. TBR=ager.
Review URL: http://codereview.chromium.org/442003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 13:27:15 +00:00
erik.corry@gmail.com
10e183d353 Make heap serialization nondestructive.
Review URL: http://codereview.chromium.org/441017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 12:55:33 +00:00
erik.corry@gmail.com
059b9bbc5e Update with a hopefully complete list of macros
used by gcc to indicate ARM architectures.
Review URL: http://codereview.chromium.org/440017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 11:23:48 +00:00
mikhail.naganov@gmail.com
3267107040 Change 'debugger-auto-break' flag status.
I think we can promote this flag to stable status and enable it by default.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 10:11:34 +00:00
erik.corry@gmail.com
b0b5dbadbd Fix bug 516 by recognizing yet another gcc macro that
indicates ARMv6.
Review URL: http://codereview.chromium.org/437056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 09:55:49 +00:00
lrn@chromium.org
d4d2277e2e Fast-compiler: Add stack limit checks to back edges of while, do-while and for.
A few other tweaks.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 09:05:30 +00:00
sgjesse@chromium.org
8dbedbb30e Added an ASSERT to code from r3350
Review URL: http://codereview.chromium.org/441014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 08:14:23 +00:00
sgjesse@chromium.org
4bc5aee624 Fix compilation error in r3350
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/435021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 14:45:27 +00:00
sgjesse@chromium.org
eb4d261e24 Remove the different length string types
The different length string types was used to encode the string length and the hash in one field. This is now split into two fields one for length and one for hash. The hash field still encodes the array index of the string if it has one. If an array index is encoded in the hash field the string length is added to the top bits of the hash field to avoid a hash value of zero.

On 32-bit this causes an additional 4 bytes to be used for all string objects. On 64-bit this will be half on average dur to pointer alignment.
Review URL: http://codereview.chromium.org/436001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 14:10:06 +00:00
ager@chromium.org
56074f783a Prepare push to trunk. Now working on version 2.0.3.
Review URL: http://codereview.chromium.org/435018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 13:30:15 +00:00
ager@chromium.org
6ce4b10608 Re-enable all declarations in fast top-level compiler.
Disable fast top-level compiler for now because of issues 525 and 526.

Add regression test for issue 525.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 12:23:29 +00:00
mikhail.naganov@gmail.com
9d440fdd36 Store API callback entry address prior to entering a callback.
Callback entry address is stored in VMState and is later retrieved by
profiler stack sampler. This makes possible relating API entry to JS
stack, and this is simpler than trying to unwind native stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-23 14:43:00 +00:00
mikhail.naganov@gmail.com
c2f12a7293 Reimplement logging of API callbacks entry points in an easier way.
Now they are logging during "LogCompiledFunctions" cycle. API functions
are detected by examining SFI's "function_data" field.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-23 09:19:24 +00:00
ager@chromium.org
1fe8655fbc Change the signature for StrNDup to match the implementation. This
mismatch causes problems if attempting to build d8 with readline
support.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 13:08:44 +00:00
mikhail.naganov@gmail.com
72d7453dc2 Fix issue 520: wrap Logger calls into LOG macro
BUG=520

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 12:38:59 +00:00
mikhail.naganov@gmail.com
a9d7c378d8 Add logging of callbacks in prof-lazy mode.
This is needed to show calls to DOM in CPU profiles. I can think
of a better approach like adding specific functions into V8 API
for explicitly providing callback names and modifying bindings codegen
appropriately. My plan is as follows:
 - submit this CL;
 - implement anything I need to process log data and display DOM
   calls in profiles;
 - think again about adding specific functions and modifying bindings
   codegen.

BUG=http://code.google.com/p/chromium/issues/detail?id=27613

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 12:15:46 +00:00
ager@chromium.org
11ba1bd163 Prepare push to trunk. Now working on version 2.0.2.
Review URL: http://codereview.chromium.org/421003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 12:03:44 +00:00