Commit Graph

391 Commits

Author SHA1 Message Date
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
olehougaard
860508f3e2 Optimizing generation of nested literals for both object and array literals.
Review URL: http://codereview.chromium.org/40295

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 08:59:00 +00:00
sgjesse@chromium.org
9d17b0d4c8 Whenever a script object is created it is assigned a unique id. Currently this id is assigned from an 32 bit integer counter.
Changed the script break points to be able to handle both break points based on script names and script ids. When break points are set through a script id the position is relative to the script itself. This is different from the script break points set through script names where the line/coulmn offset is taken into account.

This has the side effect that function break points are not converted into script break points for named scripts.

Show the script id in the D8 shell debugger when listing all scripts using the 'scripts' command.
Review URL: http://codereview.chromium.org/40317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 08:10:50 +00:00
ager@chromium.org
bab4b3b2e0 Simplify the map collection regression test. This test is the minimal
example that would trigger the bug.
Review URL: http://codereview.chromium.org/43004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 07:23:22 +00:00
kmillikin@chromium.org
96c6a02082 Third try to mark test expectation.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/40322

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 22:22:51 +00:00
kmillikin@chromium.org
149bcdde5c Chage test expectation mode from "debug" to "release".
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 21:52:49 +00:00
kmillikin@chromium.org
35defb2e5f The test for issue 165 is unpredictable in release builds. Allow it
to pass or fail.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 19:59:45 +00:00
ager@chromium.org
9f6adefa55 Fix test for building on 64-bit Linux.
TBR=sgjesse
Review URL: http://codereview.chromium.org/41007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 19:48:25 +00:00
ager@chromium.org
38548e3da6 Make map collection test run faster in an attempt to make it pass on
buildbot (not timeout).

This consistently fails with the old build.

TBR=whesse
Review URL: http://codereview.chromium.org/40302

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 18:00:39 +00:00
sgjesse@chromium.org
994ea00dfe Changed a function in the internal debugger JavaScript to return the full source location instead of only the position.
Added an optional parameter to exclude/include the source line offset in source location.

Extended a message test to include a test with source offset.
Review URL: http://codereview.chromium.org/39342

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 17:59:25 +00:00
kmillikin@chromium.org
8eea2af615 Add a failing test case for issue 265:
http://code.google.com/p/v8/issues/detail?id=265

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 17:21:28 +00:00
whesse@chromium.org
7977c6c680 Fix garbage collection of unused maps. Null descriptors, created
by map collection, are now handled correctly everywhere.  The 
map-collect flag is now true by default.
Review URL: http://codereview.chromium.org/40218

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 16:24:46 +00:00
olehougaard
2185cbaf49 Allocate getters and setters in old space to avoid failing assertion in TransformToFastProperties.
Review URL: http://codereview.chromium.org/39344

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 15:52:56 +00:00
kmillikin@chromium.org
34af9f2ecf Work around issue 260 for now by disabling duplication of the loop
condition for while and for loops.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 14:12:20 +00:00
kmillikin@chromium.org
ece2c03160 Fix issue 263:
http://code.google.com/p/v8/issues/detail?id=263

Sharing the code to unlink the exception handler for a try/finally
causes us to try to merge virtual frames with different heights (due
to statements that keep state on the stack) at the entry to the unlink
code.

Avoid this by unlinking the handler separately for each exit from the
try block.
Review URL: http://codereview.chromium.org/39331

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 10:51:57 +00:00
sgjesse@chromium.org
5c32385a70 Change the tests which looks at the number of scripts in the VM after startup to ignore native scripts without name.
Native scripts without name are currently only the script holding the empty script and the script holding the source for the empty function. These two unnamed scripts are created for each context. When running with snapshot an additional context is created during startup adding two more native scripts that in the non-snapshot case.
Review URL: http://codereview.chromium.org/39333

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 10:33:31 +00:00
sgjesse@chromium.org
747e20c449 Mark the empty script object, the script for the empty function and the D8 utility script as native scripts.
This is mainly to avoid these scripts showing up in the debugger when showing normal scripts.

Removed the check for the empty script in the debugger function returning loaded scripts as this check only filtered out the empty script from the debugger context and not empty scripts in all other contexts. Also this filter did not take the script for the empty function into account.
Review URL: http://codereview.chromium.org/39322

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 08:44:59 +00:00
kmillikin@chromium.org
182c3ebb2d Reapply r1434 and port to ARM.
Review URL: http://codereview.chromium.org/40220

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 14:18:03 +00:00
mikhail.naganov@gmail.com
cd71a2792c Get rid or heap allocation in stack sampler to avoid deadlocks.
Review URL: http://codereview.chromium.org/40219

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 13:07:57 +00:00
sgjesse@chromium.org
9ea5fe3d9e Fix lint errors
TBR=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/39253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 12:08:55 +00:00
christian.plesner.hansen@gmail.com
2a2c9381ea Reverted r1434
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 11:59:53 +00:00
sgjesse@chromium.org
22d6605f2f All preemption requests are now ignored while in the debugger. This ensures that no change of V8 thread happenes while in the debugger. The only thing that happens is that a flag is set to indicate that preemption happened. When the debugger is left preemption is requested if it occourred while in the debugger.
Moved the debugger related global variables from Top to thread local in Debug.
Review URL: http://codereview.chromium.org/39124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 11:03:14 +00:00
kmillikin@chromium.org
b638d5c613 Fix issue 259.
http://code.google.com/p/v8/issues/detail?id=259

Due to constant folding of loop conditions, it is possible to have a
try/finally with no exits from the try block (eg, an infinite loop in
the try block).  In that case the code to unlink the try handler is
dead and should not be emitted.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 10:18:33 +00:00
olehougaard
d46a9900ee Optimizing nested, constant object literals (like JSON objects) by building one large object template for the entire object instead of one for each sub-object.
Review URL: http://codereview.chromium.org/39184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 09:38:17 +00:00
erik.corry@gmail.com
e2ccac2279 Speed up a few tests that were taking too long.
Review URL: http://codereview.chromium.org/40164

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 08:28:56 +00:00
kasperl@chromium.org
e9e8628380 Revert revisions 1383, 1384, 1391, 1398, 1401, 1402,
1418, and 1419 from bleeding_edge until we have a fix
for the crashers we see on the distributed test infra-
structure.

We know that revision 1383 is causing issues, but I 
had to revert some of the other recent RegExp changes
in order to get this part out.
Review URL: http://codereview.chromium.org/39186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 15:23:17 +00:00
erik.corry@gmail.com
cf3c1a8c18 Arrays created with new Array(n) are not assumed to be sparse unless the given
size is truly huge.  A test had to be modified slightly so as not to be too slow.
Review URL: http://codereview.chromium.org/40163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 12:45:47 +00:00
kmillikin@chromium.org
86254f6ad9 Add a test for inserting a preexisting list element to a list, at the
point where the backing buffer will have to grow.
Review URL: http://codereview.chromium.org/39180

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 09:39:19 +00:00
lrn@chromium.org
21fb24e0b2 Issue 254 - now correctly updates lastIndexof when using the test method.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 12:29:37 +00:00