Commit Graph

31 Commits

Author SHA1 Message Date
mikhail.naganov@gmail.com
30a0a7de43 Split nested namespaces declaration in two lines in accordance with C++ Style Guide.
This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:05:56 +00:00
iposva@chromium.org
90ccd181ae - Fix build break on Mac OS X by using the proper formatting for pointers
by working around slightly "wrong" definition of uintptr_t on Mac OS X.
  Verified that this works on both ia32 and x64 on Linux and Mac OS X.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 16:37:39 +00:00
iposva@chromium.org
e05c2e3693 Start addressing massive arrays on the stack. There is hardly ever
a reason to stack allocate large chunks of stack space.
- Runtime_GetCFrames used to allocate a frame size of 52040 bytes.
- PreallocatedMemoryThread::Run used to allocate 32784 bytes.
- Fixed StringStream overflow conditions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 21:01:05 +00:00
sgjesse@chromium.org
8e34544bd1 Moved stdio and string functions to POSIX platform file.
Review URL: http://codereview.chromium.org/45063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 08:38:02 +00:00
sgjesse@chromium.org
0e5999efae Move time related functions to POSIX platform file.
The functions getrusage, gettimeofday and localtime are in POSIX.1-2001.
Review URL: http://codereview.chromium.org/53045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 09:28:27 +00:00
kmillikin@chromium.org
bc3fb11881 Add basic infrastructure for protecting V8's heap when leaving the VM
and unprotecting it when (re)entering.  The functionality is enabled
by the flag --protect-heap and requires V8 to be built with
ENABLE_HEAP_PROTECTION and ENABLE_LOGGING_AND_PROFILING defined.

Implemented on Linux and Windows but not yet for other platforms.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 12:47:53 +00:00
sgjesse@chromium.org
96088babe7 Add a new "pseudo" platform for POSIX. It it will contain code shared by the platforms supporting POSIX. Currently Linux, Mac OS and FreeBSD are considered POSIX platforms using the POSIX implementation.
Initially the platform socket implementation has been moved from the Linux, Mac OS and FreeBSD platforms to the POSIX platform.

If implementation which ends up in the POSIX platform at some point cannot be the same across POSIX platforms the implementation can easily be moved back into the individual POSIX "complient" platforms.
Review URL: http://codereview.chromium.org/51001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 06:32:00 +00:00
sgjesse@chromium.org
83111deb97 Add support for setting the SO_REUSEADDR option for sockets.
Review URL: http://codereview.chromium.org/50036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 08:53:57 +00:00
sgjesse@chromium.org
881e01b245 Change the socket close to shutdown.
Removed the close method for socket and added shutdown instead. The shutdown method is the one to use when terminating socket communication. The close call is in the destructor.
Review URL: http://codereview.chromium.org/42387

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 11:55:09 +00:00
sgjesse@chromium.org
b6640ad0b5 Fixed memory leaks in socket implementation.
Fixed memory leaks reported by valgring in the socket implementation and socket tests.

BUG=276
Review URL: http://codereview.chromium.org/42331

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 13:32:22 +00:00
sgjesse@chromium.org
b226f1242e Add a close method to sockets.
Now the destructor is not the only way of closing a socket, which was a bit to limited.
Review URL: http://codereview.chromium.org/42330

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 13:11:43 +00:00
olehougaard
74ebdf896c Getting rid of OS::StrDup and OS::StrNDup which were sometimes misused.
Review URL: http://codereview.chromium.org/42329

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 12:50:13 +00:00
sgjesse@chromium.org
d7f9992442 Added a wait with timeout to the platform semaphore class.
The code has been compiled and tested on Windows, Linux and Mac OS.

The FreeBSD version is a copy of the Linux version which should work on FreeBSD as well. According to the FreeBSD documentation clock_gettime is part of the standard C library so the assumption is that no additional link libraries is required for FreeBSD.
Review URL: http://codereview.chromium.org/48123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 09:04:24 +00:00
sgjesse@chromium.org
f87d1530e6 The SendAll method on Socket was a helper method that did not really belong in platform.
Review URL: http://codereview.chromium.org/40104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:33:00 +00:00
sgjesse@chromium.org
ad7ad5cfe0 Fixed lint errors.
The previous commit (r1349) resulted in a number of lint errors - extra whitespace and a missing explicit on a constructor in the test. These has been fixed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 14:22:42 +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
563287b02f Introduced a platform independent version of strchr, as the return value is const on Windows.
This fixes building of D8 on Windows.

Mac OS and FreeBSD changes have not been tested.
Review URL: http://codereview.chromium.org/20534

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 11:31:44 +00:00
mikhail.naganov@gmail.com
a23fd3284a Added the simplest call stack sampling and call profile in tick processor output.
Currently only two stack frames are sampled (current function and its caller).

Output of tick processor looks like this:

 [Call profile]:
   total  call path
   15.2%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: montReduce crypto.js:583
    6.5%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpSquareTo crypto.js:431
    2.9%  Builtin: KeyedStoreIC_Generic  <-  LazyCompile: montReduce crypto.js:583
    2.3%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpMultiplyTo crypto.js:415

Tested under Windows, Linux and OS X.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 14:45:45 +00:00
ager@chromium.org
7a523e2f92 Handle strndup in freebsd in the same way it is handled on other
platforms that do not support it directly.
Review URL: http://codereview.chromium.org/18585

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 11:28:51 +00:00
deanm@chromium.org
b7c1200462 Fix a bunch of spelling mistakes :\
Review URL: http://codereview.chromium.org/18094


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 19:08:34 +00:00
christian.plesner.hansen@gmail.com
f56c10598b Made d8 console=readline work on leopard.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 15:51:16 +00:00
iposva@chromium.org
3fc91f93a9 Remove OS::WcsCpy from platform.h. This function is unused
and is giving us headaches on platforms not supporting wchar_t.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 23:16:26 +00:00
kasperl@chromium.org
88c9fa5d42 Allow platforms (linux and win32) to not force 16-byte alignment
of activation frames (needed on Mac OS X).
Review URL: http://codereview.chromium.org/4211

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-23 10:06:58 +00:00
christian.plesner.hansen@gmail.com
66b18b9975 Fixed arm disassembler build problems.
Fixed lint issue in platform-macos.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 16:41:19 +00:00
christian.plesner.hansen@gmail.com
3764f52a4e Fixed build problem on mac, lint issues and a test failure on win32.
Review URL: http://codereview.chromium.org/2601

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 15:03:22 +00:00
iposva@chromium.org
0157bcd8f8 Fix issue http://code.google.com/p/v8/issues/detail?id=58:
- Prevent a clipping of values when converting a double to an unsigned int
  for use as the random generator's seed value.
Review URL: http://codereview.chromium.org/1887

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-10 06:59:41 +00:00
christian.plesner.hansen@gmail.com
9bed566bdb Changed copyright header from google inc. to v8 project authors.
Added presubmit step to check copyright.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-09 20:08:45 +00:00
erik.corry@gmail.com
388c1094b7 * Split up code_space into old_data_space and code_space.
* Make old_data_space non-executable on OSs and hardware that support it.
* Rename old_space to old_pointer_space (can contain pointers, esp. to new space).
* Ensure that individual pages allocated for old_space are only executable when
they are for code objects.
* Ensure Space::Setup can cope with non-aligned memory.
* Make some methods on Spaces virtual.  Make a way to iterate over all spaces.
* Replace executability flag with Executability enum in order to make intent at
call site clearer.
* Fix serialization/deserialization to allocate write barrier memory for large
arrays.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-05 12:34:09 +00:00
christian.plesner.hansen
c42f5829a1 Included mjsunit JavaScript test suite and C++ unit tests.
In the shell sample don't print the result of executing a script, only
evaluating expressions.

Fixed issue when building samples on Windows using a shared V8
library.  Added visibility option on Linux build which makes the
generated library 18% smaller.

Changed build system to accept multiple build modes in one build and
generate seperate objects, libraries and executables for each mode.

Removed deferred negation optimization (a * -b => -(a * b)) since this
visibly changes operand conversion order.

Improved parsing performance by introducing stack guard in preparsing.
Without a stack guard preparsing always bails out with stack overflow.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-22 13:33:59 +00:00
kasper.lund
7276f14ca7 Changed all text files to have native svn:eol-style.
Added a few samples and support for building them. The samples include a simple shell that can be used to benchmark and test V8.

Changed V8::GetVersion to return the version as a string.

Added source for lazily loaded scripts to snapshots and made serialization non-destructive.

Improved ARM support by fixing the write barrier code to use aligned loads and stores and by removing premature locals optimization that relied on broken support for callee-saved registers (removed).

Refactored the code for marking live objects during garbage collection and the code for allocating objects in paged spaces. Introduced an abstraction for the map word of a heap-allocated object and changed the memory allocator to allocate executable memory only for spaces that may contain code objects.

Moved StringBuilder to utils.h and ScopedLock to platform.h, where they can be used by debugging and logging modules. Added thread-safe message queues for dealing with debugger events.

Fixed the source code reported by toString for certain builtin empty functions and made sure that the prototype property of a function is enumerable.

Improved performance of converting values to condition flags in generated code.

Merged disassembler-{arch} files.


git-svn-id: http://v8.googlecode.com/svn/trunk@8 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-30 08:49:36 +00:00
christian.plesner.hansen
43d26ecc35 Initial export.
git-svn-id: http://v8.googlecode.com/svn/trunk@2 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-03 15:10:15 +00:00