Commit Graph

1183 Commits

Author SHA1 Message Date
kmillikin@chromium.org
339e2e5244 Add two more invocations of ENTER_V8 to places where we need to write
to V8's heap.
Review URL: http://codereview.chromium.org/60089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 10:30:21 +00:00
kmillikin@chromium.org
2c5ce41876 Move some more ENTER_V8 invocations. The biggest one is to move the
one in v8::V8::Initialize to after the early bailout.
Review URL: http://codereview.chromium.org/60083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 08:18:24 +00:00
kmillikin@chromium.org
35d6c8fb03 Remove ENTER_V8 from small API functions that do not need access to
V8's heap or only need read access.

This means that IsDeadCeck and EnsureInitialized could sometimes be
called without having already entered the VM.  To simplify things,
this is made always the case.  A couple of error callbacks do not need
to leave V8 because they haven't entered.

Consistently enter V8 after LOG_API (since LOG_API is sometimes before
EnsureInitialized or IsDeadCheck).

This all should have no effect unless V8 is built with
ENABLE_HEAP_PROTECTION and run with --protect-heap.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 07:49:20 +00:00
ager@chromium.org
8947c308c6 Apply Lei Zhang's patch to add easy import of additional environment
variables in our scons setup.

Here is an example of importing an additional environment variable:

export MYVAR='value'
scons importenv="MYVAR"

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-02 13:00:28 +00:00
kmillikin@chromium.org
8389e4f9f8 When computing pairwise merges of frame elements, we should allow
constants and copies below the watermark on backward jump targets
(that's the whole point!).
Review URL: http://codereview.chromium.org/60044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-02 12:23:49 +00:00
kmillikin@chromium.org
06860982a9 Clean up return statements in the code generator by explicitly
counting the reference to the return value and passing it to the
return label.  This requires threading it through try/catch and
try/finally.  The return value is loaded into eax more lazily than
before.

Also, perform some related refactoring of jump targets.
Review URL: http://codereview.chromium.org/56172

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-02 08:58:18 +00:00
ager@chromium.org
9bc64e657a Prepare another push to trunk (version 1.1.6). We pushed an unsafe
compiler optimization which has now been reverted.
Review URL: http://codereview.chromium.org/60011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 10:41:37 +00:00
ager@chromium.org
deb0d4cc37 Revert change 1656 which was unsafe until it can be properly fixed.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/60010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 10:35:20 +00:00
lrn@chromium.org
015164f0f2 String.match tests that wasn't included in the implementation change list.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 09:09:05 +00:00
sgjesse@chromium.org
a737c4239d Merge r1636 from trunk to bleeding edge.
Changelist http://codereview.chromium.org/56056 was committed directly to trunk by addident.
Review URL: http://codereview.chromium.org/60005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 07:17:29 +00:00
ager@chromium.org
185aa082c4 Prepare to push version 1.1.5 to trunk. This version contains a
number of bug fixes.
Review URL: http://codereview.chromium.org/60004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 06:39:18 +00:00
ager@chromium.org
e39b80c743 The tests pass on the arm hardware of course.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 16:48:14 +00:00
ager@chromium.org
2ca0e90da5 Apparently, the --simulator=arm option is not always used when using
test.py for running the simulator tests.  Mark the exception
propagation tests as failing on ARM in general for now.  I'll dig into
it again tomorrow morning.

TRB=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/56112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 16:43:51 +00:00
ager@chromium.org
aacd90314f Reland exception propagation fix.
Fix exception propagation problem where undefined was returned instead
of an empty handle in case of an exception.  This problem can break
C++ programs that are not interested in catching exceptions and just
want to propagate them out by testing for empty handles.

The issue is that exceptions are not rescheduled if they are
externally caught.  Externally caught exceptions have to be
rescheduled if there is a JavaScript frame on the way to the C++ frame
that holds the external handler.

A couple of tests will fail on the ARM simulator because the simulator
has separate stacks for C++ and JavaScript.  I have marked the tests
as failing only on the simulator.
Review URL: http://codereview.chromium.org/56105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 15:23:58 +00:00
whesse@chromium.org
e2ed40a1eb Keep the result of postfix increment and decrement in a register.
Review URL: http://codereview.chromium.org/56106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 15:03:02 +00:00
kmillikin@chromium.org
c80b013999 Fix issue 294 by ensuring that we don't lose the copy flag on memory
frame elements when allocating them to a register as a result of
popping one of their copies.
Review URL: http://codereview.chromium.org/57053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 14:01:25 +00:00
erik.corry@gmail.com
5829acb095 Use -mthumb on debug build too.
Review URL: http://codereview.chromium.org/57056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 13:55:33 +00:00
erik.corry@gmail.com
0b8be08c59 Both thumb and optimized for size.
Review URL: http://codereview.chromium.org/57055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 13:24:59 +00:00
erik.corry@gmail.com
e8bb6904b0 Switch to thumb mode for runtime system on Android.
Review URL: http://codereview.chromium.org/57054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 13:19:59 +00:00
erik.corry@gmail.com
45c3cba046 Optimize for size on Android.
Review URL: http://codereview.chromium.org/56110

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 13:18:43 +00:00
erik.corry@gmail.com
c7925142e6 * Add rmdir, mkdir -p and umask to d8 on Unix.
* Remove the non-working methods from the os object on d8 on Windows
so you can test for their presence with if (os.system).
* Add a test (not run by default since it only works on d8).
* Fix incorrect use of wait that left defunct processes (zombies).
Review URL: http://codereview.chromium.org/56107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 12:45:33 +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
sgjesse@chromium.org
1f7a7d9c58 Change handling of debugger unloading.
Add a semaphore for accessing debugger varaibles which can be changed from a different thread. This is mainly the debug message handler which can be set to NULL to disconnect the debugger.

Control the unloading of the debugger from the V8 thread. Before the debugger unload was called from the thread setting the debug message handler to NULL. This was not safe as this involves calling into V8. This change handles the unloading of the debugger either when entering a debugger event and the debugger was disconnected while the debugger was not active or when leaving the debugger and the debugger was disconnected while the debugger was active.

Add a flag to avoid unloading the debugger if debugger code is used by the application for other purposes than debugging.

Added tests for clearing the debug message handler.
Review URL: http://codereview.chromium.org/56102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 11:24:59 +00:00
kmillikin@chromium.org
87d8bcf7ee Mark a bunch of places where we enter or leave V8 through the API.
Indiscriminately mark every place with EnsureInitialized, ON_BAILOUT,
or IsDeadCheck (even if they cannot write to V8's heap).  Also mark
callbacks, and one other place (Function::SetName) hit in Chromium.
Review URL: http://codereview.chromium.org/57049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 09:07:57 +00:00
mikhail.naganov@gmail.com
e88d1e475e Fixed numerous issues that were causing errors in profiler log processing
on a real web application loaded in the test shell.

Also implemented output of JSON-encoded call stacks for profiler
prototype.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 09:06:37 +00:00
kmillikin@chromium.org
d0b7f84ec0 Use the AST optimizer on the bodies of function literals. Notify the
oprofile agent when we compile the body of a function literal.
Review URL: http://codereview.chromium.org/57048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 09:02:40 +00:00
erik.corry@gmail.com
b9c5232c1d Add os.chdir and os.setenv to d8. Move system() to os.system().
Protect os.chdir, os.setenv, os.system against string conversion
failures.  Add comment about the issue to include/v8.h.
Review URL: http://codereview.chromium.org/57005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 06:51:25 +00:00
kmillikin@chromium.org
d3ee29a7f6 Add just enough state changes from EXTERNAL (outside V8) to OTHER
(generic state inside V8) in the API to allow the V8 shell to run all
the mjsunit tests with heap protection on.

These state changes are only taken when built with
ENABLE_HEAP_PROTECTION.  The two states OTHER and EXTERNAL are treated
the same because we will not properly reenter OTHER through the API.
Review URL: http://codereview.chromium.org/56060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 13:32:28 +00:00
whesse@chromium.org
0f9253b537 Initialize list of frame elements to proper size.
Review URL: http://codereview.chromium.org/57006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 13:03:32 +00:00
ager@chromium.org
ab845fd829 Prepare to push version 1.1.4 to trunk.
Review URL: http://codereview.chromium.org/56059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 12:58:45 +00:00
kmillikin@chromium.org
82b9f91692 Reenable interactive use of the shell sample.
Review URL: http://codereview.chromium.org/57008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 12:13:08 +00:00
yurys@chromium.org
9a9194584c When devtools window is opening it requests all scripts parsed by the moment. Currently 'scripts' response contains only first 80 chars of the scripts sources. I added an argument to the protocol that allows to include full source text into the response.
Review URL: http://codereview.chromium.org/55011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 11:50:17 +00:00
sgjesse@chromium.org
d97a72c606 Correct debugger active check.
With r1627 (http://code.google.com/p/v8/source/detail?r=1627) the use of the debugger message thread was made optional. However the check for active debugger still included a check for the message thread. This is fixed by this change.
Review URL: http://codereview.chromium.org/58001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 08:16:14 +00:00
whesse@chromium.org
952179e323 Formatting changes and some slight improvements to revision 1621, issue 42006.
Review URL: http://codereview.chromium.org/51007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 14:35:24 +00:00
erik.corry@gmail.com
a038698ead Add a system() call to the d8 shell (Unix only).
Review URL: http://codereview.chromium.org/42641

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 13:50:26 +00:00
kmillikin@chromium.org
99ba650f71 Mark some of the places we leave V8 via callbacks as transitions to
state EXTERNAL rather than OTHER.
Review URL: http://codereview.chromium.org/55007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 12:32:28 +00:00
mikhail.naganov@gmail.com
66d40652da Fixed lint errors in test-debug. Sorry for that.
Review URL: http://codereview.chromium.org/56004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 11:56:30 +00:00
mikhail.naganov@gmail.com
d3c4a658f9 Fix issue 289: check external source strings validity in Runtime_DebugGetLoadedScripts
Review URL: http://codereview.chromium.org/56002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 11:22:52 +00:00
kmillikin@chromium.org
b8af68b03f Make VirtualFrame::CallStub on IA32 responsible for moving arguments
into the appropriate registers for the stub call.  Since stubs that
take arguments in registers do not (currently) take any arguments on
the stack, the unused generality has been removed (it's easy to put
back in later).
Review URL: http://codereview.chromium.org/55003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 10:29:37 +00:00
sgjesse@chromium.org
6feb0d9a8f Fixed lint.
Removed one space added by Visual Studio.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 10:17:50 +00:00
sgjesse@chromium.org
8b7a288e48 Debugger message handler can be called from V8 thread.
The message handler function set through the debugger API is normally called in a different thread than the V8 thread where execution is stopped due to debugger event. This change adds an option to the API for specifying that the message handler should be called directly from the V8 thread. For an application like Chrome where thread dispatching is already in place this makes more sense.

Add an option to the message handler debugger API to process messages in the thread where V8 is running instead of posting it to a queue for processing on a additional thread.
Review URL: http://codereview.chromium.org/42643

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 09:56:53 +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
christian.plesner.hansen@gmail.com
1a823e8216 Fixed second problem with special commands.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 03:27:04 +00:00
christian.plesner.hansen@gmail.com
358aaa135f Fixed special command problem I just introduced. Guess I should have
waited for review eh.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 03:22:06 +00:00
christian.plesner.hansen@gmail.com
76e725d777 Added url decoding of special commands.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 03:13:46 +00:00
christian.plesner.hansen@gmail.com
9142c42df2 Fixed a bunch of memory leaks in tests, including:
- String traversal test data (now in a zone)
 - Debug message thread (now joined on exit)
 - Threading test threads (now joined on exit)
 - Changed message tests framework to cope with valgrind
Also, fixed a bug where we'd try to delete stack-allocated objects
when tearing down v8.  Good times.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 00:24:49 +00:00
whesse@chromium.org
d970e04e04 Optimize binary operations in which one or both operands is a constant smi.
Review URL: http://codereview.chromium.org/42006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 13:14:10 +00:00
kmillikin@chromium.org
f8bf152c89 Change the arguments access stub to take both arguments in registers
rathern than one in a register and one on the stack.

Fix a stack height bug in the case that the arguments access stub hit
its slow case.
Review URL: http://codereview.chromium.org/49037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 13:02:00 +00:00
kmillikin@chromium.org
4dceb3c87f In the IA32 code genrator, handle call ICs and constructor calls the
same as load and store ICs.  Eliminate the general function used to
call any IC.
Review URL: http://codereview.chromium.org/42638

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 13:00:03 +00:00
whesse@chromium.org
7d23b48a02 Inline part of RawSyncElementAt, split the rest into two
functions.  Improve PrepareForCall, SyncRange, and SyncElementAt.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 10:25:49 +00:00