Commit Graph

1039 Commits

Author SHA1 Message Date
kmillikin@chromium.org
21d97bca55 Simplify the construction of virtual frame elements in preparation for
switching to a linked representation of copied elements.  This change
avoids initializing frame elements to invalid unless they need to be.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 14:49:55 +00:00
sgjesse@chromium.org
2ca478f9fa The method yield is now available in the context created for threads in the developer shell.
Added options --preemption/--no-preemption and --preemption-interval to control preemption in the developer shell when running several threads. Default is still to enable preemption with interval 1ms if threads are created.
Review URL: http://codereview.chromium.org/48001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 10:08:59 +00:00
lrn@chromium.org
014f0fd841 ReplaceRegExpWithString: Avoid extending handle scope by adding scope inside loop.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 09:49:14 +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
sgjesse@chromium.org
6a9d16f40f Missed a few comment changes in r1508.
Review URL: http://codereview.chromium.org/42175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 07:36:52 +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
davemoore@chromium.org
46f753a184 - Added ability to call histograms from within v8
- Changed the StatsRates to use the new HistogramTimers

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 16:06:31 +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
kmillikin@chromium.org
30af089bc5 Fix a test in the IA32 code generator for whether loop conditions
contain function literals.  The test was not conservative enough.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 19:49:19 +00:00
kmillikin@chromium.org
03d7c6bd1d Reenable the duplicated test at the bottom of for and while loops. It
is enabled for a loop by the absence of function literal
subexpressions in the condition expression.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 15:44:05 +00:00
kmillikin@chromium.org
d0e76971a6 Change the way we handle backward jumps in the code generator. Keep
the frame states of all the forward-entering frames that had merge
code generated.  At a backward branch, check if there is no merge code
or if we can reuse an existing merge block.
Review URL: http://codereview.chromium.org/40169

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 14:55:17 +00:00
ager@chromium.org
a4d60dd463 Prepare to push V8 version 1.1.1 to trunk.
Review URL: http://codereview.chromium.org/42122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 14:10:44 +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
kmillikin@chromium.org
c7f2458912 Tweak an assertion in the jump target destructor so that it only
applies to initialized jump targets, and not in the case of a stack
overflow.
Review URL: http://codereview.chromium.org/42118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 12:30:45 +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
erik.corry@gmail.com
60d83a789b 8-byte align C stack on Linux and Windows.
Review URL: http://codereview.chromium.org/42116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 10:20:32 +00:00
kasperl@chromium.org
765a3804a9 Prepare push to trunk. Now working on version 1.1.1.
Review URL: http://codereview.chromium.org/43123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 07:11:15 +00:00
kasperl@chromium.org
039d25b27e Add support for running the tests through valgrind.
Review URL: http://codereview.chromium.org/43073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 06:52:24 +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
kmillikin@chromium.org
3c41aab15d Ensure deallocation of the dynamically allocated shadow targets used
for compilation of try/finally, even in the case where control cannot
reach the end of the finally block.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 13:14:27 +00:00
kmillikin@chromium.org
1a7359fb9d Deallocate the dynamically-allocated shadow targets that we use for
compilation of try/catch and try/finally.
Review URL: http://codereview.chromium.org/42068

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 12:08:28 +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
kmillikin@chromium.org
82df32b78c Fix issue 268 by explicitly calling Unuse (to deallocate all contained
virtual frames) on zone-allocated jump targets.  These include jump
targets in AST nodes and the entry and exit targets of deferred code.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 10:25:48 +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
8d622ac4ac Fix formatting problem.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 06:31:21 +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
sgjesse@chromium.org
b1729e6c39 Remove spaces to satisfy linter
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/43012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:41:11 +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
kmillikin@chromium.org
773843b62e Introduce a BreakTarget subclass of JumpTarget used to represent the
blocks labeled by "break", "continue", and "return".  BreakTargets are
the only jump targets that appear in the AST, the only ones that can
be uninitialized, and the only ones that can be shadowed.
Review URL: http://codereview.chromium.org/42008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 12:11:56 +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
olehougaard
4703382b3e Fixed whitespace.
Review URL: http://codereview.chromium.org/43006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 09:30:10 +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
erik.corry@gmail.com
5718547ab9 Fix probably harmless thinko in StringCharAt (causes
slow-case code to be run).
Review URL: http://codereview.chromium.org/43005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 09:00:04 +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