Commit Graph

973 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
sgjesse@chromium.org
dedd811806 Set svn:eol-style for platform-posix.cc to native.
The svn:eol-style property for platform-posix.cc is now set to native. This should get rid of the CR characters in the file added by comitting from Windows and make file lint again.

TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/42639

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 09:43:14 +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
feng@chromium.org
0a5a8e8854 Fix and cleanup ARM port:
1) removed unused function, PcStoreOffset;
2) use macro instruction, Jump, when branching from JS code to C code.

This CL replaces http://codereview.chromium.org/53039/show, per our discussion.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 18:23:04 +00:00
kmillikin@chromium.org
03419c8369 Simplify the way the code generator handles calls to IC stubs. Before
we dispatched on the IC stub kind in a generic CallCodeObject
function.  Now, we have special functions for the load and store IC
stubs.

We also (for the load and store ICs) handle moving register arguments
into place only after the stack is prepared for the call.  This
replaces some memory-to-memory moves (for copies whose backing store
is occupied by a register needed for the arguments) with
memory-to-register moves.
Review URL: http://codereview.chromium.org/42602

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 14:08:41 +00:00
mikhail.naganov@gmail.com
49af176623 Add another check in profiler's stack iterator to ensure stability.
I made a test run of benchmarks and found another weak point. After
fixing it, benchmarks are able to run for a 100 times in a row
successfully in both builds.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 14:07:52 +00:00
mikhail.naganov@gmail.com
9f5de7d9da Added more checks to SafeStackFrameIterator to prevent crashes when profiling.
Tested by profiling 3d-morph.js a 100 times both in debug and release builds.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 12:59:25 +00:00
lrn@chromium.org
eb3bf2083c Move reference to variable that isn't used on ARM.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 12:37:49 +00:00
lrn@chromium.org
bd8816efb0 Moved String.prototype.match implementation to C++.
Some extra runtime assertions added.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 12:14:10 +00:00
kmillikin@chromium.org
7c35a5d820 The code generator doesn't need to put the argument count in eax for
call ICs.  Refactor CallRuntime on ARM to match the structure of IA32.
Update some comments.
Review URL: http://codereview.chromium.org/42598

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 11:05:36 +00:00
kasperl@chromium.org
4d8ea7143f Make sure to generate a CodeCreateEvent for the CPU features
probe code object, and really raise an exception if SplayTree.Remove
is called with a key that cannot be found. 
Review URL: http://codereview.chromium.org/42597

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 10:29:22 +00:00
whesse@chromium.org
36853c83d1 Remove register counts from VirtualFrame, use register indices instead.
Review URL: http://codereview.chromium.org/42565

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 10:00:52 +00:00
mikhail.naganov@gmail.com
68d9782c01 Use OpenThread instead of DuplicateHandle in Win32 profiler implementation.
OpenThread doesn't fail in Chrome sandbox, while DuplicateHandle does.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-25 09:35:11 +00:00
kasperl@chromium.org
898297b0b7 Preparing push of version 1.1.3 to trunk.
Review URL: http://codereview.chromium.org/53012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 14:42:35 +00:00
erik.corry@gmail.com
62a7f913a2 Strcmp thinko and SConstruct improvement for d8 on Android.
Review URL: http://codereview.chromium.org/42560

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 14:29:49 +00:00
kmillikin@chromium.org
f38dc917b0 Make the "has function literal" default value for loops conservative.
It defaults to true so that if the analysis is not run we get a safe
analysis result.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 14:25:22 +00:00
erik.corry@gmail.com
944258f979 Remove stl dependencies from d8.
Review URL: http://codereview.chromium.org/42559

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 13:33:54 +00:00
kmillikin@chromium.org
89a43b8f18 Fix ARM simulator. Unless building for the actual ARM hardware,
inline assembler in C++ code should be IA32 assembly, not ARM.

TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 13:21:34 +00:00
whesse@chromium.org
1d5f94c71e Fix ARM build for changes to VirtualFrame
Review URL: http://codereview.chromium.org/53009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 13:11:34 +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
kmillikin@chromium.org
1ba34bf86b Fix issue 286. Ensure frame elements are invalidated by
InvalidateFrameSlotAt.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 12:42:28 +00:00
whesse@chromium.org
bbd21a59fd Add pointers to a VirtualFrame that keep track of the indexes of register
frame elements.
Review URL: http://codereview.chromium.org/53005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 11:52:33 +00:00
ager@chromium.org
efba01b86f Preparing push of version 1.1.2 to trunk.
Review URL: http://codereview.chromium.org/42556

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 11:07:09 +00:00
lrn@chromium.org
c8c5d9820d Test a few assertions that should hold.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 10:16:30 +00:00
sgjesse@chromium.org
cf8c7cc3e4 Change the debugger agent protocol to be RFC-822 compilant.
All headers are now terminated with CRLF and not jusr LF. The beginning of the body is indicated by an empty header (just CRLF).
Review URL: http://codereview.chromium.org/42553

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 10:15:02 +00:00
kasperl@chromium.org
70aa1fde83 Fix ARM performance regression on constructing array
and object literals by using the same logic as we use
on IA-32.
Review URL: http://codereview.chromium.org/53001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 08:55:11 +00:00
kmillikin@chromium.org
5e2f3adfd0 Fix issue 284.
The problem was continuing out of the body of a for/in (where we do
register allocation) to the loop update (where we do not).  Variables
allocated to registers where not preserved.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 08:29:24 +00:00
ager@chromium.org
d4e6613760 Fix bug in context stores, where the store was ignored if there was a
read-only property in the prototype chain.  Stores should only be
ignored if there is a read-only property on the object itself.
Review URL: http://codereview.chromium.org/42508

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 08:27:43 +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
b5d265a3a2 Fixed Linux compiler warning.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/49010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 22:35:01 +00:00
sgjesse@chromium.org
d8e53cf150 Extend debugger agent protocol with a connect message.Added a name of the embedding application when enabeling the debugger agent.Send a connection message from the debugger agent to the remote debugger when connecting. This message contains the V8 version, the protcol version (currently 1) and the name of the embedding application. Currently this information is just printed raw as received.
Review URL: http://codereview.chromium.org/52012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 22:23:39 +00:00
iposva@chromium.org
7b50c072f9 Add a new C++ pointer wrapping API to External to not dilute the
External::Cast.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 19:51:10 +00:00
whesse@chromium.org
34f71b1149 Fix flaw in VirtualFrame::SetElementAt handling multiple copies of elements.
Review URL: http://codereview.chromium.org/47006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 15:03:39 +00:00
whesse@chromium.org
010443b985 Fix build
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/52013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 13:51:41 +00:00
whesse@chromium.org
ba16099e40 Change VirtualFrame::AdjustCopies to mark target as invalid.
Change its name to VirtualFrame::InvalidateFrameSlot
Review URL: http://codereview.chromium.org/50012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 13:37:55 +00:00
erik.corry@gmail.com
aa81281b3d Reapply portability fixes, this time without 64 bit system bug.
Review URL: http://codereview.chromium.org/52010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 12:37:53 +00:00
erik.corry@gmail.com
5fb08f90f7 Profiler ticks every 1ms instead of every 10ms.
Review URL: http://codereview.chromium.org/42498

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 10:06:20 +00:00
lrn@chromium.org
9ca7c8af2c Fix bug in regexp the breaks interpreter.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 08:44:33 +00:00
olehougaard
a8c50151fc Reapply revisions 1432, 1433, 1469 and 1472 while fixing issue 279.
Review URL: http://codereview.chromium.org/48006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 07:27:47 +00:00
iposva@chromium.org
1db91bee34 - Do not allocate proxy objects if the pointer can be wrapped in a Smi representation.
Review URL: http://codereview.chromium.org/42466

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 22:13:50 +00:00
erik.corry@gmail.com
80ce1b2500 Reverse latest build tweaks since they fail on some 64 bit systems
TBR=ager

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 17:01:15 +00:00
erik.corry@gmail.com
77b963ca04 More compatibility changes.
Review URL: http://codereview.chromium.org/47004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 16:37:18 +00:00
mikhail.naganov@gmail.com
3bd4c93d07 Support profiler stack sampling in any situation. After this change, almost all profiler ticks (except GC ones) have a stack sample data associated.
Tested under Linux, OS X, and Windows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 14:49:12 +00:00
lrn@chromium.org
c35bacb2dc Now compiles when not in debug mode. Whoops.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 14:09:48 +00:00
lrn@chromium.org
6fa2f4f0c9 RegExps now restart if their input string changes representation during preemption.
Cleaned up the handling of strings moving, so strings moved by GC and strings changing representation are handled equivalently.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 13:26:16 +00:00
kmillikin@chromium.org
6565243504 Inline the Result::Unuse member function and change the Result
destructor to no longer invalidate the result.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 12:58:14 +00:00
kmillikin@chromium.org
9752bf90b5 Remove a bunch of unnecessary includes from header files in favor of
forward declarations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 09:35:31 +00:00
sgjesse@chromium.org
32de098ef6 Allow the debugger agent to reuse ports stuck in TIME_WAIT for listening.
When the debugger agent terminates the used port can be stuck in TIME_WAIT for some time depending on the OS and the state of the socket. With this change will allow the debug agent to start listening on a port still in TIME_WAIT. During development of both V8 and embedding applications this makes it much easier to restart an application using the debugger agent.

This also makes it possible to run the tests involving the debugger agent multiple times without failure.
Review URL: http://codereview.chromium.org/50050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 09:03:36 +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
mike@belshe.com
318c9eed21 Add a public API for using an empty sring.
v8::String::Empty()


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 23:35:09 +00:00
ager@chromium.org
29e3ae8dfb Make sure that the d8 shell calls OnExit in case of exceptions.
Review URL: http://codereview.chromium.org/42415

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 22:09:14 +00:00
sgjesse@chromium.org
b3a4e60957 Better handling of startup and shutdown of the debugger agent.
During bind and listen socket errors are now handled. If the listen socket is occoupied the agent will retry its bind operation until success or shutdown.

Added orderly shutdown of the debugger agent both with and without a client connected.
Review URL: http://codereview.chromium.org/50007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 21:07:07 +00:00
ager@chromium.org
4d6b3a54ad Fix lint.
TBR=iposva
Review URL: http://codereview.chromium.org/50026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 19:29:23 +00:00
iposva@chromium.org
ea653021fc - Allow hidden properties to be set on any JSObject through the V8 C++ API.
- Use the hidden properties to expose a IdentityHash accessor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 18:50:00 +00:00
ager@chromium.org
2fcad0aec1 Revert change 1509 that flush ICs when adding setters on an object or
when setting a __proto__ to an object that holds a setter.

This seems to cause a major page load regression, so we need to tune
the clearing.
Review URL: http://codereview.chromium.org/50011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 15:06:00 +00:00
kmillikin@chromium.org
cd296924b6 Add a copied flag to virtual frame elements that tells if a copy has
been made of the element.  Set it when copying an element, clear it
when writing to an element marked copied and discovering that it is
not copied.

The copied flags on entry frames are exact.  Preparing a frame for
merging set the copied flags to be exact (to increase the likelihood
of matching the entry frame or another frame).
Review URL: http://codereview.chromium.org/50005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 11:57:18 +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
lrn@chromium.org
c918bec9df Reuse output array instead of creating a new one for each call in Date.parse
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 09:40:38 +00:00
erik.corry@gmail.com
b37b9af182 Spolling.
Review URL: http://codereview.chromium.org/42327

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 09:12:24 +00:00
ager@chromium.org
2ff097e17f Minor build and code style issues.
Review URL: http://codereview.chromium.org/42354

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 21:14:46 +00:00
mike@belshe.com
c5d777338a Expose Cloning through API.
Review URL: http://codereview.chromium.org/42339

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 19:24:15 +00:00
ager@chromium.org
4b928a492b Inline the fast path for handle creation.
Simplify the interceptor IC code by using raw pointers instead of handles.
Review URL: http://codereview.chromium.org/49001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 18:50:35 +00:00
erik.corry@gmail.com
2d4dd93bdd Misc. portability fixes.
Review URL: http://codereview.chromium.org/42337

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 15:20:26 +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
kmillikin@chromium.org
a41b28bb03 Revert r1529, which failed on some of the benchmarks.
Review URL: http://codereview.chromium.org/48128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 12:35:42 +00:00
olehougaard
427ba8ec40 Introducing a new StrNDup function that uses new[] for when we dispose the result using delete[].
Review URL: http://codereview.chromium.org/48127

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 12:27:37 +00:00