Commit Graph

65 Commits

Author SHA1 Message Date
yangguo@chromium.org
922efe43ed Simplify line editor choice in d8.
R=rossberg@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:40:24 +00:00
svenpanne@chromium.org
52d10a68cb Add Isolate parameter to Persistent class.
BUG=v8:2487

Review URL: https://codereview.chromium.org/12033011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-25 08:31:46 +00:00
svenpanne@chromium.org
fab9a39d9d Make the Isolate parameter mandatory in Locker and Unlocker classes.
Note that leaving out the Isolate parameter previously had a very special
meaning, namely "use the *default* Isolate", i.e. the one magically created at
program initialization time. All other API entries use the meaning "current
Isolate", which is different in a multi-threaded setting and confusing.

Temporarily disabled deprecations until Chrome is ready.

BUG=v8:2487

Review URL: https://codereview.chromium.org/11970009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-18 07:20:17 +00:00
yangguo@chromium.org
14ed983753 Enable readline on d8 while building a shared lib.
This patch enables readline on d8 except for completion support.
It sould be useful enough for history and line editing.

This is related to V8's issue 1781 (http://code.google.com/p/v8/issues/detail?id=1781), not chromium's.

BUG=1781

Review URL: https://chromiumcodereview.appspot.com/11776017
Patch from Luis Reis <luis.m.reis@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-08 15:24:17 +00:00
yangguo@chromium.org
c412264c4a Fix counters in d8.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-22 08:35:21 +00:00
svenpanne@chromium.org
7e6dd6db1e Drastically reduce the number of created strings in d8, 2nd attempt.
This also reduces the number of TLS accesses, so it is a double-win. We have
230k less TLS accesses while running Octane now, so we are down to 23% now
compared to the start of these TLS-related CLs.

To get things right in the presence of multiple Isolates, we have to thread the
correct Isolate through several layers. This threading wasn't that bad after
all, it keeps one honest about the real depdencies. The only ugly thing is that
in ExternalArrayWeakCallback we have to conjure up the current Isolate from the
TLS, but this is a know API deficiency.

Introduced a tiny helper function for throwing on the way.

Review URL: https://codereview.chromium.org/11418088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-20 14:47:56 +00:00
ulan@chromium.org
bac8e56f8d Fix test failures introduced by r12342.
Add missing context disposed notifications in test-api.
Move send-idle-notification flag to d8 options so that it is available in d8
when v8 is build as a shared libarary.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 13:19:52 +00:00
sanjoy@chromium.org
693c7643d2 Optimize functions on a second thread.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 18:58:23 +00:00
danno@chromium.org
aae81e125b Add counters that automatically track object sizes and counts.
Review URL: https://chromiumcodereview.appspot.com/10702168

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 12:22:09 +00:00
rossberg@chromium.org
cc5a88812d Implement typedarray.set and arraybuffer.slice for d8.
R=yangguo@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-03 13:44:36 +00:00
yangguo@chromium.org
947cf3930f Fix isolate build.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-29 09:15:52 +00:00
rossberg@chromium.org
680797234c Further extend TypedArray support in d8:
- Add copy constructors.
- Add subarray methods.
- Make instanceof and constructor property work.
- Rename PixelArray to Uint8ClampedArray.

Also fix broken definition of assertInstanceof in MJSUnit test harness.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-28 16:29:53 +00:00
rossberg@chromium.org
f6017d36f2 Clean up d8 ArrayBuffer implementation and fix bug in readbuffer:
- Separate CreateExternalArrayBuffer function.
- Properly create buffers for arrays constructed with size argument only.
- Finalization of data array is tied to buffer object exclusively.
- Get rid of hidden buffer reference in array objects and size header in data.
- Use 'new' instead of 'malloc' in readbuffer.
- Test cases for additional array and buffer properties.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-01 11:46:05 +00:00
yangguo@chromium.org
50063d30c4 Ensure integrity of ASCII strings.
BUG=v8:2128
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-22 12:49:20 +00:00
rossberg@chromium.org
1016c4a285 Add a readbuffer function to d8, that reads a file into an ArrayBuffer.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-15 11:00:30 +00:00
yangguo@chromium.org
4aa558f22d Introduce readbinary function in d8 to read binary files.
Review URL: https://chromiumcodereview.appspot.com/9283015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-24 11:55:11 +00:00
yangguo@chromium.org
af98ee9492 Enable asynchronous remote debugging with d8.
BUG=v8:1691
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-20 11:59:00 +00:00
yangguo@chromium.org
73ac99286d Remove limit for d8 shell input length.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-17 13:37:09 +00:00
danno@chromium.org
6ce13906dc Add primitive WebGL ArrayBuffer() support to d8
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-11 14:42:58 +00:00
yangguo@chromium.org
e53841104d Fixing d8's broken readline history.
Review URL: http://codereview.chromium.org/7885026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 14:39:56 +00:00
yangguo@chromium.org
b910f4317e Reverting r9272.
Review URL: http://codereview.chromium.org/7889033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 11:27:14 +00:00
yangguo@chromium.org
9d235c9dd7 Fixed broken readline console history.
Review URL: http://codereview.chromium.org/7888035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-14 11:05:07 +00:00
yangguo@chromium.org
113434a6e6 Fixing parallel execution in d8 (with -p) and some memory leaks.
Review URL: http://codereview.chromium.org/7891005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-13 13:16:13 +00:00
fschneider@chromium.org
e74033d9cc Fix some valgrind errors in d8 shell.
This fixes 3 possibly lost warnings occurring when running unit tests under d8:

 28 bytes in 1 blocks are possibly lost in loss record 40 of 68
  at 0x67FB8DB: operator new[](unsigned int)
  by 0x83865CC: v8::Shell::SetOptions(int, char**) (d8.cc:1200)
  by 0x83869A5: v8::Shell::Main(int, char**) (d8.cc:1276)
  by 0x8386B31: main (d8.cc:1333)
Review URL: http://codereview.chromium.org/7780032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-13 09:31:41 +00:00
mikhail.naganov@gmail.com
f8e5c71e18 Rename SmartPointer to SmartArrayPointer.
As pointed out in: http://codereview.chromium.org/7754007/#msg5

"SmartPointer should have been named SmartArrayPointer as it expects an input
allocated using new[] and deallocates it using delete[]. Using it as a simple
scoped pointer for a single object is incorrect."

R=mnaganov@chromium.org

Review URL: http://codereview.chromium.org/7860011
Patch from Thiago Farina <tfarina@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-09 22:39:47 +00:00
vitalyr@chromium.org
2063e14c15 Release memory of semaphores and thread pointers by using 'delete' instead of SmartPointer.
As pointed out in: http://codereview.chromium.org/7754007/

SmartPointer expects an input allocated using new[] and deallocates it using delete[].
So using SmartPointer for deleting T* here is incorrect. Fix it now.

R=vitalyr@chromium.org

Review URL: http://codereview.chromium.org/7846022
Patch from Thiago Farina <tfarina@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 22:44:03 +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
080628d32f Fix memory leak from d8 shell.
We were not disposing the semaphores and the thread used in SourceGroup.

R=mnaganov@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 13:51:06 +00:00
yangguo@chromium.org
ca67c5a23d Functions in d8 to turn the profiler on/off (enableProfiler() and disableProfiler()).
Review URL: http://codereview.chromium.org/7851011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-08 08:54:28 +00:00
mikhail.naganov@gmail.com
58824435d1 Pick the namespace alias 'i' from v8.h.
These files already include v8.h so they don't need to define the
namespace alias again.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-12 09:49:55 +00:00
yangguo@chromium.org
76aad1a07b Fixed a known issue in D8 (read file), enabled D8 shared library build on Windows.
Review URL: http://codereview.chromium.org/7586001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 09:34:18 +00:00
yangguo@chromium.org
e8bf31427b Introduces a light version of D8 that links against shared library.
Review URL: http://codereview.chromium.org/7351017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-14 15:43:40 +00:00
yangguo@chromium.org
8330176f3f ported --isolate option to d8 and refactored to group together option parsing
TEST=tools/test.py -j15 --shell d8 --isolates

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 07:38:09 +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
yangguo@chromium.org
61c7b030e9 reverting revision r8454
Review URL: http://codereview.chromium.org/7218042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 08:45:22 +00:00
yangguo@chromium.org
e6dbce1190 added the --test option for d8 into tools/test.py
TEST= tools/test.py --shell d8 -v

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-29 08:22:36 +00:00
yangguo@chromium.org
310ed9ebba removed some unnecessary stuff from d8's initialization
and got rid of the utility context unless interactive shell is used

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-24 20:04:32 +00:00
yangguo@chromium.org
3f80bacffb added --stress-opt option to d8
Review URL: http://codereview.chromium.org/7134040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 14:28:49 +00:00
mikhail.naganov@gmail.com
59485c1060 Add snapshot compression support into d8.
I'm not bothering with compressing d8.js, since it makes no sense,
but it is also possible.

R=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-08 09:00:25 +00:00
mikhail.naganov@gmail.com
3b2470d296 Fix presubmit errors catched by a more recent version of cpplint.py.
Mainly, there were errors concerning blank lines before and after class access
control sections [whitespace/blank_line].

BEFORE an access control section (e.g. public:, private:) there should be a
blank line (except for the section right after the class declaration).

AFTER an access control section there should be no blank line.

TBR=ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-07 07:17:46 +00:00
jkummerow@chromium.org
4ba07be98f Add support for external arrays to d8
Review URL: http://codereview.chromium.org/7053038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-31 09:42:17 +00:00
svenpanne@chromium.org
5cd715cbc3 A tiny contribution for the IWYU day: Include allocation.h in every
header which uses BASE_EMBEDDED and/or AllStatic. Note that still only
45 out of 135 headers in src/ can be used stand-alone, but at least
this is a little bit more than before...
Review URL: http://codereview.chromium.org/6931031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-06 06:50:20 +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
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
sgjesse@chromium.org
5423170113 Tweak D8 remote debugger
When D8 is used as remote debugger the command 'break' (shorthand 'b') can be used to break JavaScript execution.

Fixed the printing of the prompt 'dbg>' and printing of error messages.
Review URL: http://codereview.chromium.org/1566049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-16 12:19:47 +00:00
erik.corry@gmail.com
7914312403 Add os.unsetenv to d8.
Review URL: http://codereview.chromium.org/1602023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-13 08:44:50 +00:00
christian.plesner.hansen@gmail.com
0b60fe88da Add a readline() command to d8. This reads a single line, stripping
the new-line at the end. This is the other half of what is required to
make the Debian Language Shootout code work correctly:
http://code.google.com/p/v8/issues/detail?id=353


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 07:07:41 +00:00
christian.plesner.hansen@gmail.com
395206b1df Add a write() command to d8. This is the same as the print() command, with the
exception that it does not add a new-line to the end. This half of what is
required to make the Debian Language Shootout code work correctly:
http://code.google.com/p/v8/issues/detail?id=354

BUG=354


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-12 11:52:22 +00:00