Commit Graph

54 Commits

Author SHA1 Message Date
mikhail.naganov@gmail.com
33f54fa6e2 X64: enable stack sampling in profiler.
Added necessary code to initialize Top::js_entry_sp value.
Renamed 'test-log-ia32' test to 'test-log-stack-tracer' and enabled it in 64-bit version.

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


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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-31 11:06:17 +00:00
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
lrn@chromium.org
72de7ab74e Separate native and interpreted regexp by compile time flag, not runtime.
Clean-up of RegExp code.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 08:11:19 +00:00
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
mikhail.naganov@gmail.com
e48095b87c Implement a dynamically growing memory log buffer with an upper limit.
The goal of this change is to allow longer profiling sessions and preserve memory when profiler isn't started. The buffer starts with 64K and grows until it reaches the upper limit, which is currently set to 50MB --- according to my evaluations, this is enough for at least 20 minutes of GMail profiling. As we're planning to introduce compression for the profiler log, this time boundary will be significantly increased soon.

To make possible unit testing of the new component, I've factored out Logger's utility classes into a separate source file: log-utils.h/cc. Log and LogMessageBuilder are moved there from log.cc without any semantical changes.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-28 07:08:09 +00:00
ager@chromium.org
af59c3d68f Reapply revision 1949. Stupid error.
Add virtual destructor to jump targets to make compiler happy.
Review URL: http://codereview.chromium.org/113396

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 12:18:25 +00:00
ager@chromium.org
c9eda02def Revert revision 1949.
Review URL: http://codereview.chromium.org/115350

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:55:18 +00:00
ager@chromium.org
f4778b007f Reduce the memory used by frame elements from two words to one by
encoding the values in one word and by using an indirection table for
handles.

This reduces compilation time by roughly 10% and we should be able to make the slow case equality checking of frame elements faster as well.
Review URL: http://codereview.chromium.org/115347

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 11:43:09 +00:00
mikhail.naganov@gmail.com
bf63b8f173 Introduce internal Log class that handles writing log messages, enable logging to memory buffer.
This will enable reading profiler log in Chrome. The current implementation of memory buffer is trivial (fixed size buffer, no memory recycling) but enough to start end-to-end DevTools Profiler implementation. Later it will be enhanced.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 15:57:47 +00:00
deanm@chromium.org
2b56660a8b Introduce two separate classes of processor detection:
- TARGET, the architecture we will generate code for.
  This is brought it from the build system.
- HOST, the architecture our C++ compiler is building for.
  This is detected automatically based on compiler defines.

This adds macros for 32 or 64 bit, and cleans up some
include conditionals, etc.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 12:06:20 +00:00
sgjesse@chromium.org
a470847226 Added better version information
The current version is now held in src/version.cc in a number of defines which needs to be modified when changing version.

The following defines make up the version information:

  MAJOR_VERSION
  MINOR_VERSION
  BUILD_NUMBER
  PATCH_LEVEL
  CANDIDATE_VERSION

The first four are numbers and the fifth is a boolean. Besides these five the define

  SONAME

can be used to set a specific soname when building the a shared library (see below). This will most likely be used on stable branches where binary compatibility is ensured between different versions. This define is a string.

This version information is now read by the SCons build to support setting the soname for a Linux shared library. This requires passing the option soname=on to the SCons build.

When soname=on is specified the soname for the shared library can be set in two different ways. Either it will be the full versioned library name (e.g. libv8-1.2.2.so) or a specific soname defined in src/version.cc. Whenever a shared library is build with an soname the filename of the library will hold the full version name (e.g. libv8-1.2.2.so).

I did not update the xcode project with the new files.

BUG=151
Review URL: http://codereview.chromium.org/100104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 09:29:15 +00:00
lrn@chromium.org
976a9025e4 Fix .gyp file and avoid adding -m32 on 32 bit systems.
Fix SConstruct to only add -m32 if the compiler needs it.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 15:20:37 +00:00
lrn@chromium.org
ea56336518 Create build structure for X64.
Possible to attempt to build for X64.
Build will be unsuccessful, since all x64 source files are
missing and pointers are reinterpreted as integers everywhere.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 13:11:48 +00:00
christian.plesner.hansen@gmail.com
1f7e96743d - Extended lazy loading to general objects, not just functions.
- Added lazily loaded JSON object.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 08:13:09 +00:00
lrn@chromium.org
a4d756a1c8 Move backend specific files to separate directories.
Move ia32 and arm specific files to subdirectories to make it easier to add more backends.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 12:06:38 +00:00
sgjesse@chromium.org
8c7ca1dd92 Add missing files to the Visual Studio ARM simulator project.
Review URL: http://codereview.chromium.org/93007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 11:39:47 +00:00
mikhail.naganov@gmail.com
3c2a7bdf21 Add name inference for anonymous functions to facilitate debugging and profiling of JS code.
Currently function name inference is wired with AST optimization pass to avoid introducing another pass over AST. A better solution would be to rewrite AST visitors so they can be naturally combined together in a single pass, as their current implementation doesn't allow it.

For examples of cases where function names can be inferred, see the tests file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 00:51:59 +00:00
sgjesse@chromium.org
34064c821a Remove the PCRE_STATIC define.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/62103

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 16:01:45 +00:00
sgjesse@chromium.org
745cccdcba Fix developer shell build on Windows.
Fixed the OS check in the SCons build. Moved SetEnvironment to platform file as Windows does not have setenv. Added the d8-windows.cc to the Visual Studio project.
Review URL: http://codereview.chromium.org/57050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 11:45:20 +00:00
mikhail.naganov@gmail.com
0554042907 Fixed projects after adding oprofile-agent* sources.
Review URL: http://codereview.chromium.org/40159

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 11:35:44 +00:00
sgjesse@chromium.org
92aa4ab36c Add V8 debugger agent.
The debugger agent listens on a TCP/IP port for a remote debugger connection. When such a connection is established the debuger JSON protocol is communicated between the agent the the remote debugger. The messages containing the JSON protocol has a RFC-822 like header with a Content-Length field and with the body containing the JSON in UTF-8 encoding.

The D8 shell has option --debugger-agent to start the debugger agent.
Review URL: http://codereview.chromium.org/27355

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 12:23:45 +00:00
kmillikin@chromium.org
f4735247cf Merge from experimental code generator branch to bleeding edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 13:00:32 +00:00
mikhail.naganov@gmail.com
632d4e4f3d Adding unit tests for profiler's stack tracer.
The testing is a bit tricky because we need to obtain a frame
pointer (EBP on IA-32) from inside of a function. This is especially
interesting in case of a compiled JavaScript function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:00:21 +00:00
erik.corry@gmail.com
bbc2a73f31 Remove JSCRE
Review URL: http://codereview.chromium.org/21504

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 08:08:01 +00:00
sgjesse@chromium.org
be059966c1 Add socket support to platform code.
The new Socket class is an encapsulation of the standard BSD socket API. As it depends on platform specific include files and have some slight platform variations it is part of the platform code.

On Mac OS only the option SO_REUSEADDR is set to true for server sockets. Running the test required it as the bound listener socket would sometimes end up in TIME_WAIT. On Windows and Linux this has never been observed (given the client end of the socket is closed before the server end).

The code has been tested on Windows, Linux and Mac OS. The FreeBSD version is a copy of the Linux version but has not been compiled nor tested.

Missing Xcode project updates.
Review URL: http://codereview.chromium.org/27085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:32:01 +00:00
sgjesse@chromium.org
85584333f9 Support for building V8 with MinGW
V8 can now be build with MinGW. It still fails the following four tests in debug mode:

  mjsunit/parse-int-float
  mjsunit/mirror-array.js
  mjsunit/integer-to-string.js
  mjsunit/regress/regress-114.js

Building with MinGW has been tested with version 5.1.4 using GCC 3.4.5.

In addition to supporting MinGW this change also makes it more explicit which targets needs to link with which libraries.

BUG=64
Review URL: http://codereview.chromium.org/20177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 15:06:07 +00:00
maruel@chromium.org
4c8cd0d346 Fix snapshot generation on Visual Studio. Compiling source files generated
inside the same project is flaky with VisualStudio when building with
Incredibuild.
So I splitted the mksnapshot.exe generation, snapshot.cc generation and
snapshot.cc compilation in three different projects.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-27 16:20:10 +00:00
lrn@chromium.org
21d2865757 Separately growing stack for irregexp ia32 backtrack stack.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-12 13:05:23 +00:00
sgjesse@chromium.org
e0c7b0f366 Added command line debugger to D8 shell.
break location [condition]
  clear <breakpoint #>
  backtrace [from frame #] [to frame #]]
  frame <frame #>
  step [in | next | out| min [step count]]
  print <expression>
  source [from line [num lines]]
  scripts
  continue
  help

It is enabled through the option --debugger which is on by default.
Review URL: http://codereview.chromium.org/14509

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 10:06:49 +00:00
sgjesse@chromium.org
1d388d0778 Moved the code generation for debug break stubs from builtins* to debug*. From builtins* all code generation delegate to debug*. Added files debug-ia32.cc and debug-arm.cc for platfoem specific code generation of debugger stubs.
Removed a dead file reference (frames-ia32-inl.h) from the Visual Studio project.

Updated the ARM Visual Studio project to build again by adding all the RegExp files.
Review URL: http://codereview.chromium.org/13657

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 11:12:14 +00:00
sgjesse@chromium.org
a56ced1b87 Added regexp-macro-assembler-tracer .cc and .h files to Visual Studio project to make it build.
Review URL: http://codereview.chromium.org/13047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 14:28:04 +00:00
erik.corry@gmail.com
49d05495d8 * Remove an unused layer of abstraction by not having both a macro assembler and
an assembler when compiling to bytecode.  This fixes
  http://code.google.com/p/v8/issues/detail?id=165
* Preload the 'current character' register when starting a match (byte code only
  at the moment).
Review URL: http://codereview.chromium.org/10995

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 10:37:06 +00:00
lrn@chromium.org
4eb1913cea New regexp files are now included in VS project.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 12:08:13 +00:00
sgjesse@chromium.org
112e9ebbe5 Fixed Visual Studio build with snapshot when V8 is checked out in a directory with spaces in the path.
Review URL: http://codereview.chromium.org/12428

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 10:59:02 +00:00
feng@chromium.org
47c71e84a8 Some fixes in ARM simulator:
1) create a simulator per thread and using thread storage;
2) capitalize two function names;
3) use sscanf instead of sscanf_s in arm simulator;
4) disable warning of sscanf when building with arm simulator;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-12 22:57:04 +00:00
feng@chromium.org
b7a0a9f347 Add ARM simulator build files.
Review URL: http://codereview.chromium.org/9669

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-07 17:21:11 +00:00
feng@chromium.org
c1d5bcd852 Remove ARM files.
Review URL: http://codereview.chromium.org/9486

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-07 17:18:22 +00:00
kasperl@chromium.org
a2be3b6f84 Make sure that allocations through CALL_HEAP_FUNCTION
and runtime calls from JavaScript will always succeed
eventually if we have enough memory.
Review URL: http://codereview.chromium.org/8700

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 09:15:58 +00:00
sgjesse@chromium.org
2c3fdd8e25 Added a Visual Studio project for the d8 developer shell. Currently without readline support.
Review URL: http://codereview.chromium.org/7984

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 07:52:59 +00:00
sgjesse@chromium.org
711ada81d1 Minor fixes
- support changes to js2c in Visual Studio build
  - handle empty handles in Utf8Value
  - add /nologo to sample link in SCons build

TBR=plesner
Review URL: http://codereview.chromium.org/7816

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 15:24:58 +00:00
kasperl@chromium.org
9a63d930e3 Add codegen-arm.h and codegen-ia32.h to VS project file.
Review URL: http://codereview.chromium.org/7063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-10 06:40:11 +00:00
sgjesse@chromium.org
a834f77210 Fixed wrong filename in Visual Studio project file.
Review URL: http://codereview.chromium.org/6336

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-08 07:36:44 +00:00
sgjesse@chromium.org
b8a89fa3f2 Fixed the path for include files v8.h and v8-debug.h in Visual Studio project.
Review URL: http://codereview.chromium.org/6601

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-03 08:31:19 +00:00
sgjesse@chromium.org
d759938461 Changed optimization from /Ox to the (more) commonly used /O2 (which includes
/GF) in both SCons and Visual Studio build. There is not mesurable difference
neither in speed nor in code size.

Added whole program optimization to the SCons release build. This clutters the
linking of the samples a little with the option /LTCG. This option is not
strictly needed for linking, but if it is not specified the linker complaints
as it can see object files compiled with /GL and then restarts itself with
/LTCG which dosen't look very pretty.
Review URL: http://codereview.chromium.org/5664

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-02 09:41:01 +00:00
deanm@chromium.org
d8eddaa0bd Enable string pooling in the VS release build. This saves 46k for a v8_shell_sample.exe, I didn't measure performance or the overall change to a Chromium build. I think this option should always make sense anyway, unless we're using some string constants incorrectly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-23 12:32:43 +00:00
sgjesse@chromium.org
cc8fd0e527 Add assembler.h the the Visual Studio project file.
Review URL: http://codereview.chromium.org/2985

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-19 10:10:21 +00:00
kasperl@chromium.org
b5a72a1645 Generalized the EvalCache into a CompilationCache and enabled
it for scripts too. In the context of Chromium, this should 
have a very positive impact on memory consumption for web apps
that run multiple tabs from the same domain with a lot of the
same JavaScript code.

For now, the cache retirement policy is really simple:
Whenever a mark-sweep collection is started we clear the
cache. This guarantees that this change will not have a
huge negative impact on memory consumption, but it may
not be ideal. We should consider a more sophisticated LRU
scheme.
Review URL: http://codereview.chromium.org/1933

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 10:51:52 +00:00
sgjesse@chromium.org
571bc3edb3 Changed the Visual Studio project files to work when V8 is checked out
to a path containing spaces.

BUG=55
Review URL: http://codereview.chromium.org/2416

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 08:05:45 +00:00