Commit Graph

206 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
olehougaard
7bd50d046d Fixed issue 253. No longer assuming that the target of a property lookup is a JSObject.
Review URL: http://codereview.chromium.org/39126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 11:57:24 +00:00
lrn@chromium.org
4852bef23d Issue 246 - wait until regexp is parsed to detect whether it's simple.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 09:52:01 +00:00
lrn@chromium.org
265715d90c Optimized regexp.test. No longer creates an intermediate string array.
Removed some handler code.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 10:54:12 +00:00
erik.corry@gmail.com
367e9b5d08 Fix regression in regexp-caching.html
Review URL: http://codereview.chromium.org/27273

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 14:02:00 +00:00
kmillikin@chromium.org
634c4b94fd Mark a flaky ARM test as flaky.
Review URL: http://codereview.chromium.org/28257

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 13:49:47 +00:00
kmillikin@chromium.org
f4735247cf Merge from experimental code generator branch to bleeding edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 13:00:32 +00:00
erik.corry@gmail.com
01dae630a7 Add missing copyright boilerplate.
Review URL: http://codereview.chromium.org/27268

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 10:16:31 +00:00
erik.corry@gmail.com
5b8c63f9d5 Avoids allocating a JSArray of capture information on each non-global
regular expression match.
Also moves all last-match information into one place where it can be
updated from C++ code (this will be used in another afsnit).
Review URL: http://codereview.chromium.org/28184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-27 10:04:34 +00:00
olehougaard
e3c0ae62af Go into slow case when encountering object initialization on the top level to optimize performance of code like
C.prototype.x = ...;
C.prototype.y = ...;
...
C.prototype.z = ...;
Review URL: http://codereview.chromium.org/27128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 07:54:22 +00:00
ager@chromium.org
0c7af39737 Speed up access to global variables from eval scopes. Traverse the
surrounding context to figure out if the variable could be global.  If
the variable could be global we check context extension objects at
runtime and use a global LoadIC if no variables have been introduced
by eval.

Fix crash bug when loading function arguments from inside eval.  The 
shadowed variable in the DYNAMIC_LOCAL case does not rewrite to a slot in 
that case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:11:53 +00:00
kasperl@chromium.org
adc9362b8b Even more tests of ToInt32 conversion (from Lasse).
Review URL: http://codereview.chromium.org/28020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-23 09:52:59 +00:00
kasperl@chromium.org
f6d9b194ba Extend test case to check truncation and 64-bit ints.
Review URL: http://codereview.chromium.org/27045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-23 08:41:33 +00:00
kasperl@chromium.org
0e1819d0b8 Revert 1330:1331.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/24026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 17:42:04 +00:00
kasperl@chromium.org
3afe470026 Improve generated code for non-smi bit operations by
converting the operands to 32-bit ints directly in the 
machine code stub instead of just checking if the heap 
numbers really just represent 32-bit ints and going
through the runtime system in that case.
Review URL: http://codereview.chromium.org/21536

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 13:30:32 +00:00
ager@chromium.org
c86b47f414 Rearrange the code in Scope::ResolveVariable.
I find this clearer and it also enables the DYNAMIC_LOCAL optimization
for code executed by eval that itself uses eval:

 eval("(function() { var x = 2; eval('1'); do stuff with x...; })()")

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 15:27:44 +00:00
erik.corry@gmail.com
3f962f0f9c Irregexp:
* Fix UC16 character classes on ASCII subjects.
* Fix sign problem in Irregexp interpreter.
* Make passes over text nodes more readable.
Review URL: http://codereview.chromium.org/21450

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 16:07:03 +00:00
ager@chromium.org
b4b5e3ca95 Not sure what happened, but my revert did not get everything out. Fixing the problem instead. The issue was using tmp instead of context in two places.
TBR=kasperl

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 15:55:24 +00:00
ager@chromium.org
19f04d16c7 Revert eval changes since there is a crash that I don't have the time
to fix now.

TBR=kasperl
Review URL: http://codereview.chromium.org/20458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 15:34:37 +00:00
ager@chromium.org
a09832ab76 Optimize loads from variables that might be shadowed by variables
introduced by eval.

In the cases where calls to eval have not introduced any variables, we
do not need to perform a runtime call.  Instead, we verify that the
context extension objects have not been created and perform a direct
load.

Not implemented for ARM yet and the scope resolution code could use
some better abstractions.  I'd like to do that in a separate
changelist.
Review URL: http://codereview.chromium.org/20419

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 13:04:28 +00:00