platform/upstream/v8.git
14 years agoExplicitly release allocated memory as Vector doesn't do that in dtor.
antonm@chromium.org [Fri, 5 Mar 2010 16:46:39 +0000 (16:46 +0000)]
Explicitly release allocated memory as Vector doesn't do that in dtor.

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

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

14 years agoTry to help the builder with the conflict.
antonm@chromium.org [Fri, 5 Mar 2010 15:23:30 +0000 (15:23 +0000)]
Try to help the builder with the conflict.

TBR=sgjesse@chromium.org

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

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

14 years agoAn attempt to fix the tests.
antonm@chromium.org [Fri, 5 Mar 2010 15:07:53 +0000 (15:07 +0000)]
An attempt to fix the tests.

TBR=sgjesse@chromium.org

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

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

14 years agoBetter diagnostic of tests.
antonm@chromium.org [Fri, 5 Mar 2010 14:51:24 +0000 (14:51 +0000)]
Better diagnostic of tests.

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

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

14 years agoFix stack tweaking in array allocation
sgjesse@chromium.org [Fri, 5 Mar 2010 13:43:53 +0000 (13:43 +0000)]
Fix stack tweaking in array allocation

When Array(0) or new Array(0) is handled by the generated code it is handled
by the same code as Array() and new Array(). For this to work the stack is
tweaked to remove the argument of value 0. However the argc was still passed
as 1 if a call to the runtime system was made.

When the stack is tweaked argc is also changed to 0.

BUG=634
TEST=test/mjsunittest/mjsunit/regress/regress-634.js
Review URL: http://codereview.chromium.org/668155

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

14 years agoRevert r4029.
kasperl@chromium.org [Fri, 5 Mar 2010 13:35:59 +0000 (13:35 +0000)]
Revert r4029.
Review URL: http://codereview.chromium.org/668153

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

14 years agoFixed filling of char array in StringToArray.
vitalyr@chromium.org [Fri, 5 Mar 2010 13:33:33 +0000 (13:33 +0000)]
Fixed filling of char array in StringToArray.

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

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

14 years agoRemoved dangerous Factory::NewUninitializedFixedArray.
vitalyr@chromium.org [Fri, 5 Mar 2010 12:30:59 +0000 (12:30 +0000)]
Removed dangerous Factory::NewUninitializedFixedArray.

This was used in runtime StringToArray function which I simplified
keeping its performance for ascii strings.

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

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

14 years agoFixing style of variable names.
antonm@chromium.org [Fri, 5 Mar 2010 11:19:37 +0000 (11:19 +0000)]
Fixing style of variable names.

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

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

14 years agoChange allocations in test-heap to use handles. This makes the test
ager@chromium.org [Fri, 5 Mar 2010 09:51:10 +0000 (09:51 +0000)]
Change allocations in test-heap to use handles.  This makes the test
work when garbage collections are forced in random places.

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

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

14 years agoTry to let the context disposal GC at idle time have less
kasperl@chromium.org [Fri, 5 Mar 2010 08:58:59 +0000 (08:58 +0000)]
Try to let the context disposal GC at idle time have less
impact on the normal idle notification scheme by making sure
we do not restart the idle GC sequence just because of a
forced GC due to context disposal.
Review URL: http://codereview.chromium.org/669150

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

14 years agoTry to allow the new context disposal GC heuristic to kick
kasperl@chromium.org [Fri, 5 Mar 2010 07:35:06 +0000 (07:35 +0000)]
Try to allow the new context disposal GC heuristic to kick
in even when running with --expose-gc.
Review URL: http://codereview.chromium.org/668143

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

14 years agoFix weird issue with test case where certain global function
kasperl@chromium.org [Fri, 5 Mar 2010 07:05:26 +0000 (07:05 +0000)]
Fix weird issue with test case where certain global function
names were being reused.
Review URL: http://codereview.chromium.org/669148

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

14 years agoFix invalid fast return in splice when returned array is empty.
antonm@chromium.org [Thu, 4 Mar 2010 22:16:58 +0000 (22:16 +0000)]
Fix invalid fast return in splice when returned array is empty.

TBR=vitalyr@chromium.org

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

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

14 years agoFix a special case (zero length result array).
antonm@chromium.org [Thu, 4 Mar 2010 21:29:33 +0000 (21:29 +0000)]
Fix a special case (zero length result array).

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

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

14 years agoAdded tests for issue 618
sgjesse@chromium.org [Thu, 4 Mar 2010 15:04:04 +0000 (15:04 +0000)]
Added tests for issue 618
Review URL: http://codereview.chromium.org/668055

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

14 years agoRemove the unlocker from the JS thread in ProfMultipleThreads to
kasperl@chromium.org [Thu, 4 Mar 2010 15:03:36 +0000 (15:03 +0000)]
Remove the unlocker from the JS thread in ProfMultipleThreads to
avoid getting a profiling sample while not holding the locker,
because we will not get a stack sample in that case.
Review URL: http://codereview.chromium.org/668063

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

14 years agoDisable two problematic tests that only test functionality
kasperl@chromium.org [Thu, 4 Mar 2010 14:45:36 +0000 (14:45 +0000)]
Disable two problematic tests that only test functionality
used on the partial_snapshots branch.

BUG=http://code.google.com/p/v8/issues/detail?id=632
Review URL: http://codereview.chromium.org/669062

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

14 years agoAdd runtime function for string to array conversion.
vitalyr@chromium.org [Thu, 4 Mar 2010 14:03:08 +0000 (14:03 +0000)]
Add runtime function for string to array conversion.

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

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

14 years agoTry to fix issue 632 by being more careful in the locking/unlocking
kasperl@chromium.org [Thu, 4 Mar 2010 13:25:23 +0000 (13:25 +0000)]
Try to fix issue 632 by being more careful in the locking/unlocking
in the test-log/ProfMultipleThreads.
Review URL: http://codereview.chromium.org/669058

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

14 years agoAdded new ia32 assembler instructions to the diassembler from Math.pow inline impleme...
ricow@chromium.org [Thu, 4 Mar 2010 12:51:49 +0000 (12:51 +0000)]
Added new ia32 assembler instructions to the diassembler from Math.pow inline implementation.

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

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

14 years agoDon't use strcmp to test heap object pointer equality.
kasperl@chromium.org [Thu, 4 Mar 2010 12:35:39 +0000 (12:35 +0000)]
Don't use strcmp to test heap object pointer equality.
Review URL: http://codereview.chromium.org/668060

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

14 years ago[Linux] Patch LogSharedLibraryAddresses to work correctly on Android.
mikhail.naganov@gmail.com [Thu, 4 Mar 2010 12:32:47 +0000 (12:32 +0000)]
[Linux] Patch LogSharedLibraryAddresses to work correctly on Android.

On 'usual' Linux systems in '/proc/self/maps' we encounter two entries
per library: one has 'rw-p' attrs and the other has 'r-xp'. While on
Android, I see 'rwxp' and 'r-xp' (both entries are marked executable.)
So I've added an explicit check for non-writability to leave only a
single record in the log file.

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

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

14 years agoAssign to "sample.state" before reading it.
mikhail.naganov@gmail.com [Thu, 4 Mar 2010 12:32:03 +0000 (12:32 +0000)]
Assign to "sample.state" before reading it.

I noticed a funny thing: in StackTracer::Trace "sample.state" is
checked, but it is only assigned after the check. I've put assignment
before the check.

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

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

14 years agoAdd IsExecutionTerminating api method.
ager@chromium.org [Thu, 4 Mar 2010 12:13:04 +0000 (12:13 +0000)]
Add IsExecutionTerminating api method.

IsExecutionTerminating returns true if a termination exception is
currently being propagated.  C++ code should not reenter V8 when
IsExecutionTerminating returns true.

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

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

14 years ago- Fixed the compilation cache so Put works.
bak@chromium.org [Thu, 4 Mar 2010 11:27:28 +0000 (11:27 +0000)]
- Fixed the compilation cache so Put works.
- Cleaned up the calls to HashTable::Allocate.

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

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

14 years ago- Rearrange fields in SharedFunctionInfo.
iposva@chromium.org [Thu, 4 Mar 2010 09:55:04 +0000 (09:55 +0000)]
- Rearrange fields in SharedFunctionInfo.

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

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

14 years agoChange heap sort of descriptor array to bottom-up.
whesse@chromium.org [Thu, 4 Mar 2010 09:27:45 +0000 (09:27 +0000)]
Change heap sort of descriptor array to bottom-up.
Review URL: http://codereview.chromium.org/661470

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

14 years agoNasty workaround for bug 632.
kasperl@chromium.org [Thu, 4 Mar 2010 07:43:05 +0000 (07:43 +0000)]
Nasty workaround for bug 632.
Review URL: http://codereview.chromium.org/669045

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

14 years agoFast case conversion for ascii strings.
vitalyr@chromium.org [Wed, 3 Mar 2010 16:40:29 +0000 (16:40 +0000)]
Fast case conversion for ascii strings.

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

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

14 years ago- Changed the initial size for HashTable.
bak@chromium.org [Wed, 3 Mar 2010 16:22:17 +0000 (16:22 +0000)]
- Changed the initial size for HashTable.
- Pretenured large expanding hash tables.

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

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

14 years agoFix broken test in WebKit test suite and add the test in question to V8 tests.
oleg@chromium.org [Wed, 3 Mar 2010 14:19:04 +0000 (14:19 +0000)]
Fix broken test in WebKit test suite and add the test in question to V8 tests.

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

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

14 years agoAdded implementation if Uint32::Value.
lrn@chromium.org [Wed, 3 Mar 2010 13:44:20 +0000 (13:44 +0000)]
Added implementation if Uint32::Value.

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

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

14 years agoRefactor the scanner interface
sgjesse@chromium.org [Wed, 3 Mar 2010 13:16:10 +0000 (13:16 +0000)]
Refactor the scanner interface

No need to create sub strings for lazy compiles. The scanner will start from the start position provided.

Moved the creating of character streams into the scanner where possible. This uses a input buffer in the scanner class instead of a stack allocated one.

Added a UTF16 buffer for reading external ascii strings (by templating the external two byte string one) as all the source for the builtins are exposed as external ascii strings.
Review URL: http://codereview.chromium.org/661367

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

14 years agoTry to fix the broken build by making a single problematic
kasperl@chromium.org [Wed, 3 Mar 2010 12:22:01 +0000 (12:22 +0000)]
Try to fix the broken build by making a single problematic
test non-threaded.
Review URL: http://codereview.chromium.org/661462

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

14 years agoRemove a duplicated move instruction for store IC calls on ia32.
fschneider@chromium.org [Wed, 3 Mar 2010 11:43:45 +0000 (11:43 +0000)]
Remove a duplicated move instruction for store IC calls on ia32.

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

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

14 years agoRemove the deprecated context disposal GC heuristic.
kasperl@chromium.org [Wed, 3 Mar 2010 11:41:22 +0000 (11:41 +0000)]
Remove the deprecated context disposal GC heuristic.
Review URL: http://codereview.chromium.org/661458

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

14 years agoSmall API improvements:
vitalyr@chromium.org [Tue, 2 Mar 2010 18:47:03 +0000 (18:47 +0000)]
Small API improvements:

 * Added Get and Set taking uint32_t for faster and more convenient
   access to elements.

 * Added less verbose casting for handles. Now instead of
       v8::Local<v8::String>::Cast(args[0])
   one can write
       args[0].As<v8::String>().

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

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

14 years agoPrevent "control reaches end of non-void function" warning from gcc on Mac.
oleg@chromium.org [Tue, 2 Mar 2010 14:44:01 +0000 (14:44 +0000)]
Prevent "control reaches end of non-void function" warning from gcc on Mac.

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

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

14 years agoFix minor syntax error which broke the compilation.
oleg@chromium.org [Tue, 2 Mar 2010 14:32:31 +0000 (14:32 +0000)]
Fix minor syntax error which broke the compilation.

TBR=whesse@chromium.org

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

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

14 years agoRevert change to EquivalentTime in date.js. The checks that I've removed in the last...
oleg@chromium.org [Tue, 2 Mar 2010 14:19:34 +0000 (14:19 +0000)]
Revert change to EquivalentTime in date.js. The checks that I've removed in the last changed were essential after all.

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

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

14 years agoAdd syntax checker for side-effect-free expressions to AstOptimizer in rewriter.cc...
whesse@chromium.org [Tue, 2 Mar 2010 14:00:59 +0000 (14:00 +0000)]
Add syntax checker for side-effect-free expressions to AstOptimizer in rewriter.cc.  Add bit fields for syntax checker results to Expression in ast.h.
Review URL: http://codereview.chromium.org/660372

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

14 years agoRewrite MakeDay function from JS to C++.
oleg@chromium.org [Tue, 2 Mar 2010 13:29:26 +0000 (13:29 +0000)]
Rewrite MakeDay function from JS to C++.

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

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

14 years agoAdd cld before doing rep movs.
antonm@chromium.org [Tue, 2 Mar 2010 13:22:04 +0000 (13:22 +0000)]
Add cld before doing rep movs.

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

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

14 years agoFaster filling newly allocated arrays with the holes from the Array construction...
antonm@chromium.org [Tue, 2 Mar 2010 12:42:15 +0000 (12:42 +0000)]
Faster filling newly allocated arrays with the holes from the Array construction stub.

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

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

14 years ago- Changed the growth policy for hash tables to reduce the wasted memory.
bak@chromium.org [Tue, 2 Mar 2010 12:27:11 +0000 (12:27 +0000)]
- Changed the growth policy for hash tables to reduce the wasted memory.
  Now we fill hashtables 75% before expanding.

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

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

14 years agoRe-introduce this as a trivial expression
sgjesse@chromium.org [Tue, 2 Mar 2010 11:58:10 +0000 (11:58 +0000)]
Re-introduce this as a trivial expression

The reverts r3939 as it turned out not be the root cause for the regression http://crbug.com/36604.
Review URL: http://codereview.chromium.org/661365

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

14 years agoAllow snapshots built without -DANDROID to work on Android.
erik.corry@gmail.com [Tue, 2 Mar 2010 11:54:11 +0000 (11:54 +0000)]
Allow snapshots built without -DANDROID to work on Android.
Fix bug in fast code generator on ARM (can't use ip as scratch
in RecordWrite).
Activate normal-sized compilation cache on Android.
This is a port of 3938 from the partial snapshots branch.
Review URL: http://codereview.chromium.org/652227

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

14 years agoImplementation of a fixed-size bit vector.
fschneider@chromium.org [Tue, 2 Mar 2010 10:43:46 +0000 (10:43 +0000)]
Implementation of a fixed-size bit vector.

This is a basic implementation bit vector containing an fixed
arbitrary number of bits.

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

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

14 years agoParametrize C++ splay tree with allocator.
mikhail.naganov@gmail.com [Tue, 2 Mar 2010 10:03:38 +0000 (10:03 +0000)]
Parametrize C++ splay tree with allocator.

Thus, now there is a "generic" SplayTree and its Zone-bound
specialization ZoneSplayTree.

This is needed for my reimplementation of profiler tree generation in
C++. As generation is performed in a separate thread, Zone can't be
used, because it intentionally not thread-safe.

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

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

14 years agoEnable GC update for pointers in GenerateKeyedLoadICDebugBreak
peter.rybin@gmail.com [Mon, 1 Mar 2010 17:26:46 +0000 (17:26 +0000)]
Enable GC update for pointers in GenerateKeyedLoadICDebugBreak

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

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

14 years agoImplementing inline caches for binary operations (ia32).
kaznacheev@chromium.org [Mon, 1 Mar 2010 16:24:05 +0000 (16:24 +0000)]
Implementing inline caches for binary operations (ia32).

This is a subset of a CL reviewed earlier(http://codereview.chromium.org/551093).
The register usage optimisation part has been reviewed and submitted separately.
Two fast cases supported: HeapNumber operands and String operands for ADD.

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

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

14 years agoFaster moving FixedArray elements around.
antonm@chromium.org [Mon, 1 Mar 2010 15:33:30 +0000 (15:33 +0000)]
Faster moving FixedArray elements around.

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

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

14 years agoLogging-related changes.
mikhail.naganov@gmail.com [Mon, 1 Mar 2010 10:41:34 +0000 (10:41 +0000)]
Logging-related changes.

 - when logging 'open-tag' / 'close-tag' events, don't depend on
   FLAG_log (as it may be not enabled, e.g. in Chromium);

 - PauseProfiler / ResumeProfiler were supposing that they
   use 'is_logging_' var exclusively, thus preventing any
   other logging that may be turned on for diagnostic purposes.

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

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

14 years agoTweak the new context disposal GC heuristic to cleanly separate
kasperl@chromium.org [Mon, 1 Mar 2010 08:49:33 +0000 (08:49 +0000)]
Tweak the new context disposal GC heuristic to cleanly separate
it from the old heuristic (disabled if the new notications are
used) and make sure to not force a GC if one has already happened
after V8 received the last context disposal notification.
Review URL: http://codereview.chromium.org/660267

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

14 years agoMove definitions of named registers as constant structures to assembler-arm.h file.
whesse@chromium.org [Mon, 1 Mar 2010 08:34:09 +0000 (08:34 +0000)]
Move definitions of named registers as constant structures to assembler-arm.h file.
Review URL: http://codereview.chromium.org/660256

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

14 years agoUpdate MIPS port to support recent changes
sgjesse@chromium.org [Mon, 1 Mar 2010 08:32:54 +0000 (08:32 +0000)]
Update MIPS port to support recent changes

This lands http://codereview.chromium.org/660244.

Patch by Alexandre Rames from Sigma Designs Inc.
Review URL: http://codereview.chromium.org/661268

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

14 years agoCount GlobalHandles::PostGarbageCollectionProcessing() as being
kasperl@chromium.org [Mon, 1 Mar 2010 07:04:42 +0000 (07:04 +0000)]
Count GlobalHandles::PostGarbageCollectionProcessing() as being
in external code so it's visible when running with --trace-gc.

Landed on behalf of James Robinson (jamesr@chromium.org).

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

14 years agoImplemented one-char cache lookup in generated code.
vitalyr@chromium.org [Fri, 26 Feb 2010 20:14:20 +0000 (20:14 +0000)]
Implemented one-char cache lookup in generated code.

This speeds up string,charAt(n) and string[n].

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

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

14 years agoReturn length passed instead of receiver to allow chained assignments like
antonm@chromium.org [Fri, 26 Feb 2010 16:12:39 +0000 (16:12 +0000)]
Return length passed instead of receiver to allow chained assignments like

foo = a.length = 7

BUG=crbug.com/36854

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

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

14 years agoAdd missing error message for calling functions on incompatible receivers.
ager@chromium.org [Fri, 26 Feb 2010 15:46:57 +0000 (15:46 +0000)]
Add missing error message for calling functions on incompatible receivers.
Review URL: http://codereview.chromium.org/660178

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

14 years agoFaster filling of arrays of holes.
antonm@chromium.org [Fri, 26 Feb 2010 15:19:13 +0000 (15:19 +0000)]
Faster filling of arrays of holes.

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

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

14 years ago- Pushed source code for functions into old space.
bak@chromium.org [Fri, 26 Feb 2010 14:37:33 +0000 (14:37 +0000)]
- Pushed source code for functions into old space.
- Renamed TryFlattenIfNotFlat to TryFlatten.

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

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

14 years agoMake another small virtual frame function inlined.
fschneider@chromium.org [Fri, 26 Feb 2010 14:02:29 +0000 (14:02 +0000)]
Make another small virtual frame function inlined.

Move a constructor to the platform-independent -inl.h file.

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

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

14 years agoMoved initialization of xmm3 making sure it is initialized on all paths in GeneratePo...
ricow@chromium.org [Fri, 26 Feb 2010 12:28:25 +0000 (12:28 +0000)]
Moved initialization of xmm3 making sure it is initialized on all paths in GeneratePow - solves the sputnik failure on mac.

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

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

14 years agoRemoved space to please lint.
bak@chromium.org [Fri, 26 Feb 2010 12:00:10 +0000 (12:00 +0000)]
Removed space to please lint.

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

14 years agoAdd an explicit API entry to notify V8 that one or more
kasperl@chromium.org [Fri, 26 Feb 2010 11:51:33 +0000 (11:51 +0000)]
Add an explicit API entry to notify V8 that one or more
contexts have been disposed.
Review URL: http://codereview.chromium.org/661173

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

14 years ago- Moved the computation of old space limits to after the mandatory scavenge.
bak@chromium.org [Fri, 26 Feb 2010 11:48:18 +0000 (11:48 +0000)]
- Moved the computation of old space limits to after the mandatory scavenge.
  This reduces the number of mark sweep operations.

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

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

14 years agoChanged GeneratePow ensure xmm1 is loaded with y before making the test for NaN
ricow@chromium.org [Fri, 26 Feb 2010 11:09:06 +0000 (11:09 +0000)]
Changed GeneratePow ensure xmm1 is loaded with y before making the test for NaN
Review URL: http://codereview.chromium.org/660172

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

14 years agoAdded fast support for Math.pow. This simply calculates the result using the
ricow@chromium.org [Fri, 26 Feb 2010 10:24:58 +0000 (10:24 +0000)]
Added fast support for Math.pow. This simply calculates the result using the
same method as the old powi version in runtime.cc and also checks if
the exponent is 0.5 or -0.5 in which case we calculate the square root or
reciprocal value of the square root.

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

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

14 years agoInlining a few virtual frame functions.
fschneider@chromium.org [Fri, 26 Feb 2010 09:32:48 +0000 (09:32 +0000)]
Inlining a few virtual frame functions.

Introducing a virtual-frame-inl.h file containing some platform-independent
virtual frame function which are small enough to be inlined.

Removed unnecessary #include of virtual-frame.h from register-allocator-inl.h
and added the necessary explicit includes in a number of files.

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

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

14 years agoAdd test of internal fields on global objects. This test currently
ager@chromium.org [Fri, 26 Feb 2010 09:23:15 +0000 (09:23 +0000)]
Add test of internal fields on global objects.  This test currently
fails on the partial snapshots branch.
Review URL: http://codereview.chromium.org/660169

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

14 years agoAdd information about time spent in external callback to
kasperl@chromium.org [Fri, 26 Feb 2010 08:27:20 +0000 (08:27 +0000)]
Add information about time spent in external callback to
traces produces with --trace-gc.
Review URL: http://codereview.chromium.org/661170

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

14 years agoFix presubmit error.
ager@chromium.org [Thu, 25 Feb 2010 18:26:36 +0000 (18:26 +0000)]
Fix presubmit error.

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

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

14 years agoFix the mac debug build. Apparently g++ on Mac cannot figure out that there
ager@chromium.org [Thu, 25 Feb 2010 18:19:12 +0000 (18:19 +0000)]
Fix the mac debug build.  Apparently g++ on Mac cannot figure out that there
is a return in each branch of an if-else.

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

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

14 years agoChange KeyedStoreIC interface to take value, key, and receiver in registers.
whesse@chromium.org [Thu, 25 Feb 2010 18:04:25 +0000 (18:04 +0000)]
Change KeyedStoreIC interface to take value, key, and receiver in registers.
Review URL: http://codereview.chromium.org/608031

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

14 years agoOptimize three Number2Integer functions in runtime.cc: remove the check that was...
oleg@chromium.org [Thu, 25 Feb 2010 16:46:37 +0000 (16:46 +0000)]
Optimize three Number2Integer functions in runtime.cc: remove the check that was already done in JavaScript, add simpler code in case we are getting a SMI
result.

Code review: http://codereview.chromium.org/660084

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

14 years agoRevert r3952
sgjesse@chromium.org [Thu, 25 Feb 2010 15:43:27 +0000 (15:43 +0000)]
Revert r3952

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

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

14 years agoRefactor the code cache to handle large number of properties on the global object.
sgjesse@chromium.org [Thu, 25 Feb 2010 14:24:44 +0000 (14:24 +0000)]
Refactor the code cache to handle large number of properties on the global object.

A separate object type for the code cache have been added. This object has two different code caches. The first one (default_cache) is a fixed array organized in the same way as the as the code cache was before. The second cache (global_access_cache) is for code stubs to access the global object. This cache is organized as a hash table taking the property name and code flags as the key.

The reason for separating the global access stubs into a hash table representation is that the number of these is not bounded in the same was as the other types.

BUG=613
Review URL: http://codereview.chromium.org/652119

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

14 years agoAdding 'static const' for arg numbers used with CallCFunction.
serya@chromium.org [Thu, 25 Feb 2010 13:06:05 +0000 (13:06 +0000)]
Adding 'static const' for arg numbers used with CallCFunction.
Review URL: http://codereview.chromium.org/660078

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

14 years agoImprove string runtime compare performance for flat strings.
vitalyr@chromium.org [Thu, 25 Feb 2010 12:49:23 +0000 (12:49 +0000)]
Improve string runtime compare performance for flat strings.

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

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

14 years agoFix test for overflow in memory allocation Failure payload.
lrn@chromium.org [Thu, 25 Feb 2010 12:28:35 +0000 (12:28 +0000)]
Fix test for overflow in memory allocation Failure payload.
It bailed out too early, and could give a DEBUG assertion failure due
to right shift being artihmetic. Changed values to unsigned to be safe.

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

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

14 years agoAllignFrame/CallCFuntion moved from regexp-macro-assembler-ia32 to macro-assembler...
serya@chromium.org [Thu, 25 Feb 2010 12:18:55 +0000 (12:18 +0000)]
AllignFrame/CallCFuntion moved from regexp-macro-assembler-ia32 to macro-assembler-ia32 (like in x64 version).

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

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

14 years agoRevert pax change as it does not work with older versions of scons.
ager@chromium.org [Thu, 25 Feb 2010 08:27:07 +0000 (08:27 +0000)]
Revert pax change as it does not work with older versions of scons.

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

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

14 years agoImplement BlindReference object and provide couple of liveedit-specific structures
peter.rybin@gmail.com [Wed, 24 Feb 2010 19:59:09 +0000 (19:59 +0000)]
Implement BlindReference object and provide couple of liveedit-specific structures

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

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

14 years agoFix miss in smi check when doing fast api call.
vitalyr@chromium.org [Wed, 24 Feb 2010 19:26:10 +0000 (19:26 +0000)]
Fix miss in smi check when doing fast api call.

BUG=http://crbug.com/36604

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

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

14 years agoFix uninitialized memory read in CallOptimization.
vitalyr@chromium.org [Wed, 24 Feb 2010 19:14:21 +0000 (19:14 +0000)]
Fix uninitialized memory read in CallOptimization.

BUG=http://crbug.com/36602

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

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

14 years agoLand change to allow building on Gentoo Hardened Linux.
ager@chromium.org [Wed, 24 Feb 2010 18:50:56 +0000 (18:50 +0000)]
Land change to allow building on Gentoo Hardened Linux.

Codereview URL: http://codereview.chromium.org/659002

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

14 years agoDon't treat this as a trivial expression.
sgjesse@chromium.org [Wed, 24 Feb 2010 14:02:20 +0000 (14:02 +0000)]
Don't treat this as a trivial expression.

This caused some regressions in Chromium.

BUG=http://crbug.com/36604
Review URL: http://codereview.chromium.org/652228

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

14 years agoReview URL: http://codereview.chromium.org/652118
serya@chromium.org [Wed, 24 Feb 2010 08:33:51 +0000 (08:33 +0000)]
Review URL: http://codereview.chromium.org/652118

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

14 years agoRemove inheritance of chromium flags
sgjesse@chromium.org [Wed, 24 Feb 2010 08:30:12 +0000 (08:30 +0000)]
Remove inheritance of chromium flags
Review URL: http://codereview.chromium.org/570022

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

14 years agoAdd the ability to compile with profiler guided optimizations on Windows
sgjesse@chromium.org [Tue, 23 Feb 2010 15:22:48 +0000 (15:22 +0000)]
Add the ability to compile with profiler guided optimizations on Windows

It is now possible to experiment with profiler guided optimizations when building V8. First build an instrumented sample shell:

  > scons pgo=instrument sample=shell

Then run the JavaScript code to optimize for using that sample shell. Finally build an optimized sample shell.

  > scons pgo=optimize sample=shell

Currently this does not work when building V8 as a DLL due to scons deleting v8.exp prior to the pgo=optimize step.

Due to a bug in Visual Studio (seen in version 2008) the function MessageDispatchHelperThread::Run() in debug.cc needs to be empty for this to work.
Review URL: http://codereview.chromium.org/652114

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

14 years agoTypo fixed.
serya@chromium.org [Tue, 23 Feb 2010 12:52:29 +0000 (12:52 +0000)]
Typo fixed.

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

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

14 years agoAdd comment to generated code that says which code generator compiled it.
whesse@chromium.org [Tue, 23 Feb 2010 12:40:36 +0000 (12:40 +0000)]
Add comment to generated code that says which code generator compiled it.
Review URL: http://codereview.chromium.org/652110

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

14 years agoIA32: Native access to TranscendentalCache for sin/cos.
lrn@chromium.org [Tue, 23 Feb 2010 10:29:02 +0000 (10:29 +0000)]
IA32: Native access to TranscendentalCache for sin/cos.

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

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

14 years agoPrepare push to trunk. Now working on 2.1.3.
fschneider@chromium.org [Tue, 23 Feb 2010 10:22:07 +0000 (10:22 +0000)]
Prepare push to trunk. Now working on 2.1.3.

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

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

14 years agoFix reliability crash caused by wrong assert.
fschneider@chromium.org [Mon, 22 Feb 2010 15:42:23 +0000 (15:42 +0000)]
Fix reliability crash caused by wrong assert.

These two asserts in ComputeEntryFrame are wrong since the
virtual frame already knows how to deal with the number type
information of copy elements: We do not store type
information with copy elements. Instead the backing element
contains the type information.

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

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

14 years agoAdd integer casts to make v8 compile without warnings on 64-bit Visual Studio
whesse@chromium.org [Mon, 22 Feb 2010 11:42:46 +0000 (11:42 +0000)]
Add integer casts to make v8 compile without warnings on 64-bit Visual Studio
Review URL: http://codereview.chromium.org/650140

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

14 years agoDeclare register names as constants in assembler-x64.h. Fix for issue 615.
whesse@chromium.org [Mon, 22 Feb 2010 11:41:52 +0000 (11:41 +0000)]
Declare register names as constants in assembler-x64.h.  Fix for issue 615.
Review URL: http://codereview.chromium.org/650136

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

14 years agoConsistently return failure if the stub cache cannot deliver a code object
sgjesse@chromium.org [Mon, 22 Feb 2010 10:04:22 +0000 (10:04 +0000)]
Consistently return failure if the stub cache cannot deliver a code object

Some functions of the stub cache returned undefined if a code stub could not be generated. However the clients of these functions only cehcks for failure. Now all these functions return a failire object if no code stub can be made available
Review URL: http://codereview.chromium.org/652039

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