Commit Graph

74 Commits

Author SHA1 Message Date
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
lrn@chromium.org
0c60c88c2c Working stand-alone preparser.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-24 09:57:06 +00:00
lrn@chromium.org
dc390d0e1f Untemplated preparser.h and made it depend on virtual types.
Extracted preparse-data specification and logging classes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-23 11:46:36 +00:00
floitschV8@gmail.com
1fafbe760d Remove Gay's dtoa from sources.
Farewell.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-22 14:42:07 +00:00
ager@chromium.org
a24d627598 Extract extensions to a separate directory.
Remove extensions from the external reference table. They should never
be part of the serialized code.

Create extensions/experimental subdirectory for experimental
extensions not officially supported by V8.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-17 12:28:30 +00:00
floitschV8@gmail.com
808d00f8ef Bignum implementation of Strtod.
This removes the dependency on Gay's strtod.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-08 11:49:47 +00:00
lrn@chromium.org
f386f97476 Move part of scanner.* into scanner-base.* for reuse in preparser scanner.
Make checks.h not depend on flags.h or global.h (or anything else except
include/v8stdint.h). Only checks.cc has the dependencies (so another
implementation of checks.cc can be provided by the preparser).
Now files depending on checks.h (using ASSERT macros) can include it
directly without depending on all of v8.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-05 13:33:40 +00:00
ager@chromium.org
08da2bd6fb Remove vm-state.cc from build files. Forgot to do that when
removing the file from the repository.
Review URL: http://codereview.chromium.org/3950001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-10-20 06:47:49 +00:00
lrn@chromium.org
2c85faf1ae Refactored string search code.
Made string search state explicit for repreated calls (a StringSearch class).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-29 10:57:23 +00:00
whesse@chromium.org
82309445ad Move code stub implementations from codegen-[platform].cc files to new code-stub-[platform].cc files, and declarations to new code-stub-[platform].h files.
Remaining work is to do the same for platform-independent code stub declarations, and to remove all dependencies on codegen header files from code stub files.
Review URL: http://codereview.chromium.org/3195022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-25 09:44:44 +00:00
kasperl@chromium.org
7b51dc7edb Cleanup the AST code by removing unused parts and get rid of the
flow graph code completely. Add new AST node for null compares
and use it to make the full codegens better at generating code
for null comparisons.
Review URL: http://codereview.chromium.org/3146037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-24 07:26:49 +00:00
ager@chromium.org
3e936b547a Remove experimental fast-codegen. We are no longer working on this
approach.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-13 09:07:09 +00:00
vegorov@chromium.org
7e167a9585 Add object-visiting.cc into GYP/XCode/MSVC project files.
Review URL: http://codereview.chromium.org/3166008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-11 15:18:01 +00:00
yurys@chromium.org
909a447b10 Fix v8_base.vcproj: add dtoa.cc and fixed-dtoa.cc to dtoa project.
Review URL: http://codereview.chromium.org/2086024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 08:20:44 +00:00
mikhail.naganov@gmail.com
decd0fed78 CPU profiler: make code events handling scalable.
I changed the implementation of a queue between the VM and processor
thread to be unbounded and lock-free, using Herb Sutter's example from
DDJ article: http://www.ddj.com/high-performance-computing/210604448
This had brought back profiling overhead to a minimum for the page
from Chromium's issue 16184.

BUG=714

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-22 05:27:19 +00:00
erik.corry@gmail.com
fa7c92eaf5 First step towards making JumpTarget work on ARM. Instead
of having a list of virtual frame pointers in the jump
target we have one virtual frame, which is the frame that
all have to merge to to branch to that frame.  The virtual
frame in the JumpTarget is inside the JumpTarget, rather than
being an allocated object that is pointed to.  Unfortunately
this means that the JumpTarget class has to be able to see
the size of a VirtualFrame object to compile, which in turn
lead to a major reorganization of related .h files.  The
actual change of functionality in this change is intended
to be minimal (we now assert that the virtual frames match
when using JumpTarget instead of just assuming that they do).
Review URL: http://codereview.chromium.org/1961004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 11:32:25 +00:00
mikhail.naganov@gmail.com
c520e28dcb Make VM state tracking to be independent of logging and profiling.
Also pull out VMState into its own set of source files.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-08 13:37:39 +00:00
mikhail.naganov@gmail.com
070ee02057 Add include/v8-profiler.h into manually maintained project files.
Sorry, forgot about it. No need to change v8.gyp because it only
references the whole 'include' directory.

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 17:15:19 +00:00
whesse@chromium.org
75003d7e76 Change a TypeInfo function from inline to non-inline, reducing stack usage during code compilation.
Review URL: http://codereview.chromium.org/1369003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-26 11:34:00 +00:00
kmillikin@chromium.org
70bbac9c56 Move flow graph and helper classes to their own file.
The FlowGraph, FlowGraphBuilder, and flow graph node classes are moved
to src/flow-graph.cc.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 16:22:48 +00:00
erik.corry@gmail.com
f5523ecc6a Split the virtual frame into heavy and light versions.
The heavy version is for x86 and x64.  The light version
is for ARM and MIPS.  Remove the elements_ array from the
virtual frame in the light version.  More simplifications
to come, followed by light register allocation.
Review URL: http://codereview.chromium.org/1164002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 13:18:00 +00:00
fschneider@chromium.org
0737ec8dcb Rename NumberInfo to TypeInfo.
Since we add more type (StringType, PrimitiveType) the name
NumberInfo does not make sense anymore.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 12:44:15 +00:00
fschneider@chromium.org
51495beb78 Store type information with constants.
Instead of testing the value of a constant frame element to determine
the type we compute its type information at construction time.

This speeds up querying the type information during code generation.

This change also adds support for Integer32 constants and sets 
the type information accordingly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-24 15:29:41 +00:00
sgjesse@chromium.org
b278895d28 Update Visual Studio project files.
Review URL: http://codereview.chromium.org/1111011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 13:09:33 +00:00
mikhail.naganov@gmail.com
9582645a02 Add basic C++ implementation of CPU profiler.
Review URL: http://codereview.chromium.org/1079006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-19 09:46:53 +00:00
mikhail.naganov@gmail.com
d2188658ca Re-apply r4159 now with working test on x64
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:15:42 +00:00
fschneider@chromium.org
9f318feb93 Revert r4159 because of x64 test failures.
Review URL: http://codereview.chromium.org/1049003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:04:07 +00:00
mikhail.naganov@gmail.com
ce9298029d Implement circular queues for the C++ version of CPU profiler.
Circular queues serve as a transport for communicating between
VM, stack sampler and analyzer threads. Logging requirements
for VM and stack sampler are completely different, that's why
I introduced two different versions of CQs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 12:25:10 +00:00
mikhail.naganov@gmail.com
12d252eb81 Start migrating profiles processing to C++.
Adding code for maintaining (address -> name) mapping and building
call trees.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 14:11:19 +00:00
kmillikin@chromium.org
bce8d2ebae Remove unneeded variable usage analysis.
A variable usage analysis pass was run on toplevel and lazily-compiled
code but never used.  Remove this pass and the data structures it
builds.

The representation of variable usage for Variables has been changed
from a struct containing a (weighted) count of reads and writes to a
simple flag.  VariableProxies are always used, as before.  The unused
"object uses" is removed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 13:01:24 +00:00
fschneider@chromium.org
893637a057 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
2010-02-26 09:32:48 +00:00
fschneider@chromium.org
226769d8bf Temporarily move the ia32 fast code generator into the platform-specific directory.
This allows us to make changes to one platform without affecting the others.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-19 09:17:37 +00:00
peter.rybin@gmail.com
3849f08ade Add central bridge for liveedit support
Review URL: http://codereview.chromium.org/607004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-17 20:37:08 +00:00
fschneider@chromium.org
dbe99e405a Introduce number type information in the virtual frame.
Each frame element gets a new attribute with number type information. A frame element can be: 

- smi 
- heap number 
- number (i.e. either of the above) 
- or something else. 

The type information is propagated along with all virtual frame operations. 
Results popped from the frame carry the number information with them.

Two optimizations in the code generator make use of the new 
information: 
- GenericBinaryOpSyub omits map checks if input operands are numbers. 
- Boolean conversion for numbers: Emit inline code for converting a number (smi or heap number) to boolean. Do not emit call to ToBoolean stub in this case.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-15 14:24:38 +00:00
kmillikin@chromium.org
41865cd677 Implement simple fast-path code for functions containing this property stores and global variables.
Code is specialized to the initial receiver.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-01 17:01:58 +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
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
kmillikin@chromium.org
1405258621 Rename the fast-codegen* files to full-codegen*.
Review URL: http://codereview.chromium.org/549109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 16:28:21 +00:00
kmillikin@chromium.org
d92fa03eca Move the Location class into the AST Expression class as a member.
Since it is (currently) only an enum, change it to an enum (for now).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-30 08:36:46 +00:00
kmillikin@chromium.org
339e49c0b2 Added first support for tracking locations of expressions in the
fast-mode code generator.

AST expression nodes are annotated with a location when doing the
initial syntactic check of the AST.  In the current implementation,
expression locations are 'temporary' (ie, allocated to the stack) or
'nowhere' (ie, the expression's value is not needed though it must be
evaluated for side effects).

For the assignment '.result = true' on IA32, we had before (with the
true value already on top of the stack):

32  mov eax,[esp]
35  mov [ebp+0xf4],eax
38  pop eax

Now:

32  pop [ebp+0xf4]


======== On x64, before:

37  movq rax,[rsp]
41  movq [rbp-0x18],rax
45  pop rax

Now:

37  pop [rbp-0x18]


======== On ARM, before (with the true value in register ip):

36  str ip, [sp, #-4]!
40  ldr ip, [sp, #+0]
44  str ip, [fp, #-12]
48  add sp, sp, #4

Now:

36  str ip, [fp, #-12]


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-15 16:42:22 +00:00
kmillikin@chromium.org
f74e723599 Initial infrastructure for fast compilation of top-level code. The
fast code generator is optimized for compilation time and code size.

Currently it is only implemented on IA32.  It is potentially triggered
for any code in the global scope (including code eval'd in the global
scope).  It performs a syntactic check and chooses to compile in fast
mode if the AST contains only supported constructs and matches some
other constraints.

Initially supported constructs are

* ExpressionStatement,
* ReturnStatement,
* VariableProxy (variable references) to parameters and
    stack-allocated locals,
* Assignment with lhs a parameter or stack-allocated local, and
* Literal

This allows compilation of literals at the top level and not much
else.

All intermediate values are allocated to temporaries and the stack is
used for all temporaries.  The extra memory traffic is a known issue.

The code generated for 'true' is:

 0  push ebp
 1  mov ebp,esp
 3  push esi
 4  push edi
 5  push 0xf5cca135             ;; object: 0xf5cca135 <undefined>
10  cmp esp,[0x8277efc]
16  jnc 27  (0xf5cbbb1b)
22  call 0xf5cac960             ;; code: STUB, StackCheck, minor: 0
27  push 0xf5cca161             ;; object: 0xf5cca161 <true>
32  mov eax,[esp]
35  mov [ebp+0xf4],eax
38  pop eax
39  mov eax,[ebp+0xf4]
42  mov esp,ebp                 ;; js return
44  pop ebp
45  ret 0x4
48  mov eax,0xf5cca135          ;; object: 0xf5cca135 <undefined>
53  mov esp,ebp                 ;; js return
55  pop ebp
56  ret 0x4

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 19:30:50 +00:00
sgjesse@chromium.org
1bb3f68904 Fix a file name in the Visual Studio project files.
Review URL: http://codereview.chromium.org/266004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-08 07:10:10 +00:00
kmillikin@chromium.org
2c2554ec3c Remove obsolete support for an experimental multipass compiler.
Review URL: http://codereview.chromium.org/255022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 13:24:24 +00:00
mikhail.naganov@gmail.com
abc0bd46f6 Add initial version of retainers heap profile.
The profile is taken together with constructors profile. In theory, it
should represent a complete heap graph. However, this takes a lot of memory,
so it is reduced to a more compact, but still useful form. Namely:

 - objects are aggregated by their constructors, except for Array and Object
   instances, that are too hetereogeneous;

 - for Arrays and Objects, initially every instance is concerned, but then
   they are grouped together based on their retainer graph paths similarity (e.g.
   if two objects has the same retainer, they are considered equal);

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 13:41:24 +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
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
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
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