Commit Graph

2164 Commits

Author SHA1 Message Date
erik.corry@gmail.com
038f9074bc Reapply ARM root array change to reduce const pool size
by using r10 to point to a list of common root objects.
This time we also disable a debugger test on ARM that
has never worked, but with this change sometimes
crashes.
Review URL: http://codereview.chromium.org/174317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 11:57:57 +00:00
whesse@chromium.org
1dfac258a3 Change some integer types to make the x64 Win32 platform happier.
Review URL: http://codereview.chromium.org/173115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 11:56:29 +00:00
ager@chromium.org
ed05df0053 Shrink new space on compacting collections.
Review URL: http://codereview.chromium.org/174219

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 13:14:53 +00:00
sgjesse@chromium.org
cba1ae7db2 Prepare to push to trunk. We are now working on version 1.3.7.
Review URL: http://codereview.chromium.org/173189

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 10:48:31 +00:00
ager@chromium.org
fdf70d37fa Land change to bail out from post garbage collection processing if
another post gc processing was trigger because of weak callbacks.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 08:52:24 +00:00
sgjesse@chromium.org
88588df8c5 Fix a GC issue.
When descriptor arrays where allocated with the initial map the handling of allocation failures was not correct. This could cause the map returned could possible have been collected.
Review URL: http://codereview.chromium.org/173188

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 08:44:21 +00:00
sgjesse@chromium.org
77204cb36f Fix an ASSERT in the scanner.
The assert when performing a push back on a two byte string was wrong.

Added a small regression test.
Review URL: http://codereview.chromium.org/173116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 06:30:59 +00:00
ager@chromium.org
94a3009b04 Go back to doubling the size when growing new space.
Our memory tests show little improvement by only growing by 50%.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 08:12:30 +00:00
whesse@chromium.org
cd4d95bc1c Fix build error
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 08:08:18 +00:00
ager@chromium.org
756abb6e83 Land patch by agl@chromium.org to hopefully fix build failure on
Ubuntu with GCC 4.4.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 07:41:46 +00:00
feng@chromium.org
855c654b25 Add LowMemoryNotification to the API on Android platform.
Android system provides a unique feature that it sends a notification to the
browser in low memory condition, and the browser cleans up cache and frees
resources. Forcing a GC in low memory condition can free DOM objects and also
can shrink the old spaces.

This patch addresses the last comment in 
http://codereview.chromium.org/173016/show

	
Mads Ager 2009/08/19 17:24:23 
I would prefer to not use the flags to signal that a compacting collection is
requested.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 00:07:19 +00:00
antonm@chromium.org
8b42f23dec Do not allow GlobalHandles::Create to reuse destoryed nodes (ones from free list)
while performing GlobalHandles::PostGarbageCollectionProcessing as those might be already deleted (in C++ sense).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 20:32:51 +00:00
ager@chromium.org
0efbd40baf Add support for forceful termination of JavaScript execution.
The termination is achieved by throwing an exception that is uncatchable by JavaScript exception handlers.
Review URL: http://codereview.chromium.org/174056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 15:14:11 +00:00
sgjesse@chromium.org
8cc5048ac4 Prepare to push to trunk. We are now working on version 1.3.6.
Review URL: http://codereview.chromium.org/173054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 12:46:48 +00:00
sgjesse@chromium.org
b7eb0762b8 Fix lint error.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/173056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 12:44:45 +00:00
sgjesse@chromium.org
b8a73f0650 Fix uninitialized members.
Make sure that the DummyScope top level scope used for pre-parsing have all members initialized. The type of this scope is set to global scope as it is a top level scope. Also ensure that the "naked" Scope constructor can only be used by sub-classes of Scope.

The bug of missing initiaalization of members in the DummyScope was found by Valgrind.
Review URL: http://codereview.chromium.org/173052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 12:06:16 +00:00
ager@chromium.org
469259cd88 Reapply the semispace growth policy change in isolation.
Additionally fix NewSpace capacity bug by removing the duplicated
capacity and maximum capacity book keeping.  The capacity and maximum
capacity of NewSpace is the capacity and maximum capacity of one of
it's semispaces.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 10:36:19 +00:00
lrn@chromium.org
fdf31f7f5e X64: Implement debugger hooks.
Debugger is now fully functional.
Fix difference in emitting statement positions to match ia32.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 10:18:30 +00:00
ager@chromium.org
f68b81b084 Put back the reduction of semispace sizes as an isolated change.
The growth policy change is next.
Review URL: http://codereview.chromium.org/173050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 08:48:17 +00:00
ager@chromium.org
5e0a513e29 Temporarily revert the reduction of semispace sizes and the growth
policy change.

I will put the changes back one at a time so we can see the effect of
them in isolation.  Also, there is a bug in the growth policy change
that I will fix before putting it back again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 08:12:12 +00:00
sgjesse@chromium.org
b9f39307be Create a set of x64 Visual studio project files and corresponding solution.
These files will make it possible to start working with the 64-bit version on Windows.

The GUID's of the x64 project files are the same as their ia32 counterparts, but that does not matter as they will never be used in the same solution.

Added a temporary #error when building 64-bit version on Windows.
Review URL: http://codereview.chromium.org/171111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 07:32:48 +00:00
sgjesse@chromium.org
4e03645dc4 Analyze functions for assignment to this properties.
During parsing functions are analyzed for statements of the form this.x = ...;. These assignments are categorized in two types: simple and non simple. The simple ones are where the right hand side is known to be either a constant or an argument to the function. If a function only contains statements of this type the property names are collected and for the simple assignments the index of the argument or the constant value assigned are stored as well.

When the initial map for a function is created and the function consists of only this type of assignemnts the initial map is created with a descriptor array describing these properties which will be known to always exist in an object created from the function.

The information on this property assignments is not collected during pre-parsing so if compiling using pre-parse data these optimization hints are not available.

Next step will be to use the information collected for the simple assignments to generate constructor code which will create and initialize the object from this information without calling the code for the function.
Review URL: http://codereview.chromium.org/172088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 07:30:20 +00:00
feng@chromium.org
03a39152b9 Fix IA32 build when not using native regexp compiler.
Review URL: http://codereview.chromium.org/173003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 17:26:51 +00:00
whesse@chromium.org
e9365fb39b Increase new space size and limits on 64-bit platforms.
Review URL: http://codereview.chromium.org/171105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 11:26:14 +00:00
whesse@chromium.org
5b8d422524 Remove one of the GCs performed by the --gc-greedy flag. The GC performed by CEntryStub before the first call to C, when --gc-greedy is set, caused a bug in calling API callbacks.
Review URL: http://codereview.chromium.org/171104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 10:52:14 +00:00
ager@chromium.org
1656dd639a Fix regression caused by the generation of a shift stub during
snapshot creation in a better way.

Encode whether or not the stub should use sse3 instructions in the
minor key of the stub.  The stubs generated during snapshot creation
will have sse3 disabled, but they will not be found when sse3 is
enabled.  Therefore they will only affect the code generated as part
of the snapshot.
Review URL: http://codereview.chromium.org/172086

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 09:47:45 +00:00
ager@chromium.org
b3f8ce7ce4 Fix regression caused by context creation optimization r2681.
The issue is that a shift operation is used when creating the
snapshot.  This means that the shift binary operation stub is
generated at snapshot time without sse3 instructions.

The fix is to use division instead.
 
TBR=erik.corry@gmail.com

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 09:14:19 +00:00
feng@chromium.org
1c70072f7f Streamline the scanner for external two byte string input.
Review URL: http://codereview.chromium.org/165403

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 07:14:02 +00:00
feng@chromium.org
33fb11c12f Revert commit 2701 per Erik Corry's request.
Original CL:

http://codereview.chromium.org/171041
Review URL: http://codereview.chromium.org/171089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 00:12:26 +00:00
whesse@chromium.org
349dc04a5d Use root array to load roots in generated ARM code.
This cuts down on code size and reloc work.
Review URL: http://codereview.chromium.org/171041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 14:31:49 +00:00
christian.plesner.hansen@gmail.com
e64bf9ad6c Added API for getting object mirrors
Added Debug::GetMirror call to get a mirror for a given object.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 14:26:48 +00:00
christian.plesner.hansen@gmail.com
11e7f2a30b Added API call to get the stack trace for an exception
Added TryCatch::StackTrace that gets the stack trace for the thrown
exception.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 13:34:41 +00:00
christian.plesner.hansen@gmail.com
570788b115 Context-independent script compilation.
Added Script::New calls that create a new context-independent
(boilerplate) script which can be executed in any context, unlike the
current scripts which bind the context in which they're compiled.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 11:41:00 +00:00
christian.plesner.hansen@gmail.com
04a6340227 RegExp tweaks
Fixed bug where regexps were not callable across contexts since the
callable test used object identity on the regexp constructor.  Changed
typeof RegExp from 'object' to 'function' for compatibility.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 10:19:00 +00:00
whesse@chromium.org
a82bd0507c X64: Remove compound smi+overflow test using cmov.
Review URL: http://codereview.chromium.org/165525

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 09:07:40 +00:00
whesse@chromium.org
ab041ee4ed X64: Do not use an AllocateWithoutSpill register if it is invalid. Abandoned in favor of approach in http://codereview.chromium.org/165525/show (Issue 165526)
Review URL: http://codereview.chromium.org/164480

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 08:02:07 +00:00
deanm@chromium.org
903599a2fc Fix strict aliasing crash on x64.
Review URL: http://codereview.chromium.org/164498


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 17:19:51 +00:00
lrn@chromium.org
925433d241 Fix unsafe cast in RegExpStack
Review URL: http://codereview.chromium.org/164552


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 12:20:33 +00:00
sgjesse@chromium.org
409993be38 Refactor SetFunctionInfo to reduce long argument list take 2.
It now includes the change to ARM and x64 architectures as well.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 11:35:10 +00:00
lrn@chromium.org
4254388c14 X64: Implement RegExp natively.
Review URL: http://codereview.chromium.org/165443


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 11:24:32 +00:00
sgjesse@chromium.org
7b05678316 Refactor SetFunctionInfo to reduce long argument list.
Review URL: http://codereview.chromium.org/165527

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-14 11:05:42 +00:00
feng@chromium.org
f04005b576 Revert http://code.google.com/p/v8/source/detail?r=2670
Now we can pass '--expose_gc' to V8 in the layout test controller. This is probably a better option.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 22:13:45 +00:00
bak@chromium.org
f1f776f947 Changed Heap::Shrink to free as many pages as possible.
As a benefit, this eliminates an ifdef ARDROID.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 14:58:35 +00:00
whesse@chromium.org
9373ca76ed erikcorry: Remember to put objects back in fast case after adding functions.
P.S. for reasons unknown the original change (2681), also by erikcorry,
was attributed to Bill.
Review URL: http://codereview.chromium.org/164479

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 14:04:49 +00:00
whesse@chromium.org
d0d03d9980 Avoid map transitions and multiple backing arrays for builtin prototypes
while adding functions and other properties.  This gives around 2% on
context-create, more if we don't GC on every new context.  Also fix
accounting bug in cell space.
Review URL: http://codereview.chromium.org/165449

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:35:59 +00:00
whesse@chromium.org
5a3998c1f4 X64: Change testl to testb if mask fits in 1 byte. Shortens smi test.
Review URL: http://codereview.chromium.org/164472

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:35:09 +00:00
ager@chromium.org
c540fc7de6 Prepare push to trunk to get JSON parser fix into Chromium.
Now working on version 1.3.5.
Review URL: http://codereview.chromium.org/164474

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:21:11 +00:00
bak@chromium.org
6d98b0ba66 Changed semi space Grow to be rounded to OS page size.
Review URL: http://codereview.chromium.org/164469

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:13:50 +00:00
bak@chromium.org
bd5b5e52fc - Added simple memory reduction behavior for IdleNotification.
- This also include a one line change approved by lrh.
     http://codereview.chromium.org/164469

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:03:42 +00:00
christian.plesner.hansen@gmail.com
061834200a Fixed issue 19212
Fixed a bug in json parsing.  Refactored compilation code a bit to
make it more obvious what's going on.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 10:25:35 +00:00
bak@chromium.org
7f18bef0d2 Added idle notification to the API.
The implementation is still empty.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 09:35:51 +00:00
whesse@chromium.org
d7474a61a8 X64: Add an SHL optimization, fix a floating-point bug, fix xchg rax,r8 and printing of test ?ax, imm in disassembler.
Review URL: http://codereview.chromium.org/164399

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 08:00:04 +00:00
whesse@chromium.org
d35c815e94 Move some arrays into functions so they don't get cloned on each new context.
Review URL: http://codereview.chromium.org/164396

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 07:36:28 +00:00
christian.plesner.hansen@gmail.com
0b60fe88da Add a readline() command to d8. This reads a single line, stripping
the new-line at the end. This is the other half of what is required to
make the Debian Language Shootout code work correctly:
http://code.google.com/p/v8/issues/detail?id=353


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 07:07:41 +00:00
feng@chromium.org
de8c403f1c Revert my previous change r2654.
It has a similar impact on page cycler performance because now GC is randomly counted in page load time.

http://code.google.com/p/v8/source/detail?r=2654

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 21:30:13 +00:00
christian.plesner.hansen@gmail.com
896f875d76 Prepare to push to trunk. We are now working on version 1.3.4.
Review URL: http://codereview.chromium.org/165383

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 14:02:09 +00:00
bak@chromium.org
d7449ddebf - Reduced the maximum capacity of a semi space from 8MB to 4MB.
- Changed the semi space growth policy from doubling to increasing by 50%.
This slows down V8BenchmarkSuite with 1.32% but reduces the memory footprint with 8MB per V8 instance.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 13:54:43 +00:00
christian.plesner.hansen@gmail.com
395206b1df Add a write() command to d8. This is the same as the print() command, with the
exception that it does not add a new-line to the end. This half of what is
required to make the Debian Language Shootout code work correctly:
http://code.google.com/p/v8/issues/detail?id=354

BUG=354


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 11:52:22 +00:00
christian.plesner.hansen@gmail.com
8cc083d523 Fixed broken build.
Review URL: http://codereview.chromium.org/164395

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 11:08:10 +00:00
christian.plesner.hansen@gmail.com
ba974ace1b Add api call to determine whether a string can be externalized.
Review URL: http://codereview.chromium.org/164393

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 10:27:35 +00:00
whesse@chromium.org
2596299f1e X64: Remove optimization of SHR by constant, due to unfixed bug.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 15:30:09 +00:00
ager@chromium.org
f39651cbcd Land change to notify valgrind when we modify code on x86. This does
not seem to impact performance and makes it a lot easier for people
embedding V8 to run their application under valgrind.

If we observe a negative performance impact, we will need to revise
this again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 15:23:06 +00:00
whesse@chromium.org
6a8a7d580e X64: Implement remaining constant smi optimizations. Enable mozilla tests that now pass.
Review URL: http://codereview.chromium.org/164317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 12:49:27 +00:00
kmillikin@chromium.org
29b12aba42 Change the location set size from kPointerSize to kBitsPerPointer.
This was leftover from an old code review and not yet submitted.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 11:47:41 +00:00
kmillikin@chromium.org
d1f846cb2b Remove much of the register allocation overhead from ARM. When
registers are required for calls, explicitly construct a Result with
the needed register rather than allocating it.  For returns from
calls, let the return value in r0 be implicit rather than explicitly
allocated.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-11 11:46:27 +00:00
whesse@chromium.org
9024b946e7 X64: Add special inlining for subtracting a constant smi.
Review URL: http://codereview.chromium.org/164252

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-10 14:35:20 +00:00
kmillikin@chromium.org
6e63b28b2a Factored out common Instruction code in the CFG builder that depends only
on the number of operands.

Tinkered with instruction printing to align operands and not include
so many parentheses.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-10 13:00:05 +00:00
kmillikin@chromium.org
2bdd9d7c2e "Port" (count >= 0) assertion in VirtualFrame::Drop to ia32 and x64.
Review URL: http://codereview.chromium.org/164251

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-10 11:54:25 +00:00
kmillikin@chromium.org
a53c70c788 Eliminate most of the jump target jumping, branching, and binding
overhead on the ARM platform.

Because virtual frames are always in memory, there is no work to be
done for control flow except in the case of breaking or continuing
when there is extra statement state on the stack.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-10 11:13:34 +00:00
feng@chromium.org
1005fa3fbc Avoid calling GC in Context::New on Android devices.
Review URL: http://codereview.chromium.org/164153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 18:17:01 +00:00
kmillikin@chromium.org
e8f54a6073 Added support for property loads to the CFG builder and fast-mode
compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 13:32:39 +00:00
whesse@chromium.org
e73bfe98a4 Implement inline constructors for X64. Fix ia32 inline constructors a little. Fix a bug of a non-constant length between a call and its fixup.
Review URL: http://codereview.chromium.org/164144

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 12:52:32 +00:00
lrn@chromium.org
6ad8b09efb X64: Implement fast charCodeAt.
Review URL: http://codereview.chromium.org/164135


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 11:16:26 +00:00
kmillikin@chromium.org
216eaff31a Factor out some platform-independent code into the shared cfg.cc.
Review URL: http://codereview.chromium.org/165127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 10:55:19 +00:00
kmillikin@chromium.org
2851185938 Rename: ExpressionBuilder => ExpressionCfgBuilder, StatementBuilder =>
StatementCfgBuilder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 10:35:48 +00:00
kmillikin@chromium.org
90772fa427 Change the SpilledScope scope and ...AndSpill functions on ARM so that
they do nothing.  The frame is currently always spilled, so they were
not doing anything useful.

The call sites have been left alone to mark where spills will
eventually be needed if we begin doing register allocation on ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 08:18:31 +00:00
kmillikin@chromium.org
9edc69c72f Add support for (some) assignment expressions to the CFG builder and
fast-mode compiler.

1. We avoid generating a useless temporary for assignments with
nontrivial right-hand sides.  Instead of translating id = expr into:

...
tmp = <last expr instruction>
id = tmp

we generate directly

...
id = <last expr instruction>

by passing a data destination ('hint') down the AST.  The semantics is
to use the destination as a result location if a temp is needed.  It
may be ignored.  NULL indicates I don't care and you should generate a
temp.

2. We correctly handle assignments as subexpressions.  When building
the CFG for an expression we accumulate the assigned variables and we
emit a move to a fresh temporary if a value in a variable is in
jeopardy of being overwritten.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 07:15:31 +00:00
kasperl@chromium.org
bcbef79a11 Convert global objects to global receivers before invoking
JavaScript functions on them.
Review URL: http://codereview.chromium.org/165122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-07 07:15:16 +00:00
mikhail.naganov@gmail.com
b290c323a9 Fix presubmit errors.
TBR=whesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 20:35:33 +00:00
whesse@chromium.org
d3eeaf1757 X64: Implement tickprocessor sampling on 64-bit MacOS. This issue on codereview has been accidentally reused from an earlier issue by a process mistake.
Review URL: http://codereview.chromium.org/151004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 15:47:58 +00:00
whesse@chromium.org
863582bad4 Make sure use of eax in inlined sin and cos is safe.
Review URL: http://codereview.chromium.org/164061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 14:42:38 +00:00
whesse@chromium.org
384a6f299e X64: Implement inline trigonometric operations.
Review URL: http://codereview.chromium.org/164056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 14:42:10 +00:00
kmillikin@chromium.org
cde1262754 M regexp-macro-assembler-ia32.cc
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 13:57:34 +00:00
vitalyr@chromium.org
d6fcda0044 API: added function to find instance of template in prototype chain.
Also inlined Object::IsInstanceOf.

This new function is intended to be used to speed up DOM bindings.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 13:35:21 +00:00
lrn@chromium.org
5ae761cc15 Irregexp-ia32 internal call strategy changed.
Review URL: http://codereview.chromium.org/164053


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 12:51:04 +00:00
whesse@chromium.org
7bd88e829f X64: Optimize MOD operator by a constant power of 2.
Review URL: http://codereview.chromium.org/164054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 11:51:23 +00:00
kmillikin@chromium.org
6a19a8f5fd Fix the debugger in multipass mode by introducing phantom instructions
marking statement boundaries.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 11:14:48 +00:00
lrn@chromium.org
6f21761ea8 X64: Fix bug in boolean conversion of empty string.
Review URL: http://codereview.chromium.org/165043


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 10:22:38 +00:00
kmillikin@chromium.org
98b93c739d Added support for expression statements to the CFG builder and
fast-mode compiler.

This will generate a compiler temporary for complex expressions and
then immediately throw it away, so a better approach (to be
implemented later) is to pass to the expression builder whether an
expression is in an effect or value context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 07:51:44 +00:00
whesse@chromium.org
23507e34db X64: Make megamorphic and normal calls use stub cache and stub code.
Review URL: http://codereview.chromium.org/162009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 07:42:04 +00:00
kmillikin@chromium.org
23fbd8fe3f Add support to the CFG builder for non-short-circuited binary
expressions.  Add compilation support in fast mode (optimized for
compilation time and code size).

This breaks one debugger test each on ARM and IA32 (expectedly).
Review URL: http://codereview.chromium.org/160584

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 12:52:31 +00:00
lrn@chromium.org
30fa78f1f7 Fix bug in X64 RSet code. Optimize IA32 version.
Review URL: http://codereview.chromium.org/162001


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 11:08:24 +00:00
mikhail.naganov@gmail.com
ed09a3bf0b Fix issue 417: incorrect %t placeholder expansion.
BUG=http://code.google.com/p/v8/issues/detail?id=417
TEST=none

Verified on Linux, Mac, and Windows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 08:53:02 +00:00
sgjesse@chromium.org
02ac252907 Prepare to push to trunk. We are now working on version 1.3.3.
Review URL: http://codereview.chromium.org/159910

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 08:27:54 +00:00
sgjesse@chromium.org
fd956f70a5 Fix Windows build.
TBP=mnaganov
Review URL: http://codereview.chromium.org/160632

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-05 07:35:05 +00:00
whesse@chromium.org
2f7f0f6ea5 X64: Enable specialized stubs for length property.
Review URL: http://codereview.chromium.org/160582

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 14:18:03 +00:00
mikhail.naganov@gmail.com
5470f9b132 Add an ability to initiate GC through V8 API.
I'm planning to use it in DevTools heap profiler. It is a common scenario in debugging memory leaks to enforce GC, then perform an operation, then enforce GC again to check for non-collected (that is, leaked) objects. Using the existing GC extension isn't possible because it doesn't exposed in the normal operation mode of Chromium.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 14:14:01 +00:00
whesse@chromium.org
f2faaa5c34 X64: Add missing pop when calling handler with Out-of-memory exception.
Review URL: http://codereview.chromium.org/160520

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 13:46:58 +00:00
lrn@chromium.org
4fa5fc4f7e X64: double stack size, to be able to have the same number of stack frames as in ia32.
Review URL: http://codereview.chromium.org/159852


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 12:30:21 +00:00
whesse@chromium.org
3703231636 Add safe handling of NaN to Posix platform-dependent time functions.
Review URL: http://codereview.chromium.org/160580

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 09:41:18 +00:00
lrn@chromium.org
e05ea61528 X64: Fix bug in RandomPositiveSmi (doesn't save rsi before calling C-code).
Review URL: http://codereview.chromium.org/160519


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-04 08:23:37 +00:00
lrn@chromium.org
0e11fbcd79 Removed unsafe optimization in RecordWrite.
Optimization was only unsafe if new-space was in the low half of memory and an object could be
located in the top half at an addressed that only differ from a new-space address by the high
bit.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 13:17:34 +00:00
lrn@chromium.org
fd8b376989 X64: Reenabled RSet.
Review URL: http://codereview.chromium.org/160453


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 11:05:26 +00:00
sgjesse@chromium.org
8c9b30af83 Removed some comments which did not make any sense.
Review URL: http://codereview.chromium.org/159783

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 10:59:00 +00:00
whesse@chromium.org
118d5e171b Fix debug printing of pointers, and a keyed store with smi index error, in X64
Review URL: http://codereview.chromium.org/160452

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 10:53:45 +00:00
kmillikin@chromium.org
67a61e96c7 Restructure to support recursive invocation of the CFG builder. Add
support for stack-allocated variables when run with multipass.

There is no liveness analysis and they are currently always allocated
to memory.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 07:55:48 +00:00
iposva@chromium.org
3d070f1f0c - Fix a style violation which was flagged by gcc: while loop without body
- Restructured the entire function because:
  During the simple style fix I discovered that this whole routine was
  hard to read due to a general lack of comments. While adding comments I
  realized that the function was also skipping entries if there were two
  consecutive entries in the maps file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-01 06:11:53 +00:00
whesse@chromium.org
78ec956610 Add missing file to last changelist, for NaN Dates.
Review URL: http://codereview.chromium.org/159700

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 13:24:40 +00:00
whesse@chromium.org
2679ad1118 Guard local time posix functions from NaN value of invalid dates.
Review URL: http://codereview.chromium.org/160451

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 13:17:59 +00:00
kmillikin@chromium.org
e2ae01b6ef Add virtual destructors to address a gcc warning.
TBR=plesner@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:34:47 +00:00
kmillikin@chromium.org
b092d55890 Enable --trace when --multipass is on. Bugfix in bailout condition.
All V8 and (ia32) mozilla tests pass with --multipass on, failures now
count as regressions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:27:14 +00:00
mikhail.naganov@gmail.com
33f54fa6e2 X64: enable stack sampling in profiler.
Added necessary code to initialize Top::js_entry_sp value.
Renamed 'test-log-ia32' test to 'test-log-stack-tracer' and enabled it in 64-bit version.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:07:05 +00:00
kmillikin@chromium.org
3a472fada8 Basic infrastructure for fast two-pass compilation. A CFG is
generated in one-pass from the source AST, code is generated from the
CFG.  Enabled by the flag --multipass and disabled by default.

Rudimentary and currently only supports literal expressions and return
statements.  There are some other known limitations (e.g., missing
support for tracing).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:06:17 +00:00
whesse@chromium.org
ddbe148b68 X64: Add fix of issue 392 to X64
Review URL: http://codereview.chromium.org/160393

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 08:04:41 +00:00
sgjesse@chromium.org
219df901a2 Prepare push to trunk. We are now working towards version 1.3.2.
Review URL: http://codereview.chromium.org/160391

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 14:18:09 +00:00
lrn@chromium.org
67936a7b16 X64: Fix lint problem and add missing stub function.
Review URL: http://codereview.chromium.org/160387


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 12:09:51 +00:00
kmillikin@chromium.org
1a39e07003 Another name change for consistency's sake. NODE_LIST -> AST_NODE_LIST.
Review URL: http://codereview.chromium.org/159633

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 12:09:05 +00:00
kmillikin@chromium.org
a48fd5916e Change the overly-general class named Node to the more specific
AstNode in case we ever want to have some other kind of node.

Split the NODE_LIST macro-generating macro so that we can iterate
concrete subclasses of Statement and concrete subclasses of Expression
separately.
Review URL: http://codereview.chromium.org/159632

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 11:53:29 +00:00
lrn@chromium.org
dc8ca16931 X64: Added inline keyed load/store and a bunch of other missing functions.
Review URL: http://codereview.chromium.org/160272


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 09:18:14 +00:00
sgjesse@chromium.org
cffc051177 Avoid dictionary expansion during bootstrapping.
Allocate the code stubs dictionary and non monomorphic cache dictionary with an initial size which avoids these dictionaries to be expanded during bootstrapping. This gets rid of 9 dictionary expansions during bootstrapping.

Preallocate the dictionary when normalizing an object to a size sufficient for holding the number of properties which is expected to be added to the object. This is used when ceating an object from an object literal boilerplate where multiple properties are known to be added.  This gets rid of 10 dictionary expansions during bootstrapping.

There are now 3 dictionary expansions left during bootstrapping.
Review URL: http://codereview.chromium.org/160382

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 09:13:48 +00:00
whesse@chromium.org
027f8d11c7 X64: Change wording of comments.
Review URL: http://codereview.chromium.org/160381

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 08:11:25 +00:00
sgjesse@chromium.org
d8563e4d1e Allocate global object as a normalized object.
The global object is now allocated and initialized as a normalized object.
Review URL: http://codereview.chromium.org/159587

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 07:33:05 +00:00
whesse@chromium.org
79b52509d3 X64: Fix error in division & modulus, adjust mjsunit test status, fix lint error in objects.h
Review URL: http://codereview.chromium.org/159584

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 07:31:54 +00:00
sgjesse@chromium.org
e13c319f7c Harden message handling in the debugger agent.
This defect have been reported by the Coverity Prevent static analysis tool.
Review URL: http://codereview.chromium.org/160327

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 07:02:23 +00:00
christian.plesner.hansen@gmail.com
98425a31f1 Speed up CalledAsConstructor.
Changed CalledAsConstructor to process the raw runtime stack directly,
rather than using a StackFrameIterator.  Using an interator turns out
to be quite expensive and the vast majority of the work done is not
relevant to deciding if we've been called as a constructor.

This speeds up getElementById by ~13%.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 12:50:20 +00:00
antonm@chromium.org
0d2c81584b Compile precanned answers for the case of failed interceptor for some combinations.
Review URL: http://codereview.chromium.org/140069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 12:34:21 +00:00
yurys@chromium.org
cd16b5be95 Use JSFunction::IsBuiltin() for checking if a function is a builtin one
Review URL: http://codereview.chromium.org/160323

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 11:55:26 +00:00
mikhail.naganov@gmail.com
e97554ed10 Add generic V8 API functions for controlling profiling aspects.
As we'll have several aspects of heap profiling, it is more handy to control them using binary flags than by individual functions. CPU profiling represent just a particular aspect to control, so {Pause,Resume}Profiler and IsProfilerPaused are only left for compatibility.

For now, PROFILER_FLAG_HEAP_STATS and PROFILER_FLAG_JS_CONSTRUCTOR are equivalent, but later will be split.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 11:23:36 +00:00
kasperl@chromium.org
84d8e51df4 Change the check for builtin functions to not be based on identity,
which seems shaky in the presence of multiple builtin objects.
Review URL: http://codereview.chromium.org/159583

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 09:51:41 +00:00
sgjesse@chromium.org
69a90ee916 Add missing case in AST printer.
Review URL: http://codereview.chromium.org/159580

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 08:46:28 +00:00
mikhail.naganov@gmail.com
9e8216ef22 Introduce first approximation of constructor heap profile for JS objects.
It is activated with '--log-gc' flag.

JS object size is calculated as its size + size of 'properties' and 'elements' arrays, if they are non-empty. This doesn't take maps, strings, heap numbers, and other shared objects into account.

As Soeren suggested, I've moved ZoneSplayTree from jsregexp to zone, and removed now empty jsregexp-inl header file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 08:10:19 +00:00
yurys@chromium.org
cda6146266 Don't step in function.call/apply if the function is builtin one.
Chromium bug: http://code.google.com/p/chromium/issues/detail?id=17886
Review URL: http://codereview.chromium.org/159508

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 06:34:30 +00:00
iposva@chromium.org
8a82d61722 - getc returns an int.
Review URL: http://codereview.chromium.org/159538

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 21:10:13 +00:00
iposva@chromium.org
9a5a3fd6a5 - Clamp double values as doubles to get a free NaN check and
to handle infinity properly.

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



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 18:11:12 +00:00
mikhail.naganov@gmail.com
ee340a52ff X64: Fixes to enable C/C++ functions processing in profiler.
- rewrote Linux version of LogSharedLibraryAddresses to work correctly with 64-bit libs;
 - fixed address length restriction in JS tickprofiler script.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 15:37:05 +00:00
antonm@chromium.org
4354661a49 Get rid of unnecessary handle management when invoking interceptors.
Review URL: http://codereview.chromium.org/155682

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 14:46:06 +00:00
whesse@chromium.org
1ed7462166 X64: Fix bug that showed up in mjsunit/invalid-lhs.js
Review URL: http://codereview.chromium.org/159506

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 14:11:09 +00:00
whesse@chromium.org
b357dc043e More X64 inline cache implementation.
Review URL: http://codereview.chromium.org/160268

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 13:44:17 +00:00
kasperl@chromium.org
f68b31403c Change custom NaN check to use isnan to fix pixel array
failures on ARM hardware.
Review URL: http://codereview.chromium.org/160269

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 12:50:58 +00:00
kasperl@chromium.org
516d47c73b Fix pixel array support for x64 and make the fast Array functions
that use JSARRAY_HAS_FAST_ELEMENTS_CHECK a bit safer in the presence
of pixel arrays.
Review URL: http://codereview.chromium.org/159500

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 12:46:08 +00:00
sgjesse@chromium.org
422b02717e Change the updating of the counters for global stub use to be consistent. Now counters are updated when they are sure to count to avoid decrementing them when there is a miss.
Review URL: http://codereview.chromium.org/160265

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 11:42:18 +00:00
kasperl@chromium.org
b2fc0598c1 Fix lint issues. TBR=iposva@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 09:05:05 +00:00
iposva@chromium.org
1ce28eda0b - Expose CanvasPixelArray functionality directly in JavaScript
indexed property accesses.
- The IC stubs have not been updated to handle these directly, but
  at least we do not have to leave the VM to access bytes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 08:43:51 +00:00
lrn@chromium.org
25eb44253f X64: Fixed bug de-tagging of smis in multiplication code.
Moved some dummy function implementations to from ic-x64.cc to stub-cache-x64.cc (where they belong)

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 08:22:48 +00:00
whesse@chromium.org
65580ea35e X64: Fix buggy expression in disassembler. Fixes Issue 408: http://code.google.com/p/v8/issues/detail?id=408
Review URL: http://codereview.chromium.org/160174

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 18:51:46 +00:00
whesse@chromium.org
72ac6f619a X64: Add inline cache stub for storing to globals.
Review URL: http://codereview.chromium.org/160160

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 15:02:35 +00:00
christian.plesner.hansen@gmail.com
668497b26a Handlified some stack trace code
Fixed some failing sputnik tests by handlifying some code that would
otherwise break on gc.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 13:26:43 +00:00
christian.plesner.hansen@gmail.com
c1581cd5bd Added Error.captureStackTrace function.
Added utility function for capturing stack traces so that efficient
stack trace collection works for custom errors too, not just built-in
ones.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 12:01:32 +00:00
whesse@chromium.org
9b25131b4f X64: Add mov rax,(mem64) to disassembler.
Review URL: http://codereview.chromium.org/159397

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 10:39:46 +00:00
whesse@chromium.org
8558fde3a5 Make X64 implementation update Store ic stubs. Remove comment that talks about "below" on the stack meaning closer to the top.
Review URL: http://codereview.chromium.org/159402

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 10:39:21 +00:00
vitalyr@chromium.org
57e8217c10 Stub Cache: speed up load callback accessor by allocating data handle on stack.
Review URL: http://codereview.chromium.org/160041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 09:54:59 +00:00
kasperl@chromium.org
ef0fb2e6fb Prepare to push version 1.3.0 to trunk.
Review URL: http://codereview.chromium.org/160157

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 08:27:28 +00:00
iposva@chromium.org
d573e3b39d Landing patch for Timur Iskhodzhanov.
Reviewed at http://codereview.chromium.org/160099

The original MacOSMutex constructor makes data race detectors a little
bit crazy. Also, the new version is simpler and easier to understand.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-27 05:31:30 +00:00
whesse@chromium.org
500e10b648 Add inline caching for keyed loads and stores. Remove extra parentheses from some files.
Review URL: http://codereview.chromium.org/159266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-24 11:22:35 +00:00
yurys@chromium.org
161d38c614 Debugger should not stop in its own code and in code of built-in functions since it may confuse user.Debug break handler checks whether current function is a built-in or a debugger one and just resumes execution if it is.
CallCheckStackGuardState is no longer called in loop in the RegExp code as it hangs if debug break flag is not reset after calling Execution::HandleStackGuardInterrupt.
Review URL: http://codereview.chromium.org/160001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-24 06:14:23 +00:00
whesse@chromium.org
1309d6df08 Fix typo in last change
Review URL: http://codereview.chromium.org/160009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 13:05:36 +00:00
whesse@chromium.org
18c6337a2c Fix an error in a keyed lookup stub - HeapNumbers treated as strings.
Review URL: http://codereview.chromium.org/155924

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 13:01:17 +00:00
kmillikin@chromium.org
4196711d2e Call the (fatal) V8 out of memory handler if we cannot allocate enough
memory from the OS to deserialize the initial heap snapshot at
startup.

This catches the failure to startup earlier, and avoids dereferencing
the encoding of an allocation failure.

BUG=16359

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 12:56:45 +00:00
kmillikin@chromium.org
270c0e8b8f Change a few style issues (dead code, unitialized members) flagged by
Coverity Prevent.  All are benign.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 12:51:49 +00:00
kmillikin@chromium.org
1ca19c383d Fix ARM compiler crash in short-circuited boolean expressions.
We did not handle the case where the left-hand-side expression was
fully compiled to control flow.  There were also some assertions for
unary and binary expressions that crashed debug builds when the
expression was fully compiled to control flow.

Regression test added.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 11:40:14 +00:00
whesse@chromium.org
f751483255 Correct sense of test for generic keyed load with a symbol as key.
Review URL: http://codereview.chromium.org/155922

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 14:40:04 +00:00
kmillikin@chromium.org
e8ae83eec3 Remove a few occurrences of the CHECK_FAILED macro in the parser.
There's no reason to check if we've failed when (a) we know we have
and (b) we've got a perfectly good NULL just lying around anyway.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 12:33:16 +00:00
kmillikin@chromium.org
dc30b11fbc Fix some defects identifies by Coverity Prevent. All are false
positives, but I've restructured the code to be more explicit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 11:29:38 +00:00
kmillikin@chromium.org
1cbe7a240a Fix two deallocation bugs identified by Coverity Prevent.
1. The tables array allocated in the CompilationSubCache constructor
   was never deallocated.  Fixed by adding destructor.

2. The buffer allocated in one of the constructors of the
   NoAllocationStringAllocator was never deallocated.  It seems that
   this class sometimes owns the buffer (if it allocated one itself)
   and sometimes doesn't (if it was passed one).  Simple fix is to
   remove the offending constructor which was never used anyway.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 10:23:19 +00:00
ager@chromium.org
2183309385 Introduce a external allocation limit.
If V8 is holding on to a lot of external memory, we attempt to clean
it up even if we do not get an allocation failure.  Since tiny V8
objects can hold on to a lot of external memory, we might run out of
external memory while waiting for a normal allocation failure.
Review URL: http://codereview.chromium.org/155916

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 10:01:25 +00:00
whesse@chromium.org
be562ee794 X64: Add StoreField inline cache stub.
Review URL: http://codereview.chromium.org/155915

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 09:11:33 +00:00
iposva@chromium.org
a109c08c78 - Remove unneeded include of ucontext.h as it is deprecated on Snow Leopard.
- Avoid calculating shared library addresses if profiling is not enabled.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-21 17:25:07 +00:00
whesse@chromium.org
ff242173c3 Make stub cache hash work on X64 platform. Stub cache now works.
Switch arguments of 32-bit arithmetic instructions so they are consistent
with 64-bit arithmetic instructions (all on X64 platforms).
Review URL: http://codereview.chromium.org/155849

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-21 13:30:46 +00:00
whesse@chromium.org
8ff3dc5280 X64: Implement inline caches for loads
Review URL: http://codereview.chromium.org/159131

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-21 11:06:24 +00:00
whesse@chromium.org
46b8d84659 X64: Fix compiler complaint
Review URL: http://codereview.chromium.org/159079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 20:17:27 +00:00
whesse@chromium.org
ca6cd9b4b2 X64: Add instructions to disassembler. Skip hanging test-api test.
Review URL: http://codereview.chromium.org/155771

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 14:57:09 +00:00
whesse@chromium.org
7f886c8582 X64: Enable more of LoadIC, disable individual stub types.
Review URL: http://codereview.chromium.org/155763

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 14:33:59 +00:00
kmillikin@chromium.org
7c8a166b91 Fix another site where a stack-allocated character was treated as a
one-element character array.  This was safe at this site but
potentially confusing.

BUG=17103

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 12:28:02 +00:00
kmillikin@chromium.org
2126c36279 Change RegExpMacroAssemblerIA32::CaseInsensitiveCompareUC16 so that it
does not use stack-allocated character as a one-element character
array.

The use at this site was actually safe (Ecma262Canonicalize will only
write to the first character of the array), but not obviously so.

BUG=17103

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 10:54:00 +00:00
mikhail.naganov@gmail.com
ec526df16f Heap profiling: add logging of heap memory stats (capacity, used) under 'log-gc' flag.
Also changed time reporting to system time to be able to get synchronized with other memory (e.g. DOM) size status.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-20 09:38:44 +00:00
ager@chromium.org
ab59ea5a16 I will lint my code before submitting...
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 16:34:58 +00:00
ager@chromium.org
6d641a8131 Add missing handle scope in internal field code.
TBR=kasperl@chromium.org
Review URL: http://codereview.chromium.org/155691

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 16:00:42 +00:00
whesse@chromium.org
39c9dd5ab1 X64: Add inline caching to calls of global functions
Review URL: http://codereview.chromium.org/155688

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 12:58:12 +00:00
whesse@chromium.org
76833936b7 Make Array::kHeaderSize protected, and only use kHeaderSize of its subclasses.
Many X64 bugs have been due to the difference between (unaligned) Array::kHeaderSize and (aligned) FixedArray::kHeaderSize.
Review URL: http://codereview.chromium.org/155687

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 12:12:24 +00:00
kasperl@chromium.org
21f44e8fd2 Make sure we don't crash if NewProxy returns an empty handle (only
happens when out of memory).
Review URL: http://codereview.chromium.org/155685

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 11:16:10 +00:00
antonm@chromium.org
3c6c399381 Introduce faster utilty methods for storing and retrieving native pointers
in internal fields.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 10:35:15 +00:00
kasperl@chromium.org
4f2cc4104e Patch by Vitaly Repeshko. Improve performance of internal fields
operations by adding a fast-case check for JS_OBJECT_TYPE in
JSObject::GetHeaderSize().
Review URL: http://codereview.chromium.org/155684

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 09:16:23 +00:00
whesse@chromium.org
f8e622a620 Added inline caching for calls to a field to X64. Changed a use of Array::kHeaderSize to FixedArray::kHeaderSize on all platforms.
Review URL: http://codereview.chromium.org/149798

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 08:55:01 +00:00
kasperl@chromium.org
38f5a84701 Avoid more static variables in inline functions.
Review URL: http://codereview.chromium.org/149799

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 08:22:07 +00:00
kasperl@chromium.org
124ef540c0 Patch by Mark Mentovai. Don't put static variables inline.
Original review: http://codereview.chromium.org/149768

TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/155679

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 05:37:09 +00:00
kasperl@chromium.org
94c4760225 Revert r2486, r2487, and r2488 until I get the chance to fix
the performance issue with number dictionaries.

TBR=kmillikin@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 04:57:17 +00:00
bak@chromium.org
752a8fbaba Changed the dictionary code to use original hash value when starting linear scan.
This is necessary for hash codes for string where the array index is encoded.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 14:59:28 +00:00
bak@chromium.org
78ffa1df4d Added two spaces to make presubmit.py happy.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 13:25:45 +00:00
bak@chromium.org
e0047e4331 Changed hash table to use more of the hash value when probing.
Review URL: http://codereview.chromium.org/155350

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 12:56:50 +00:00
whesse@chromium.org
263acb4d02 X64: Implement inline cache of monomorphic constant function call. Mark a debugger test on X64 as failing.
Review URL: http://codereview.chromium.org/155631

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 12:49:14 +00:00
whesse@chromium.org
a1cf7d6e3d X64: Enable inline caching for calls, with some stubs stubbed out.
Review URL: http://codereview.chromium.org/149674

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 08:38:52 +00:00
yurys@chromium.org
20e4b1dbc5 Reapply http://codereview.chromium.org/149542 now that issue with Mac builder is fixed(http://codereview.chromium.org/155591)
Review URL: http://codereview.chromium.org/149746

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 07:07:51 +00:00
whesse@chromium.org
10605879f6 Disable inline caching on X64 separately for loads, stores, and calls, while they are being implemented and tested one-by-one.
Review URL: http://codereview.chromium.org/149673

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 12:30:28 +00:00
yurys@chromium.org
12d5143551 Reverting 2458 to see if it makes Builder Webkit Mac (V8-Latest) happy.
Review URL: http://codereview.chromium.org/149672

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 09:45:06 +00:00
kmillikin@chromium.org
6443cb99f7 Fix issue 345 by avoiding duplicates in the list of escaping labels
from a try...catch...finally statement.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 08:57:25 +00:00
antonm@chromium.org
f12bdb27aa Improved version of LookupForRead (tnx to Kasper) + some faster paths.
1) add no GC check;
2) do not use recursion;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 08:07:31 +00:00
mikhail.naganov@gmail.com
36b69749a5 Add heap log processing script originally written by Kevin.
Also, add user time into heap sample begin events to make '--log-gc' flag alone sufficient for producing heap logs (previously, samples times were extracted from scavenge events which are only logged with '--log' flag).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 07:09:48 +00:00
feng@chromium.org
9b58a0c856 Adjust kPagesPerChunk to 16 instead of 64 on Android.
Renamed some macros to ANDROID.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 22:38:06 +00:00
yurys@chromium.org
cc6be014dc Support stepping into getters and setters.
Related Chromium bug:
http://code.google.com/p/chromium/issues/detail?id=16427

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 16:55:32 +00:00
whesse@chromium.org
894af58c82 Change tests status for x64, make test runner pass --arch flag to Scons, add to x64 disassembler. Copied from http://codereview.chromium.org/155346 so it can be committed.
Review URL: http://codereview.chromium.org/149608

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 11:39:45 +00:00
mikhail.naganov@gmail.com
73710e057a Implement shared libraries logging on Mac OS X, added required support in Tick Processor.
Review URL: http://codereview.chromium.org/155437

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 05:01:06 +00:00
ager@chromium.org
7a80be473d Firefox and Safari both allow calling regular expression objects as
functions (as an alias for calling the exec method).  For
compatibility make call_regexp the default and remove the flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 23:41:17 +00:00
ager@chromium.org
44be312091 Put the work-around for http://crbug.com/16276 into the ARM port as
well.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 23:15:04 +00:00
feng@chromium.org
d52990b2e2 Add a trace_gc_verbose flag.
The flag is only turned on when --trace_gc is one. It prints out used and available bytes in each space. To enable it, ENABLE_LOGGING_AND_PROFILING must be defined.

This is a mini version of --heap_stats, but don't need DEBUG macro to be turned on.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 21:24:54 +00:00
feng@chromium.org
3e4c457d1c Add ENABLE_DEBUGGER_SUPPPORT around 4 functions, set complation cache generation
to 1 for ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 21:23:21 +00:00
feng@chromium.org
0b70c7e16e Hook up the log facility of Android platform.
Review URL: http://codereview.chromium.org/155443

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 21:22:50 +00:00
iposva@chromium.org
1ea35a858f - Added missing braces in an if statement as a drive-by-edit.
- Removed executable bits from Xcode project file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 15:00:35 +00:00
kasperl@chromium.org
f188ed8183 Prepare to push version 1.2.14 to trunk.
Review URL: http://codereview.chromium.org/149533

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 13:49:57 +00:00
kasperl@chromium.org
df43ae3993 Revert r2431. I don't think this is it.
Review URL: http://codereview.chromium.org/155419

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 13:36:38 +00:00
kasperl@chromium.org
067b3af8b7 Attempt at work-around for http://crbug.com/16276 by explicitly checking
for global objects in the assembly code for dictionary loads.
Review URL: http://codereview.chromium.org/155418

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 13:24:32 +00:00
deanm@chromium.org
e9f42cde46 Small cleanup to Utf8::CalculateValue:
- Don't duplicate kMaxXByteChar constants.
  - Don't compare signed and unsigned integers.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 11:17:51 +00:00
antonm@chromium.org
d067f8903a Convert object to fast mode after creation. That enables more optimizations.
Review URL: http://codereview.chromium.org/155405

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 10:10:28 +00:00
kasperl@chromium.org
55a8088bd8 Add support for tracking down leak of the hole value.
Review URL: http://codereview.chromium.org/149522

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 09:17:04 +00:00
kasperl@chromium.org
e0c01db960 Try to work around http://crbug.com/16276 until we can
find the cause of the problem.
Review URL: http://codereview.chromium.org/149521

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 08:31:30 +00:00
ager@chromium.org
55050383e1 Port the function prototype load stub to ARM.
Review URL: http://codereview.chromium.org/155373

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 23:26:33 +00:00
ager@chromium.org
00cdc3f1a3 Remove the descriptor stream abstractions.
The abstractions have led to bugs because it looks like descriptor
streams are GC safe but they are not.

I have moved the descriptor stream helper functions to descriptor
arrays and I find most of the code just as readable now as it was
before.
Review URL: http://codereview.chromium.org/149458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 19:25:18 +00:00
yurys@chromium.org
0da86e1250 Fix an issue with debugger 'step in' when calling function has local variables.Corresponding Chromium bug:http://code.google.com/p/chromium/issues/detail?id=15824
Review URL: http://codereview.chromium.org/149326

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 09:57:53 +00:00
kasperl@chromium.org
875dbe6584 Re-enable ICs for loads and calls that skips a global object during
lookup through the prototype chain.
Review URL: http://codereview.chromium.org/155344

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 09:40:47 +00:00
mikhail.naganov@gmail.com
15754c6f1c Fixed issue 401: os.system() hangs on Mac OS X.
Fixed by falling back to using 'waitpid' instead of 'waitid'.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 08:36:37 +00:00
kmillikin@chromium.org
726c29c0be Skip the write barrier for global property cell writes. The heap
verification code was refactored to avoid verifying that property
cells have correct remembered sets.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 14:34:08 +00:00
whesse@chromium.org
b019600dce X64: Let debugger patch JSReturn with a debug break.
Review URL: http://codereview.chromium.org/155286

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 13:30:27 +00:00
kmillikin@chromium.org
e0ac466589 During a scavenge, instead of sweeping remembered-set bits for global
property cells, sweep the cell values themselves.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 13:28:22 +00:00
kasperl@chromium.org
13acf24a2b Don't have too many holders. Reviewed offline by Kevin Millikin.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 12:23:08 +00:00
kmillikin@chromium.org
525601be88 Fix free list construction for global property cells on x64.
Review URL: http://codereview.chromium.org/155287

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 12:20:04 +00:00
kmillikin@chromium.org
fd9aab6ee7 Fix too-long line.
TBR=kasperl@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 12:13:51 +00:00
erik.corry@gmail.com
97f319d989 Get peep-hole optimizer working on ARM by not emitting
debug info at places where the debugger can't stop.
This fixes the ARM version after
http://codereview.chromium.org/14170
Reformat debug-backtrace.js test.
Review URL: http://codereview.chromium.org/155285

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:59:58 +00:00
lrn@chromium.org
b3e8f5ef49 X64: Fixed more bad smi operations.
Review URL: http://codereview.chromium.org/155281


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:46:30 +00:00
kmillikin@chromium.org
266ce3fdb0 Fix x64 build.
Review URL: http://codereview.chromium.org/149385

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:46:12 +00:00
kasperl@chromium.org
98f1a228c6 Allow access through the global proxy to use ICs.
Review URL: http://codereview.chromium.org/155283

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:17:57 +00:00
kmillikin@chromium.org
d0c35af612 Create a new paged heap space for global property cells. The new
space is similar to map space in that it has fixed-size objects.  A
common superclass for a space with fixed size objects is used for the
map space and cell space.

Allocate all cells in cell space.  Handle it during all GCs.  Modify
the free-list node representation (so that the size is not at a fixed
offset in all cells) to allow two-pointer free-list nodes.  Clean up
some stuff in the MC collector.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:13:08 +00:00
lrn@chromium.org
e3bb851efb X64: Fix bug in left-shift.
Also changed a few other places that looked suspicious in the same way.
Added more info to failing test case and rewrote incorrect uses of mjsunit "fail" function.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 08:00:12 +00:00
kasperl@chromium.org
b8eb6189be Prepare to push version 1.2.13 to trunk.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/149381

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 05:44:19 +00:00
lrn@chromium.org
b360ef238d X64: Fix recently introduced bug in movq with 64-bit literal.
Review URL: http://codereview.chromium.org/155223


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 05:43:34 +00:00
ager@chromium.org
68f5664689 Address review comments.
Only jump over 'else' part of a conditional if it is actually
generated.  Update a comment to more correctly reflect what is going
on.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 04:22:05 +00:00
iposva@chromium.org
05b7b265cb - Update comments and fix a small glitch in the ARM disassembler.
- Fix the use of OS::ActivationFrameAlignment() when running with
  the simulator.
Review URL: http://codereview.chromium.org/155109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 22:13:42 +00:00
ager@chromium.org
13bf328e19 Fix crash bug in ARM codegenerator by adding another special case for
generating code after a call to LoadConditionAndSpill.

This crash is hit on www.rightmove.co.uk when using the ARM
codegenerator.
Review URL: http://codereview.chromium.org/149351

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 22:05:06 +00:00
ager@chromium.org
0be6a72cc1 Fix crash in arm conditional expression code generation.
Review URL: http://codereview.chromium.org/155234

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 19:43:22 +00:00
erik.corry@gmail.com
8f73ae0325 * Move almost all roots into an array ready for use by a constant-pool
register on ARM.
* Make some compile-time loops into run-time loops for compactness.
Review URL: http://codereview.chromium.org/149324

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 19:12:58 +00:00
whesse@chromium.org
bf656d2ae1 Fix an X64 problem with builtin fixups. Remove an assert from fixups that is no longer true on all platforms.
Review URL: http://codereview.chromium.org/149332

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 16:19:13 +00:00
lrn@chromium.org
bef7669209 X64: Fix bug in for-in iteration.
Review URL: http://codereview.chromium.org/155213


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 15:43:31 +00:00
bak@chromium.org
be6dd7a490 Fixed and exposure to the_hole from Runtime_KeyedGetProperty.
Added regression test that fails with previous revisions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 11:51:43 +00:00
kasperl@chromium.org
9aa9458933 Fix crash that occurs when we're forced to delete a global
property that used to be DontDelete and we still have an IC
that reads from the cell.
Review URL: http://codereview.chromium.org/149322

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 11:32:03 +00:00
whesse@chromium.org
1aad92a9ab X64: Turn of gcc strict-aliasing optimization for X64 release.
Review URL: http://codereview.chromium.org/155208

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 09:46:26 +00:00
lrn@chromium.org
dbdce5e650 X64: Added unimplemented method in codegen-x64.cc.
Six more tests run.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2387 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 09:26:51 +00:00
kasperl@chromium.org
d4511a3a93 Fix issue with skipping global object during lookup through
the prototype chain. In case we're skipping a global object,
we have to be careful not to use ICs for the load, because
it's possible to introduce variables on the global object
without a map change.
Review URL: http://codereview.chromium.org/149316

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 07:13:44 +00:00
ager@chromium.org
5c8961704e Fix unsafe use of DescriptorWriter across allocation.
DescriptorWriters hold a raw pointer to the descriptor array and they
are therefore not GC safe.
Review URL: http://codereview.chromium.org/149304

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 03:21:27 +00:00
ager@chromium.org
b4c6762b61 Port IsConstructCall optimization to x64 and ARM.
Review URL: http://codereview.chromium.org/149266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 19:00:24 +00:00
whesse@chromium.org
19e82212f4 Fix issue number 398: replacing a constant function on a clone.
Review URL: http://codereview.chromium.org/149249

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 14:06:08 +00:00
kmillikin@chromium.org
35a1de0f6a Remove the support for jump-table switches from the x64 port as well.
Review URL: http://codereview.chromium.org/126197

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 13:17:22 +00:00
yurys@chromium.org
cba9c183a0 In Chrome several tabs may share the same v8 instance. Each of those tabs can be inspected with its own devtools window. When such devtools window closes we need to clear all breakpoints that belong to it. Notion of breakpoint group enables us to do that.
Storing the breakpoints on the client(in a different process) would be inreliable since 1) it may crash and 2) some 'setbreakpoint' requests may be not processed yet by the time devtools window closes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 12:48:57 +00:00
lrn@chromium.org
9cecee80f1 X64: Disassembler updated to using REX, extended registers and some X64 opcodes.
Not all opcodes fixed yet (some should be invalid in 64-bit mode, others should be added).

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 12:40:15 +00:00
whesse@chromium.org
e9580c61ba X64: Use CmpObjectType macro everywhere, fix problem with sign of instance types.
Review URL: http://codereview.chromium.org/155132

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 12:17:31 +00:00
kasperl@chromium.org
b0f411c298 Fix issue 397 and issue 399.
Review URL: http://codereview.chromium.org/149247

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 11:57:09 +00:00
kmillikin@chromium.org
8e0e670bde Change a few sites where the Handle<T>(NULL) constructor is used so
that they use the static Handle<T>::null() member function instead.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 11:41:21 +00:00
kmillikin@chromium.org
8e6bf58174 Allow variable proxies for the same global variable to share the same
variable object.

Add a map from names to variables for global scopes just like
non-global scopes.  Variables are added to the map by the parser when
it encounters a declaration in a global scope or else at scope
resolution time by a failed variable lookup from the global scope or
an inner one and with no intervening with statements or possible calls
to eval.
Review URL: http://codereview.chromium.org/149245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 09:48:54 +00:00
lrn@chromium.org
72235cf06c Changed ?: into if/else to placate compiler.
Review URL: http://codereview.chromium.org/155131


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 09:29:41 +00:00
erik.corry@gmail.com
67fec3265b Fix the order in which ToNumber is called for some Math functions.
Avoid divisions when doing Math.min(0, 0).
https://bugs.webkit.org/show_bug.cgi?id=26978 has been
filed to fix inconsistencies between JSC and V8.
Review URL: http://codereview.chromium.org/149188

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 08:55:55 +00:00
lrn@chromium.org
72de7ab74e Separate native and interpreted regexp by compile time flag, not runtime.
Clean-up of RegExp code.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 08:11:19 +00:00
whesse@chromium.org
1bee2d8a34 X64: Implement sin and cos.
Review URL: http://codereview.chromium.org/149200

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 07:53:15 +00:00
whesse@chromium.org
6cf6824c17 X64: Make comparisons work on zero-extended smis.
Review URL: http://codereview.chromium.org/155083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-06 13:21:39 +00:00
antonm@chromium.org
12c7246cff Use attributes to communicate failed lookup instead of retval.
Review URL: http://codereview.chromium.org/151151

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-06 11:00:53 +00:00
deanm@chromium.org
4c39a8dc5b Remove some unused messages.
Review URL: http://codereview.chromium.org/149194


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-06 10:56:52 +00:00
kasperl@chromium.org
0f9d8908ad Prepare to push version 1.2.12 to trunk.
Review URL: http://codereview.chromium.org/149192

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-06 07:45:39 +00:00
kasperl@chromium.org
0fedb6fcc0 Fix win32 build by moving template function definition.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-06 06:57:32 +00:00
whesse@chromium.org
1370cae14b Lint error fix
Review URL: http://codereview.chromium.org/149189

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-05 15:38:06 +00:00
whesse@chromium.org
203ae17b5d X64: Fix LoadFloatOperands.
Review URL: http://codereview.chromium.org/155073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-05 15:22:59 +00:00
whesse@chromium.org
0a774c9c18 X64: Use low bits of registers in emit_sse_operand. Enable --stop-at flag.
Review URL: http://codereview.chromium.org/155052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 13:30:15 +00:00
erik.corry@gmail.com
9dd35ee2f9 ARM improvements to constant div, mod and mul.
* Fast runtime calls for div and mod.
* Fix assembly and disassembly of multiply instructions.
* Strength reduce and inline multiplications to shift-add.
* Strength reduce and inline mod by power of 2.
* Strength reduce mod by other small integers to mul.
* Strength reduce div by 2 and 3.
Review URL: http://codereview.chromium.org/155047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 12:44:31 +00:00
erik.corry@gmail.com
1a3d633edc Fix thinko in IC code.
Review URL: http://codereview.chromium.org/149175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 12:43:59 +00:00
kasperl@chromium.org
07bbacc875 Remove unneeded ToString calls. We call ToString if necessary
when the result of calling the replace function is added to the
ReplaceResultBuilder.
Review URL: http://codereview.chromium.org/149179

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2353 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 12:08:00 +00:00
lrn@chromium.org
4cccc960a3 Reverted RegExp parser error message change that broke layout test.
Also cleaned up some leftover crud.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 11:09:34 +00:00
whesse@chromium.org
48ceb2cfab X64: Exit frame should use x64 ABI callee-save registers.
Review URL: http://codereview.chromium.org/155045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 10:13:05 +00:00
kasperl@chromium.org
4a90e2c69b Optimize Date construction and string concatenation with
string objects (not values).
Review URL: http://codereview.chromium.org/149177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 10:09:59 +00:00
yurys@chromium.org
48a99323a4 We've got complains that sending afterCompile events to debug message handler may have considerable impact on the profiler when inspected script does lots of 'eval's. The proposed solution is to request source of the compiled script lazily instead of sending it in afterCompile event.
Corresponding Chromium bug:
http://code.google.com/p/chromium/issues/detail?id=15913
Review URL: http://codereview.chromium.org/149176

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 10:02:51 +00:00
whesse@chromium.org
d53e5f8d8a X64: Remove optimistic smi operations on non-smis. They cannot be undone on X64.
Review URL: http://codereview.chromium.org/151200

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 09:24:53 +00:00
whesse@chromium.org
2cba313a49 X64: Ignore extra bits in Smi::value()
Review URL: http://codereview.chromium.org/155046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 09:22:22 +00:00
whesse@chromium.org
a0d07c2941 X64: Fix floating point and integer instructions in assembler.
Review URL: http://codereview.chromium.org/151207

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 09:16:23 +00:00
lrn@chromium.org
17362b27ea Changed RegExp parser to use a recursive data structure instead of stack-based recursion.
Shouldn't run out of stack space while parsing deeply nested regexps.
Might be a little faster.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 08:18:35 +00:00
bak@chromium.org
3cb5fc56d2 M ic-arm.cc
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 08:00:51 +00:00
bak@chromium.org
99bea86c7a Missing file from last change
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 06:58:56 +00:00
bak@chromium.org
6bc979e879 Improved code for megamorphic stub on ia32.
Review URL: http://codereview.chromium.org/150225

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 06:34:59 +00:00
iposva@chromium.org
c15df35204 - Cache on backtracking stack in the irregexp interpreter for future use.
Review URL: http://codereview.chromium.org/149131

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 19:46:28 +00:00
christian.plesner.hansen@gmail.com
1e3bd893d3 Fixed test failures caused by enabling stack traces by default
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 15:30:03 +00:00
ager@chromium.org
465aadc8b6 Port %ClassOf() optimization to X64 and ARM.
Review URL: http://codereview.chromium.org/150226

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 14:17:10 +00:00
christian.plesner.hansen@gmail.com
89b77643e9 Enable capture of the top of the stack on error instantiation.
Performance impact on v8 benchmarks seems limited.  Will be backed out
if chrome performance regresses.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 12:26:31 +00:00
whesse@chromium.org
da1327e088 X64: Align start of remembered set to a 4-byte boundary
Review URL: http://codereview.chromium.org/151198

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 11:49:39 +00:00
bak@chromium.org
35f86b0a61 Template instantiations for Windows build.
Review URL: http://codereview.chromium.org/150221

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 10:59:34 +00:00
kasperl@chromium.org
22231d4703 Fix crash when calling non-function globals.
Review URL: http://codereview.chromium.org/151199

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 10:51:46 +00:00
bak@chromium.org
70f67d6ec5 Reverted change to ASSERT is void Dictionary<Shape, Key>::SetEntry.
Review URL: http://codereview.chromium.org/150212

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 08:07:56 +00:00
whesse@chromium.org
1058f300b1 X64: Move remembered set to a safe location on x64 platform.
Review URL: http://codereview.chromium.org/151148

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 07:48:05 +00:00
whesse@chromium.org
2ddf3301da X64: Implement InstanceofStub. Prohibit zero-size code objects.
Review URL: http://codereview.chromium.org/151142

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 07:09:49 +00:00
bak@chromium.org
9aa0f380a6 Fixed arm/mac errors and presubmitting 2324.
Review URL: http://codereview.chromium.org/151193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 06:50:43 +00:00
kasperl@chromium.org
1e88965d04 Prepare to push version 1.2.11 to trunk.
Review URL: http://codereview.chromium.org/150209

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 06:31:57 +00:00
ager@chromium.org
b95dbc3fdd Make global variable initialization consistent with Firefox and Safari
behavior.  Only force the introduction of a variable directly on the
global object if there is an explicit initial value in a variable
declaration.

BUG=http://crbug.com/12548
Review URL: http://codereview.chromium.org/151191

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 06:28:37 +00:00
ager@chromium.org
e75a173ff7 Revert r2324 until we can fix build and test errors.
TBR=bak@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 16:49:54 +00:00
bak@chromium.org
5cbb209425 Removed virtual behavior from Dictionaries.
Review URL: http://codereview.chromium.org/150168

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 15:38:25 +00:00
feng@chromium.org
9518261f2b Fix the snapshotter when ENABLE_DEBUGGER_SUPPORT is off.
Review URL: http://codereview.chromium.org/151136

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 15:36:28 +00:00
antonm@chromium.org
05ccaa41ef Ignore interceptors with no getters when doing any kind of read.
Review URL: http://codereview.chromium.org/150164

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 15:06:46 +00:00
kasperl@chromium.org
35137dd8f9 Always scavenge when doing GCs.
Review URL: http://codereview.chromium.org/151149

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 13:20:09 +00:00
whesse@chromium.org
e7e3f03504 X64: Add Math.random, fix UnarySubStub
Review URL: http://codereview.chromium.org/151077

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 11:59:10 +00:00
kasperl@chromium.org
6cfc5f1ef9 Treat the builtins object like other global objects (with
cells in old space for properties) and avoid allocating tons
of unused properties in new space when creating new contexts.
Review URL: http://codereview.chromium.org/151146

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 11:44:37 +00:00
erik.corry@gmail.com
70331f67f9 ARM: Don't always go into the runtime system just because a
mul gave zero.
Review URL: http://codereview.chromium.org/151144

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 11:32:08 +00:00
sgjesse@chromium.org
25405ddd9c Handle JavaScript accessors on the global object.
With the new representation of the global object adding JavaScript accessors for a property after global inline caches was created for that property did not work property as the inline caches did not take the JavaScript accessor information (fixed array with two elements) that could be present in a global object property cell into account.

This is now fixed by changing the map for a global object when a JavaScript accessor is defined on it.

BUG=394
TEST=test\mjsunit\regress\regress-394.js
Review URL: http://codereview.chromium.org/150162

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 11:20:33 +00:00
mikhail.naganov@gmail.com
10489497c5 Fix presubmit error.
TBR=iposva@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 09:11:33 +00:00
mikhail.naganov@gmail.com
8318f5e5f1 Reimplement profiler sampler on Mac OS X to get it working under Chromium.
Previous implementation of sampler for OS X was copied from the Linux one. But BSD (OS X) and Linux has a very important difference in signal handling. LinuxThreads doesn't support the notion of process-directed signals. So, the SIGPROF signal was directed to the thread that installed the handler---the V8 thread. But on BSD, signal handling is implemented according to POSIX spec, where process-directed signal is to be handled by an arbitrary selected thread. By a coincidence, in V8's sample shell and in Chromium's test shell, V8's thread was picked almost every time, so sampling seemed working. But not in case of Chromium.

So, I've changed the implementation of profiler sampler to use the same scheme as on Windows---a dedicated thread with high priority is used to periodically pause and sample V8's thread.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 08:46:59 +00:00
iposva@chromium.org
65e71082d5 - Avoid allocating an overly large stack frame in the irregexp
interpreter.
Review URL: http://codereview.chromium.org/151119

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 22:36:35 +00:00
erik.corry@gmail.com
3652b8212f Add missing cases. Thanks to polarjs for bug 393.
Review URL: http://codereview.chromium.org/151112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 20:57:44 +00:00
feng@chromium.org
3bf1af0916 Fix the redness on Flexo.
/auto/JavaScriptV8/flexo/linux64/v8/src/x64/stub-cache-x64.cc:0:  One or more unexpected \r (^M) found;better to use only a \n  [whitespace/newline] [1]

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 19:02:59 +00:00
erik.corry@gmail.com
5d5cb0bfa8 Young space should be same size on snapshot builder and snapshot users
because this gets backed into the generated code.
Review URL: http://codereview.chromium.org/151083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 17:34:41 +00:00
erik.corry@gmail.com
ea3b18919e We have to be sure to generate a relocatable instruction when
handling external references before a heap serialization.
Review URL: http://codereview.chromium.org/151080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2310 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 16:35:42 +00:00
sgjesse@chromium.org
20165a648e Fixed X64 compilation.
TBR=kasperl@chromium.org
Review URL: http://codereview.chromium.org/150103

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 14:58:33 +00:00
sgjesse@chromium.org
92bb897081 Tweaks to global object inline cache code.
Remove the check for deleted properties in the global load inline cache if the property is known to be read only.

Propegate the in loop flag for the global call inline cache.

Changed the propagation of the code flags in the call stub compiler to compute these the same way for all types of call stubs and assert that the flags for the generated code is the same as those used for the cache lookup.

Addressed a few comments from previous review in test-api.cc.
Review URL: http://codereview.chromium.org/150101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 14:07:29 +00:00
erik.corry@gmail.com
cea9476cf0 More changes to make the simulator run code that is for the ARM5 snapshot.
Review URL: http://codereview.chromium.org/150100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 13:38:40 +00:00
antonm@chromium.org
9110beb772 Don't do a second lookup as we have it already.
Review URL: http://codereview.chromium.org/149007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 12:29:45 +00:00
whesse@chromium.org
3d065ccebe X64: Make lazy arguments objects work
Review URL: http://codereview.chromium.org/151075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 12:16:47 +00:00
whesse@chromium.org
137f61b85a X64: Implement unary subtraction, ObjectPair. 350 tests still fail.
Review URL: http://codereview.chromium.org/150093

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 12:11:21 +00:00
lrn@chromium.org
df135415ea X64: Fix bad value in stack layout constants.
Remove references to Array:kHeaderSize.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 11:09:57 +00:00
christian.plesner.hansen@gmail.com
118a2ccc8e When Error.collectStackTraces is set to true all new instances of
Error, ReferenceError, etc. are given a stack property that gives a
stack trace.  Here's an example stack trace:

ReferenceError: FAIL is not defined
    at Constraint.execute (deltablue.js:527)
    at Constraint.recalculate (deltablue.js:426)
    at Planner.addPropagate (deltablue.js:703)
    at Constraint.satisfy (deltablue.js:186)
    at Planner.incrementalAdd (deltablue.js:593)
    at Constraint.addConstraint (deltablue.js:164)
    at Constraint.BinaryConstraint (deltablue.js:348)
    at Constraint.EqualityConstraint (deltablue.js:517)
    at chainTest (deltablue.js:809)
    at deltaBlue (deltablue.js:881)
    at deltablue.js:888

If Error.prepareStackTrace holds a function this function is used to
format the stack trace, for instance allowing code generators to
customize the way stack traces are reported to make them easier to
process.

Next step: performance measurements to see if it is feasible to turn
this on by default.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 11:08:37 +00:00
sgjesse@chromium.org
a54a4ada5c Changed the global object representation.The global object is now always in dictionary (slow) mode with each of its properties stored in a cell object. A cell object has one field containing the actual value for the property. Inline caches for access to global properties which uses direct to the cell are now created for load, store and call to properties of the global object. When properties of the global object are deleted the cell for that property is kept with an indcation of that the property is deleted.Added counters to track the use of the global property inline caches.Added additional information on IC's in the disassembler.
Review URL: http://codereview.chromium.org/151019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 10:05:36 +00:00
feng@chromium.org
9f252dad52 Workaround a gcc 4.4 bug.
Gcc generates wrong vtable entries for certain code pattern. The change in heap.cc has detailed explanation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 21:15:03 +00:00
iposva@chromium.org
f9dc709c72 - Add a "#error Unsupported target architecture." where needed. A chain of
platform dependent ifdefs is useless if it does not include an error like
  this. You will end up searching for the failure in all the wrong places.
Review URL: http://codereview.chromium.org/150026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 17:07:30 +00:00
whesse@chromium.org
a7c7d67d3a X64: Remove temporary compiler and assembler tests, now that shell runs.
Review URL: http://codereview.chromium.org/151022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 15:04:24 +00:00
erik.corry@gmail.com
da61eb8b1e Fix build on x64 after compare stub change.
Review URL: http://codereview.chromium.org/150022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 14:23:33 +00:00
erik.corry@gmail.com
c9e004a808 Add a compare stub on ARM.
Review URL: http://codereview.chromium.org/151003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 13:52:13 +00:00
bak@chromium.org
829146e2ea Replaced DateFromTime and isNaN with macro calls in date code.
Review URL: http://codereview.chromium.org/150021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 12:41:18 +00:00
kasperl@chromium.org
f1ffd50257 Optimize %ClassOf() on IA-32 and use it instead of the
custom %HasXXXClass() calls.
Review URL: http://codereview.chromium.org/151018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 10:45:16 +00:00
erik.corry@gmail.com
4a30e3f58e * Add missing imul instruction on Intel.
* Fix incorrect signedness in disassembly of umull/mull on ARM.
* Fix incorrect register order in disassembly of umull/mull.
* Fix incorrect assembly of umull on ARM.
* Remove retroactively obsoleted restriction on choice of
  registers in mul instructions on ARM.
Review URL: http://codereview.chromium.org/150002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 09:32:06 +00:00
kasperl@chromium.org
a1622491af Optimize %IsConstructCall() on IA-32.
Review URL: http://codereview.chromium.org/150018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 08:14:06 +00:00
ager@chromium.org
14d126d300 Prepare push of version 1.2.10 to trunk.
Review URL: http://codereview.chromium.org/151015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 08:12:02 +00:00
whesse@chromium.org
49474f0408 X64: Fix error in running handlers, disable TakeValue optimization for count operators.
Review URL: http://codereview.chromium.org/150007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 08:11:35 +00:00
whesse@chromium.org
29bcccb4e0 X64 Implementation: Implement Generate_Function(Call,Apply)
Review URL: http://codereview.chromium.org/147205

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 08:04:39 +00:00
bak@chromium.org
b9995e035c Changed HashTable::EnsureCapacity to gurantee at least 50% of the entries are free (up from 25%).
This reduces the mount of probing in large hash tables.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 07:19:17 +00:00
kasperl@chromium.org
3ae01ab8ef Fix issue 392 by disabling the TakeValue optimization for
access to the arguments object.
Review URL: http://codereview.chromium.org/150016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 06:20:52 +00:00
whesse@chromium.org
e99f056a43 X64 implementation: Store to lookup slots
Review URL: http://codereview.chromium.org/147203

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 13:52:05 +00:00
bak@chromium.org
252514ca23 - Inlined the code for make simple cons strings.
- Simplify generated code for Runtime_** functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 13:09:50 +00:00
whesse@chromium.org
0746d93014 X64 Implementation: Correct type, add VisitCallEval
Review URL: http://codereview.chromium.org/149066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 11:35:42 +00:00
whesse@chromium.org
1ad12de4ba X64 Implementation: Implement floating-point compare
Review URL: http://codereview.chromium.org/147201

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 11:01:13 +00:00
lrn@chromium.org
a51771ddae X64: Break and continue.
Review URL: http://codereview.chromium.org/147198


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 10:59:04 +00:00
whesse@chromium.org
b64f6b9287 X64 implementation: Add arguments object to context when needed.
Review URL: http://codereview.chromium.org/149063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 08:38:48 +00:00
lrn@chromium.org
5b5f528a4f X64: Added support for "with" and "switch".
Review URL: http://codereview.chromium.org/147197


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 08:29:01 +00:00
lrn@chromium.org
f131788739 X64: Added for-in
Review URL: http://codereview.chromium.org/149005


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 07:41:19 +00:00
whesse@chromium.org
8608e1bb4f X64 Implementation: Correct error with initializer blocks
Review URL: http://codereview.chromium.org/149008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-26 07:27:06 +00:00
ager@chromium.org
681ab6e30c Reintroduce recording of source position that was lost on ia32 for
some reason.
Review URL: http://codereview.chromium.org/147147

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 12:20:15 +00:00
whesse@chromium.org
d7e86fc341 X64 implementation: Add some inline runtime functions.
Review URL: http://codereview.chromium.org/149004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 12:06:30 +00:00
lrn@chromium.org
fa03347706 X64: Count operations (increment, decrement)
Review URL: http://codereview.chromium.org/149002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 11:48:27 +00:00
ager@chromium.org
a5331d6426 Fix instance type check in apply optimization.
We accidentally compared a map address with an instance type.  This
fix additionally avoids an upper bounds check that is not needed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 11:35:03 +00:00
erik.corry@gmail.com
617fa455a6 * Fix compile errors on Android.
Review URL: http://codereview.chromium.org/149001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 10:51:34 +00:00
whesse@chromium.org
14397182f6 X64 implementation: VisitLoop and StackCheck
Review URL: http://codereview.chromium.org/147143

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 10:39:28 +00:00
ager@chromium.org
e3fa53edef Make sure that message reporting works when the builtin string and
array functions are overwritten.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 10:27:36 +00:00
whesse@chromium.org
08d098e082 X64 implementation: VisitUnaryOperation, configure dtoa for X64 platform.
Review URL: http://codereview.chromium.org/147141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 10:15:50 +00:00
antonm@chromium.org
09df6ed2ae Do not use common INFINITY name as it might be overriden by some other include file. Let's use
project specific name.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 17:25:46 +00:00
whesse@chromium.org
4c2a378842 X64 implementation: GenerateAdaptor builtin.
Review URL: http://codereview.chromium.org/146085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 15:02:46 +00:00
whesse@chromium.org
cc271fe751 X64 implementation: Start compiling native functions.
Review URL: http://codereview.chromium.org/146083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 13:48:09 +00:00
whesse@chromium.org
a367522a1a X64 implementation: comparison operations.
Review URL: http://codereview.chromium.org/146082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 13:46:07 +00:00
antonm@chromium.org
ecfd1f1017 Attempt to reduce performance penalty for logging and profiling
Review URL: http://codereview.chromium.org/125141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 13:09:34 +00:00
lrn@chromium.org
76ac8bc73b Removed static type inference and add a dynamic test for string addition.
The complexity of static type inference never really paid off, and as an
analysis it didn't fit well with codegen frame propagation.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 12:46:00 +00:00
lrn@chromium.org
1f5a905302 X64: Implemented LikelySmiBinaryOperation
Review URL: http://codereview.chromium.org/146081


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 12:12:17 +00:00
antonm@chromium.org
0402951844 A helper function to speed up creation of V8 wrappers for DOM Nodes.
Review URL: http://codereview.chromium.org/141044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 11:52:52 +00:00
ager@chromium.org
1a12862c9a Revert attempt to optimize away the allocation of a temporary.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/147076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 08:56:55 +00:00
ager@chromium.org
5b4bacdd69 x64 code generation for construct calls, declaring global variables
and for runtime calls.

We could not handle functions with no explicit return statement.  I
added support for that as well.  The place was hard to find because
code was left out from the codegenerator with no TODO comment.  We
need to make sure to comment if we leave out code when porting
something. :-)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 08:28:42 +00:00
kasperl@chromium.org
f66ea38c0b Allocate arguments object on-demand instead of at function entry.
This allows Function.prototype.apply to not allocate the objects 
and copy the arguments directly from the stack.
Review URL: http://codereview.chromium.org/147075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 08:01:38 +00:00
lrn@chromium.org
69764a5d2a X64: Addition binary operation.
Review URL: http://codereview.chromium.org/146022


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 11:26:05 +00:00
whesse@chromium.org
e61d1c7380 X64 implementation: Read compiler tests from test.js.
Review URL: http://codereview.chromium.org/146024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 11:11:38 +00:00
yurys@chromium.org
0feda5a2e1 Introduce an argument that allows to include some data neccessary for displaying collapsed scope variables values in graphical debugger.
When request has 'inlineRefs' option simple type values will be written in the response directly. Variables of other types in addition to 'ref' property containing the value handle will contain some type information.
Review URL: http://codereview.chromium.org/140061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 09:53:18 +00:00
whesse@chromium.org
c19fde4f1c X64 implementation: Change argument to relocator to take a 64-bit delta. Change maximum relocation info encoding length.
Review URL: http://codereview.chromium.org/146021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 09:50:51 +00:00
ager@chromium.org
1b6738e2c2 Prepare to push V8 version 1.2.9 to trunk.
Review URL: http://codereview.chromium.org/146017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 07:16:22 +00:00
ager@chromium.org
768dc546d2 Remove unused variable from keyed stores to fix 64-bit release mode.
The variable is used for the inlined version of stores which has not
yet been implemented.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 06:24:37 +00:00
ager@chromium.org
094d17ffeb x64: Generate code for loading from, storing to and calling properties.
Review URL: http://codereview.chromium.org/141056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 06:12:14 +00:00
ager@chromium.org
ad970953f8 Implement code generation for conditional expressions and regexp
literals.  Regexp literals will not really work before we can
bootstrap, but the right code is being called with the right
arguments.

Finish implementation of object literals.  We can now call through the
StoreIC_Miss stub into the runtime system to do stores.

Restore comment that I accidentally removed in my last commit.
Review URL: http://codereview.chromium.org/140068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 19:25:41 +00:00
erik.corry@gmail.com
a874dcdd5d Fix non-Intel regexp that needed the number of registers in the
regexp implementation before the regexp had been compiled and the
register count calculated.
Review URL: http://codereview.chromium.org/141047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 18:37:57 +00:00
ager@chromium.org
7b3c9af918 Fix lint issue.
TBR=bak@chromium.org
Review URL: http://codereview.chromium.org/140066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 15:19:47 +00:00
ager@chromium.org
8de05cef85 Enable code generation for array literals.
Introduce macro assembler support for pushing heap-object handles and
for comparing a register to a heap-object handle.

Cleanup: Remove some code that was needlessly commented out.  Added
TODO's for code that was commented out (where we do not hit an
UNIMPLEMENTED). 
Review URL: http://codereview.chromium.org/140060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 15:14:20 +00:00
whesse@chromium.org
dcd25643bd X64 implementation: Correct kTargetAddrToReturnAddrDist value for x64.
Review URL: http://codereview.chromium.org/140063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 14:46:33 +00:00
bak@chromium.org
ab3d1e1a43 Added descriptor lookup cache to eliminate some search overhead.
Reduced the KeyedLookupCache length to 64.
Review URL: http://codereview.chromium.org/141046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 14:29:35 +00:00
whesse@chromium.org
1ae3423af8 X64 implementation: Emit correct merge code for virtual frames at CFG merges.
Review URL: http://codereview.chromium.org/141043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 14:22:39 +00:00
yurys@chromium.org
d432b5e0e2 Sending scope types and object refs costs nothing but would save us request that should be send to retrieve scopes informations for each frame in 'backtrace' response.
Review URL: http://codereview.chromium.org/131107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 13:14:47 +00:00
lrn@chromium.org
2dd9717c4b Fix bug in static type inference for loops.
Review URL: http://codereview.chromium.org/140058


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 12:36:01 +00:00
erik.corry@gmail.com
2b71d0a83e Fix regexp bug reported on iit.edu.
Review URL: http://codereview.chromium.org/141042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 12:29:27 +00:00
yurys@chromium.org
46165adb9a After compile event should be sent even if there is a provisional breakpoint out of its lines range.
Review URL: http://codereview.chromium.org/141041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 11:56:36 +00:00
sgjesse@chromium.org
3ce873c351 Refactor the handling of generations in the compilation cache.
Add generations to the compilation cache for eval and regexp. The number of generations for these are set to two.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 11:12:51 +00:00
ager@chromium.org
59cd4dc572 X64: Enable lazy compilation and add code generation for simple object
literals.
Review URL: http://codereview.chromium.org/141040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 10:54:11 +00:00
whesse@chromium.org
83ad579ac5 X64 implementation: Add high_bit() and low_bits() to register methods.
Review URL: http://codereview.chromium.org/141032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 08:17:44 +00:00
bak@chromium.org
c078783c36 Implemented a ContextSlotCache for compiled code.
Review URL: http://codereview.chromium.org/141038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 08:09:57 +00:00
whesse@chromium.org
4f6a4a8339 X64 implementation: if-then-else
Review URL: http://codereview.chromium.org/141030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 08:08:47 +00:00
whesse@chromium.org
74ddab9d94 Fix issue 386, a bug in JSObject::ReplaceSlowProperty with constant transitions.
Review URL: http://codereview.chromium.org/141031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 07:41:15 +00:00
mikhail.naganov@gmail.com
44936ad32d Eliminate double offsetting of line numbers in profiler.
I didn't noticed that in r1481 GetScriptLineNumber was changed to perform line numbers offsetting by itself.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 07:22:09 +00:00
erik.corry@gmail.com
e2a01ed4fb Fix regexp bug reported by Ian where [6-9] would match any digit.
Review URL: http://codereview.chromium.org/140021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-20 17:57:09 +00:00
whesse@chromium.org
5831cc70e8 X64 implementation: Local vars, nested function calls, assignment statements
Review URL: http://codereview.chromium.org/131050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-19 10:16:52 +00:00
whesse@chromium.org
8ad2edb6b5 Clarify precedence of operations involving bitwise and(&) in x64/assembler.
Review URL: http://codereview.chromium.org/131099

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-19 09:12:20 +00:00
kasperl@chromium.org
5f5fbd4e4a Allow functions to have custom construct stubs that are called
when the function is instantiated.
Review URL: http://codereview.chromium.org/132063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-19 07:36:16 +00:00
bak@chromium.org
7dab62ee96 Changed allocation to allow large objects to be allocated in new space.
This avoids back-to-back mark-sweep collections.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 14:06:36 +00:00
sgjesse@chromium.org
531a6db569 Fixed exception in debugger scripts request.
When collecting the result for a scripts request check that scripts compiled through eval actually have a script for the function they where eval'ed in before adding that informaiton to the response.

BUG=http://crbug.com/14388
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 14:04:04 +00:00
whesse@chromium.org
da49c0f8a2 X64 implementation: Add function literals and function calls.
Review URL: http://codereview.chromium.org/131029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 11:46:38 +00:00
mikhail.naganov@gmail.com
a1a962f65e Implemented processing of compressed log files.
- fixed address delta calculation;
- code creations are also compressed to be in sync with other events;
- factored out a base class from TickProcessor to reuse code in DevTools profiler.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 07:59:13 +00:00
erik.corry@gmail.com
5f77401b0c Inline mod for integer powers of 2.
Review URL: http://codereview.chromium.org/126293

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 07:33:44 +00:00
kasperl@chromium.org
cbda639253 Speculative fix for computing Math.pow(2, -1074) on win32 where
the overloaded pow(double, int) function from math.h produces the
wrong answer. 

TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/131022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 05:47:31 +00:00
iposva@chromium.org
529c3a0a9f Make some small Mac-specific modifications to V8 to make it work on MacOS X 10.4
rather than just 10.5 and up.
1: Set the right compile flags and predefines to get backward compatible Unix
system calls.
2: Explicitly weak import the functions in execinfo.h and check at runtime to
see if that library loaded before calling backtrace(). 

Original change submitted by maf@google.com and reviewed at http://codereview.chromium.org/126241.
Review URL: http://codereview.chromium.org/132002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 00:22:52 +00:00
erik.corry@gmail.com
bc1aa93449 Don't strength reduce divisions by 1 or 2 as they can often be
handled by an optimistic inline idiv.
Review URL: http://codereview.chromium.org/125258

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 19:26:01 +00:00
kasperl@chromium.org
ac19e4b29b Update Mozilla test expectations to better match the new handling
of tests that time out.
Review URL: http://codereview.chromium.org/126274

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 13:57:44 +00:00
sgjesse@chromium.org
f36c8574c9 Fix unload debugger.
Add a missing handle scope when clearing the debug message handler.

BUG=none
TEST=cctest/test-debug/DebuggerUnload 
Review URL: http://codereview.chromium.org/126271

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 13:14:51 +00:00
whesse@chromium.org
310fd67aea X64 Implementation: Make codegen load literals and assign to local variables.
Review URL: http://codereview.chromium.org/126198

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 12:16:59 +00:00
lrn@chromium.org
e9b13d9c39 X64: Implementation of a bunch of stubs, and some new opcodes.
Review URL: http://codereview.chromium.org/125185


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 11:50:33 +00:00
ager@chromium.org
a7c970c529 Avoid needless creation of handles in regexp runtime routines and use
the stack instead.
Review URL: http://codereview.chromium.org/126268

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 11:44:25 +00:00
kasperl@chromium.org
40213b131f Optimize special cases of Math.pow().
Review URL: http://codereview.chromium.org/125245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 11:06:32 +00:00
ager@chromium.org
885259ffab Inline fast case of the method that ensures that an array has a
certain size.
Review URL: http://codereview.chromium.org/126265

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 10:55:58 +00:00
bak@chromium.org
1155ba8e8e Reimplemented the KeyedLookupCache to speed up access.
Review URL: http://codereview.chromium.org/126262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 06:07:49 +00:00
bak@chromium.org
977ad65073 - Changed fast case for computing object size based on usage histogram.
- Added fast case to String.prototype.split (Mads's idea).
- Made minor other optimizations in String.prototype.split.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 13:31:31 +00:00
kasperl@chromium.org
01216a069b Add fast negative checks for symbol equality: If we're comparing
two symbols, they're only equal if the objects are identical.
Review URL: http://codereview.chromium.org/125184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 12:54:07 +00:00
erik.corry@gmail.com
52dfeca5f2 Fix profiling for shared libraries on Linux loaded at negative addresses
(Android does this).  Fix logging for executable mappings that have no
file associated.  Be more consistent with use of uintptr_t.
Review URL: http://codereview.chromium.org/125183

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 12:52:02 +00:00
sgjesse@chromium.org
78a8cdfbe8 Added utility scripts for running oprofile in tools/oprofile.
To profile running the JavaScript file test.js using the V8 release mode shell (assuming it is build passing prof=oprofile to the SCons build). The following commands can be used:

$ tools/oprofile/start
$ tools/oprofile/run test.js
$ tools/oprofile/report | less
$ tools/oprofile/annotate | less
$ tools/oprofile/shutdown

Here is a summary of the commands.

For all the commands taking an executable the executable is expected to be a binary using V8. If no executable is specified the release mode V8 shell is assumed.

By default the --session-dir=/tmp/oprofv8 is passed to all oprofile commands. This walue can be changed by setting environment variable OPROFILE_SESSION_DIR.

When using the defaulf executable (V8 shell in release mode) it is assumed to be located in ../.. relative from the oprofile utility scripts. This default location can be overridden using the V8_SHELL_DIR environment variable.

start
-----
Start the oprofiling daemon.

run [executable] [parameters]
-----------------------------
Profile a V8 executable. Running this will reset oprofile samples, run the command and do an oprofile dump to flush samples and write ELF binaries for the generated code. The parameters are passed to the executable together with the --oprofile option.

report [executable] [parameters]
--------------------------------
Print the report for a profile run. The parameters are passed to opreport. E.g report --callgraph.

annotate [executable] [parameters]
----------------------------------
Print annotated assembly for a profile run. The parameters are passed to opannotate. E.g annotate -threshold 1.

reset
-----
Reset oprofile samples.

dump
----
Flush oprofile samples and write ELF binaries for the generated code.

shutdown
--------
Shutdown oprofile daemon.

Added a warning which is printed if option --oprofile is passed to a V8 which has not been compiled with oprofile support.
Review URL: http://codereview.chromium.org/125181

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 12:08:59 +00:00
mikhail.naganov@gmail.com
02b7894f95 Fix issue 380.
Don't infer name for a function if a result of its call is assigned to a variable / property. E.g., in this case:

  a = function() { ... } ();

the function must remain anonymous because 'a' doesn't receive a function reference, but instead a result of its call.

BUG=http://code.google.com/p/v8/issues/detail?id=380
TEST=cctest/test-func-name-inference/Issue380

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 11:47:00 +00:00
antonm@chromium.org
c34c406dae Review URL: http://codereview.chromium.org/126158
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 10:06:24 +00:00
kmillikin@chromium.org
73fe551048 Remove the unused support for jump-table switch statements.
Review URL: http://codereview.chromium.org/126193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 09:50:37 +00:00
erik.corry@gmail.com
824140bde0 Avoid going into runtime system for round-towards-zero operations on ARM.
Review URL: http://codereview.chromium.org/126192

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 09:49:29 +00:00
ager@chromium.org
5c7572985b Prepare to push V8 version 1.2.8 to trunk.
Review URL: http://codereview.chromium.org/125177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 09:33:17 +00:00
kasperl@chromium.org
991ec9a777 Make sure to invoke valueOf methods on both operands of & and >> -- even
when the left operand lets us shortcut the computation.
Review URL: http://codereview.chromium.org/125176

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 08:29:31 +00:00
whesse@chromium.org
7358e1980c X64 implementation: Test Compiler::Compile by compiling and running a function.
Review URL: http://codereview.chromium.org/126191

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 08:25:08 +00:00
whesse@chromium.org
fb03c8414f X64 platform: Add more register allocator functions.
Review URL: http://codereview.chromium.org/125131

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 08:24:42 +00:00
kasperl@chromium.org
2acf2ed80e Improve DST offset computation performance.
Review URL: http://codereview.chromium.org/126188

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 06:52:04 +00:00
bak@chromium.org
03356a0e60 Implemented fast case for NumberToString where the result is a single character string.
Review URL: http://codereview.chromium.org/126189

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 06:44:09 +00:00
sgjesse@chromium.org
97482a43bf Fix disassembly output from oprofile.
Only send the inscructions part of a code object to oprofile when reporting dynamically generated code. Before the code object header was also reported to oprofile as code which caused strange disassembly output when using opannotate.
Review URL: http://codereview.chromium.org/125126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 16:33:28 +00:00
mikhail.naganov@gmail.com
91241273cb Fixed pointer vs. va_list overloading problem occuring in gcc 3.3 (used for ARM build).
It seems that when calling a method that has two overloaded versions like this:
  f(char* format, ...)
  f(char* format, va_list args)
with a second pointer argument: f("format", pointer), the second version is picked up.

I've found a description of a similar issue here: http://bugs.gentoo.org/63112

So, to resolve this ambiguity, I've named such LogMessageBuilder's Append functions differently.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 15:49:03 +00:00
ager@chromium.org
00107efb02 Use the correct version of CallRuntime in the arm code generator.
This fixes assertion failures in debug mode tests.
Review URL: http://codereview.chromium.org/126128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 14:27:57 +00:00
kasperl@chromium.org
7f27314644 Fix stack alignment issue with the new fast Math.random() code
under Mac OS.
Review URL: http://codereview.chromium.org/125123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 13:17:09 +00:00
ager@chromium.org
c1d0401b3d Two small fixes for the Math.sin and Math.cos optimizations.
Review URL: http://codereview.chromium.org/125122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 12:55:48 +00:00
ager@chromium.org
225a6a82b0 Optimize Math.sin and Math.cos by avoiding runtime calls.
Review URL: http://codereview.chromium.org/125121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 12:06:48 +00:00
erik.corry@gmail.com
0fcf27bcb1 Make young space smaller on ARM.
Review URL: http://codereview.chromium.org/126121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 11:44:04 +00:00
erik.corry@gmail.com
e44d30e284 Optimize constant divisions by powers of 2.
Review URL: http://codereview.chromium.org/126116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 10:27:52 +00:00
kasperl@chromium.org
f36f5f2331 Optimize the slow case implementations of bit operations by
avoiding excessive ToNumber calls and by dealing with NaNs
in BIT_AND and SAR.
Review URL: http://codereview.chromium.org/125118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 09:49:17 +00:00
mikhail.naganov@gmail.com
3a3a6924a1 Involve more log compression techniques.
Code addresses are now written as an offset from the previous address for ticks, code move and delete events. Employed backreference and RLE compression for code move and delete events. This gives additional 30% log size reduction for benchmarks run w/o snapshot.

Overall compression results (compared with the revision of V8 having no compression):
 - V8: 70% size reduction for benchmarks run w/o snapshot (for reference, gzip gives 87%)
 - Chromium: 65% size reduction for public html version of benchmarks (v4) (for reference, gzip gives 90%)

The one obvious opportunity for improving compression results in Chromium is to compress URLs of scripts.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 09:37:50 +00:00
kasperl@chromium.org
4cc3fe04a1 Avoid sign issues with the fast case code for Math.floor().
Review URL: http://codereview.chromium.org/126115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 08:27:38 +00:00
kasperl@chromium.org
a20757d7dc Fix x64 build.
Review URL: http://codereview.chromium.org/126114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 08:25:08 +00:00
kasperl@chromium.org
ce7cdbd799 Change the implementation of Math.random to use George
Marsaglia's multiply-with-carry instead of mixing the
bits obtained from calling the system random() twice.

This seems to be a bit faster and gives a better 
distribution than the system random() in particular on 
Windows. 
Review URL: http://codereview.chromium.org/126113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 08:04:47 +00:00
ager@chromium.org
5cbcd53f8a Fix memory leak in regexp macro assembler. If the buffer has been
expanded the macro assembler owns the buffer and needs to dispose it
in the destructor.
Review URL: http://codereview.chromium.org/126111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 06:27:33 +00:00
kmillikin@chromium.org
6ed860b7d6 Remove branching and binding with two arguments from the JumpTarget
class.  Manually manage off-frame results at the two sites where they
were used.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 14:43:27 +00:00
lrn@chromium.org
8be7fd052e X64: Call runtime function from JS stack frame.
Review URL: http://codereview.chromium.org/125049


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 13:14:35 +00:00
lrn@chromium.org
d4cc50e165 X64: Remove restriction on using r12 as index register.
Review URL: http://codereview.chromium.org/126045


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 12:29:01 +00:00
whesse@chromium.org
e2fdac39a4 Implement more of x64 register allocator.
Review URL: http://codereview.chromium.org/126043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 11:25:15 +00:00
kmillikin@chromium.org
b318835cdc First round of JumpTarget simplification. Remove dead functions (jumps,
branches, and bind with more than two arguments).  Remove unneeded
variable (the "watermark" on virtual frames).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 11:25:13 +00:00
ager@chromium.org
f706cfa30c Fix debugger after inlined keyed store change.
Make sure that the IC is always hit when debugging and make sure to
restore the fast case when leaving the debugger.
Review URL: http://codereview.chromium.org/125044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 11:24:13 +00:00
bak@chromium.org
492705657a Changed the expansion of new space to depend on how much has survived scavenge.
This replaces the fixed expansion policy based on number of scavenges.
Increased the max new space size to 8MB (only reserved space).
Increased the defalt new space size to 512KB.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 11:11:04 +00:00
sgjesse@chromium.org
63dced1331 Move the default return handling to please some versions of gcc.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/125043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 10:25:05 +00:00
sgjesse@chromium.org
882614391f Add scope chain information to the debugger.
For each frame it is now possible to request information on the scope chain. Each scope in the chain can have one of the types local, global, with and closure. For scopes of type global and with the mirror for the actual global or with object is available. For scopes of type local and closure a plain JavaScript object with the materialized content of the scope is created and its mirror is returned. Depending on the level of possible optimization the content of the materialized local and closure scopes might only contain the names which are actually used.

To iterate the scope chain an iterator ScopeIterator have been added which can provide the type of each scope for each part of the chain. This iterator creates an artificial local scope whenever that is present as the context chain does not include the local scope.

To avoid caching the mirror objects for the materialized the local and closure scopes transient mirrors have been added. They have negative handles and cannot be retrieved by subsequent lookup calls. Their content is part of a single response.

For debugging purposes an additional runtime function DebugPrintScopes is been added.

Added commands 'scopes' and 'scope' to the developer shell and fixed the dir command.

BUG=none
TEST=test/mjsunit/debug-scopes.js
Review URL: http://codereview.chromium.org/123021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 10:03:25 +00:00
mikhail.naganov@gmail.com
8c16bc13bc Implement tick events compression in a log file.
Two techniques are involved:
 - compress repeated line ends (common stack beginnings) by using back references;
 - do RLE compression of repeated tick events.

This gives only 5% size reduction on benchmarks run, but this is because tick events are only comprise 10% of file size. Under Chromium winnings are bigger because long repeated samples of idleness are now compressed into a single line.

Tickprocessor will be updated in the next patch.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 14:08:34 +00:00
whesse@chromium.org
f1fcab31c2 X64 implementation starts using virtual frame and register allocators.
Review URL: http://codereview.chromium.org/123018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 13:51:46 +00:00
lrn@chromium.org
d39df3809c X64: Create test JS-function and call it.
Review URL: http://codereview.chromium.org/123017


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 13:17:46 +00:00
ager@chromium.org
a8507cb43d Inline keyed stores if the code is in a loop and the key is likely to
be a smi.

The inlined version works for stores to JSArrays where the key is a
smi that is within bounds of the array and the value is either
constant or a smi so we can skip the write-barrier.
Review URL: http://codereview.chromium.org/122035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 13:17:26 +00:00
lrn@chromium.org
e797b865aa X64: Adds zone scope before creating codegenerator for testing.
Review URL: http://codereview.chromium.org/122033


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 11:21:10 +00:00
lrn@chromium.org
525b72a4d5 X64: Implemented InvokeFunction
Review URL: http://codereview.chromium.org/122030


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 10:46:28 +00:00
whesse@chromium.org
594a30ef73 Add x64 implementation test support for assembler and code generator.
Review URL: http://codereview.chromium.org/123014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 10:03:51 +00:00
erik.corry@gmail.com
cf07b3141c Fix fp code for mixed-endian ARM.
Review URL: http://codereview.chromium.org/119420

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 16:32:15 +00:00
whesse@chromium.org
2de98f8e55 Add statistics operations and long calls and jumps to x64 macro assembler.
Remove unimplemented instructions from x64 assembler.  Add operand-size
suffixes to add, sub, inc, dec, and cmp.
Review URL: http://codereview.chromium.org/118380

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 15:53:46 +00:00
whesse@chromium.org
85720fc05e Make JSObjects with both indexed interceptors and indexed accessors work safely.
Review URL: http://codereview.chromium.org/118499

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 15:33:31 +00:00
kmillikin@chromium.org
2d7d89d831 Get rid of the notion of "parameter pointer" that no longer exists in
the implementation but still lives on in comments and identifier
names.

Where it was used, it has been changed to "caller's stack pointer".
Review URL: http://codereview.chromium.org/118500

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 15:08:25 +00:00
kasperl@chromium.org
cbd31001ef Re-land patch r2110.
TBR=antonm@chromium.org
Review URL: http://codereview.chromium.org/118501

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 14:45:46 +00:00
kmillikin@chromium.org
35b5aab3c7 Fix a bug when shifting left by zero. Ensure that the left operand is
writable (non-aliased) so it can be used for the result in the slow
case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 12:41:57 +00:00
whesse@chromium.org
bedff67b6e Make Array.sort safely generic on JSObject types. Fix bug 346 http://code.google.com/p/v8/issues/detail?id=346
Review URL: http://codereview.chromium.org/119357

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 11:42:22 +00:00
erik.corry@gmail.com
8bd85d8c82 Add instanceof stub for ARM.
Review URL: http://codereview.chromium.org/119353

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 11:42:13 +00:00
erik.corry@gmail.com
b7d48f5807 A bunch of changes to speed up math on ARM.
* Identify heap numbers that contain non-Smi int32s and do bit
ops on them without calling the fp hardware or emulation.
* Identify results that are non-Smi int32s and write them into
heap numbers without calling the fp hardware or emulation.
* Do unary minus on heap numbers without going into the runtime
system.
* On add, sub and mul if we have both Smi and heapnumber inputs
to the same operation then convert the Smi to a double and do
the op without going into runtime system.  This also applies
if we have two Smi inputs but the result is not Smi.
Review URL: http://codereview.chromium.org/119241

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 10:20:37 +00:00
lrn@chromium.org
13e548af1d X64: Implement CEntryStub and JSEntryTrampoline.
Still some supporting functions missing.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 09:48:15 +00:00
kmillikin@chromium.org
94a122296d Cleanup of ARM exception handlers. Remove the unused code and
parameter pointer slots.  Change it so that the handler address no
longer points into the middle of the handler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 09:00:07 +00:00
kmillikin@chromium.org
f6aa7ce3ee Change the IA32 stack handler layout so that the handler address does
not point into the middle of the handler.  Also remove top-of-stack
caching from MacroAssembler::PushTryHandler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 08:01:30 +00:00
erik.corry@gmail.com
6b2a49ff83 * Modify simulator and ARM code generator to avoid swi
instructions.  The intention is that the snapshots generated
by the simulator should be usable on the hardware.  Instead of
swi instructions we generate a branch to a swi instruction that
is not part of the snapshot.  The call/jump is patched up in
the same way as other external references when the snapshot
is deserialized.  This only works for EABI targets: on old ABI
targets we still emit some instructions not supported by the
simulator (fp coprocessor instructions).
Review URL: http://codereview.chromium.org/119036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 09:26:53 +00:00
kmillikin@chromium.org
4a96feeef3 Change IA32's CodeGenerator::GenerateFastCharCodeAt to eagerly
allocate and spill registers, so that the register reference counts
and virtual frame are unchanged in the main body.

This eliminates a few sites of magic branching or binding of
JumpTarget with arguments.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 07:44:09 +00:00
sgjesse@chromium.org
dc9670bcb4 Change locationFromPosition() and locationFromLine() to use a binary search to locate line numbers from position numbers. Modify test debug-sourceinfo.js to include more tests, including error conditions.
Patch by Matt Hanselman, see http://codereview.chromium.org/118371.

BUG=213
TEST=test/mjsunit/debug-sourceinfo.js
Review URL: http://codereview.chromium.org/118425

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 07:03:21 +00:00
sgjesse@chromium.org
dc68e0f9bd Activate the debugger in the developer shell earlier.
This will support breaking in debugger statements in JavaScript files read from the command line.
Review URL: http://codereview.chromium.org/113998

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 06:53:15 +00:00
kmillikin@chromium.org
0bfd850a26 Simplify the IA32 exception handler block by removing the unused code
pointer and parameter pointer slots.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 14:39:50 +00:00
mikhail.naganov@gmail.com
d7cccf6b8d Add log compression ability.
This is a trivial per-row compression:
- short aliases are introduced for events and code creation tags;
- in tick events, offsets are used instead of absolute addresses;
- removed 'code-allocation' event, as it seems not used.

The first two options are depend on the new flag: 'compress-log', which is off by default.

On benchmarks run w/o snapshot, this gives 45% log size reduction.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 13:39:48 +00:00
ager@chromium.org
e665c09177 Prepare push of V8 version 1.2.7 to trunk. Now working on version 1.2.8.
Review URL: http://codereview.chromium.org/118378

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 11:03:04 +00:00
sgjesse@chromium.org
d498361c5f Add more debugging information to scripts compiled through eval.
Scripts now have a compilation type which can be host, eval or JSON. Host scripts are compiled through the API, eval scripts are compiled through call to evan and JSON scripts are compiled as a result of calling JSON.parse.

For scripts scripts compiled through eval the JavaScript function in top of the stack and the pc offset into the code is stored in the script object. This makes it possible to calculate the source position of the eval call later when requested. This information can be obtained through the script mirror object and is part of the script mirror JSON serialization for the debugger protocol.

Moved the enumeration ScripType into class Script and remamed to Type. The new compilation type enumeration is also inside the class Script.

This information is now shown when using the scripts command in he developer shell debugger.
Review URL: http://codereview.chromium.org/119108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 10:47:49 +00:00
ager@chromium.org
24d22b567a Introduce an API to force the deletion of a property ignoring
interceptors and dont-delete attributes.

Minor change to the behavior of eval: throw exception when calling
eval in a context for which the global has been detached.  This
matches the behavior of both Firefox and Safari post navigation in the
browser.
Review URL: http://codereview.chromium.org/118374

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 09:46:09 +00:00
kasperl@chromium.org
9e35fb6582 Lower the number of generations in the script compilation
cache to 5 (down from 8). Generations 5, 6, and 7 are 
rarely hit in real browsing sessions (~2% in the best case)
so it seems better to lower the size to avoid carrying around 
too many compiled scripts in the cache.
Review URL: http://codereview.chromium.org/119301

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 08:03:58 +00:00
whesse@chromium.org
64bd87b8a8 Change handle creation to use Object*, to comply with strict aliasing rules.
Review URL: http://codereview.chromium.org/119177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 07:16:04 +00:00
kmillikin@chromium.org
42c7dc755c Fix x64 build.
TBR=whesse@chromium.org,lrn@chromium.org
Review URL: http://codereview.chromium.org/118310

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 17:14:06 +00:00
kmillikin@chromium.org
bd82b972fc Simplify the processing of deferred code in the code generator. Our
deferred code snippets are highly stylized.  They always make a call
to a stub or the runtime and then return.  This change takes advantage
of that.

Creating a deferred code object now captures a snapshot of the
registers in the virtual frame.  The registers are automatically saved
on entry to the deferred code and restored on exit.

The clients of deferred code must ensure that there is no change to
the registers in the virtual frame (eg, by allocating which can cause
spilling) or to the stack pointer.  That is currently the case.

As a separate change, I will add either code to verify this constraint
or else code to forbid any frame effect.

The deferred code itself does not use the virtual frame or register
allocator (or even the code generator).  It is raw macro assembler
code.
Review URL: http://codereview.chromium.org/118226

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 14:16:32 +00:00
antonm@chromium.org
1e55c82115 Revert r2110 as it introduces performance regressions.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 13:42:29 +00:00
antonm@chromium.org
b2f0dc3542 Don't do local lookup on global object as those (currently) are not JITed anyway.
Review URL: http://codereview.chromium.org/119048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 10:50:36 +00:00
kasperl@chromium.org
dfbc850ebc Revert revision 2108. This brings back the changes
submitted in revisions 2093, 2094, 2099, and 2106.
There's no evidence that supports that these changes
should be the cause of the unexplained performance
regressions on the intl2 and DHTML page cyclers. 


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 08:07:15 +00:00
kasperl@chromium.org
84c09c6de4 Experimental revert of revisions 2093, 2094, 2099, and
2106 to try to isolate a performance regression on the
page cyclers.

I'll roll the changes back in if this doesn't fix the
regression.

TBR=antonm@chromium.org
Review URL: http://codereview.chromium.org/118302

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 06:57:30 +00:00
kasperl@chromium.org
be11c4e979 Patch by Craig Schlenter. See http://codereview.chromium.org/118153
Change stack alignment on linux to 16 bytes to keep gcc 4.4 happy. 
This fixes the mksnapshot segfault without requiring -fno-tree-vectorize
which just avoided the problem by not generating code with movdqa.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 06:20:30 +00:00
antonm@chromium.org
0a0ede0716 Fix the issue with layout tests.
The problem was I incorrectly treated NULL result as failure to fetch
a property with a getter.  However, if getter returns zero, it is
manifested as NULL pointer (see added test case).

Good news: that gives another boost as before this CL if getter returned
0, I did another slow lookup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 19:19:53 +00:00
kmillikin@chromium.org
f7bb967678 Clean up the AST pretty printer by adding some missing newlines and
indentation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 12:01:55 +00:00
lrn@chromium.org
b918e64dc3 X64: JSEntry Stub
Review URL: http://codereview.chromium.org/118115


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 11:54:14 +00:00
whesse@chromium.org
32ce7956ac Fix formatting of one line.
Review URL: http://codereview.chromium.org/119171

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 11:20:03 +00:00
whesse@chromium.org
2852f8d5e2 Declare register names as static constants rather than external globals.
Review URL: http://codereview.chromium.org/119082

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 11:09:17 +00:00
antonm@chromium.org
250081d671 Store lookup index in ARM stubs as well (see r2093 and 2094 for more info).
Review URL: http://codereview.chromium.org/118163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 16:09:43 +00:00
whesse@chromium.org
34de62698c Add multiplication and division to x64 assembler. Add emit_modrm() function.
Review URL: http://codereview.chromium.org/119078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 13:30:31 +00:00
kmillikin@chromium.org
84ef2d3ace Refactor IA32 shift operations to simplify moving the right operand
into the ecx register and to ensure that there is no frame effect
between the first entry to the deferred code and binding its exit.
Review URL: http://codereview.chromium.org/118157

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:20:56 +00:00
antonm@chromium.org
2e49a1c03d Follow up to r2093: forgotten files and changes.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:04:53 +00:00
antonm@chromium.org
06fdc01543 In case of holder with fast properties that allows to fetch the property
immediately if holder has this property or saves binary search on holder if
property doesn't belong to holder.  Of course, in the cases when named getter
returns nothing.

That gives ~20% for dom benchmark/Document Object String Get, speeds up overall
dom_perf (not dramatically) and overall score for peacekeeper.  Strange, but DOM
part of peacekeepr runs somewhat slower.
Review URL: http://codereview.chromium.org/118118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 11:25:34 +00:00
lrn@chromium.org
5e83c2cc9c X64: Added implementations of Set(..., Immediate) to macro assembler.
Removed duplicates comments in assembler-x64.cc.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 10:30:50 +00:00
kmillikin@chromium.org
a41b41bf98 As a simplification, manually inline the function
DeferredInlineBinaryOperation::GenerateInlineCode and remove its
definition.  It was only called from one site and was the only
deferred code object that was split that way into fast-case inline and
slow-case stub.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 20:11:26 +00:00
whesse@chromium.org
ea0644506d Add miscellaneous operations to x64 assembler.
Review URL: http://codereview.chromium.org/113997

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 13:40:52 +00:00
whesse@chromium.org
8c78e673ad Add shift operations to x64 assembler.
Review URL: http://codereview.chromium.org/118107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 11:43:26 +00:00
kmillikin@chromium.org
c70a511b70 Factor out the code for emitting the IA32 binary operations div and
mod so they do not share code with the other binary operations.  They
now preallocate their fixed registers (eax and edx).  There is now no
frame effect between entries to the deferred call to the stub.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 11:18:41 +00:00
mikhail.naganov@gmail.com
0fcedde224 Fix determining of JS lower stack bottom used in profiler's JS stack tracer to work with Chromium.
My assumption that log initialization happens somewhere near the stack's bottom is true for V8's sample shell but isn't true for Chromium, causing many otherwise valid stack addresses to be thrown out. The solution proposed is to save stack pointer value for the outermost JS function in ThreadLocalTop similar to c_entry_fp.

Implemented only for IA-32. Currently I'm not dealing with profiling on ARM and x86-64 anyway.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 09:33:17 +00:00
lrn@chromium.org
734f1fd135 X64: Added jmp and call and nop(n) to X64 assembler.
Review URL: http://codereview.chromium.org/115920


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 07:21:05 +00:00
ager@chromium.org
ce988f32cc Add a couple of parenthesis to improve readability and please certain
GCC version.

BUG=364
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/118016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 19:17:48 +00:00
whesse@chromium.org
1bb3976a14 Change RelocInfo to write 64-bit data field on x64 architecture.
Review URL: http://codereview.chromium.org/115860

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 12:14:54 +00:00
sgjesse@chromium.org
2eebe59957 Prepare for push to trunk. We are now working on 1.2.7.
Review URL: http://codereview.chromium.org/113994

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 10:52:00 +00:00