antonm@chromium.org [Thu, 21 Jan 2010 14:22:28 +0000 (14:22 +0000)]
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
erik.corry@gmail.com [Thu, 21 Jan 2010 13:59:15 +0000 (13:59 +0000)]
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
lrn@chromium.org [Thu, 21 Jan 2010 12:10:56 +0000 (12:10 +0000)]
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
erik.corry@gmail.com [Thu, 21 Jan 2010 11:28:11 +0000 (11:28 +0000)]
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
erik.corry@gmail.com [Thu, 21 Jan 2010 11:15:02 +0000 (11:15 +0000)]
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
erik.corry@gmail.com [Thu, 21 Jan 2010 08:31:16 +0000 (08:31 +0000)]
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
peter.rybin@gmail.com [Wed, 20 Jan 2010 18:27:44 +0000 (18:27 +0000)]
Fix lint error with strtol in test
Review URL: http://codereview.chromium.org/549111
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3666
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
peter.rybin@gmail.com [Wed, 20 Jan 2010 17:06:23 +0000 (17:06 +0000)]
Don't mention obsolete Issue 548
Review URL: http://codereview.chromium.org/543121
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3665
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
whesse@chromium.org [Wed, 20 Jan 2010 17:01:34 +0000 (17:01 +0000)]
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
peter.rybin@gmail.com [Wed, 20 Jan 2010 16:56:49 +0000 (16:56 +0000)]
Support backtrace debug command when stack is empty
Review URL: http://codereview.chromium.org/536089
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3663
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Wed, 20 Jan 2010 16:28:21 +0000 (16:28 +0000)]
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
fschneider@chromium.org [Wed, 20 Jan 2010 16:13:53 +0000 (16:13 +0000)]
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
kmillikin@chromium.org [Wed, 20 Jan 2010 15:51:03 +0000 (15:51 +0000)]
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
vitalyr@chromium.org [Wed, 20 Jan 2010 14:43:12 +0000 (14:43 +0000)]
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
kmillikin@chromium.org [Wed, 20 Jan 2010 09:55:32 +0000 (09:55 +0000)]
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
antonm@chromium.org [Tue, 19 Jan 2010 23:03:37 +0000 (23:03 +0000)]
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
peter.rybin@gmail.com [Tue, 19 Jan 2010 18:36:51 +0000 (18:36 +0000)]
Fix lineprocessor: compilation
Review URL: http://codereview.chromium.org/549086
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3656
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
antonm@chromium.org [Tue, 19 Jan 2010 16:34:37 +0000 (16:34 +0000)]
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
peter.rybin@gmail.com [Tue, 19 Jan 2010 15:40:42 +0000 (15:40 +0000)]
Re-Fix DebugEvaluateWithoutStack test on Windows
Review URL: http://codereview.chromium.org/545118
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3654
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
peter.rybin@gmail.com [Tue, 19 Jan 2010 15:12:43 +0000 (15:12 +0000)]
Fix DebugEvaluateWithoutStack test on Windows
Review URL: http://codereview.chromium.org/543115
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3653
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
sgjesse@chromium.org [Tue, 19 Jan 2010 14:17:34 +0000 (14:17 +0000)]
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
sgjesse@chromium.org [Tue, 19 Jan 2010 14:15:47 +0000 (14:15 +0000)]
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
antonm@chromium.org [Tue, 19 Jan 2010 13:26:40 +0000 (13:26 +0000)]
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
antonm@chromium.org [Tue, 19 Jan 2010 13:15:52 +0000 (13:15 +0000)]
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
ricow@chromium.org [Tue, 19 Jan 2010 12:56:36 +0000 (12:56 +0000)]
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
kmillikin@chromium.org [Tue, 19 Jan 2010 12:41:02 +0000 (12:41 +0000)]
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
lrn@chromium.org [Tue, 19 Jan 2010 12:27:04 +0000 (12:27 +0000)]
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
vitalyr@chromium.org [Tue, 19 Jan 2010 10:32:20 +0000 (10:32 +0000)]
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
ricow@chromium.org [Tue, 19 Jan 2010 08:23:29 +0000 (08:23 +0000)]
Added ES5 conform tests for getOwnPropertyNames.
Most of the test cases fail as the different objects according to the tests
can not have additional properties attached to them. I will file a bug report
on the es5 conform site as they should allow this. Some of the test fails
because we still miss some of the es5 features used.
Review URL: http://codereview.chromium.org/545109
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3642
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Tue, 19 Jan 2010 08:03:26 +0000 (08:03 +0000)]
Fix Windows build by using OS::StrNCpy.
Fix lint issue in lineprocessor.cc.
TBR=peter.rybin
Review URL: http://codereview.chromium.org/549081
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3641
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Mon, 18 Jan 2010 23:18:09 +0000 (23:18 +0000)]
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
peter.rybin@gmail.com [Mon, 18 Jan 2010 19:14:27 +0000 (19:14 +0000)]
Add another test on debug global evaluate
Review URL: http://codereview.chromium.org/553009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3639
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
mikhail.naganov@gmail.com [Mon, 18 Jan 2010 16:56:17 +0000 (16:56 +0000)]
Fix test-serialize.
Sorry for a breakage...
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/536090
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3638
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
peter.rybin@gmail.com [Mon, 18 Jan 2010 16:45:13 +0000 (16:45 +0000)]
Add "lineprocessor" sample program
Review URL: http://codereview.chromium.org/491006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3637
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
kmillikin@chromium.org [Mon, 18 Jan 2010 16:23:24 +0000 (16:23 +0000)]
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
mikhail.naganov@gmail.com [Mon, 18 Jan 2010 16:04:25 +0000 (16:04 +0000)]
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
peter.rybin@gmail.com [Mon, 18 Jan 2010 15:48:41 +0000 (15:48 +0000)]
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
sgjesse@chromium.org [Mon, 18 Jan 2010 14:13:58 +0000 (14:13 +0000)]
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
sgjesse@chromium.org [Mon, 18 Jan 2010 14:11:37 +0000 (14:11 +0000)]
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
kmillikin@chromium.org [Mon, 18 Jan 2010 14:09:36 +0000 (14:09 +0000)]
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
kmillikin@chromium.org [Mon, 18 Jan 2010 14:04:55 +0000 (14:04 +0000)]
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
antonm@chromium.org [Mon, 18 Jan 2010 13:17:38 +0000 (13:17 +0000)]
Lift filtering of the test higher as otherwise we can get
empty list of tests to run after the filtering and
would actually die with division by 0.
And there was a type (|c| instead of |case|) which is fixed too.
Review URL: http://codereview.chromium.org/545080
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3629
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Mon, 18 Jan 2010 12:02:53 +0000 (12:02 +0000)]
Fix windows tests. In the context of fopen the opposite of 'b' for binary
is '' for ascii, not 'a' for ascii.
Review URL: http://codereview.chromium.org/542104
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3628
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
lrn@chromium.org [Mon, 18 Jan 2010 11:22:03 +0000 (11:22 +0000)]
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
lrn@chromium.org [Mon, 18 Jan 2010 09:49:50 +0000 (09:49 +0000)]
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
erik.corry@gmail.com [Mon, 18 Jan 2010 08:36:06 +0000 (08:36 +0000)]
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
peter.rybin@gmail.com [Fri, 15 Jan 2010 22:40:57 +0000 (22:40 +0000)]
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
peter.rybin@gmail.com [Fri, 15 Jan 2010 21:14:56 +0000 (21:14 +0000)]
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
mikhail.naganov@gmail.com [Fri, 15 Jan 2010 20:15:47 +0000 (20:15 +0000)]
Fix build problems.
Review URL: http://codereview.chromium.org/543087
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3622
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
peter.rybin@gmail.com [Fri, 15 Jan 2010 18:11:12 +0000 (18:11 +0000)]
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
mikhail.naganov@gmail.com [Fri, 15 Jan 2010 15:34:32 +0000 (15:34 +0000)]
Submit Object.getOwnPropertyNames patch by Pavel Feldman. See 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
erik.corry@gmail.com [Fri, 15 Jan 2010 14:20:31 +0000 (14:20 +0000)]
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
vitalyr@chromium.org [Fri, 15 Jan 2010 13:43:28 +0000 (13:43 +0000)]
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
sgjesse@chromium.org [Fri, 15 Jan 2010 13:42:32 +0000 (13:42 +0000)]
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
ricow@chromium.org [Fri, 15 Jan 2010 13:40:13 +0000 (13:40 +0000)]
Updated README in es5conform so the description says to get revision
62998 which corrects some errors in the tests that will otherwise make us
(wrongly) fail.
Review URL: http://codereview.chromium.org/545079
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3616
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
vitalyr@chromium.org [Fri, 15 Jan 2010 12:25:24 +0000 (12:25 +0000)]
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
fschneider@chromium.org [Fri, 15 Jan 2010 12:00:59 +0000 (12:00 +0000)]
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
fschneider@chromium.org [Fri, 15 Jan 2010 12:00:21 +0000 (12:00 +0000)]
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
fschneider@chromium.org [Thu, 14 Jan 2010 17:22:59 +0000 (17:22 +0000)]
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
fschneider@chromium.org [Thu, 14 Jan 2010 15:09:43 +0000 (15:09 +0000)]
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
erik.corry@gmail.com [Thu, 14 Jan 2010 14:46:31 +0000 (14:46 +0000)]
* 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
ager@chromium.org [Thu, 14 Jan 2010 14:32:19 +0000 (14:32 +0000)]
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
ager@chromium.org [Thu, 14 Jan 2010 12:51:38 +0000 (12:51 +0000)]
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
ricow@chromium.org [Thu, 14 Jan 2010 12:05:48 +0000 (12:05 +0000)]
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
ager@chromium.org [Thu, 14 Jan 2010 09:05:52 +0000 (09:05 +0000)]
Fix the tests that change because of change to toISOString format.
Review URL: http://codereview.chromium.org/543057
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3602
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Thu, 14 Jan 2010 08:55:15 +0000 (08:55 +0000)]
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
antonm@chromium.org [Wed, 13 Jan 2010 19:16:07 +0000 (19:16 +0000)]
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
kmillikin@chromium.org [Wed, 13 Jan 2010 16:21:06 +0000 (16:21 +0000)]
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
kmillikin@chromium.org [Wed, 13 Jan 2010 16:01:15 +0000 (16:01 +0000)]
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
ager@chromium.org [Wed, 13 Jan 2010 13:26:31 +0000 (13:26 +0000)]
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
fschneider@chromium.org [Wed, 13 Jan 2010 12:13:37 +0000 (12:13 +0000)]
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
ricow@chromium.org [Wed, 13 Jan 2010 12:10:57 +0000 (12:10 +0000)]
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
kmillikin@chromium.org [Wed, 13 Jan 2010 11:29:08 +0000 (11:29 +0000)]
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
ager@chromium.org [Wed, 13 Jan 2010 10:27:54 +0000 (10:27 +0000)]
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
ager@chromium.org [Wed, 13 Jan 2010 08:16:02 +0000 (08:16 +0000)]
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
sgjesse@chromium.org [Wed, 13 Jan 2010 07:45:53 +0000 (07:45 +0000)]
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
sgjesse@chromium.org [Wed, 13 Jan 2010 07:35:31 +0000 (07:35 +0000)]
Fix ARM cross compiles generated from gyp.
Landing of http://codereview.chromium.org/549018.
TBR=piman@chromium.org
Review URL: http://codereview.chromium.org/546030
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3590
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
antonm@chromium.org [Tue, 12 Jan 2010 23:42:36 +0000 (23:42 +0000)]
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
antonm@chromium.org [Tue, 12 Jan 2010 19:36:09 +0000 (19:36 +0000)]
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
fschneider@chromium.org [Tue, 12 Jan 2010 17:22:57 +0000 (17:22 +0000)]
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
antonm@chromium.org [Tue, 12 Jan 2010 16:57:18 +0000 (16:57 +0000)]
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
erik.corry@gmail.com [Tue, 12 Jan 2010 15:36:43 +0000 (15:36 +0000)]
Fix float conversion warning from some gcc versions.
Review URL: http://codereview.chromium.org/541026
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3585
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
erik.corry@gmail.com [Tue, 12 Jan 2010 15:16:23 +0000 (15:16 +0000)]
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
ager@chromium.org [Tue, 12 Jan 2010 11:56:19 +0000 (11:56 +0000)]
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
ager@chromium.org [Tue, 12 Jan 2010 11:54:19 +0000 (11:54 +0000)]
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
kmillikin@chromium.org [Tue, 12 Jan 2010 09:58:50 +0000 (09:58 +0000)]
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
kmillikin@chromium.org [Tue, 12 Jan 2010 08:48:26 +0000 (08:48 +0000)]
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
ager@chromium.org [Tue, 12 Jan 2010 08:31:00 +0000 (08:31 +0000)]
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
ager@chromium.org [Tue, 12 Jan 2010 07:16:49 +0000 (07:16 +0000)]
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
sgjesse@chromium.org [Mon, 11 Jan 2010 15:19:53 +0000 (15:19 +0000)]
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
fschneider@chromium.org [Mon, 11 Jan 2010 12:59:17 +0000 (12:59 +0000)]
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
christian.plesner.hansen@gmail.com [Mon, 11 Jan 2010 12:13:24 +0000 (12:13 +0000)]
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
sgjesse@chromium.org [Mon, 11 Jan 2010 10:00:07 +0000 (10:00 +0000)]
Fix building of D8
This fixes building D8 when SCons cannot figure the build environment and it is passed using the env argument. This is usually only used when building with Visual Studio 2008.
Review URL: http://codereview.chromium.org/542009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3574
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
ager@chromium.org [Mon, 11 Jan 2010 07:35:32 +0000 (07:35 +0000)]
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
sgjesse@chromium.org [Fri, 8 Jan 2010 14:17:26 +0000 (14:17 +0000)]
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
erik.corry@gmail.com [Fri, 8 Jan 2010 13:48:27 +0000 (13:48 +0000)]
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
erik.corry@gmail.com [Fri, 8 Jan 2010 12:42:58 +0000 (12:42 +0000)]
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
sgjesse@chromium.org [Fri, 8 Jan 2010 11:58:15 +0000 (11:58 +0000)]
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
lrn@chromium.org [Fri, 8 Jan 2010 11:27:37 +0000 (11:27 +0000)]
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
erik.corry@gmail.com [Fri, 8 Jan 2010 10:41:25 +0000 (10:41 +0000)]
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