Commit Graph

87 Commits

Author SHA1 Message Date
yangguo@chromium.org
02e70b799b Fixed the shared library build of D8 that was broken by r9005.
Review URL: http://codereview.chromium.org/7701024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-24 10:48:48 +00:00
yangguo@chromium.org
1afbe92a0e Fixed minor bug in D8 related to mapping counters to a file.
Review URL: http://codereview.chromium.org/7717022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-24 09:47:10 +00:00
keuchel@chromium.org
3c7ca304fe Preliminary code for block scopes and block contexts.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-11 16:29:28 +00:00
yangguo@chromium.org
b301cab837 Added two whitespaces to match correct indentation.
Review URL: http://codereview.chromium.org/7585033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-08 09:53:28 +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
6bc1aa0db2 Fixed: regression in issue 1579 concerning readline() in d8.
BUG=v8:1579

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-08-01 14:15:02 +00:00
yangguo@chromium.org
635a9f72ef Fixed win64 compiler warnings for D8 (static type casting).
Review URL: http://codereview.chromium.org/7470014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-26 08:15:49 +00:00
yangguo@chromium.org
252d62ed27 Fix for issue 1566: added flushing after writing to stdout.
BUG=v8:1566

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-20 13:14:46 +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
f2f2efc544 bug fix since --prof did not work
BUG= --prof did not work
TEST=./d8 --prof <insert any test>

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-11 12:04:13 +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
286f1d6bc3 d8 drops into a shell if no files are passed on command line
Fixes regression introduced in r8241.

BUG=
TEST=Run ./d8 --print_code -- should drop into shell.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-22 17:32:35 +00:00
ricow@chromium.org
b256c9c192 Reinitialize the arguments object in d8 when renewing the evaluation context (fixes issue 1477).
Review URL: http://codereview.chromium.org/7189007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8312 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 08:35:26 +00:00
yangguo@chromium.org
b2ffa68884 removed isolates from d8 since they are not necessary anymore
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:41:35 +00:00
yangguo@chromium.org
f5a0b2e749 corrected parts in d8 that accesses the new "deisolated" Thread in platform.h
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-10 12:41:26 +00:00
yangguo@chromium.org
d5951b8ef9 fixed style mistake found in presubmit.py
Review URL: http://codereview.chromium.org/6995110

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-09 15:07:45 +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
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
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
kasperl@chromium.org
e8277a0ab5 Changed d8 to print exception stack traces like samples/shell.cc.
Review URL: http://codereview.chromium.org/7060006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-23 10:41:02 +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
8481a75698 Adding debugger interface and runtime functions hooks for supporting
LiveObjectList functionality.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-02 08:10:38 +00:00
ager@chromium.org
ad27c1271e Use correct type for the map-counters flag used in d8.
Review URL: http://codereview.chromium.org/6598063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-01 12:26:19 +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
c89021d162 Added labelled thread names to help with some debugging activity. Right now,
the only platform that it works on is linux (using the prctl API to set the
names of the threads). Other platforms are setup to build properly if the
flag is set, but their thread names are not currently set.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 09:09:50 +00:00
sgjesse@chromium.org
d3e457303e Add API callback for tracking allocated memory
Allows the host application to provide a mechanism for notification and custom logging through a callback (set through the API V8::AddMemoryAllocationCallback and removed through V8::RemoveMemoryAllocationCallback), when V8 allocates ro frees memory. 

This replaces the current histogram data "V8.ExecutableMemoryMax" by allowing usage data to be logged by the application as required rather than always through V8. 

BUG=http://crbug.com/54222
TEST=Set the callback function with the API and cause V8 to allocate memory.

Patch by Paul Mehta <pmehta@chromium.org>

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-03 11:31:58 +00:00
sgjesse@chromium.org
634fb9152c More precise break points and stepping when debugging
Added support for more precise break points when debugging and stepping. To achieve that additional nop instructions are inserted where breaking would otherwise be impossible. The number of nop instructions inserted are sufficient to make place for patching with a call to a debug break code stub. On Intel that is 5 nop's for 32-bit and 13 for 64-bit. Om ARM 3 nop instructions (12 bytes) are required.

In order to avoid inserting nop's in to many places a simple ast checker have been added to check whether there are breakable code in a statement or expression. If it is possible to break in an expression no additional break enabeling code is inserted.

Added break locations to the true and false part of a conditional expression.

Added stepping tests to cover more constructs.

These changes are only in the full compiler.

Changed the default value for the option --debugger in teh d8 shell from true to false. The reason for this is that with --debugger turned on the full compiler will be used for all code in when running d8, which can be unexpeceted.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:04:49 +00:00
erik.corry@gmail.com
b685df1caa Make bleeding edge compile (since r4561 made Handle ctor explicit). http://codereview.chromium.org/1936001. Committed for Dmitry Titov of Google
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 07:28:29 +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
kasperl@chromium.org
73470162de Fix issue 658 by adapting the d8.cc code to the new types of
scripts (either a JSFunction or a SharedFunctionInfo).
Review URL: http://codereview.chromium.org/1077010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 12:23:15 +00:00
sgjesse@chromium.org
14066c0e0e Check return code from fwrite
BUG=http://code.google.com/p/v8/issues/detail?id=453
TEST=none
Review URL: http://codereview.chromium.org/458016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 08:48:32 +00:00
christian.plesner.hansen@gmail.com
223973ef9b Modifies readline() to behave in the same way as it does in TraceMonkey.
Author: abdulla <abdulla.kamar@gmail.com>
Review URL: http://codereview.chromium.org/173262


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-07 12:37:56 +00:00
mikhail.naganov@gmail.com
fa0034ccbc Fixing presubmit error
TBR=christian.plesner.hansen@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 19:38:04 +00:00
christian.plesner.hansen
d2624cc6d6 Fixed error in d8's write() function
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 15:36:53 +00:00
christian.plesner.hansen@gmail.com
56d8401ce5 Modifies write() so that NULs are allowed within a string.
This is required by the mandelbrot test in the language shootout.

Patch by abdulla <abdulla.kamar@gmail.com>.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 07:49:02 +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
sgjesse@chromium.org
dc68e0f9bd Activate the debugger in the developer shell earlier.
This will support breaking in debugger statements in JavaScript files read from the command line.
Review URL: http://codereview.chromium.org/113998

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 06:53:15 +00:00
sgjesse@chromium.org
d498361c5f Add more debugging information to scripts compiled through eval.
Scripts now have a compilation type which can be host, eval or JSON. Host scripts are compiled through the API, eval scripts are compiled through call to evan and JSON scripts are compiled as a result of calling JSON.parse.

For scripts scripts compiled through eval the JavaScript function in top of the stack and the pc offset into the code is stored in the script object. This makes it possible to calculate the source position of the eval call later when requested. This information can be obtained through the script mirror object and is part of the script mirror JSON serialization for the debugger protocol.

Moved the enumeration ScripType into class Script and remamed to Type. The new compilation type enumeration is also inside the class Script.

This information is now shown when using the scripts command in he developer shell debugger.
Review URL: http://codereview.chromium.org/119108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 10:47:49 +00:00
erik.corry@gmail.com
4a120eccdc Fix asterisk spacing.
Review URL: http://codereview.chromium.org/113333

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 12:34:35 +00:00
feng@chromium.org
ea48d53bad Add ENABLE_DEBUGGER_SUPPORT macro.
ENABLE_DEBUGGER_SUPPORT is enabled by default unless it is on Android platform.
On Android platform, it can also enabled by passing -DENABLE_DEBUGGER_SUPPORT flag to the compiler.

This should not affect any existing build (I hope, cross my fingers) except the build in real Android environment (in other word, it only affects me now).

There are lot of room for code refactoring in stead of using #ifdef all over the place. I will leave this to v8 folks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 16:36: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
davemoore@chromium.org
69bdfe255b Reenable d8 stats timers, using the histogram mechanism
Review URL: http://codereview.chromium.org/67100

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