Commit Graph

92 Commits

Author SHA1 Message Date
sgjesse@chromium.org
de7b222e36 Support for precise stepping in functions compiled before debugging was started (step 2)
This change will ensure that full code with debug break slots is compiled and activated for all functions which already have activation frames.

This additional handling is only for functions which have activations on the stack, and that activation is of the full code compiled without debug break slots. In that case the full code is recompiled with debug break slots. It is ensured that the full code is compiled generating the exact same instructions - except for the additional debug break slots - as before. The return address on the stack is then patched to continue execution in the new code.

Also fixed SortedListBSearch to actually use the passed comparision function.

R=svenpanne@chromium.org, kmillikin@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-30 08:39:56 +00:00
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00
kmillikin@chromium.org
2ebe8039ac Add an explicit cast for an integral promotion that MSVC warns about.
I don't think the warning is valid, but it's a good sign that MSVC is
fixin' to generate the wrong code no matter what I think.

R=ricow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-12 12:16:30 +00:00
kmillikin@chromium.org
636991a0b3 Use the BitField class for Code::Flags.
Use the BitField helper class for the code flags, so that we do not have to
define both a shift and a mask explicitly.  This makes changing the flags
layout simpler.

Also, make the 'mask' and 'max' members of BitField into constants, because
they are constant and so that they can be used as constant expressions.
E.g., so they can be used in declaring other const members or in static
asserts.

R=fschneider@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-12 10:50:50 +00:00
ricow@chromium.org
b8cbe08fcc Fix presubmit errors caused by updated depot tools
This is all blank line before/after linting errors.
Review URL: http://codereview.chromium.org/7754022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 19:57:14 +00:00
lrn@chromium.org
c1dc429c02 Fix bug in collector.
Small cleanups in preparser.

TEST=cctest/test-utils/SequenceCollectorRegression

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 13:44:11 +00:00
lrn@chromium.org
81e7f597b0 Reintroduce duplicate identifier detection in preparser.
Duplicate identifier detection must be an early syntax error in strict code,
so errors in otherwise lazily compiled functions must be caught in the
preparser.

Originally introduced in r8541 and reverted in r8542.
Now really compiles on Windows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-07 12:39:53 +00:00
svenpanne@chromium.org
0b55f28e34 Introduce a poor man's version of STL's bitset.
Used in a separate upcoming patch...
Review URL: http://codereview.chromium.org/7472029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-21 13:06:55 +00:00
lrn@chromium.org
57b7a67dba Revert preparser duplicate detection.
Doesn't work on Windows yet.
Crashes some layout-tests.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 09:15:10 +00:00
lrn@chromium.org
57760b8275 Make preparser detect duplicate parameters and object literal properties.
This is a fix and reapply of r8516 with some comments addressed and more
tests added.
The difference from r8516 is that canonicalization of number literals is
no performed using the same methods as in v8, to avoid false positives/negatives
when detecting duplicates.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 08:32:48 +00:00
lrn@chromium.org
877d6198e5 Extract string->double and double->string conversions for use in the preparser.
Review URL: http://codereview.chromium.org/7308004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-05 11:54:11 +00:00
lrn@chromium.org
4f1e60cc75 Revert r8516.
Revision 8516 contained a temporary hack that doesn't work on Windows.

TBR: ricow

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 15:44:21 +00:00
lrn@chromium.org
b6779044c9 Add duplicate parameter detection to preparser.
Add tests for duplicate properties of object initialisers to preparser.

TEST=preparser

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-01 13:46:52 +00:00
fschneider@chromium.org
5a236ce6fd Add support for hydrogen control instructions with >2 successor blocks.
This change makes the number of successors of a control instruction
configurable with a template parameter and changes the existing instructions
to use it.

To iterate over all successors I added an iterator instead of always calling
First- and SecondSuccessor.
Review URL: http://codereview.chromium.org/7114004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:09:48 +00:00
karlklose@chromium.org
799c3e92b9 ARM: Add optimization for constant RHS in DoMulI.
Patch by ARM Ltd.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 07:47:21 +00:00
ager@chromium.org
6f775f2fb0 Fix calls of strict mode function with an implicit receiver.
Only IA32 version for now. I'll start porting.

Strict mode functions are to get 'undefined' as the receiver when
called with an implicit receiver. Modes are bad! It forces us to have
checks on all function calls.

This change attempts to limit the cost by passing information about
whether or not a call is with an implicit or explicit receiver in ecx
as part of the calling convention. The cost is setting ecx on all
calls and checking ecx on entry to strict mode functions.

Implicit/explicit receiver state has to be maintained by ICs. Various
stubs have to not clobber ecx or save and restore it.

CallFunction stub needs to check if the receiver is implicit when it
doesn't know from the context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 14:01:36 +00:00
kmillikin@chromium.org
d0fcbb4ece Simplify include dependencies.
Try to make sure that accessors.h, data-flow.h, list-inl.h, and
scopeinfo.h are included only where needed, but without introducing
implicit dependencies.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-03 08:23:58 +00:00
vitalyr@chromium.org
a9ea3f98b0 ll_prof: Reduce profiling hooks overhead from >400% to 25%.
Switched to using binary low-level log instead of the textual log used
by the ticks processor. The binary log contains code-related events,
code object names, and their bodies. When writing to the log we ask
glibc to use a larger buffer. To avoid complex processing of the
snapshot log (which is still textual) the serializer emits final
snapshot position to code name mappings that can be quickly be read
without replaying the snapshot log. (This might be useful for the
ticks processor.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 16:06:25 +00:00
karlklose@chromium.org
bb1fe3ed9c Revert revision 7582.
The changes caused mozilla date test failures on ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-13 08:00:59 +00:00
karlklose@chromium.org
72fff00e48 ARM: Add optimization for constant RHS in DoMulI.
Patch by ARM Ltd.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-12 06:44:15 +00:00
karlklose@chromium.org
12615106d7 Revert r7288.
TBR=ager
Review URL: http://codereview.chromium.org/6709060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-21 16:10:05 +00:00
karlklose@chromium.org
93d4776d46 ARM: Add optimization for constant RHS in DoMulI.
Patch by ARM Ltd.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-21 14:31:15 +00:00
vitalyr@chromium.org
b604befe61 Always inline BitCast.
Review URL: http://codereview.chromium.org/6688064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-21 09:59:29 +00:00
vegorov@chromium.org
2c93e885f3 Switch from template functions overloading to partial template specialization.
This should fix compilation on old GCC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 20:47:53 +00:00
lrn@chromium.org
c9928c0595 Change scanner buffers to not use utf-8.
Make preparser keep its symbol text itself instead of relying on the scanner.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 20:14:19 +00:00
kasperl@chromium.org
90b3370374 Update V8 to version 3.0 (re-land r5920).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096 Revert r5920. Will re-land shortly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8 Update V8 to version 3.0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00
mikhail.naganov@gmail.com
1cfc63cf8a New heap profiler: implement fast retaining sizes approximation.
Approximation is done by building a dominators tree for the heap graph.
Dominator nodes and retained sizes are serialized into JSON.

Removed:
 - reachable size (it is useless, after all);
 - HeapEntryCalculatedData (size is now stored in the node, retaining
   paths in a hash map);

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-22 14:00:40 +00:00
lrn@chromium.org
af7b6fecfe Split globals.h into two parts, where only one depends on V8.
Made allocation.{h,cc} independent of V8, allowing utils.h to allocate
vectors and collectors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-15 13:23:30 +00:00
lrn@chromium.org
8f8039574a Split utils.h into utils.h and v8utils.h where the former is independent of V8.
The code in utils.h can be reused outside of v8 propert, as long as the
propert ASSERT macros are defined.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-05 08:18:53 +00:00
erik.corry@gmail.com
d46fb9d454 New attempt to make the allocation routines 64 bit clean.
This one has been approved by the 64 bit compiler in MSVC
2005 so I hope it also passes the 2008 version.

The --max-new-space-size option is now in kBytes.
The --max-old-space-size option is now in MBytes.

Some issues remain with 64 bit heaps and the counters.  See
http://code.google.com/p/v8/issues/detail?id=887
Review URL: http://codereview.chromium.org/3573005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-30 07:22:53 +00:00
erik.corry@gmail.com
2d0c23bc82 Revert attempt to make heap size 32/64 clean. This change needs to
be done from Windows where the compiler is stricter about truncating
changes.
Review URL: http://codereview.chromium.org/3454035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-28 12:49:25 +00:00
erik.corry@gmail.com
d6313dbbb7 More changes to 32/64 bit correctness.
TBR=vegorov
Review URL: http://codereview.chromium.org/3412038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-28 12:18:19 +00:00
erik.corry@gmail.com
28d7064856 More correctness around PrintF and 32/64 bit values.
Fix test after 64 bit heap size change.
Review URL: http://codereview.chromium.org/3432032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-28 11:44:30 +00:00
lrn@chromium.org
cb514b72db Made predata smaller by storing symbol data in variable length base-128.
Remove position from symbol data - they must come in the correct order anyway.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-15 10:54:35 +00:00
lrn@chromium.org
7b89a5f2b8 Reordered function entries in PreParse data to be ordered by start position.
Also add skip to entry, to skip pre-data for the body of the function.
Preparser data is now only accessed linearly, in the same order it was created.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-27 08:26:29 +00:00
lrn@chromium.org
23d0abb040 Ensure that scanner state is correctly reset when an error is encountered.
Add a scope object to ensure that leaving a literal scanning prematurely
will clean up after itself.
Also reset the literal buffer if a scanner is reinitialized with a new
source code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-24 12:29:50 +00:00
lrn@chromium.org
b1e27e2cd5 Created collector class and used it to collect identifiers during scanning.
The collector class automatically expands to hold the values added to it,
like a List, but doesn't ensure that the backing store is contiguous, which
allows it to avoid copying back and forth as the buffer grows.

This is in preparation for identifyng identical symbols during preparsing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-24 10:53:44 +00:00
ager@chromium.org
9d5a72673a Fix indentation in utils.h.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-19 08:49:26 +00:00
ager@chromium.org
cc475ecf47 Landing for Ryan Dahl.
Remove const from BitCast.

Fixes build for old GCCs.

Review URL: http://codereview.chromium.org/3130033/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-19 08:14:29 +00:00
lrn@chromium.org
abcf1012c6 Allow compiling with strict aliasing enabled on GCC 4.4.
Patch by Jay Freeman.
Fixes issue 463.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-11 10:52:34 +00:00
sandholm@chromium.org
4695ef1a09 Change kMinComplexMemCopy to 64 for IA32. It's just better.
Review URL: http://codereview.chromium.org/2818028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 11:21:58 +00:00
erik.corry@gmail.com
142de62819 ARM: Be more smart about switching instructions when immediates
don't fit in the instruction.  Use ubfx and sbfx more.
Review URL: http://codereview.chromium.org/2826001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 11:20:36 +00:00
vegorov@chromium.org
53923e9233 Revert r4782. Fix issues 728, 732.
Review URL: http://codereview.chromium.org/2701003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 09:36:30 +00:00
lrn@chromium.org
d3d295efa7 Add optimized version of memcpy on ia32.
Only used in one place right now.
Still room for tweaking.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:30:55 +00:00
antonm@chromium.org
1e744a3011 Turn some usages of NewArray with DeleteArray in the same scope into ScopedVector or SmartPointer.
That makes it easier to maintain the code---one should care less
about releasing the memory as smart pointers would take care of
this.

Switch to ScopedVector instead Vector for the same semantics in
src/builtins.cc

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 12:25:58 +00:00
vegorov@chromium.org
238b211274 Reapplying changes from r4318
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/1656003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 07:26:20 +00:00
vegorov@chromium.org
82ddab5fd5 Reverting r4318 (merge of scavenge into sweeping pass of MSC garbage collector)
Review URL: http://codereview.chromium.org/1622016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-09 08:16:25 +00:00
vegorov@chromium.org
6d3cdbbf98 Merging scavenge into sweeping phase of mark-sweep(-compact) collector.
Should reduce full GC pauses. 
Review URL: http://codereview.chromium.org/1217011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-30 12:01:06 +00:00