Commit Graph

70 Commits

Author SHA1 Message Date
danno@chromium.org
b063b2d7e8 Fix scoping of v8::HandleScope to prevent use-after-dispose
R=jkummerow@chromium.org
TEST=shell_g doesn't crash

Review URL: https://chromiumcodereview.appspot.com/9959014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-30 13:49:40 +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
mikhail.naganov@gmail.com
f6c063e143 Avoid creating shell name every time in shell sample.
R=mnaganov@chromium.org

Signed-off-by: Thiago Farina <tfarina@chromium.org>

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-02 18:50:24 +00:00
jkummerow@chromium.org
dda2889ba1 Refactor .gyp files:
common.gypi now contains global target defaults and is included by all .gyp files;
standalone.gypi contains definitions for stand-alone v8 builds.
This fixes d8 for the ARM simulator.

TEST=compiles and tests pass on all platforms

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-25 14:50:09 +00:00
yangguo@chromium.org
021bbce1aa Simplified the sample shell. Resort to D8 shell for tests instead.
Review URL: http://codereview.chromium.org/7354022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-19 11:13:26 +00:00
jkummerow@chromium.org
1a849d2754 Make GYP build usable for day-to-day work (second attempt)
- Introduce a global Makefile that triggers GYP-based building
- Some fixes to .gyp[i] files to make everything work
- tools/test-wrapper-gypbuild.py as a temporary solution for easy testing

Original review URL: http://codereview.chromium.org/7383006/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-05 09:44:30 +00:00
jkummerow@chromium.org
7ac9dfcc81 Revert "Make GYP build usable for day-to-day work"
This reverts r8674 due to failures on the buildbots.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 16:39:41 +00:00
jkummerow@chromium.org
93c5c5fa23 Make GYP build usable for day-to-day work
- Introduce a global Makefile that triggers GYP-based building
- Some fixes to .gyp[i] files to make everything work
- tools/test-wrapper-gypbuild.py as a temporary solution for easy testing

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-18 14:19:48 +00:00
yangguo@chromium.org
3cbd1a1d30 sample shell does not link against shared lib due to latest change
Review URL: http://codereview.chromium.org/7366004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 10:46:45 +00:00
ricow@chromium.org
5d024ca5d2 Fix memory leak from sample/shell.cc.
We did not dispose the semaphores used in SourceGroup
Review URL: http://codereview.chromium.org/7366002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 09:00:11 +00:00
vegorov@chromium.org
29801d4e9b Correctly propagate toolchain setting in SConstruct.
Patch by Bert Belder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-06 12:36:05 +00:00
vegorov@chromium.org
fb32b10b4c Fix SConstruct to pass correct defines to samples/preparser when building with library=shared.
Fix shell sample build with library=library.

R=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 11:53:54 +00:00
jkummerow@chromium.org
6f66664386 Error checking for length parameter of external array constructors in shell
BUG=v8:1501

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 10:27:14 +00:00
mikhail.naganov@gmail.com
508b22c436 "Deiceolate" Thread classes.
Thread class was receiving an isolate parameter by default.
This approact violates the assumption that only VM threads
can have an associated isolate, and can lead to troubles,
because accessing the same isolate from different threads
leads to race conditions.

This was found by investigating mysterious failures of the
CPU profiler layout test on Linux Chromium. As almost all
threads were associated with some isolate, the sampler was
trying to sample them.

As a side effect, we have also fixed the DebuggerAgent test.

Thanks to Vitaly for help in fixing isolates handling!

R=vitalyr@chromium.org
BUG=none
TEST=none

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:54:04 +00:00
mikhail.naganov@gmail.com
47248cc5fe Revert accidental r8254..r8256
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:42:08 +00:00
mikhail.naganov@gmail.com
f05fd92994 remove isolate reference from threads
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 09:35:31 +00:00
sgjesse@chromium.org
62a65fcc67 Add support for building Xcode project files from GYP files
Removed the current Xcode project file.

Fixed a few places where the C++ compiler supplied with Xcode produced warnings.
Review URL: http://codereview.chromium.org/7134016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 09:07:17 +00:00
mikhail.naganov@gmail.com
f1309b0417 Compress sources of JS libraries in addition to the snapshot.
This saves ~170K on current sources.

R=sgjesse@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-06 20:47:30 +00:00
ager@chromium.org
a4cf6da5d2 linux: extend the ifdefs in shell.cc to cover V8_SHARED too
Review URL: http://codereview.chromium.org/7076030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-30 06:10:41 +00:00
vegorov@chromium.org
3641fa7e59 Use MarkIndependent in sample shell.
Review URL: http://codereview.chromium.org/7043006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-18 15:01:57 +00:00
mikhail.naganov@gmail.com
ec58c05f4e Add support for startup data (snapshot) compression.
This is for mobile platforms where application footprint size is
important. To avoid including compression libraries into V8, we assume
that the host machine have them (true for Linux), and rely on embedder
to provide decompressed data.

Currently, only snapshot data can be comressed. It is also possible to
compress libraries sources, but it is more involved and will be
addressed in another CL.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-29 12:08:33 +00:00
jkummerow@chromium.org
bc8f6943bb Support Float64Arrays
BUG=None
TEST=mjsunit/external-arrays.js; updated cctest; existing unit tests

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-21 07:15:43 +00:00
jkummerow@chromium.org
adf509f159 Make "length" and "BYTES_PER_ELEMENT" properties of typed arrays accessible.
Review URL: http://codereview.chromium.org/6805010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-07 08:24:56 +00:00
ager@chromium.org
cc989aa2fc Expose WebGL typed array constructors in the shell sample
Review URL: http://codereview.chromium.org/6691061
Patch from Jakob Kummerow <jkummerow@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-06 08:31:54 +00:00
karlklose@chromium.org
6de158fc44 Do not try to execute empty programs.
After failing to read a non-existing file, the shell tried to execute the resulting empty program, which resulted in a null pointer dereference. This patch avoids execution of empty programs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-01 11:47:42 +00:00
mmaly@chromium.org
610b510f86 Fix xcode build warning in shell.cc
(out of order initialization).

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 04:36:41 +00:00
sgjesse@chromium.org
aec7de9238 Fix wording in comment
Review URL: http://codereview.chromium.org/6676111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-24 11:19:27 +00:00
sgjesse@chromium.org
b05152a2a4 Make V8 build with the chromium shared library build
Fix the shell to not use functions from the v8::internal namespace when building with V8 in a shared library.

Remove the v8_preparser library. The dependencies for this target needs to be resolved after isolates have landed.
Review URL: http://codereview.chromium.org/6696067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-24 10:54:23 +00:00
vitalyr@chromium.org
04537cb227 Use v8::internal threading support in samples/shell.cc.
We need this for isolates testing. To make it work I had to extend the
internal Thread constructor with an option to set the stack size (see
the comment in shell.cc).

BUG=1264

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-21 15:04:17 +00:00
vitalyr@chromium.org
7976ca2cbc Merge isolates to bleeding_edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 20:35:07 +00:00
vitalyr@chromium.org
76e226f832 Revert r7268: it borked the history.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 19:41:05 +00:00
vitalyr@chromium.org
6ff7fdebd3 Merge isolates to bleeding_edge.
Review URL: http://codereview.chromium.org/6685088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 18:49:56 +00:00
sgjesse@chromium.org
bc9ddf20bb ARM: Port r7089 to ARM
Ensure that there is always enough bytes between consequtive calls in optimized code to write a call instruction at the return points without overlapping.

Add a call to deoptimize all functions after running tests with --stress-opt. This will catch some issues with functions which cannot be forcefully deoptimized. Some of the tests failed on ARM with that change without the rest of the changes in this change.
Review URL: http://codereview.chromium.org/6661022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-10 13:58:20 +00:00
antonm@chromium.org
6b4ff18b5b Properly process try/finally blocks.
In some circumstances, try/finally block can actually catch the exception:

function f() {
  try {
    throw 42;
  } finally {
    return 0;
  }
}

Therefore when propagating exception to v8::TryCatch, we must be sure
there is no try/finally blocks as well.

When bulding the messages we should be more conservative and expect that
any v8::TryCatch with no JS try/catch in between can potentionally
be the right exception handler.

Plus various minor refactorings.

BUG=1147
TEST=cctest/test-api/TryCatchAndFinallyHidingException, cctest/test-api/TryCatchAndFinally

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 11:40:48 +00:00
sgjesse@chromium.org
d9c202752e Initial attempt to add support for using gyp to build V8 itself
This is based on the structore used in chromium with a script wrapping the call to gyp itself and the default processing of common.gypi.

It is possible to build all our targets on Intel Linux for all architectures (ia32, x64 and ARM simulator). When this is committed I wil take a look at Windows.

See the README.txt file in the changelist for the current way of using it.
Review URL: http://codereview.chromium.org/5701001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-14 08:16:39 +00:00
sgjesse@chromium.org
e868984077 Remove a unused function form the sample shell
Review URL: http://codereview.chromium.org/5668001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-08 10:42:32 +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
ager@chromium.org
277b908150 Fix the process sample to actually dispose the contexts used for
processors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-24 09:21:29 +00:00
vitalyr@chromium.org
3260fb9465 Add stack traces to mjsunit tests.
Review URL: http://codereview.chromium.org/2094005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-14 10:00:24 +00:00
ager@chromium.org
4c628ec1bc Fix typo in process sample. The initialization of the map template is
guarded by an IsEmpty check on the request template instead of the map
template.

TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/2036006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-08 14:45:32 +00:00
peter.rybin@gmail.com
16799e203f Mark up debugger support in sample file
Review URL: http://codereview.chromium.org/1569009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-09 13:02:25 +00:00
antonm@chromium.org
a9664cbd0d Making lint happy.
Review URL: http://codereview.chromium.org/593014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-10 11:48:53 +00:00
peter.rybin@gmail.com
cd86e80a35 Don't mention obsolete Issue 548
Review URL: http://codereview.chromium.org/543121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-20 17:06:23 +00:00
peter.rybin@gmail.com
449359b0c2 Fix lineprocessor: compilation
Review URL: http://codereview.chromium.org/549086

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 18:36:51 +00:00
ager@chromium.org
00b6a335b0 Fix Windows build by using OS::StrNCpy.
Fix lint issue in lineprocessor.cc.

TBR=peter.rybin
Review URL: http://codereview.chromium.org/549081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-19 08:03:26 +00:00
peter.rybin@gmail.com
4f47f77d35 Add "lineprocessor" sample program
Review URL: http://codereview.chromium.org/491006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-18 16:45:13 +00:00
iposva@chromium.org
8775634598 Add a "read" extension to the shell programs. This global function
reads the contents of a file into a string and returns it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 21:04:34 +00:00
sgjesse@chromium.org
be7f110adf Remove definition of _HAS_EXCEPTIONS from source files.
The define _HAS_EXCEPTIONS=0 is only required on Windows and is already set in the SCons build file and Visual Studio project files.
Review URL: http://codereview.chromium.org/67116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 14:58:23 +00:00