Commit Graph

2968 Commits

Author SHA1 Message Date
kasperl@chromium.org
6c605d1fe0 Revert r3758.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 15:27:51 +00:00
kasperl@chromium.org
5e96a8ca4b Temporarily allocate all function contexts in old space and
force the system to use the full compiler to momentarily get 
better test coverage.

This change will be reverted once the unit tests have finished
running.
Review URL: http://codereview.chromium.org/552257

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 15:16:26 +00:00
kasperl@chromium.org
ae4fd1e54f Avoid using RecordWrite with the context (esi, rsi, cp) as
one of the arguments since this may clobber the register.
Review URL: http://codereview.chromium.org/556101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 13:20:43 +00:00
ager@chromium.org
05e8784136 Allow the optimizing compiler to use an existing macro assembler.
This is the first towards using the optimizing compiler for split
compilation bailouts.
Review URL: http://codereview.chromium.org/557079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 13:07:53 +00:00
yurys@chromium.org
2a8034c8f6 Correctly set eval_from_shared value when new function is created by "new Function(...)". At the moment it's set to the native script where the Function is defined(v8natives.js) which doesn't make much sense for the user when he tries to debug his code. Moreover, it causes an exception in JSONProtocolSerializer.prototype.serialize_.
Related Chromium bug: http://crbug.com/29062
Review URL: http://codereview.chromium.org/551227

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 12:56:56 +00:00
whesse@chromium.org
d450fe1ed3 Remove StoreIC::Generate, and inline StoreIC::GenerateInitialize.
Review URL: http://codereview.chromium.org/558067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 11:07:41 +00:00
yurys@chromium.org
4963f13f22 Show user script source line that caused exception intead of a line in a native script. When an error is reported as one happened in a native script it's hard to track the original cause. See chromium issue: http://crbug.com/25305
Review URL: http://codereview.chromium.org/555170

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 10:34:57 +00:00
lrn@chromium.org
f03e42b133 Added validating JSON parser mode to parser.
Review URL: http://codereview.chromium.org/549207

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 10:31:55 +00:00
whesse@chromium.org
866eac3057 StoreIC interface changed on ia32 to take receiver in edx, not on stack.
Review URL: http://codereview.chromium.org/555162

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 08:35:38 +00:00
vitalyr@chromium.org
f40ecb18c3 Fix stack overflow in cctest/test-api/Threadin2 after r3613.
r3613 started wrapping all builtins in extra call in debug mode so it
became easier to cause stack overflow especially in 64-bit build.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 18:01:46 +00:00
kmillikin@chromium.org
5536273594 Add fast code generator visitor.
It does not yet emit code so there is a flag --print-ir to print the
AST as seen by the code generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 15:29:33 +00:00
mikhail.naganov@gmail.com
0867927b4b Rewrite CsvParser.parseLine to make it simpler and gain some performance improvement.
Review URL: http://codereview.chromium.org/548198

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 13:32:32 +00:00
serya@chromium.org
9239bbdd91 Removing redundant stub for runtime native calls.
Review URL: http://codereview.chromium.org/543207

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 12:41:11 +00:00
kmillikin@chromium.org
8588518851 Introduce a stack-allocated structure to encapsulate compile-time information.
Use it to hold the possible shared function info, the possible
receiver, and the compilation loop nesting depth.  Remove loop nesting
from FunctionLiteral AST nodes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 11:55:40 +00:00
kasperl@chromium.org
048fe9b980 RFC: Try to be much more careful with where we skip the write barrier by:
1. Avoid using SKIP_WRITE_BARRIER when we don't have to (smis).
  2. Check and document the remaining uses of SKIP_WRITE_BARRIER.
  3. Only allow GetWriteBarrierMode when in an AssertNoAllocation scope.

The only functional change should be in DeepCopyBoilerplate where we
no longer use the write barrier mode (because of allocations). I'm
running benchmarks to see if this has a measurable impact on performance.
Review URL: http://codereview.chromium.org/558041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 11:46:55 +00:00
sgjesse@chromium.org
2498d5cb7b Fix debug build breakage from r3740
TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/555161

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 11:34:37 +00:00
sgjesse@chromium.org
0528427a1b Change to src/x64/assembler-x64.h missing from r3740
TBR=lrn@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 10:56:26 +00:00
sgjesse@chromium.org
8ced9b99be Port direct call from JavaScript to native RegExp to x64
Code tested on both Linux and Windows.

Added a bit more abstraction to calling a C function from generated code.

Minor tweaks to the ia32 version.
Review URL: http://codereview.chromium.org/548179

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 10:33:27 +00:00
kmillikin@chromium.org
e7528c4ac6 Propagate receiver from initial call site to code generator.
When doing lazy compilation of methods, allow the code generator to know the
(initial) receiver at the (initial) call site.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 09:52:51 +00:00
fschneider@chromium.org
88f6734ddb Add a pass for the fast compiler to label expression nodes.
This change adds a post-order numbering to AST nodes that
are relevant for the fast code generator. It is only invoked
together with the fast compiler. 

Also changed the ast printer to print the  numbering for 
testing purposes if it is present.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-29 09:42:13 +00:00
whesse@chromium.org
e9263697cb Remove some unneeded restorations of a register in StoreIC.
Review URL: http://codereview.chromium.org/548181

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 14:01:14 +00:00
ager@chromium.org
fa4954a42b Remove unsafe and unneeded logging during deserialization.
Review URL: http://codereview.chromium.org/558018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 13:05:29 +00:00
kaznacheev@chromium.org
432caaf14e Use registers to pass arguments to GenericBinaryOpStub (x64).
This is a port to x64 of the following CLs:

http://codereview.chromium.org/554062 (use registers at all)
http://codereview.chromium.org/555098 (use registers for MUL, DIV and virtual frames)
http://codereview.chromium.org/556019 (optimize register order)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 12:45:14 +00:00
whesse@chromium.org
8999064435 Move a line, in codegen-*.cc. Make formatting of ic-*.cc uniform.
Review URL: http://codereview.chromium.org/552210

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 12:41:27 +00:00
sgjesse@chromium.org
ef4b110620 Fix typo.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/554114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 10:46:58 +00:00
kasperl@chromium.org
7db4279d22 Add missing break.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/548178

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 09:08:01 +00:00
kasperl@chromium.org
0b13c6be28 Strengthen a few assertions and add zapping of allocated
memory blocks filling them out with recognizable non-zero
bit pattern in debug mode.
Review URL: http://codereview.chromium.org/558016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 08:46:56 +00:00
sgjesse@chromium.org
f07a0230dc Updage Visual Studio project files
Add the new files for the fast compiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 08:41:31 +00:00
ager@chromium.org
9879490308 Implement SUB and BIT_NOT unary operations in full codegenerator.
This change depends on landing the BIT_NOT unary op stub on arm. That
change is out for review.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 08:15:00 +00:00
ager@chromium.org
ed224fc1dc Port bit not unary op stub to ARM.
Review URL: http://codereview.chromium.org/552188

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-28 08:14:19 +00:00
kasperl@chromium.org
25c6b59b1e Make sure to initialize all fields in the special maps
created during bootstrapping. Without this change we 
risk having weird flags set on the map for the null
value (among others), which can lead to crashes.
Review URL: http://codereview.chromium.org/552195

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 20:14:46 +00:00
fschneider@chromium.org
58a8a1f341 Rename flags in unit tests to match the new flag definitions.
TBR=kmillikin@chromium.org, 
Review URL: http://codereview.chromium.org/555132

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 17:21:48 +00:00
leonclarke@gmail.com
eaa845804e Get it to compile when ENABLE_LOGGING_AND_PROFILING isn't defined.
I think it currently is defined on all platforms except Android.
Review URL: http://codereview.chromium.org/554101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 17:10:28 +00:00
sgjesse@chromium.org
5fe8bd9919 Fix 64-bit build on Windows and Visual Studio project files
64-bit version now builds on Windows again in both release and debug mode.

The Visual Studio project files have been updated so that all three configurations work (32-bit, 64-bit and 32-bit with ARM simulator). They all convert from Visual Studio 2005 to Visual Studio 2008.

TBR=lrn@chromium.org
Review URL: http://codereview.chromium.org/549174

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 16:18:58 +00:00
kmillikin@chromium.org
2b62886dab Refactor the selection of code generator and add the possibility of a
simpler backend for non-toplevel code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 15:23:48 +00:00
whesse@chromium.org
62f3e48d2d Refactor Reference so that SetValue and GetValue pop the reference state.
Review URL: http://codereview.chromium.org/487017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 14:07:12 +00:00
ricow@chromium.org
80d71c6406 Changed JSObject::DefineGetterSetter to also set the right attributes
when an existing accessor is redefined (a configurable accessor can
potentially be redefined as a non-configurable (i.e., DONT_DELETE)).


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 13:53:19 +00:00
ricow@chromium.org
7985bf73c8 Set iIsExtensible to true as default in the map.
Review URL: http://codereview.chromium.org/556041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 13:51:04 +00:00
ager@chromium.org
68f537d2b1 Port code to load an integer directly from a heap number from ia32 to x64.
For now, this is a direct port from ia32, so there is probably still
stuff that can be improved here.
Review URL: http://codereview.chromium.org/555131

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 13:34:29 +00:00
kmillikin@chromium.org
f866a574ae Enable references and assignments to lookup slots in the toplevel code
generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 12:14:26 +00:00
whesse@chromium.org
93f5cb2cd4 Move heap numbers directly to VFP3 registers in comparison stub.
Review URL: http://codereview.chromium.org/556020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 12:13:32 +00:00
erik.corry@gmail.com
10fdd6509b Add counters for the different code generators.
Review URL: http://codereview.chromium.org/552184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 11:08:32 +00:00
erik.corry@gmail.com
90045ddd5e Another step on the way to context snapshots. We can now refer to
objects in the startup heap from a partial snapshot.  This happens
through the partial snapshot cache.  A startup snapshot and a
partial snapshot are created together so that the startup snapshot
contains the partial snapshot cache entries needed.
Review URL: http://codereview.chromium.org/548149

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 08:25:48 +00:00
kmillikin@chromium.org
97e3aae5ef Refactoring and small optimization of the smi code for binary op stubs
on ia32.

1. Operate on the values in edx,eax when possible (all operations
except DIV and MOD).  This saves moving them on entry and when falling
out to the non-smi code.

2. Do not perform ADD and SUB before the smi check of their inputs.
This saves undoing the operation in the case that we fall through to
the non-smi case due to non-smi inputs (probably common?), and we can
avoid emitting the smi check code twice (code size reduction).

3. Don't perform OR twice (once to smi check the inputs and once to
smi check the result).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 14:43:40 +00:00
ager@chromium.org
400b62a1f7 Implement unary addition in the full (non-optimizing) code generator.
Review URL: http://codereview.chromium.org/555099

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 13:57:11 +00:00
sgjesse@chromium.org
c16974e0f3 Alow long running test to time out on ARM
This test have been timing out on ARM hardware from time to time.
Review URL: http://codereview.chromium.org/543206

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 11:45:53 +00:00
sgjesse@chromium.org
cf78ed05ee Don't pass the "at start" parameter to native RegExp
As the start index is already passed it is easy to calculate the "at start" boolean in generated code. Also as direct entry has been implemented this needs to be done in generated code anyway, and therefore might as well be moved to the generated code for RegExp. The "at start" value is now calcualted as a local variable on the native RegExp frame based on the value of the start index argument.

The x64 version have been tested on both Linux and 64-bit Windows Vista.

For ARM I have tested cctest/test-regexp on ARM hardware, but the rest of the tests have only been run on the ARM simulator.
Review URL: http://codereview.chromium.org/554078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 11:08:42 +00:00
kaznacheev@chromium.org
c33dfa5a1d Support register arguments in more cases.
1. MUL and DIV on SMIs.
2. When calling GenericBinaryOpStub from a virtual frame.
3. When generating code for a loop counter.
Overall performance gain is about 0.6%.
Review URL: http://codereview.chromium.org/555098

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 10:27:27 +00:00
erik.corry@gmail.com
2f0ad64db9 Increase young generation size on Android.
Review URL: http://codereview.chromium.org/556018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 10:03:44 +00:00
whesse@chromium.org
439ab839ba Load HeapNumbers directly into floating-point registers in BinaryOpSlowCase.
Review URL: http://codereview.chromium.org/549147

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-26 09:31:40 +00:00