Commit Graph

419 Commits

Author SHA1 Message Date
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
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
christian.plesner.hansen
3355c8130e Fixed windows build.
Review URL: http://codereview.chromium.org/52004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 02:25:40 +00:00
iposva@chromium.org
ce1fe3e465 - Fix constness in tests.
Review URL: http://codereview.chromium.org/42472

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 23:33:36 +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
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
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
sgjesse@chromium.org
b52848758a Change expectations for DebuggerAgent test.
Review URL: http://codereview.chromium.org/42444

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 13:24:58 +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
30f49d60c0 Disable a test that fails on some Linux versions.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/50032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 21:46:12 +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
erik.corry@gmail.com
54d295bdef Speed up slow test that times out on ARM.
Review URL: http://codereview.chromium.org/50008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 13:01:50 +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
erik.corry@gmail.com
2c84d84d5c // Test that we can make large object literals that work.
// Also test that we can attempt to make even larger object
// literals without crashing.
Review URL: http://codereview.chromium.org/48133

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 08:23:00 +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
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
sgjesse@chromium.org
d7f9992442 Added a wait with timeout to the platform semaphore class.
The code has been compiled and tested on Windows, Linux and Mac OS.

The FreeBSD version is a copy of the Linux version which should work on FreeBSD as well. According to the FreeBSD documentation clock_gettime is part of the standard C library so the assumption is that no additional link libraries is required for FreeBSD.
Review URL: http://codereview.chromium.org/48123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 09:04:24 +00:00
lrn@chromium.org
89f466659c Flatten strings before parsing them as Date strings, and work on Vector of chars instead.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 13:27:21 +00:00
lrn@chromium.org
eb656c723b Moved subject and index before matches in RegExp lastMatchInfo.
Some minor changes, and removed the new handlescope in the inner loop of replace. Only really affects replaces on extremely long strings.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 12:44:20 +00:00
erik.corry@gmail.com
608a99a90c Remove all uses of StringShape variables, since that has proven
to be error-prone and of little benefit in terms of performance.
Review URL: http://codereview.chromium.org/45010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 09:33:06 +00:00
olehougaard
9149e4c8db Fixed some memory leaks in unit tests.
Review URL: http://codereview.chromium.org/46103

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 07:53:20 +00:00
kasperl@chromium.org
0a09a08ec8 Add copyright notice to new test case.
Review URL: http://codereview.chromium.org/42216

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-15 22:44:23 +00:00
erik.corry@gmail.com
99063fe0f8 Fix GC related crash bug in search-replace.
Review URL: http://codereview.chromium.org/42214

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-15 22:28:26 +00:00
erik.corry@gmail.com
3aa57f7f65 Revert 1432, 1433, 1469 and 1472 due to a bug with literal objects.
Review URL: http://codereview.chromium.org/46088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-15 16:18:20 +00:00
christian.plesner.hansen@gmail.com
8dffcb9efa Flush ICs when adding setters to an object or setting a __proto__ to
an object that holds a setter.  If there are no store ics then no
flushing is done.  The implementation has been tweaked so that no ICs
are cleared during normal context creation.
This may cost us some performance but I'm submitting it as it is and
if there are problems we can either decide to be smarter about when,
what and/or how we clear, or back this change out altogether.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 13:43:07 +00:00
sgjesse@chromium.org
17b498c957 A new stack guard break flag DEBUGCOMMAND has been introduced. This is used to signal debug break due to debugger commands available in the queue for processing. If a stack guard break happens with this flag and not the DEBUGBREAK flag the no debug break event is generated and execution is resumed automatically when all debugger commands in the queue has been processed.
This makes it possible to remote debuggers to just add commands to the queue without having to request a break as well. As soon as any JavaScript executes the debugger commands will be processed and the response send to the remote debugger.

Currently hide this behind a flag (--debugger-auto-break) as the current command line debugger in Chrome is not designed for this new behaviour, whereas the new Chrome developer tools will use it.
Review URL: http://codereview.chromium.org/42173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 13:26:21 +00:00
olehougaard
74722e199f Implementing __defineSetter__ and __defineGetter__ with an array index as argument as described in issue 242. For performance reasons, the change is not applied to arrays. This conforms to the behavior of Safari.
Review URL: http://codereview.chromium.org/46030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 11:40:09 +00:00
lrn@chromium.org
e2af4529c3 String.replace implemented in C++.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 10:22:38 +00:00
sgjesse@chromium.org
79aae815dd During the refactoring in r1461 and adding of script ids in r1468 the propagation of a boolean flag was missing. This caused the line numbers retreived through ScriptMirror objects to ignore the resource line offset information in the script.
Added an explicit false parameter where the parameter was previously left out.

Added a test case for this.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 14:03:05 +00:00
ager@chromium.org
04cc9cfffd Revert the exception propagation fix. It leads to crashes because
Top::external_caught_exception_ and Top::try_catch_handler_ are no
longer in sync.  Pulling it out until I have the time to fix it.
Review URL: http://codereview.chromium.org/42117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 12:29:17 +00:00
ager@chromium.org
6eb3030479 Temporarily disable tests that no longer work on the ARM simulator.
Exclude the tests from the threaded tests because I don't want to
disable those on ARM.

The issue is that the simulator keeps the C++ and the JavaScript stack
separated.  This is not a problem on the real hardware and the tests
pass on our ARM box.
Review URL: http://codereview.chromium.org/42069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 14:29:21 +00:00
erik.corry@gmail.com
912c8eb03a * Reapply revisions 1383, 1384, 1391, 1398, 1401, 1402,
1418, and 1419 from bleeding_edge, reverted in 1429.
* Fix of $1 accessor on sliced strings.
* Fix of lastParen method when last parenthesis did not match.
Review URL: http://codereview.chromium.org/43075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 14:00:55 +00:00
ager@chromium.org
90093ea868 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.
Review URL: http://codereview.chromium.org/43070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 11:13:15 +00:00
erik.corry@gmail.com
1094cfe1b6 Add a test that r1383 failed (harmlessly).
Review URL: http://codereview.chromium.org/44002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 09:29:29 +00:00
sgjesse@chromium.org
c8f01466ff See http://code.google.com/p/v8/issues/detail?id=269.
BUG=269
Review URL: http://codereview.chromium.org/43023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 07:34:48 +00:00
kmillikin@chromium.org
0e60cf38dc Fix issue 265 by handling extra statement state on the frame based on
the expectation at the break, continue, and return labels (including
shadowed ones) instead of based on the AST nodes.

See http://code.google.com/p/v8/issues/detail?id=265

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 06:17:19 +00:00
kasperl@chromium.org
1a9dc2d002 Move InitLineEnds and GetLineNumber to handles.cc to avoid
issues with a raw this pointer and GC.

Fix issue with FlattenString where we may keep a StringShape
alive across a GC.
Review URL: http://codereview.chromium.org/43020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 15:08:45 +00:00
kasperl@chromium.org
3f3ed140ba Fix typo.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 13:35:28 +00:00
kmillikin@chromium.org
e2254a30af Change expectation for the bug-265 test to allow crashing in release
builds.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 13:23:43 +00:00
christian.plesner.hansen@gmail.com
feb2594f8a Tweaked semantics of error prototype.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 13:15:24 +00:00
lrn@chromium.org
34db0ff86c Issue 267: Calls to arguments in eval-tainted function scope uses global object as receiver.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:28:34 +00:00
sgjesse@chromium.org
b74c5b1e39 Moved the storage of the last script id into the heap to make it part of the serialized data when starting V8 on a snapshot.
Currently the script ids wrap when positive smi value is exhausted.
Review URL: http://codereview.chromium.org/43008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:05:20 +00:00
christian.plesner.hansen@gmail.com
c1c5a09ebd Made the Error prototype into an error. Allow \c at the end of
regexps.  Throw a type error when calling regexp methods on
non-regexps.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 11:32:19 +00:00
christian.plesner.hansen@gmail.com
782b53799d Implemented invalid UTF8 detection in decodeURI. That is, detection
of invalid utf8 not invalid utf8-detection.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 09:08:05 +00:00