Commit Graph

1178 Commits

Author SHA1 Message Date
whesse@chromium.org
18c6337a2c Fix an error in a keyed lookup stub - HeapNumbers treated as strings.
Review URL: http://codereview.chromium.org/155924

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 13:01:17 +00:00
kmillikin@chromium.org
1ca19c383d Fix ARM compiler crash in short-circuited boolean expressions.
We did not handle the case where the left-hand-side expression was
fully compiled to control flow.  There were also some assertions for
unary and binary expressions that crashed debug builds when the
expression was fully compiled to control flow.

Regression test added.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-23 11:40:14 +00:00
ager@chromium.org
2183309385 Introduce a external allocation limit.
If V8 is holding on to a lot of external memory, we attempt to clean
it up even if we do not get an allocation failure.  Since tiny V8
objects can hold on to a lot of external memory, we might run out of
external memory while waiting for a normal allocation failure.
Review URL: http://codereview.chromium.org/155916

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 10:01:25 +00:00
whesse@chromium.org
76833936b7 Make Array::kHeaderSize protected, and only use kHeaderSize of its subclasses.
Many X64 bugs have been due to the difference between (unaligned) Array::kHeaderSize and (aligned) FixedArray::kHeaderSize.
Review URL: http://codereview.chromium.org/155687

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 12:12:24 +00:00
antonm@chromium.org
3c6c399381 Introduce faster utilty methods for storing and retrieving native pointers
in internal fields.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 10:35:15 +00:00
whesse@chromium.org
263acb4d02 X64: Implement inline cache of monomorphic constant function call. Mark a debugger test on X64 as failing.
Review URL: http://codereview.chromium.org/155631

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 12:49:14 +00:00
whesse@chromium.org
e21d0b510c Allow a slow test, array-splice, to timeout on ARM.
Review URL: http://codereview.chromium.org/155500

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 12:09:05 +00:00
antonm@chromium.org
6f30c0e7ec Some more test for load and call stubs.
Review URL: http://codereview.chromium.org/149749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 10:57:17 +00:00
yurys@chromium.org
20e4b1dbc5 Reapply http://codereview.chromium.org/149542 now that issue with Mac builder is fixed(http://codereview.chromium.org/155591)
Review URL: http://codereview.chromium.org/149746

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 07:07:51 +00:00
yurys@chromium.org
12d5143551 Reverting 2458 to see if it makes Builder Webkit Mac (V8-Latest) happy.
Review URL: http://codereview.chromium.org/149672

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 09:45:06 +00:00
kmillikin@chromium.org
6443cb99f7 Fix issue 345 by avoiding duplicates in the list of escaping labels
from a try...catch...finally statement.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2466 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 08:57:25 +00:00
yurys@chromium.org
cc6be014dc Support stepping into getters and setters.
Related Chromium bug:
http://code.google.com/p/chromium/issues/detail?id=16427

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 16:55:32 +00:00
whesse@chromium.org
894af58c82 Change tests status for x64, make test runner pass --arch flag to Scons, add to x64 disassembler. Copied from http://codereview.chromium.org/155346 so it can be committed.
Review URL: http://codereview.chromium.org/149608

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 11:39:45 +00:00
mikhail.naganov@gmail.com
e0b829b1a5 TickProcessor: more accurate mapping of statically compiled code on Linux.
'nm' is now called with an option to report function code sizes. Static code entries are restricted to the sizes reported, and the remaining unnamed code is attributed to a library as a whole. This makes reports more accurate, as some functions are tiny, but has chunks of unnamed code behind them.

This change doesn't affect reporting on Windows, as in .map files function code sizes aren't specified.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 09:47:44 +00:00
kasperl@chromium.org
0eb595eb51 Add regression test case for http://crbug.com/16276. Crashes
in both debug and release mode before r2435, but not after.
Review URL: http://codereview.chromium.org/155491

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 09:31:48 +00:00
kasperl@chromium.org
19f31a77e7 Update test expectations because we've decided to allow RegExps
to be called as functions. See http://codereview.chromium.org/155453.

TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/155488

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 06:40:40 +00:00
ager@chromium.org
7a80be473d Firefox and Safari both allow calling regular expression objects as
functions (as an alias for calling the exec method).  For
compatibility make call_regexp the default and remove the flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 23:41:17 +00:00
yurys@chromium.org
9461c4b176 Disable debug-stepin-function-call.js test on ARM.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/155348

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 12:12:23 +00:00
yurys@chromium.org
0da86e1250 Fix an issue with debugger 'step in' when calling function has local variables.Corresponding Chromium bug:http://code.google.com/p/chromium/issues/detail?id=15824
Review URL: http://codereview.chromium.org/149326

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 09:57:53 +00:00
lrn@chromium.org
4b9eb18644 X64: Added failure entries in test expectations.
Review URL: http://codereview.chromium.org/149389


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 14:04:37 +00:00
erik.corry@gmail.com
97f319d989 Get peep-hole optimizer working on ARM by not emitting
debug info at places where the debugger can't stop.
This fixes the ARM version after
http://codereview.chromium.org/14170
Reformat debug-backtrace.js test.
Review URL: http://codereview.chromium.org/155285

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:59:58 +00:00
lrn@chromium.org
b3e8f5ef49 X64: Fixed more bad smi operations.
Review URL: http://codereview.chromium.org/155281


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:46:30 +00:00
kasperl@chromium.org
98f1a228c6 Allow access through the global proxy to use ICs.
Review URL: http://codereview.chromium.org/155283

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:17:57 +00:00
lrn@chromium.org
e3bb851efb X64: Fix bug in left-shift.
Also changed a few other places that looked suspicious in the same way.
Added more info to failing test case and rewrote incorrect uses of mjsunit "fail" function.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 08:00:12 +00:00
mikhail.naganov@gmail.com
32b0e47fa5 Add automatic tests for Tick Processor, take two.
Now tests can be run from any directory. Location of test data is now determined using test file location provided by 'testcfg.py' script.

Tested under Linux, Mac, and Windows.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 06:39:38 +00:00
bak@chromium.org
be6dd7a490 Fixed and exposure to the_hole from Runtime_KeyedGetProperty.
Added regression test that fails with previous revisions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 11:51:43 +00:00
kasperl@chromium.org
9aa9458933 Fix crash that occurs when we're forced to delete a global
property that used to be DontDelete and we still have an IC
that reads from the cell.
Review URL: http://codereview.chromium.org/149322

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 11:32:03 +00:00
lrn@chromium.org
ef4f04bd54 X64: Decrease limit in big-object-literal test. Hits max call stack.
Review URL: http://codereview.chromium.org/155210


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 10:46:13 +00:00
kasperl@chromium.org
d4511a3a93 Fix issue with skipping global object during lookup through
the prototype chain. In case we're skipping a global object,
we have to be careful not to use ICs for the load, because
it's possible to introduce variables on the global object
without a map change.
Review URL: http://codereview.chromium.org/149316

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 07:13:44 +00:00
ager@chromium.org
7eb5fbfc59 Another attempt at correctly marking a debug test that fails in debug
mode on arm.

Let's see if we can make the builder green.

TBR=yurys@chromium.org
Review URL: http://codereview.chromium.org/149282

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 21:08:29 +00:00
ager@chromium.org
f3a610cbea Remove passing test from expected failures.
TBR=yurys@chromium.org
Review URL: http://codereview.chromium.org/149274

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 20:13:52 +00:00
yurys@chromium.org
a75da8f4df Disable test-clearbreakpointgroup on ARM
Review URL: http://codereview.chromium.org/149262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 18:17:20 +00:00
whesse@chromium.org
19e82212f4 Fix issue number 398: replacing a constant function on a clone.
Review URL: http://codereview.chromium.org/149249

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 14:06:08 +00:00
kasperl@chromium.org
0684291c89 Revert r2372 to get the tree green again.
TBR=mikhail.naganov@gmail.com
Review URL: http://codereview.chromium.org/155137

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 13:06:40 +00:00
yurys@chromium.org
cba9c183a0 In Chrome several tabs may share the same v8 instance. Each of those tabs can be inspected with its own devtools window. When such devtools window closes we need to clear all breakpoints that belong to it. Notion of breakpoint group enables us to do that.
Storing the breakpoints on the client(in a different process) would be inreliable since 1) it may crash and 2) some 'setbreakpoint' requests may be not processed yet by the time devtools window closes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 12:48:57 +00:00
mikhail.naganov@gmail.com
0f7b263bdd Add automatic tests for Tick Processor.
Added tests for cmdline args parsing, symbols processing, and the whole process.

Tick Processor code was refactored to make it testable.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 12:11:12 +00:00
kasperl@chromium.org
b0f411c298 Fix issue 397 and issue 399.
Review URL: http://codereview.chromium.org/149247

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 11:57:09 +00:00
kasperl@chromium.org
fa12b9a4e2 Fix lint issue.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 09:50:12 +00:00
erik.corry@gmail.com
67fec3265b Fix the order in which ToNumber is called for some Math functions.
Avoid divisions when doing Math.min(0, 0).
https://bugs.webkit.org/show_bug.cgi?id=26978 has been
filed to fix inconsistencies between JSC and V8.
Review URL: http://codereview.chromium.org/149188

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 08:55:55 +00:00
lrn@chromium.org
72de7ab74e Separate native and interpreted regexp by compile time flag, not runtime.
Clean-up of RegExp code.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 08:11:19 +00:00
erik.corry@gmail.com
9dd35ee2f9 ARM improvements to constant div, mod and mul.
* Fast runtime calls for div and mod.
* Fix assembly and disassembly of multiply instructions.
* Strength reduce and inline multiplications to shift-add.
* Strength reduce and inline mod by power of 2.
* Strength reduce mod by other small integers to mul.
* Strength reduce div by 2 and 3.
Review URL: http://codereview.chromium.org/155047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 12:44:31 +00:00
lrn@chromium.org
17362b27ea Changed RegExp parser to use a recursive data structure instead of stack-based recursion.
Shouldn't run out of stack space while parsing deeply nested regexps.
Might be a little faster.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 08:18:35 +00:00
christian.plesner.hansen@gmail.com
1e3bd893d3 Fixed test failures caused by enabling stack traces by default
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 15:30:03 +00:00
christian.plesner.hansen@gmail.com
89b77643e9 Enable capture of the top of the stack on error instantiation.
Performance impact on v8 benchmarks seems limited.  Will be backed out
if chrome performance regresses.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 12:26:31 +00:00
kasperl@chromium.org
22231d4703 Fix crash when calling non-function globals.
Review URL: http://codereview.chromium.org/151199

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 10:51:46 +00:00
kasperl@chromium.org
f0053e89aa Add regression test case for issue 396.
Review URL: http://codereview.chromium.org/150215

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 09:08:15 +00:00
ager@chromium.org
b95dbc3fdd Make global variable initialization consistent with Firefox and Safari
behavior.  Only force the introduction of a variable directly on the
global object if there is an explicit initial value in a variable
declaration.

BUG=http://crbug.com/12548
Review URL: http://codereview.chromium.org/151191

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 06:28:37 +00:00
sgjesse@chromium.org
25405ddd9c Handle JavaScript accessors on the global object.
With the new representation of the global object adding JavaScript accessors for a property after global inline caches was created for that property did not work property as the inline caches did not take the JavaScript accessor information (fixed array with two elements) that could be present in a global object property cell into account.

This is now fixed by changing the map for a global object when a JavaScript accessor is defined on it.

BUG=394
TEST=test\mjsunit\regress\regress-394.js
Review URL: http://codereview.chromium.org/150162

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 11:20:33 +00:00
sgjesse@chromium.org
92bb897081 Tweaks to global object inline cache code.
Remove the check for deleted properties in the global load inline cache if the property is known to be read only.

Propegate the in loop flag for the global call inline cache.

Changed the propagation of the code flags in the call stub compiler to compute these the same way for all types of call stubs and assert that the flags for the generated code is the same as those used for the cache lookup.

Addressed a few comments from previous review in test-api.cc.
Review URL: http://codereview.chromium.org/150101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 14:07:29 +00:00
christian.plesner.hansen@gmail.com
118a2ccc8e When Error.collectStackTraces is set to true all new instances of
Error, ReferenceError, etc. are given a stack property that gives a
stack trace.  Here's an example stack trace:

ReferenceError: FAIL is not defined
    at Constraint.execute (deltablue.js:527)
    at Constraint.recalculate (deltablue.js:426)
    at Planner.addPropagate (deltablue.js:703)
    at Constraint.satisfy (deltablue.js:186)
    at Planner.incrementalAdd (deltablue.js:593)
    at Constraint.addConstraint (deltablue.js:164)
    at Constraint.BinaryConstraint (deltablue.js:348)
    at Constraint.EqualityConstraint (deltablue.js:517)
    at chainTest (deltablue.js:809)
    at deltaBlue (deltablue.js:881)
    at deltablue.js:888

If Error.prepareStackTrace holds a function this function is used to
format the stack trace, for instance allowing code generators to
customize the way stack traces are reported to make them easier to
process.

Next step: performance measurements to see if it is feasible to turn
this on by default.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 11:08:37 +00:00
sgjesse@chromium.org
a54a4ada5c Changed the global object representation.The global object is now always in dictionary (slow) mode with each of its properties stored in a cell object. A cell object has one field containing the actual value for the property. Inline caches for access to global properties which uses direct to the cell are now created for load, store and call to properties of the global object. When properties of the global object are deleted the cell for that property is kept with an indcation of that the property is deleted.Added counters to track the use of the global property inline caches.Added additional information on IC's in the disassembler.
Review URL: http://codereview.chromium.org/151019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 10:05:36 +00:00
erik.corry@gmail.com
c9e004a808 Add a compare stub on ARM.
Review URL: http://codereview.chromium.org/151003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 13:52:13 +00:00
erik.corry@gmail.com
4a30e3f58e * Add missing imul instruction on Intel.
* Fix incorrect signedness in disassembly of umull/mull on ARM.
* Fix incorrect register order in disassembly of umull/mull.
* Fix incorrect assembly of umull on ARM.
* Remove retroactively obsoleted restriction on choice of
  registers in mul instructions on ARM.
Review URL: http://codereview.chromium.org/150002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 09:32:06 +00:00
kasperl@chromium.org
3ae01ab8ef Fix issue 392 by disabling the TakeValue optimization for
access to the arguments object.
Review URL: http://codereview.chromium.org/150016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 06:20:52 +00:00
ager@chromium.org
681ab6e30c Reintroduce recording of source position that was lost on ia32 for
some reason.
Review URL: http://codereview.chromium.org/147147

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 12:20:15 +00:00
ager@chromium.org
a5331d6426 Fix instance type check in apply optimization.
We accidentally compared a map address with an instance type.  This
fix additionally avoids an upper bounds check that is not needed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 11:35:03 +00:00
ager@chromium.org
e3fa53edef Make sure that message reporting works when the builtin string and
array functions are overwritten.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 10:27:36 +00:00
kasperl@chromium.org
f66ea38c0b Allocate arguments object on-demand instead of at function entry.
This allows Function.prototype.apply to not allocate the objects 
and copy the arguments directly from the stack.
Review URL: http://codereview.chromium.org/147075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 08:01:38 +00:00
lrn@chromium.org
2dd9717c4b Fix bug in static type inference for loops.
Review URL: http://codereview.chromium.org/140058


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 12:36:01 +00:00
erik.corry@gmail.com
2b71d0a83e Fix regexp bug reported on iit.edu.
Review URL: http://codereview.chromium.org/141042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 12:29:27 +00:00
yurys@chromium.org
46165adb9a After compile event should be sent even if there is a provisional breakpoint out of its lines range.
Review URL: http://codereview.chromium.org/141041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 11:56:36 +00:00
whesse@chromium.org
74ddab9d94 Fix issue 386, a bug in JSObject::ReplaceSlowProperty with constant transitions.
Review URL: http://codereview.chromium.org/141031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 07:41:15 +00:00
erik.corry@gmail.com
e2a01ed4fb Fix regexp bug reported by Ian where [6-9] would match any digit.
Review URL: http://codereview.chromium.org/140021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-20 17:57:09 +00:00
bak@chromium.org
7dab62ee96 Changed allocation to allow large objects to be allocated in new space.
This avoids back-to-back mark-sweep collections.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 14:06:36 +00:00
mikhail.naganov@gmail.com
a1a962f65e Implemented processing of compressed log files.
- fixed address delta calculation;
- code creations are also compressed to be in sync with other events;
- factored out a base class from TickProcessor to reuse code in DevTools profiler.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 07:59:13 +00:00
sgjesse@chromium.org
2caf318dfe Fix lint error.
TBR=kasperl@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 14:14:24 +00:00
kasperl@chromium.org
50e35a30d7 More debug mode tweaks to mozilla.status.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/125251

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 14:05:00 +00:00
kasperl@chromium.org
ac19e4b29b Update Mozilla test expectations to better match the new handling
of tests that time out.
Review URL: http://codereview.chromium.org/126274

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 13:57:44 +00:00
sgjesse@chromium.org
f36c8574c9 Fix unload debugger.
Add a missing handle scope when clearing the debug message handler.

BUG=none
TEST=cctest/test-debug/DebuggerUnload 
Review URL: http://codereview.chromium.org/126271

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 13:14:51 +00:00
kasperl@chromium.org
6b096428cb Revert change to LongRunningApply, but allow the test case to time
out for now.
Review URL: http://codereview.chromium.org/125241

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 06:47:15 +00:00
kasperl@chromium.org
9cac93d73e Make test-api/ApplyInterruption less likely to time out in debug
mode and on actual ARM hardware.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 06:18:10 +00:00
mikhail.naganov@gmail.com
02b7894f95 Fix issue 380.
Don't infer name for a function if a result of its call is assigned to a variable / property. E.g., in this case:

  a = function() { ... } ();

the function must remain anonymous because 'a' doesn't receive a function reference, but instead a result of its call.

BUG=http://code.google.com/p/v8/issues/detail?id=380
TEST=cctest/test-func-name-inference/Issue380

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 11:47:00 +00:00
erik.corry@gmail.com
824140bde0 Avoid going into runtime system for round-towards-zero operations on ARM.
Review URL: http://codereview.chromium.org/126192

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 09:49:29 +00:00
ager@chromium.org
667176d910 Another attempt at fixing sine & cosine test.
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/125129

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 15:57:06 +00:00
erik.corry@gmail.com
622e13f573 Semirandom changes in the code generated by gcc -g mean we can't iterate quite
as deep on newer VMs in debug mode.
Review URL: http://codereview.chromium.org/126125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 13:50:07 +00:00
ager@chromium.org
b898b6dfea Modify regression test.
Because of varying floating-point precision, the slow case is hard to
test with explicit values.  Instead, we check that sine and cosine do
not return the same value (the regression was that the slow case of
cosine accidentally did sine instead of cosine).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 13:18:51 +00:00
ager@chromium.org
225a6a82b0 Optimize Math.sin and Math.cos by avoiding runtime calls.
Review URL: http://codereview.chromium.org/125121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 12:06:48 +00:00
mikhail.naganov@gmail.com
3a3a6924a1 Involve more log compression techniques.
Code addresses are now written as an offset from the previous address for ticks, code move and delete events. Employed backreference and RLE compression for code move and delete events. This gives additional 30% log size reduction for benchmarks run w/o snapshot.

Overall compression results (compared with the revision of V8 having no compression):
 - V8: 70% size reduction for benchmarks run w/o snapshot (for reference, gzip gives 87%)
 - Chromium: 65% size reduction for public html version of benchmarks (v4) (for reference, gzip gives 90%)

The one obvious opportunity for improving compression results in Chromium is to compress URLs of scripts.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 09:37:50 +00:00
ager@chromium.org
f706cfa30c Fix debugger after inlined keyed store change.
Make sure that the IC is always hit when debugging and make sure to
restore the fast case when leaving the debugger.
Review URL: http://codereview.chromium.org/125044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 11:24:13 +00:00
sgjesse@chromium.org
882614391f Add scope chain information to the debugger.
For each frame it is now possible to request information on the scope chain. Each scope in the chain can have one of the types local, global, with and closure. For scopes of type global and with the mirror for the actual global or with object is available. For scopes of type local and closure a plain JavaScript object with the materialized content of the scope is created and its mirror is returned. Depending on the level of possible optimization the content of the materialized local and closure scopes might only contain the names which are actually used.

To iterate the scope chain an iterator ScopeIterator have been added which can provide the type of each scope for each part of the chain. This iterator creates an artificial local scope whenever that is present as the context chain does not include the local scope.

To avoid caching the mirror objects for the materialized the local and closure scopes transient mirrors have been added. They have negative handles and cannot be retrieved by subsequent lookup calls. Their content is part of a single response.

For debugging purposes an additional runtime function DebugPrintScopes is been added.

Added commands 'scopes' and 'scope' to the developer shell and fixed the dir command.

BUG=none
TEST=test/mjsunit/debug-scopes.js
Review URL: http://codereview.chromium.org/123021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 10:03:25 +00:00
mikhail.naganov@gmail.com
8c16bc13bc Implement tick events compression in a log file.
Two techniques are involved:
 - compress repeated line ends (common stack beginnings) by using back references;
 - do RLE compression of repeated tick events.

This gives only 5% size reduction on benchmarks run, but this is because tick events are only comprise 10% of file size. Under Chromium winnings are bigger because long repeated samples of idleness are now compressed into a single line.

Tickprocessor will be updated in the next patch.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-11 14:08:34 +00:00
whesse@chromium.org
2de98f8e55 Add statistics operations and long calls and jumps to x64 macro assembler.
Remove unimplemented instructions from x64 assembler.  Add operand-size
suffixes to add, sub, inc, dec, and cmp.
Review URL: http://codereview.chromium.org/118380

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 15:53:46 +00:00
whesse@chromium.org
85720fc05e Make JSObjects with both indexed interceptors and indexed accessors work safely.
Review URL: http://codereview.chromium.org/118499

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 15:33:31 +00:00
kasperl@chromium.org
cbd31001ef Re-land patch r2110.
TBR=antonm@chromium.org
Review URL: http://codereview.chromium.org/118501

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 14:45:46 +00:00
kmillikin@chromium.org
35b5aab3c7 Fix a bug when shifting left by zero. Ensure that the left operand is
writable (non-aliased) so it can be used for the result in the slow
case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 12:41:57 +00:00
whesse@chromium.org
bedff67b6e Make Array.sort safely generic on JSObject types. Fix bug 346 http://code.google.com/p/v8/issues/detail?id=346
Review URL: http://codereview.chromium.org/119357

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 11:42:22 +00:00
lrn@chromium.org
13e548af1d X64: Implement CEntryStub and JSEntryTrampoline.
Still some supporting functions missing.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-10 09:48:15 +00:00
sgjesse@chromium.org
dc9670bcb4 Change locationFromPosition() and locationFromLine() to use a binary search to locate line numbers from position numbers. Modify test debug-sourceinfo.js to include more tests, including error conditions.
Patch by Matt Hanselman, see http://codereview.chromium.org/118371.

BUG=213
TEST=test/mjsunit/debug-sourceinfo.js
Review URL: http://codereview.chromium.org/118425

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2125 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-09 07:03:21 +00:00
sgjesse@chromium.org
d498361c5f Add more debugging information to scripts compiled through eval.
Scripts now have a compilation type which can be host, eval or JSON. Host scripts are compiled through the API, eval scripts are compiled through call to evan and JSON scripts are compiled as a result of calling JSON.parse.

For scripts scripts compiled through eval the JavaScript function in top of the stack and the pc offset into the code is stored in the script object. This makes it possible to calculate the source position of the eval call later when requested. This information can be obtained through the script mirror object and is part of the script mirror JSON serialization for the debugger protocol.

Moved the enumeration ScripType into class Script and remamed to Type. The new compilation type enumeration is also inside the class Script.

This information is now shown when using the scripts command in he developer shell debugger.
Review URL: http://codereview.chromium.org/119108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 10:47:49 +00:00
ager@chromium.org
24d22b567a Introduce an API to force the deletion of a property ignoring
interceptors and dont-delete attributes.

Minor change to the behavior of eval: throw exception when calling
eval in a context for which the global has been detached.  This
matches the behavior of both Firefox and Safari post navigation in the
browser.
Review URL: http://codereview.chromium.org/118374

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 09:46:09 +00:00
antonm@chromium.org
1e55c82115 Revert r2110 as it introduces performance regressions.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 13:42:29 +00:00
antonm@chromium.org
b2f0dc3542 Don't do local lookup on global object as those (currently) are not JITed anyway.
Review URL: http://codereview.chromium.org/119048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 10:50:36 +00:00
kasperl@chromium.org
dfbc850ebc Revert revision 2108. This brings back the changes
submitted in revisions 2093, 2094, 2099, and 2106.
There's no evidence that supports that these changes
should be the cause of the unexplained performance
regressions on the intl2 and DHTML page cyclers. 


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 08:07:15 +00:00
kasperl@chromium.org
84c09c6de4 Experimental revert of revisions 2093, 2094, 2099, and
2106 to try to isolate a performance regression on the
page cyclers.

I'll roll the changes back in if this doesn't fix the
regression.

TBR=antonm@chromium.org
Review URL: http://codereview.chromium.org/118302

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 06:57:30 +00:00
antonm@chromium.org
0a0ede0716 Fix the issue with layout tests.
The problem was I incorrectly treated NULL result as failure to fetch
a property with a getter.  However, if getter returns zero, it is
manifested as NULL pointer (see added test case).

Good news: that gives another boost as before this CL if getter returned
0, I did another slow lookup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 19:19:53 +00:00
kmillikin@chromium.org
92c17c34de Rename misnamed test file.
Review URL: http://codereview.chromium.org/119081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:21:54 +00:00
ager@chromium.org
63a51e01ba Fix flakyness in tests: make sure to garbage collect temporary test
external strings so that they are not disposed when running other
tests that rely on only one external string being disposed during its
run.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:09:52 +00:00
antonm@chromium.org
2e49a1c03d Follow up to r2093: forgotten files and changes.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 12:04:53 +00:00
mikhail.naganov@gmail.com
0fcedde224 Fix determining of JS lower stack bottom used in profiler's JS stack tracer to work with Chromium.
My assumption that log initialization happens somewhere near the stack's bottom is true for V8's sample shell but isn't true for Chromium, causing many otherwise valid stack addresses to be thrown out. The solution proposed is to save stack pointer value for the outermost JS function in ThreadLocalTop similar to c_entry_fp.

Implemented only for IA-32. Currently I'm not dealing with profiling on ARM and x86-64 anyway.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-02 09:33:17 +00:00
mikhail.naganov@gmail.com
f0b3d3062d Fix wait interval calculation in ProfLazyMode test.
Also, add a small delay to be sure that all ticks are logged prior to leaving CheckThatProfilerWorks function.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 15:33:02 +00:00
whesse@chromium.org
1bb3976a14 Change RelocInfo to write 64-bit data field on x64 architecture.
Review URL: http://codereview.chromium.org/115860

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 12:14:54 +00:00
mikhail.naganov@gmail.com
48b4679396 Use uint in ProfLazyMode test when measuring time delta.
While testing ProfLazyMode stability I encountered a situation when the cycle supposed to run for 200 ms started to run "infinitely" because delta between two int64_t values became negative.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 09:33:53 +00:00
mikhail.naganov@gmail.com
6ad05a9ebd fix embedded vector copy constructor and assignment.
Thanks to Tobias Kaes, an issue with default copy constructor and assignment operator is found and fixed.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 09:00:39 +00:00
sgjesse@chromium.org
a019501be2 Change the handling of the debug break stack guard. The debug break is no longer ignored when hit inside "system" JavaScript. The reason for this is twofold:
* Running "system" JavaScript with the debug break flag active leads to slow running code while waiting for the break in non "system" JavaScript (one exception to this it is to try to avoid breaks in the clear mirror cache JavaScript code called when leaving the debugger).

* If this happens while processing RegExp running in native code an infinite loop is created as the stack guard handler for RegExp does not move execution forward

Fixed a GC bug in the interrupt handling for RegExp running in native code.

Added test of debug break while in debug message handler callback and debug break while executing a RegExp.
Review URL: http://codereview.chromium.org/115262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 08:42:02 +00:00
mikhail.naganov@gmail.com
795ba99117 Handle filling up of memory buffer to make log processing in DevTools Profiler easier.
When profiler's memory buffer is filled up, profiling is stopped and it is ensured that the last record in the buffer is "profiler,\"pause\"" thus making the end of profiling session explicit. Otherwise DevTools Profiler would need to guess whether the current profiling session has been stopped.

Tested with Chromium.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-28 13:56:32 +00:00
whesse@chromium.org
76d5e4e06d Add immediate operands and arithmetic operations to the x64 assembler.
Review URL: http://codereview.chromium.org/115816

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-28 09:18:17 +00:00
mikhail.naganov@gmail.com
e48095b87c Implement a dynamically growing memory log buffer with an upper limit.
The goal of this change is to allow longer profiling sessions and preserve memory when profiler isn't started. The buffer starts with 64K and grows until it reaches the upper limit, which is currently set to 50MB --- according to my evaluations, this is enough for at least 20 minutes of GMail profiling. As we're planning to introduce compression for the profiler log, this time boundary will be significantly increased soon.

To make possible unit testing of the new component, I've factored out Logger's utility classes into a separate source file: log-utils.h/cc. Log and LogMessageBuilder are moved there from log.cc without any semantical changes.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-28 07:08:09 +00:00
lrn@chromium.org
2e37ebe1ed Added stack overflow check for RegExp analysis phase.
A very long regexp graph can overflow the stack with recursive calls.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-27 11:23:26 +00:00
whesse@chromium.org
88635e401e Implement memory operands for instructions in the x64 assembler.
Review URL: http://codereview.chromium.org/113841

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-27 08:15:31 +00:00
lrn@chromium.org
945245393c Fix for issue 351 - lastIndexOf.
Review URL: http://codereview.chromium.org/113838


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-26 15:42:06 +00:00
mikhail.naganov@gmail.com
e66a0831fd Run script in ProfLazyMode test longer to improve stability.
Prior to this change debug version of the test crashed 2 of 1000 times. After the change no crashes (out of 1000 runs) occured.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-26 14:28:08 +00:00
whesse@chromium.org
960a1d36c2 Add implementation of control flow and label binding to x64 assembler.
Review URL: http://codereview.chromium.org/113832

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-26 12:32:09 +00:00
whesse@chromium.org
3bd462f2eb Add a unit test for V8's 64-bit assembler.
Review URL: http://codereview.chromium.org/115707

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-26 07:58:36 +00:00
davemoore@chromium.org
62caa393b0 Changed the flags that indicate the status of running vs dead
This allows us to optimized the EnsureInitialized() function
so it doesn't require a function call when we're running

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 19:39:52 +00:00
yurys@chromium.org
6e29fadb72 When inspecting a function with a native getter return result of execution of the getter function in the client context. This is useful for debugging DOM elements.
Review URL: http://codereview.chromium.org/113821

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 15:07:21 +00:00
mikhail.naganov@gmail.com
cee54f88a1 Remove ifdef from ProfLazyMode test, instead mark it in cctest.status.
Review URL: http://codereview.chromium.org/113820


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 12:35:32 +00:00
mikhail.naganov@gmail.com
def20131a6 Disable crashing ProfLazyMode test on ARM.
Review URL: http://codereview.chromium.org/115760


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:28:35 +00:00
mikhail.naganov@gmail.com
91bf9e8798 Fixes for comments in http://codereview.chromium.org/113641.
Review URL: http://codereview.chromium.org/115757


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:27:18 +00:00
mikhail.naganov@gmail.com
30a0a7de43 Split nested namespaces declaration in two lines in accordance with C++ Style Guide.
This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:05:56 +00:00
mikhail.naganov@gmail.com
6d71da11fd Merge in changes from readability review.
All changes from http://codereview.chromium.org/115024, except splitting namespace declarations in two lines (will be done separately for all source files).

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 08:39:22 +00:00
mikhail.naganov@gmail.com
9f69c414eb Implement resource-saving ("lazy") mode of Profiler.
This is intended to be used with Chromium. When in resource-saving mode, profiler doesn't consume any resources (sampler and logging is off) until resumed. Then again, when profiler is paused, sampling and logging are turned off.

Tested under Linux and Windows. Also have done preliminary testing with Chromium.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 08:25:36 +00:00
yurys@chromium.org
530b86ff17 When message handler is set to NULL and there is no debugger listener the debugger is unloaded immediately unless it's entered, in which case it will be unloaded when last instance of EnterDebugger is destroyed.
Without the change the debugger may crash as Debugger::EventActive(v8::Break) called from OnDebugBreak may clear current debugger context. 

Also when compilation cache was enabled debugger could fail on second attach for the same reason(see AfterCompileMessageWhenMessageHandlerIsReset).

BUG=12404
Review URL: http://codereview.chromium.org/115709

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 07:51:04 +00:00
lrn@chromium.org
e9f1a09f9d X64: Omitted creating native builtins and using them in test-heap.
This allows test-heap to run successfully.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-22 14:01:06 +00:00
ager@chromium.org
cc619a34ef Remove list copy constructor (for which there was no corresponding
assignment operator) and add an AddAll method to lists instead.
Review URL: http://codereview.chromium.org/115705

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-22 11:52:24 +00:00
yurys@chromium.org
d6742c7fae For ScriptCollected events current context may be null. Message.GetEventContext will return an empty handle in such cases.
Review URL: http://codereview.chromium.org/113698

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-21 14:21:14 +00:00
sgjesse@chromium.org
7a10634e90 Disable compilation cache when debugger is active.
Added an option to control whether the compilation cache is enabled. Default value is true.

BUG=343
Review URL: http://codereview.chromium.org/113625

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 20:28:33 +00:00
sgjesse@chromium.org
3e76ba9a78 Propagate information on whether a non function was called as constructor or not.The Arguments object passed to the callback now has IsConstructCall set accordingly.BUG=http://crbug.com/3285
Review URL: http://codereview.chromium.org/113634

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 19:33:44 +00:00
mikhail.naganov@gmail.com
f76cb020f9 Fix test-log/EquivalenceOfLoggingAndTraversal for the snapshot case.
If was failing because with snapshot the range between minimum and maximum addresses of heap objects is very large (close to 0xf0000000). To fix this I rewrote handling of address maps in the test.

Submitting with TBR because of late time. I think, we'll need to revisit this change tomorrow.

TBR=sgjesse@chromium.org

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 16:43:46 +00:00
mikhail.naganov@gmail.com
eec57b9b13 Fix lint errors, fix Windows version.
Sorry for not testing these prior to committing.

TBR=sgjesse@chromium.org

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 12:47:30 +00:00
mikhail.naganov@gmail.com
4075179fbe Introduce Logger::LogCompiledFunctions that logs current map of compiled code.
The goal is to make possible having --prof flag always enabled in Chromium.  Currently we can't do this because --prof causes compiler and gc to log code creations / moves / deletes which aren't needed until we start profiling.  With LogCompiledFunctions it will be possible not to log anything until we start profiling.  When started, the current map of compiled functions will be logged and compiler / gc logging will be enabled to update current state.  When profling is stopped, logging will be turned off again.

Funny that testing code is actually much longer and complex than function code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 09:04:13 +00:00
ager@chromium.org
10b8928e0e Expose the calling context through the API.
In C++ callbacks, we can now get the context of the javascript code
that called the callback.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 07:44:59 +00:00
yurys@chromium.org
897ecefe1e Exposed method for finding global context by traversing context chain to API.
Review URL: http://codereview.chromium.org/112035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 07:28:42 +00:00
lrn@chromium.org
2ff3901cf7 Fix for issue 349: Make initial boundary check for BM text search.
There was a case where the BMH algorithm bailed out exactly at the end of the string, and the BM algorithm that takes over wasn't expecting this.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-19 09:01:03 +00:00
lrn@chromium.org
c27d0f7b4b X64: Fixups in heap-test.cc to make it compile in X64 mode.
Review URL: http://codereview.chromium.org/113574


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-19 08:59:23 +00:00
sgjesse@chromium.org
94879a93b0 Add a script cache to the debugger
When loaded scripts are requested this cache is filled with all the script objects in the heap. Hereafter its content is kept in sync with the active scripts in the heap through the notifications of new scripts compiled and by using weak handles to get notified when a script is collected.

Through the tracking of collected scripts the debugger event OnScriptCollected have been added to notify a debugger that a script previously returned through the scripts command is no longer in use.

Make the ComputeIntegerHash globally available.

Moved clearing of the mirror cache to when debugger is really left. Previously recursive invocations of the debugger cause the mirror cache to be cleared causing handles to become either stale or reference other objects.
Review URL: http://codereview.chromium.org/115462

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 13:14:37 +00:00
sgjesse@chromium.org
44bdc2c9a8 Make the hash map test run faster by doing less work.
It still hits all of the code and runs in seconds on tinyone.
Review URL: http://codereview.chromium.org/113459

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1970 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 13:49:00 +00:00
ager@chromium.org
a3f30f5a3a Clean up the Result class. Reduce the size of Result from four words
to one by keeping a stack of active code generators and by using
indirection to handles.

Mainly a cleanup.  No visible performance impact.
Review URL: http://codereview.chromium.org/113455

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 11:09:51 +00:00
kasperl@chromium.org
3e0f2a1532 Fix lint errors in test-hashmap.cc
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 08:33:38 +00:00
sgjesse@chromium.org
c32884d371 Fix compilation of test-hashmap.cc on Linux.
TBE=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/113448

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 07:54:33 +00:00
yurys@chromium.org
acfc50ac12 MirrorSerializer now converts mirrors to plain JS objects. This objects are serialized to json string using JSON.stringify.
Review URL: http://codereview.chromium.org/113399

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 07:35:11 +00:00
sgjesse@chromium.org
77b9c60169 Add a remove method to the hash map.
Extended the hash map test to also use a heavy collision hash function to exercise the remove code.
Review URL: http://codereview.chromium.org/113397

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 07:09:17 +00:00
kasperl@chromium.org
2d50e31438 Add multiple generations (5) to the script compilation cache
to allow scripts that are used alot to survive a number of GCs
in the compilation cache.
Review URL: http://codereview.chromium.org/113445

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-15 06:45:50 +00:00
yurys@chromium.org
750a8391c2 Add parameter that allows to request data for scripts by their ids. It's going to be used e.g. to request script sources by their ids.
Review URL: http://codereview.chromium.org/113335

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-14 06:39:47 +00:00
iposva@chromium.org
032681a057 - Update cctest.status to reflect that we cannot expect OutOfMemory exceptions
in all situations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 18:35:55 +00:00
whesse@chromium.org
1ae8a7da3d Fix bug 344: always keep attributes of existing properties.
Review URL: http://codereview.chromium.org/113197

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 10:46:28 +00:00
sgjesse@chromium.org
ada3d37219 Added support to backtrace from botton of stack to debugger protocol.
Fixed backtrace in D8 debugger and added gdb like syntax 'bt n' and 'bt -n' in addition to the already existing 'bt from to'.
Review URL: http://codereview.chromium.org/99342

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 08:54:50 +00:00
iposva@chromium.org
6c39aefd4f Fix for issue 339:
- Move GetHiddenProperties functionality from object.cc to handle.cc to
  be more robust in the presence of GC in the middle of the function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 22:07:10 +00:00
kmillikin@chromium.org
18f69a7171 Fix for issue 341. In the stub for instanceof, we could try to read
an object's map before we were sure it was a heap object.
Review URL: http://codereview.chromium.org/115236

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 11:40:14 +00:00
yurys@chromium.org
052d63f5bd Script context information is included in before/afterCompile events.
Review URL: http://codereview.chromium.org/115128

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 09:08:01 +00:00
erik.corry@gmail.com
a3b2c7cf55 Fix intermittent crashes caused by unexpected GCs in
HasLocalProperty (bug introduced in r1882 et al.)
Review URL: http://codereview.chromium.org/115106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-08 12:39:37 +00:00
mikhail.naganov@gmail.com
7d260e5f8c Don't keep data about JS code that is never executed.
This reduces memory usage of tickprocessor. Thanks to William Hesse for pointing out this issue.

Also speed up static symbols loading.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-08 11:27:02 +00:00
mikhail.naganov@gmail.com
ebdf1d1e5b Return immediately from GetLogLines if logging to memory isn't enabled.
Review URL: http://codereview.chromium.org/115123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-08 10:06:38 +00:00
whesse@chromium.org
3dc6701516 Fix lint
Review URL: http://codereview.chromium.org/115076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-07 10:31:14 +00:00
mikhail.naganov@gmail.com
3e82fce446 Restore stack backtrace tests removed in revision 1785.
To re-enable tests, instead of compiled code patching, inlined code is used.
Inlined code is only installed in test.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-07 09:24:43 +00:00
ager@chromium.org
7adff828a0 Port change (r1837) that allows call-as-function handlers to be called
through new to ARM.  

Added simple test case of the current behavior.

For consistency, changed a number of occurences of explicit moves to
pc to use Jump instead.
Review URL: http://codereview.chromium.org/115014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-07 07:18:33 +00:00
erik.corry@gmail.com
275a27d6bd Fix Chromium bug 1717 by emulating JSCs somewhat strange hidden
prototypes on some built in types.
Review URL: http://codereview.chromium.org/109004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-06 12:54:57 +00:00
kasperl@chromium.org
055367afeb Extend the regression test case for crbug.com/9746 to
make sure we actually get rid of the external string
eventually.
Review URL: http://codereview.chromium.org/113022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-06 06:20:35 +00:00
yurys@chromium.org
beb5161b84 Add function inferred name to FunctionMirror and its json representation.
Review URL: http://codereview.chromium.org/109026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 18:12:03 +00:00
mikhail.naganov@gmail.com
bf63b8f173 Introduce internal Log class that handles writing log messages, enable logging to memory buffer.
This will enable reading profiler log in Chrome. The current implementation of memory buffer is trivial (fixed size buffer, no memory recycling) but enough to start end-to-end DevTools Profiler implementation. Later it will be enhanced.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 15:57:47 +00:00
deanm@chromium.org
2b56660a8b Introduce two separate classes of processor detection:
- TARGET, the architecture we will generate code for.
  This is brought it from the build system.
- HOST, the architecture our C++ compiler is building for.
  This is detected automatically based on compiler defines.

This adds macros for 32 or 64 bit, and cleans up some
include conditionals, etc.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 12:06:20 +00:00
lrn@chromium.org
b11b61c4c0 Added test for issue 334.
Test for issue 334 (oveerwriting function erases attributes).

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 11:52:37 +00:00
ager@chromium.org
5a4e24fe0f Revert workaround for http://crbug.com/9746.
Review URL: http://codereview.chromium.org/109015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 10:15:05 +00:00
sgjesse@chromium.org
3cdb194c56 Add the ability to set embedder data on created contexts from the API.
Expose the active context where a break event occoured through the debug message handler.
Review URL: http://codereview.chromium.org/109013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 09:38:45 +00:00
kasperl@chromium.org
8ac7f7d8f3 Add regression test case for crbug.com/9746.
Review URL: http://codereview.chromium.org/109003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 07:02:25 +00:00
erik.corry@gmail.com
282bc7a7b4 Reverty 1842 (see http://code.google.com/p/chromium/issues/detail?id=1717 )
Review URL: http://codereview.chromium.org/99346

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 19:35:46 +00:00
erik.corry@gmail.com
8a15c49974 Fix http://code.google.com/p/chromium/issues/detail?id=1717
undeletable functions on some prototypes.
Review URL: http://codereview.chromium.org/100335

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 12:34:20 +00:00
lrn@chromium.org
5026b2906c Removed long-running array sort test.
Long running array-sort test times out on ARM.
Also fixed a bug in another test.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-04 09:07:36 +00:00
feng@chromium.org
ecd705813f A simple fix of issue http://code.google.com/p/chromium/issues/detail?id=3285
NPN_Construct allows a NPObject to be called as a construct. For example, the
test case

var s = new app.Packages.java.lang.Integer(5);

app.Packages.java.lang.Integer is a NPObject, and it implements NPN_Construct.

This fix allows a JSObject created by an API function be called as a construct
if it can be called
as a function. This is done by generating the same code for
var s = new app.Packages.java.lang.Integer(5); as
var s = app.Packages.java.lang.Integer(5);

and the caller handles both case correctly. A more sophiscated fix is to one
extra JSConstructCall
frame and allow CallAsConstructor in Builtin::HandleApiCallAsFunction.

This change itself shouldn't affect the semantic of normal case such as:

var a = {};
var s = new a();

A TypeError exception will be thrown in CALL_NON_FUNCTION (runtime.js).

Another part of fix is in the binding code, V8NPObject, which makes
NPN_InvokeDefault or NPN_Construct
call depending on which function is available. 
Review URL: http://codereview.chromium.org/100243

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 19:01:19 +00:00
erik.corry@gmail.com
ad23017469 When strings can change from an ASCII representation to a
UC16 representation we need to be careful about flat strings.
Flat strings can be sliced or cons strings that have a flat
string under them, so when we ask a flat cons or a slice whether
it is ASCII or not we should ask the underlying string about
its representation.  This should fix
http://code.google.com/p/chromium/issues/detail?id=10971
Review URL: http://codereview.chromium.org/100249

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 11:16:29 +00:00
lrn@chromium.org
83d1d02df7 Made sort on non-arrays also affect elements on the prototype, for JSC compatability.
Made sort on non-objects with inherited elements JSC compatible.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-01 10:06:55 +00:00
sgjesse@chromium.org
a470847226 Added better version information
The current version is now held in src/version.cc in a number of defines which needs to be modified when changing version.

The following defines make up the version information:

  MAJOR_VERSION
  MINOR_VERSION
  BUILD_NUMBER
  PATCH_LEVEL
  CANDIDATE_VERSION

The first four are numbers and the fifth is a boolean. Besides these five the define

  SONAME

can be used to set a specific soname when building the a shared library (see below). This will most likely be used on stable branches where binary compatibility is ensured between different versions. This define is a string.

This version information is now read by the SCons build to support setting the soname for a Linux shared library. This requires passing the option soname=on to the SCons build.

When soname=on is specified the soname for the shared library can be set in two different ways. Either it will be the full versioned library name (e.g. libv8-1.2.2.so) or a specific soname defined in src/version.cc. Whenever a shared library is build with an soname the filename of the library will hold the full version name (e.g. libv8-1.2.2.so).

I did not update the xcode project with the new files.

BUG=151
Review URL: http://codereview.chromium.org/100104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 09:29:15 +00:00
whesse@chromium.org
714e525b40 Improve register allocation of left shift operation. Add tests
for all shift operations.
Review URL: http://codereview.chromium.org/101016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 09:21:50 +00:00
mikhail.naganov@gmail.com
178a656429 Enhancing profiling data processing code with functionality needed for the Dev Tools Profiler.
Details:

 - added properties / functions in view objects needed for WebKit's ProfileView;

 - added ability to count profiles for specific functions.

The tickprocessor functionality does not affected.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 08:10:27 +00:00
lrn@chromium.org
9156ed9e04 Added architecture properties to Windows Scons build.
Made scons build work on windows.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-30 07:21:54 +00:00
whesse@chromium.org
732e3999e4 Add a mjsunit test to cover more paths in the ia32 code generator.
Review URL: http://codereview.chromium.org/99187

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 13:57:48 +00:00
sgjesse@chromium.org
2beedf1181 Create a transition API for the debug message handler.
Kept the previous message handler API to avoid breaking clients depending on it.

The new message handler API uses a new name ending with 2.
Review URL: http://codereview.chromium.org/100158

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 12:54:07 +00:00
sgjesse@chromium.org
f8319c3cba Re-submit http://codereview.chromium.org/99122 after fixing compilation issues.
TBR=yurys@chromium.org
Review URL: http://codereview.chromium.org/100155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 09:04:20 +00:00
sgjesse@chromium.org
974734bedb Reverting 1811.
Review URL: http://codereview.chromium.org/99175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 08:33:01 +00:00
sgjesse@chromium.org
95288e916e Changed the debugger message API to receive an object instead of a JSON string.
The object delivered to the debug message handler contains additional information on the current break handling the messages.

Clients which require just JSON message parsing can simply get the JSON using the GetJSON message on the message object to still have the previous behaviour.

  NewMessageHangler(const v8::Debug::Message& message) {
    v8::String::Value val(message.GetJSON());
    OldMessageHandler(Vector<uint16_t>(const_cast<uint16_t*>(*val), val.length()));
  }

Refactored some of the debugger code to use internal handles instead of API handles. Also changed Object to JSObject is some places.

The access to the active context when the break occurred is still not implemented. I will add this in a new CL, as this one is quite big already.
Review URL: http://codereview.chromium.org/99122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 08:23:58 +00:00
mikhail.naganov@gmail.com
bffdfa3552 Rename profileview.js -> profile_view.js because WebInspector already has ProfileView.js.
Review URL: http://codereview.chromium.org/100102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 09:15:31 +00:00
mikhail.naganov@gmail.com
aa2c33126c TickProcessor script reimplemented in JavaScript.
This is an effort to reuse profiler data processing code both in
TickProcessor and Dev Tools Profiler. The old Python implementation
will be removed.

The new TickProcessor works almost identical to the previous one.
However, it has some differences:

1. Not very useful "Call profile" section is replaced with a new
   WebKit-like "Bottom up (heavy) profile" which shows the most
   expensive functions together with their callers. I used it
   personally in order to find and remove bottlenecks in the
   tickprocessor script itself, and found it quite helpful.

2. Code entries with duplicate names (they occur for RegExes, stubs
   and sometimes for anonymous Function objects) are now distinguished
   by adding an occurence number inside curly brackets.

3. (Address -> code entry) mapping is more precise in boundary cases.

4. Windows version no more requires specifying .map file location.

5. Works faster.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 13:50:42 +00:00
yurys@chromium.org
c56b22c72a 1. Send 'afterCompile' event to the debug message handler.2. Process messages from the debugger command queue on each event not only break and exception.3. auto_continue is always true for compilation events.
Review URL: http://codereview.chromium.org/100034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 12:38:20 +00:00
lrn@chromium.org
889eac7f13 Fix Issue 326. Handle sorting of non-array objects correctly.
Change handling of sorting to be the same for all JS-arrays.
Collect undefined values as well while removing holes.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 11:16:59 +00:00
erik.corry@gmail.com
b1d09b32f9 Remove dependency on libstdc++ from test framework.
Review URL: http://codereview.chromium.org/99051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 10:52:44 +00:00
erik.corry@gmail.com
f08b2a8898 Fix bugs 145 and 323, preemption and apply on ARM.
Review URL: http://codereview.chromium.org/93121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 07:03:10 +00:00
sgjesse@chromium.org
d8daf5f817 Changed the ASSERT's in the cctest's to CHECK's.
There are no ASSERTS left in the cctest's.
Review URL: http://codereview.chromium.org/93120

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 14:29:42 +00:00
christian.plesner.hansen@gmail.com
4a909a7a62 - When cloning maps to set the 'lazy loading' bit remember to clone
the properties as well.  This fixes some failing tests.
- Moved json parsing into native code.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 12:45:29 +00:00
sgjesse@chromium.org
8fefc769f5 Removed the debug message thread.
The debug message thread was introduced to make it possible to have the message handler callback be called from a different thread than the thread running V8 where the debug event occoured, but it never had any practical use, and prevents providing information to the message handler which is only available from the V8 thread.

In the future any thread decoupling will have do be done by the embedder.

This also removes the queue used for outbound messages.

Renamed the class Message to CommandMessage as it is only used for debugger commands from the client. Related message queue classes has also been renamed.
Review URL: http://codereview.chromium.org/93118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 12:05:40 +00:00
mikhail.naganov@gmail.com
2060dc1512 Added ProfileView object for performing sorting, searching and filtering operations on a profile.
It will be used both in the new tickprocessor and Dev Tools profiler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 11:37:38 +00:00
kmillikin@chromium.org
cc0c8d178f Materializing a frame element on the stack by pushing it can cause the
stack pointer to change by more than one in a corner case.  If we push
a constant smi larger than 16 bits, we push it via a temporary
register.  Allocating the temporary can cause a register to be spilled
from the frame somewhere above the stack pointer.

As a fix, do not use pushes to materialize ranges of elements of size
larger than one.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 11:26:49 +00:00
christian.plesner.hansen@gmail.com
1f7e96743d - Extended lazy loading to general objects, not just functions.
- Added lazily loaded JSON object.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 08:13:09 +00:00
lrn@chromium.org
a4d756a1c8 Move backend specific files to separate directories.
Move ia32 and arm specific files to subdirectories to make it easier to add more backends.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-23 12:06:38 +00:00
kmillikin@chromium.org
cb9d66638b Fix regression test by wrapping expression in a thunk^H^H^H^H^Hstring.
Review URL: http://codereview.chromium.org/95001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 17:44:28 +00:00
erik.corry@gmail.com
4f834546c7 Mark failing test on ARM.
Review URL: http://codereview.chromium.org/92014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 15:20:25 +00:00
pfeldman@chromium.org
a3a0d64305 DevTools: Add support for eventless host message dispatching.
Review URL: http://codereview.chromium.org/87026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 14:16:50 +00:00
erik.corry@gmail.com
561bd9861a Make a test that excercises the preemption code in apply().
Review URL: http://codereview.chromium.org/93015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 14:09:50 +00:00
sgjesse@chromium.org
7fd0da52e7 Add setting break points by using handles.
Extend the D8 break command to handle script names with :line[:column] position specification and handles using #<id>#.
Review URL: http://codereview.chromium.org/92011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 13:59:48 +00:00
erik.corry@gmail.com
befbeba831 Small changes to improve test coverage in codegen-ia32.cc.
Review URL: http://codereview.chromium.org/92008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 13:34:35 +00:00
kmillikin@chromium.org
b39f4383dc When merging a frame to an expected on at block entry, the static type
of elements is set to a safe lower bound.  Move the setting of the
static type out of VirtualFrame::MergeTo (which is not necessarily run
for all frames) and into VirtualFrame::PrepareMergeTo (which is).
Review URL: http://codereview.chromium.org/92009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 13:19:38 +00:00
lrn@chromium.org
bfb33b1e2f Fix for Issue 317 - bug in string.replace(string, "$foo").
Fix for Issue 317. Replace string with something containing dollar now works.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 11:43:05 +00:00
sgjesse@chromium.org
22612a516e Change the expectations of the ARM debugger tests once more
A couple of the tests actually passes now.
Review URL: http://codereview.chromium.org/93011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 11:41:19 +00:00
sgjesse@chromium.org
3b84a19bfe Enable flaky test that was fixed some time ago.
Review URL: http://codereview.chromium.org/80001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 09:01:13 +00:00
sgjesse@chromium.org
a8c1df9fa4 Change the expectations of the ARM debugger tests.
Previous change r1756 caused some ARM debugger tests to fail instead of crash in release mode.
Review URL: http://codereview.chromium.org/93005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 08:54:59 +00:00
sgjesse@chromium.org
5b394bf4d1 Handle breaks on keyed IC loads which can have an inlined version.
For keyed IC loads setting a break point now ensures that the inlined code is not used. When the break point is set the inlined map check is changed to fail causing the inlined code not to be used but the IC to be called. As long at the break point is set the map check will stay invalid.
Review URL: http://codereview.chromium.org/87025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 14:48:54 +00:00
yurys@chromium.org
7fc551ecc3 As long as all debugger messages are handled by a single static method we need a way to identify request sender to route the response to the right handler. To accomplish this clients can send some additional data along with command text and debugger will later pass this data to the message handler along with the response text.
Review URL: http://codereview.chromium.org/67266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 14:06:48 +00:00
christian.plesner.hansen@gmail.com
d26e6dd0b4 force-set
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:11 +00:00
lrn@chromium.org
123f671a17 Reduced size of Array.reduce test.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 11:25:51 +00:00
lrn@chromium.org
97427d86e0 Add ES5 Array methods reduce and reduceRight, with test.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 09:57:30 +00:00
sgjesse@chromium.org
b8dc312b25 Make it possible to add a user data object to each script compiled.
Review URL: http://codereview.chromium.org/90003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 07:22:06 +00:00
ager@chromium.org
670a535b35 Correct the marking of tests that only fail on the simulator.
Review URL: http://codereview.chromium.org/80002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 09:40:08 +00:00
mikhail.naganov@gmail.com
6290e19716 Implemented a CSV parser in JavaScript.
Review URL: http://codereview.chromium.org/67253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 17:58:14 +00:00
mikhail.naganov@gmail.com
dfe8af02a6 Implemented Profile object that processes profiling events and calculates profiling data.
Review URL: http://codereview.chromium.org/77014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 17:40:52 +00:00
erik.corry@gmail.com
fb303212b1 Improve coverage of line 619 in stub-cache-arm.cc
Review URL: http://codereview.chromium.org/77028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 14:34:35 +00:00
iposva@chromium.org
82ac3f3031 - Fix buffer overflow in the pre-allocated memory thread.
Review URL: http://codereview.chromium.org/67248

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 00:57:21 +00:00
mikhail.naganov@gmail.com
7aacf00933 Allow multiple function literals to be assigned to the same var / property.
In such a case all functions get the same name. I think it's a good performance / usability tradeoff. In case a developer wants more clarity, it's up to him to give names to functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 16:34:24 +00:00
mikhail.naganov@gmail.com
5edf6f35bc Reimplement (address -> code) mapping from tickprocessor.py in JS.
Found a pair of bugs concerned with border cases in the original implementation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 16:05:17 +00:00
ager@chromium.org
069a8c096f Migrate a couple of old tests to mjsunit tests.
Review URL: http://codereview.chromium.org/67215

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 13:46:55 +00:00
ager@chromium.org
72294ca735 Change the enumeration order for unsigned integer keys to always be
numerical order independently of the representation of the object.

Exchanged the order of enumeration of integer and string keys so
integer keys are first instead of string keys to better match
WebKit/JSC behavior.

Added test cases that document our enumeration order choice.
Review URL: http://codereview.chromium.org/75035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 11:30:55 +00:00
erik.corry@gmail.com
4d18959446 Avoid a call to the runtime system when doing binary fp ops on ARM
(at the moment only if we do not need to allocate a heap number).
Find a few more oportunities to avoid heap number allocation on IA32.
Add some infrastructure to test coverage of generated ARM code in our
tests.
Review URL: http://codereview.chromium.org/67163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 09:30:23 +00:00
yurys@chromium.org
b92740bf44 Lookup can now be performed for several handles.
Review URL: http://codereview.chromium.org/67155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 06:03:17 +00:00
sgjesse@chromium.org
9f7ccacf86 Add debug command break flag for debugger host dispatch.
Ensure that debugger host dispatch is processed even though there are no debugger commands in the queue.
Review URL: http://codereview.chromium.org/67180

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 19:09:38 +00:00
kmillikin@chromium.org
22896c8304 Change the function name collector to tolerate expressions that contain
multiple anonymous function literals as subexpressions.

Choose the rightmost one the one to attach a name to.
Review URL: http://codereview.chromium.org/67165

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 13:14:23 +00:00
ager@chromium.org
0c52806f0d Add mjsunit test for the overriding of read-only properties.
For compatibility, our behavior here does not match the spec.  Added a
comment to that effect in the test.
Review URL: http://codereview.chromium.org/67164

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 12:31:02 +00:00
ager@chromium.org
0de8a28ea7 Fix crash bug when loading const variable in the presence of eval.
The problem was a missing 'uninitialized' check.
Review URL: http://codereview.chromium.org/73076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 10:47:23 +00:00
kasperl@chromium.org
3b7f631e86 Allow using with and eval in JS extensions in debug mode by
getting rid of bogus assertion error.
Review URL: http://codereview.chromium.org/73072

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 06:28:07 +00:00
mikhail.naganov@gmail.com
e9aa21849b Reimplement Splay Tree in JavaScript (and add unit tests!).
This is the first step in reimplementing tick processing scripts in
JavaScript. The goal is to have the same source both for Dev Tools and
Golem, so Python implementation will be removed to avoid code
duplication.

The implementation follows the Dev Tools style: namespaces and JSDocs
are used.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 01:22:52 +00:00
sgjesse@chromium.org
8b4cfc3768 Fix the source position recorded for funtion return
Record the function return position as the end of the function source. Don't record function entry and return positions as statement positions.

Added a test for source position for break at function return.
Review URL: http://codereview.chromium.org/67109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 14:56:03 +00:00
mikhail.naganov@gmail.com
3c2a7bdf21 Add name inference for anonymous functions to facilitate debugging and profiling of JS code.
Currently function name inference is wired with AST optimization pass to avoid introducing another pass over AST. A better solution would be to rewrite AST visitors so they can be naturally combined together in a single pass, as their current implementation doesn't allow it.

For examples of cases where function names can be inferred, see the tests file.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 00:51:59 +00:00
iposva@chromium.org
b5ba35b742 - Fix lint failure.
- Add missing files d8-posix.cc and d8-windows.cc to Xcode project.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-09 23:17:45 +00:00
iposva@chromium.org
8ce3aae482 Workaround for http://crbug.com/9746:
- Added special cutouts if a Vector has NULL data, which will now happen
  if an external string's resource has been deleted.
- Added an verification phase before old gen GC to verify that all real
  entries in the SymbolTable are valid symbols.
- Added test that verifies the correct behaviour of the workaround.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-09 23:04:00 +00:00
asargent@chromium.org
144cca7d3d Fix v8::Object::DeleteHiddenValue to not bail when there are no hidden properties.
Review URL: http://codereview.chromium.org/58016


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-08 21:05:29 +00:00
sgjesse@chromium.org
835b89b727 Fixed step in handling for function.call.
For function.call debug step in did not work as execution did not break in the function called. This has now been fixed using the same means as for function.apply in CL http://codereview.chromium.org/63055.
Review URL: http://codereview.chromium.org/63058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 12:11:43 +00:00
sgjesse@chromium.org
a74fcf458c Fixed the step in handling for function.apply.
The generic step-in mechanism floods the function called with break points to ensure a break is hit when entering the function. This generic mechanism was also used for function.apply. The code for function.apply contains a keyed load IC which was patched when stepping into function.apply. However function.apply enteres an internal frame not a JavaScript frame. This caused the logic for returning from the break in function.apply to fail as it forced a jump to the IC on the top JavaScript frame. The top JavaScript frame was the frame for the function calling function.apply not the frame for the apply function. Now returning from the break point in the keyed load IC in the apply code caused a jump to the code for the call IC for the function calling function.apply in the first place. Not a pretty sight.

Step-in now handles function.apply as a separate case where the actual JavaScript function called through apply is flodded with breakpoints instead of the function.apply function.

BUG=269
BUG=8210@chromium.org
Review URL: http://codereview.chromium.org/63055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 09:54:53 +00:00
sgjesse@chromium.org
2336579a11 Apply Matt Hanselman's patch to fix issue 96.
Reviewed CL at http://codereview.chromium.org/42686.

BUG=96
Review URL: http://codereview.chromium.org/62052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 07:16:10 +00:00
whesse@chromium.org
5ccfe93c9e Fix crash with indexed setter on objects without corresponding getter.
Review URL: http://codereview.chromium.org/63010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-06 14:55:01 +00:00
whesse@chromium.org
20a6e7e5e9 Rewrite of VisitCountOperation that should speed it up
Review URL: http://codereview.chromium.org/56151

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 13:27:14 +00:00
lrn@chromium.org
5dc51480c5 Quick pointer comparison, removed undetectable tests.
Special case for NaN in equality test.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 12:44:45 +00:00
lrn@chromium.org
3e55df5a57 Tracks static type of strings in frame elements and results.
Uses static string type to optimize string additions.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-03 12:01:56 +00:00
lrn@chromium.org
015164f0f2 String.match tests that wasn't included in the implementation change list.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-01 09:09:05 +00:00
ager@chromium.org
e39b80c743 The tests pass on the arm hardware of course.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 16:48:14 +00:00
ager@chromium.org
2ca0e90da5 Apparently, the --simulator=arm option is not always used when using
test.py for running the simulator tests.  Mark the exception
propagation tests as failing on ARM in general for now.  I'll dig into
it again tomorrow morning.

TRB=christian.plesner.hansen@gmail.com
Review URL: http://codereview.chromium.org/56112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 16:43:51 +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
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
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
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
66d40652da Fixed lint errors in test-debug. Sorry for that.
Review URL: http://codereview.chromium.org/56004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 11:56:30 +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
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
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
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
kasperl@chromium.org
dd95e1d216 Add newline at end of test-debug.cc file. TBR=sgjesse@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 10:49:25 +00:00
sgjesse@chromium.org
1bf46b6be0 Added a test for debugger agent protocol message.
Review URL: http://codereview.chromium.org/42555

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 10:42:00 +00:00
kmillikin@chromium.org
4e74725681 Update test expectation.
TBR=plesner

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 08:53:43 +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
christian.plesner.hansen
dbe4e4a644 Marked bug 284 as passing on arm.
Review URL: http://codereview.chromium.org/49013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 00:48:17 +00:00
christian.plesner.hansen
cff1d2715e Added test case for issue 284.
Review URL: http://codereview.chromium.org/52031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 23:49:58 +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
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
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
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
sgjesse@chromium.org
f87d1530e6 The SendAll method on Socket was a helper method that did not really belong in platform.
Review URL: http://codereview.chromium.org/40104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:33:00 +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
mikhail.naganov@gmail.com
3db607a3c4 Dump more stack frames to perf log when executing a C++ function.
JavaScriptFrameIterator is templatized on the iterator type and renamed to JavaScriptFrameIteratorTemp.
The original JSFI is now a typedef for JavaScriptFrameIteratorTemp<StackFrameIterator>. Because of templatizing, JSFI code is moved to frames-inl.h

StackTraceFrameIterator moved to frames.*

Implemented SafeStackFrameIterator which wraps StackFrameIterator and have the same interface. It performs additional checks of stack addresses prior to delegating to StackFrameIterator. SafeSFI is used in an another specialization of JavaScriptFrameIteratorTemp template to perform safe JS frames iteration on sampler ticks.

I haven't took an advantage of having multiple stack frames in tickprocessor yet.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 11:56:44 +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
sgjesse@chromium.org
0dee6cbab4 Fix lint errors.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/27208

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 14:30:30 +00:00
sgjesse@chromium.org
be011678f9 Make test-log-ia32.cc compile even if ENABLE_LOGGING_AND_PROFILING is not defined.
Review URL: http://codereview.chromium.org/28182

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1377 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 13:45:11 +00:00
sgjesse@chromium.org
7a83e2c0f6 Skip flaky (occasionally crashes) test on ARM until issue has been resolved.
BUG=240
Review URL: http://codereview.chromium.org/28183

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 13:32:44 +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
411b7d18f6 Fix lint issues found by tools/presubmit.py.
TBR=mikhail.naganov
Review URL: http://codereview.chromium.org/28178

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-26 07:05:53 +00:00
iposva@chromium.org
c093e94546 - Pass the knowledge whether the old GC is compacting to the GC prologue and epilogue. This allows us to skip frame cooking and uncooking when doing a mark-sweep GC.
- Add the ability for the code to refer to its code object by adding a handle to the code object in the MacroAssembler.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:52:15 +00:00
kasperl@chromium.org
d8c56a7fc4 Fix ARM build.
TBR=olehougaard@chromium.org
Review URL: http://codereview.chromium.org/28115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:13:57 +00:00
mikhail.naganov@gmail.com
632d4e4f3d Adding unit tests for profiler's stack tracer.
The testing is a bit tricky because we need to obtain a frame
pointer (EBP on IA-32) from inside of a function. This is especially
interesting in case of a compiled JavaScript function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:00:21 +00:00
kasperl@chromium.org
1e42e70021 Use SSE3 instructions - if available - for faster To(U)Int32
conversion in bit operation stubs. Disable serialization
support by default to allow us to use SSE3 instructions and
faster write barrier code when running without snapshot.
Review URL: http://codereview.chromium.org/27046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 14:57:46 +00:00
sgjesse@chromium.org
ad7ad5cfe0 Fixed lint errors.
The previous commit (r1349) resulted in a number of lint errors - extra whitespace and a missing explicit on a constructor in the test. These has been fixed.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/27089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 14:22:42 +00:00
mikhail.naganov@gmail.com
1d843bfa3d Fixed regression http://code.google.com/p/v8/issues/detail?id=236.
The problem was that the case of 'undefined' script source wasn't
handled in Script::InitLineEnds.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:33:49 +00:00
sgjesse@chromium.org
be059966c1 Add socket support to platform code.
The new Socket class is an encapsulation of the standard BSD socket API. As it depends on platform specific include files and have some slight platform variations it is part of the platform code.

On Mac OS only the option SO_REUSEADDR is set to true for server sockets. Running the test required it as the bound listener socket would sometimes end up in TIME_WAIT. On Windows and Linux this has never been observed (given the client end of the socket is closed before the server end).

The code has been tested on Windows, Linux and Mac OS. The FreeBSD version is a copy of the Linux version but has not been compiled nor tested.

Missing Xcode project updates.
Review URL: http://codereview.chromium.org/27085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:32:01 +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
lrn@chromium.org
f8051275e0 Add test for GC during RegExp.
Fix bug found by test.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 13:03:54 +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
sgjesse@chromium.org
bdaf8320e4 Fixed Linux build.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/20493

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 14:29:48 +00:00
sgjesse@chromium.org
44b83d3e77 Add host callback for debug break.
Add the ability to have the host embedding V8 receive a callback in the V8 thread while V8 is processing a debug callback. When V8 is processing a debug callback the thread where V8 is executing is sitting in a tight loop processing debug commands until the continue command has been executed. In some embedding situations it is beneficial to be able to call back into the embedding host from the thread where V8 is sitting. The might have functions which needs to be called to complement the JavaScript debugging.

Using the uint16_t array to pass a void* is a temporary hack.
Review URL: http://codereview.chromium.org/20491

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 14:02:42 +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
lrn@chromium.org
3e2712e018 Lots of small optimizations, and one that is measurable (speeds up celtickane-array signficantly).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-16 10:18:34 +00:00
sgjesse@chromium.org
a0aa0309a2 Fix lint errors and compile erors on Linux.
TBR=ager
Review URL: http://codereview.chromium.org/21349

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 12:50:47 +00:00
sgjesse@chromium.org
ceef7cb854 Make the debugger completely unload when the debug event listener is unregistered.
Added a number of handle scopes to the debugger code to keep handles local to the function using them.

Fixed SetDebugEventListener to actually unregister when passed a NULL pointer. Previously this NULL pointer was wrapped in a Proxy.

BUG=1242702
Review URL: http://codereview.chromium.org/21347

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 12:36:58 +00:00
lrn@chromium.org
80bb2cc546 Missing handle check. Triggers bug if the runtime stack overflows and it is detected by a global regexp.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 09:40:15 +00:00
iposva@chromium.org
be6b490fb0 Remove experimental ExternalSymbolCallback feature. This is not needed
since we can now transform String objects to be external when needed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 16:58:55 +00:00
lrn@chromium.org
0b1f3f2134 Issue 231 - Irregexp backtracking stack pointer could become corrupted.
http://code.google.com/p/v8/issues/detail?id=231


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 13:07:58 +00:00
lrn@chromium.org
24dfb65ff8 Test for issue 87 was upgraded, but the old bug file wasn't deleted.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1254 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 09:24:53 +00:00
lrn@chromium.org
396fa22799 Regular Expression literal flags may contain unicode escapes. If these escape any of the
valid flags, "gim", they should work.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 09:09:28 +00:00
iposva@chromium.org
1bf2c7405e Allow the morphing of strings to external strings to avoid having to
create copies in the embedding code (aka WebKit V8 bindings) on every
external use.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 23:52:52 +00:00
lrn@chromium.org
c621bbbe45 Issue 227 Fixed. Properly handles non-ASCII characters in quick-check on ASCII strings.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 11:54:30 +00:00
christian.plesner.hansen@gmail.com
14f66ff796 Added one test case and moved another.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 08:46:26 +00:00
sgjesse@chromium.org
6b4d372696 Added the 'references' command to the debugger protocol to provide access to the mirror features of retreiving all the objects referencing a given object and all objects instantiated by a given function.
Added commands 'references' and 'instances' to the developer shell for using this new debugger protocol command.
Review URL: http://codereview.chromium.org/21080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 14:19:36 +00:00
lrn@chromium.org
b0e3ee6274 Fix bug 225 in regexp replace with function.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 13:24:13 +00:00
lrn@chromium.org
0070e8c572 Fixed overflow bug in parsing of regexp repetitions.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 12:55:20 +00:00
sgjesse@chromium.org
f7f4cb1c33 Fixed the debugger compile events.
The debugger compile events (BeforeCompile and AfterCompile) have not been used by any V8 debuggers lately and where actually not working any more. Added the correct information to the compile event.

Added a simple 'trace compile' command to the developer shell for testing.

Added a test for compile evnets.
Review URL: http://codereview.chromium.org/21076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 10:10:45 +00:00
olehougaard
1a3cdf3fc1 Differentiating the file names between different serialization tests to avoid conflict when testing in parallel.
Review URL: http://codereview.chromium.org/20079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 10:06:55 +00:00
sgjesse@chromium.org
d7a9f15bda Updated handling of the script mirror.
The script mirror is now created through MakeMirror like all other mirrors preserving handle identity. Added a couple of properties to the script mirror and added some more tests for the script mirror.
Review URL: http://codereview.chromium.org/21074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 08:23:10 +00:00
erik.corry@gmail.com
484ee83dd9 Fix crash-bug in code generation for case independent 16 bit backreferences.
Review URL: http://codereview.chromium.org/21042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-04 12:20:27 +00:00
olehougaard
e9a496a5fe Fix lint error.
Review URL: http://codereview.chromium.org/21011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 09:00:43 +00:00
olehougaard
da4fdea61a Fixing the flakiness of the serialization tests by assuring that serialization is run before every deserialization test.
Review URL: http://codereview.chromium.org/19541

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 08:35:03 +00:00
sgjesse@chromium.org
c5964cb7ad File missing from http://codereview.chromium.org/19753.
TBR=ager
Review URL: http://codereview.chromium.org/21010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 08:21:30 +00:00
sgjesse@chromium.org
d131ecf3dd Changed the debugger API to allow only one debug event listener to be registered. The public API now only has SetDebugEventListener instead of AddDebugEventListener and RemoveDebugEventListener.
Moved the registrered debug event listener from the context to a global handle in the Debugger class. Storing it in the context did not make much sense.

Changed a lot of tests to handle the API change.

BUG=1242707
Review URL: http://codereview.chromium.org/19753

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 07:59:12 +00:00
christian.plesner.hansen@gmail.com
4bd3d3d10c Turned down the amount of work done by array-splice to ensure that it
doesn't time out on our slowest platforms.  It turns out that almost
all the time was spent in Array.prototype.unshift on a non-array with
a length-field holding 40000.  We may want to look into that but on
the other hand it is a pretty obscure thing to do so we may not.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 07:24:49 +00:00
erik.corry@gmail.com
4e1190ec73 Added regexp tests from PCRE.
Review URL: http://codereview.chromium.org/19751

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 14:15:18 +00:00
ager@chromium.org
c33e51681f Fix issue 221:
http://code.google.com/p/v8/issues/detail?id=221

The attempt to resolve 'eval' went into an infinite loop.  Also, we
need to throw a reference error in case 'eval' cannot be resolved.
Review URL: http://codereview.chromium.org/19536

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 13:18:20 +00:00
kmillikin@chromium.org
46023fb742 Fix for off-by-one when initializing a constant or function
declaration that was not a slot.
Review URL: http://codereview.chromium.org/19745

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 12:05:13 +00:00
olehougaard
978c62a42d Placing the snapshot in local directory for serialization test to avoid problems with permissions and multiple processes using same file.
Review URL: http://codereview.chromium.org/19503

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 13:21:29 +00:00
lrn@chromium.org
0730ada63e Allow duplicate flags in regexps to match other browsers.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 12:36:40 +00:00
lrn@chromium.org
6e13e8ce37 Parsing a RegExp decimal escape could overflow, making an otherwise too large
decimal escape be accepted as a capture index.
We introduce a limit on the nubmer of allowed captures in a regexp, and break off
parsing of the decimal escape at that point.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 10:38:25 +00:00
sgjesse@chromium.org
9f5ad905cb Skip the context extension object when locating objects referenced from another object (the right way).
BUG=211
Review URL: http://codereview.chromium.org/18857

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-28 06:28:13 +00:00
ager@chromium.org
db1896c253 Make sure that the prototype of the initial map is created in the
right context.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 15:09:44 +00:00
lrn@chromium.org
2de5de495f Irregexp: Backtrack past look-aheads works correctly.
Allows backtracking to clear registers instead of pushing and popping
them to restore state.
Redo of 1135 with bug fixed.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 14:38:17 +00:00
sgjesse@chromium.org
b7ca939e2f Set ARM expectations for new debugger test.
Review URL: http://codereview.chromium.org/18755

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 14:26:14 +00:00
sgjesse@chromium.org
115d57a677 Added a lookup request to the debugger protocol to retreive an object from it's handle.
Added a test for testing handles when using both the 'evaluate' and the 'lookup' request.
Review URL: http://codereview.chromium.org/18752

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:44:37 +00:00
olehougaard
baac94254f Reintroduced a fix for an alignment issue on ARM. I had reverted it by mistake. This fixes the serialization test suite on ARM.
Review URL: http://codereview.chromium.org/18751

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:21:49 +00:00
ager@chromium.org
524e34b8f8 Fix issue 192 by propagating out exceptions from object literal
boilerplate creation.

Removed declaration of unused and unimplemented function.
Review URL: http://codereview.chromium.org/18749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:10:26 +00:00
erik.corry@gmail.com
c956219ef4 * Remember to check for end of string even where we
know the character class must match.
Thanks to Mads and Christian for finding this bug
Review URL: http://codereview.chromium.org/18750

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 13:04:49 +00:00
olehougaard
1efdae68a5 Fixing alignment issue allowing serialization to run on ARM.
Review URL: http://codereview.chromium.org/18746

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 11:33:12 +00:00
erik.corry@gmail.com
108fe9dbcc complete revert by removing empty files
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 15:50:33 +00:00
erik.corry@gmail.com
f6c3ef2d2a Reverting r1136 due to crashes
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 14:33:19 +00:00
lrn@chromium.org
18c2d3ef4e Clears captures of look-aheads on backtrack.
Reduces number of pushes when flushing a trace. Some are converted to clears
in the undo-code instead, and some just ignored if they have no value worth restoring.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 13:34:51 +00:00
ager@chromium.org
39842baecf Do not violate the assumption that fast-case arrays have Smi length
when transforming from slow to fast-case array elements.

This fixes issue 201:
  
   http://code.google.com/p/v8/issues/detail?id=201
   
Review URL: http://codereview.chromium.org/18711

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 13:08:29 +00:00
ager@chromium.org
8a731355be Make sure that eval and try-catch introduced context extension objects
act as if they have no properties in their prototype chains.

This fixes V8 issue 193:

  http://code.google.com/p/v8/issues/detail?id=193.
Review URL: http://codereview.chromium.org/18709

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 12:16:03 +00:00
christian.plesner.hansen@gmail.com
031e72ce99 review
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 07:46:44 +00:00
ager@chromium.org
c23dbc1928 Fix handling of const initialization. We did not handle the fact that
a const variable can be deleted between its declaration and its
initialization.

This fixes issue 189:

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 13:53:06 +00:00
sgjesse@chromium.org
0dab442be9 Added handling of hidden prototype objects when collecting local properties for an object mirror. The property names provided by an object mirror now includes all properties from the object and any hidden prototypes merged together.
Changed the name of Runtime_GetPrototype to Runtime_DebugGetPrototype to indicate that it is a debugger related function and changed its implementation to do the correct __proto__ lookup.

Added some more information to the Map debug print.
Review URL: http://codereview.chromium.org/18658

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 13:20:31 +00:00
lrn@chromium.org
6bd6376588 RegExp parser forgot to advance after reading \c in character class. I.e., \cM was interpreted as \ccM.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 10:37:09 +00:00
christian.plesner.hansen@gmail.com
e801020724 Marked ascii-regexp-subject as flaky on arm for now. The cause of
this failure is that this test depends on a particular optimization in
jscre that we don't yet have, but that we will get very soon.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-21 14:43:10 +00:00
sgjesse@chromium.org
2a5955a4fc Changes to the mirror handling
When getting properties for the global object proxy the properties from the global object are returned.

Script objects now have handles and are serialized by reference.

Added special handling for NaN.
Review URL: http://codereview.chromium.org/18445

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-21 09:32:07 +00:00
erik.corry@gmail.com
2b77e718fa Add support for \b and ^ and $ in multiline mode, completing Irregexp
features.  Switch on Irregexp by default.
Review URL: http://codereview.chromium.org/18193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-19 18:56:47 +00:00
sgjesse@chromium.org
f5f1cd2921 Changes to the V8 debugger support which otherwise caused problems with Chrome.
Added quoting of the name of the ref property using {"ref":1} instead of {ref:1}. The Chrome C++ JSON parser implementation requires quoted property names.

Changed the JSON format for non finite numbers. The previous formatting using NaN, Infinite and -Infinite caused the Chrome C++ JSON parser implementation to fail. Values "NaN", "Infinite" and "-Infinite" (incuding quotes) are now used.

Reverted changes to DebugLookupResultValue (runtime.cc) from http://codereview.chromium.org/17377. The change caused callback into Chrome with the current V8 context expected to have a DOM Window global object. This is not the case when the debugger context is the active context. This causes properties from interceptors and accessors to be reported as undefined in the debugger.
Review URL: http://codereview.chromium.org/18194

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-19 15:21:41 +00:00
sgjesse@chromium.org
c2c780bfc4 Added handles to the mirror objects. When a mirror for an object is created
it is assigned a numeric handle. Handles are used to make a 1:1
correspondence between objects and mirrors. Currently the mirrors are
cached in a JavaScript array and when creating a mirror this cache is
checked to see if a mirror already exists for the object. This cache is
cleared when leaving the debugger.

Changed the serialization format to take advantage of these handles. When
an object is serialized referenced objects are represented just by their
handle id serialized as '{ref:<handle>}'. During serialization the
referenced handles are collected and the serializer can provide a
serialization of all the referenced objects.

Removed the special handling of array properties. Indexed properties and
the length property are now rendered as named properties in the
serialization.

Removed the special serialization handling of RegExp properties. The
properties 'source', 'global', 'ignoreCase' and 'multiline' are serialized
with the rest of the properties.

Changed a lot of tests to handle the changed format.
Review URL: http://codereview.chromium.org/18092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 09:54:46 +00:00
ager@chromium.org
baa5476830 Change the file names of a couple of tests for consistency.
Review URL: http://codereview.chromium.org/18142

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 09:43:42 +00:00
ager@chromium.org
47d1298236 Change the handling of catch blocks to use context extension objects
instead of normal JSObjects.

This ensures that __proto__ and accessors on the Object prototype do
not interfere with catch scopes.  Also, it fixes the bug that catch
variables were not DontDelete (issue 74).

Next step is to create special lookup routines for context extension
objects and remove the special handling of context extension objects
from the general javascript object lookup routines.
Review URL: http://codereview.chromium.org/18143

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 09:42:08 +00:00
feng@chromium.org
de06f3092c Avoid using sprintf_s, which is windows-only.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 19:42:51 +00:00
feng@chromium.org
2cb36759ba Fix issue 6264 with a test case.
The problem is that Disable/EnableAccessCheck on an object may chnage its constructor's behavior
if object's map is the same as constructor's initial map. By copying maps, the constructor's
initial map is not changed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 17:39:23 +00:00
sgjesse@chromium.org
dc2a0ec3e9 Reverted r1078 as it was committed by accident without review.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 12:29:05 +00:00
sgjesse@chromium.org
6bc1d40a57 Added handles to the mirror objects. When a mirror for an object is created it is assigned a numeric handle. Handles are used to make a 1:1 correspondence between objects and mirrors. Currently the mirrors are cached in a JavaScript array and when creating a mirror this cache is checked to see if a mirror already exists for the object. This cache is cleared when leaving the debugger.
Changed the serialization format to take advantage of these handles. When an object is serialized referenced objects are represented just by their handle id serialized as '{ref:<handle>}'. During serialization the referenced handles are collected and the serializer can provide a serialization of all the referenced objects.

Removed the special handling of array properties. Indexed properties and the length property are now rendered as named properties in the serialization.

Removed the special serialization handling of RegExp properties. The properties 'source', 'global', 'ignoreCase' and 'multiline' are serialized with the rest of the properties.

Changed a lot of tests to handle the changed format.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 12:10:34 +00:00
ager@chromium.org
384b0a5408 Fix issue 191:
http://code.google.com/p/v8/issues/detail?id=191

Accessor setters should not be called for eval-introduced context
extension objects.

This change fixes the issue, but I think it is time to separate out
the lookup routines for eval-introduced context extension objects.
There is no reason to use the general lookup routines for this.  I'll
do that in a separate changelist.
Review URL: http://codereview.chromium.org/18090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 11:31:08 +00:00
ager@chromium.org
d4dae20a12 Fix issue 186:
http://code.google.com/p/v8/issues/detail?id=186

Create a new instance type for context extension objects.  Use it to
not use the __proto__ accessor for context extension objects.
Review URL: http://codereview.chromium.org/18044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-14 12:13:26 +00:00
christian.plesner.hansen@gmail.com
37a50a8059 Fixed test failure caused by being more conservative in estimating the
length of expressions containing backreferences.  Bad plesner for
forgetting to run the tests before submitting!


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-14 11:48:52 +00:00
christian.plesner.hansen@gmail.com
d6e6508bd7 Added clearing of captures before entering the body of a loop. This
also revealed a bug or two that had to be fixed.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-14 11:32:23 +00:00
ager@chromium.org
cd1afeaaa2 Add failing test for issue 186:
http://code.google.com/p/v8/issues/detail?id=186

The issue is that the extension object is a normal javascript object
on which assignments to __proto__ changes the prototype chain.
Review URL: http://codereview.chromium.org/18221

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-14 09:20:13 +00:00
sgjesse@chromium.org
25112aba44 Refactored the mirror representation of properties. Removed the AssessorMirror and InterceptorPropertyMirror and moved all reflection for properties to PropertyMirror. From a PropertyMirror it can be checked whether a property has getter/setter defined in JavaScript and information on the getter/setter functions are now available. If calling the getter resulted in an exception this is reflected as well.
Properties from interceptors are also reflected through PropertyMirror as the distinction did not make sense seen from a JavaScript debugging perspective. The isNative function on a PropertyMirror can be used to check whether a property is defined natively by the host (or V8).

Simplified the local property lookup in the debug runtime call to just call GetProperty as the property is known to be a local property.
Review URL: http://codereview.chromium.org/17377

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 14:38:44 +00:00
olehougaard
ce673ec9ad Avoiding the assumption that the pc pointer of RelocInfo points to the word containing the target address. It wasn't true for ARM. (One step closer to serialization on ARM).
Review URL: http://codereview.chromium.org/17376

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 14:38:12 +00:00
lrn@chromium.org
0fad625991 Unsigned number can't be negated in the VisualStudio compiler.
Fixed a few earlier review comments that had slipped through.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 09:23:26 +00:00
lrn@chromium.org
21d2865757 Separately growing stack for irregexp ia32 backtrack stack.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-12 13:05:23 +00:00
ager@chromium.org
12854e6c67 Allocate as many object-literal properties as possible inobject.
This can lead to large objects which wastes a lot of space if we normalize properties.  We therfore clear the inobject properties when normalizing properties.  This is done by adjusting the instance size in the new map and overwriting the inobject properties with a filler.
Review URL: http://codereview.chromium.org/17308

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-12 10:59:58 +00:00
christian.plesner.hansen@gmail.com
4a16e4928a Added check that bails out of a repetition when the body is empty.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-08 12:40:47 +00:00
iposva@chromium.org
f3da5ff626 Fix for issue 171:
- Make sure to not destroy the instance type by slightly rearranging the code.
- Added regression test.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-07 23:26:31 +00:00
olehougaard
726aa859c6 Fix for issue 91 (http://code.google.com/p/v8/issues/detail?id=91)
Review URL: http://codereview.chromium.org/17232

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-07 09:58:58 +00:00
sgjesse@chromium.org
60cb58ea91 Factored the generation of JSON serialization from beeing part of the mirror objects into a seperate class. The purpose of this is to make it easier to change the serialization to contain object identification and references.
Added a test case for the script mirror and modified a number of the other mirror tests.
Review URL: http://codereview.chromium.org/16539

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-07 09:27:30 +00:00
christian.plesner.hansen@gmail.com
afcc36a417 Added runtime call to the logging infrastructure. Made some changes
to the way regexps are being logged.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-06 13:24:52 +00:00
ager@chromium.org
3f383346aa Inline array loads in loops directly in the code instead of always
calling a stub.  The map to check against is unknown when generating
the code, so we patch the map check in the IC initialization code.

Loop nesting is currently not tracked on ARM.  I'll file feature
request bug reports for implementing this on ARM and add the number to
the TODOs before I commit.
Review URL: http://codereview.chromium.org/16409

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-22 12:56:32 +00:00
olehougaard
ed7d9e9c5b Reverting the BOM changes due to security concerns.
Review URL: http://codereview.chromium.org/14890

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-19 13:28:56 +00:00
olehougaard
2c3b392c8c Handling byte-order marks as specified in Ecmascript-262 and in compliance with Safari.
Review URL: http://codereview.chromium.org/15075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-19 12:06:11 +00:00
erik.corry@gmail.com
ab2d4bc9bf * Generate quick checks based on mask and compare for
the alternatives in a choice node.  The quick checks
  are conservative in the sense that they only detect
  failure with certainty.  Checks can do 2 or 4 characters
  at a time.
* Inline the quick checks to allow the alternatives to
  be checked without branching in the common case where
  they fail.
Review URL: http://codereview.chromium.org/14194

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-19 12:02:34 +00:00
sgjesse@chromium.org
6c7a746c5d Refactored the code for handling debug step in in the runtime system into one function. For constructors this also means that step in will no longer step into the code for the builtins context.
Review URL: http://codereview.chromium.org/15035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 14:32:49 +00:00
olehougaard
392e6f849b Fixing a subtle bug in receiver resolution when a thrown and caught function is called from a catch-block.
Second attempt - now with better memory efficiency.
Review URL: http://codereview.chromium.org/14834

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 11:28:13 +00:00
iposva@chromium.org
358591f9ea Fix issue 142:
- Removed the potential for a NULL pointer access in
  ContextSwitcher::PreemptionReceived.
- Removed a leak of the semaphore in the ContexSwitcher thread, by removing
  the need for this semaphore entirely.
- Added a regression test case which will catch accesses to the ContextSwitcher
  singleton after it has been stopped.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 17:40:02 +00:00
christian.plesner.hansen@gmail.com
5d3cc28967 Fixed bug in interest propagation caused by following the loop edge
out of a loop choice node before the continuation edge.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 13:16:38 +00:00
lrn@chromium.org
00122b76d0 Each RegExtTree node can now report the min and max size of strings it can match.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 10:59:14 +00:00
sgjesse@chromium.org
b3dd6b686a Refactored the recording of source position in the generated code. The code generator now has two methods
void CodeForStatement(Node* node)
  void CodeForSourcePosition(int pos)

The first is used to indicate that code is about to be generated for the given statement and the second is used to indicate that code is about to be generated for the given source position.

Added position information for some statements which was missing whem.

Updated the code generator for ARM to emit source position the same way as for IA-32.

Added an assert to ensure that deferred code stubs will always have a source source position as if it has not it will take whatever source position before which makes no sense.

The passing test on ARM has only been tested using the simulator.
Review URL: http://codereview.chromium.org/14170

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 08:45:42 +00:00
lrn@chromium.org
028e3414f2 Removed rep-cmps{w,b} from CheckCharacters to improve performance.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-16 14:21:00 +00:00
lrn@chromium.org
5d2fd5cbaa Regexp-IA32 tests doesn't work with snapshots.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-12 11:40:03 +00:00
lrn@chromium.org
3b968e0207 Preemption code for irregexp-native-ia32. Regexps can not only succeede or
fail, but also report a thrown exception.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-12 10:49:00 +00:00
lrn@chromium.org
09e3c76137 Quantified look-aheads are sometimes removed entirely, leaving only a
single atom node. A flag was not set in this case, leading the wrapper
code to think the pattern was equal to the atom and use the pattern
in the indexOf operation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-12 10:22:56 +00:00
deanm@chromium.org
6297a19160 Improve mark-compact object grouping interface.
The main goal was to improve O(n^2) behavior when there are many object groups.  The old API required the grouping to be done on the v8 side, along with a linear search.  The new interface requires the caller to do the grouping, passing V8 entire groups at a time.  This removes the group id concept on the v8 side.

  - Changed AddObjectToGroup to AddObjectGroup.
  - Removed the group id concept from the V8 side.
  - Remove a static constructor while I'm here, lazily initialize
    the object groups list.
  - Cleaned up return by non-const references to return pointers.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:20:04 +00:00
christian.plesner.hansen@gmail.com
ff3e30ae11 - Added lookbehind propagation for the initial node; now, if the
initial node is interested in what precedes it the automaton is
  given an initial all-consuming character class that determines it.
- Added verification of some node information invariants.  We now
  check that if a node expresses interest in what precedes it that
  information is available to it after assertion expansion.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:13:13 +00:00
ager@chromium.org
e8b56e6f95 Make sure that the API does not change templates pass in from the
user.  The API should never change templates behind the back of the
user.
Review URL: http://codereview.chromium.org/13741

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:09:51 +00:00
erik.corry@gmail.com
4ede982a4b Added test for bug 176 (zero length matches should fail in quantifiers).
Review URL: http://codereview.chromium.org/13381

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 09:01:55 +00:00
sgjesse@chromium.org
d63a3e13e6 Changed the debugger break handling to support situations where there are no stack frames. This can happen when an exception is thrown when compiling code.
This is related to Chromium issue 5349 (http://code.google.com/p/chromium/issues/detail?id=5349).
Review URL: http://codereview.chromium.org/13720

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 08:03:24 +00:00
lrn@chromium.org
5afca497cb Arm codegen could emit const pool in the middle of jump table.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-10 08:37:58 +00:00
ager@chromium.org
4f15a008f6 Make sure that the generic stubs for keyed load and store and for
dictionary probing respects access check bit.
Review URL: http://codereview.chromium.org/13663

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-10 08:05:10 +00:00
olehougaard
90611c0ef7 Removed a few calls to Top::ReportPendingMessages() that caused the messages to be reported prematurely and not at the C++/JS boundary.
Review URL: http://codereview.chromium.org/13287

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 13:18:33 +00:00
sgjesse@chromium.org
bbbab4821c Refactor the convertion of a target address into a code object from the debugger to the Code class.
Review URL: http://codereview.chromium.org/13285

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 12:53:59 +00:00
olehougaard
ccf388fc64 Fixing a bug where a try-finally block obscured a try-catch block when registering an external try-catch handler.
Review URL: http://codereview.chromium.org/13658

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 10:16:38 +00:00
sgjesse@chromium.org
6a8fdf0429 Skip some debugger related tests on ARM for nowas they have different behaviour based on platform and mode. The debugger infrastructure is currently not working on the ARM platform. This also fix the "syntax" error of the previous change to mjsunit.status.
Review URL: http://codereview.chromium.org/13622

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 15:11:02 +00:00
sgjesse@chromium.org
0bc3f21c20 Changed expectations on some ARM debugger tests after CL 933.
Review URL: http://codereview.chromium.org/13245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 13:39:25 +00:00
lrn@chromium.org
5178af89fa Irregexp is specialized on subject character type.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 12:43:01 +00:00
erik.corry@gmail.com
ba09ec5e89 Irregexp:
* Facility for generating a node several ways.  This allows
  code to be generated for a node knowing where it is trying
  to match relative to the 'current position' and it allows
  code to be generated that knows where to backtrack to.  Both
  allow dramatic reductions in the amount of popping and pushing
  on the stack and the number of indirect jumps.
* Generate special backtracking for greedy quantifiers on
  constant-length atoms.  This allows .* to run in constant
  space relative to input string size.
* When we are checking a long sequence of characters or character
  classes in the input then we do them right to left and only the
  first (rightmost) needs to check for end-of-string.
* Record the pattern in the profile instead of just <CompiledRegExp>
* Nodes no longer contain an on_failure_ node.  This was only used
  for lookaheads and they are now handled with a choice node instead.
Review URL: http://codereview.chromium.org/12900

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 09:22:12 +00:00
olehougaard
89855a08d9 Fixing exception reporting so that a verbose TryCatch handler works again.
Review URL: http://codereview.chromium.org/13173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 13:30:55 +00:00
lrn@chromium.org
ee9e6b5bae Excluded test that fails in JSCRE.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 10:04:40 +00:00
lrn@chromium.org
ed4e792cd5 Makes irregexp-ia32 feature complete wrt. regexps.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 09:18:55 +00:00
olehougaard
30204a0c00 Added reporting compilation errors.
Review URL: http://codereview.chromium.org/13125

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 08:35:52 +00:00
ager@chromium.org
15e98d12e6 Pull out revision 915 and 916 to get a green builder. I believe the
issue has been resolved and these changes can go back in along with
the fix tomorrow.

TBR=olehougaard
Review URL: http://codereview.chromium.org/12945

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 14:35:31 +00:00
olehougaard
5b9561b104 Adding a message test to deal with return in finally.
Review URL: http://codereview.chromium.org/13122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 09:27:07 +00:00
olehougaard
cb6a3e2f0a Reporting uncaught errors at the boundary between C++ and JS instead of trying to guess whether they get caught at the time of the throw.
Review URL: http://codereview.chromium.org/12901

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 08:47:31 +00:00
lrn@chromium.org
dd9be4ef58 Matching a back-reference must handle unbound start-register (but can assume that if start register is bound, then end register is bound too).
After matching a back reference, the character position is advanced past
the match


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 13:24:34 +00:00
ager@chromium.org
c1c8603a13 Follow jsc in throwing an exception when using test or exec on a
regexp with no input.

Fixed problem with assertThrows.

Deleted test that tests arbitrary limits on the sizes of regular
expressions.
Review URL: http://codereview.chromium.org/13088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 12:47:21 +00:00
lrn@chromium.org
12b6a949a2 Two tests in the Mozilla test suite pass due to a bug in the framework (compares numbers to NaN with !=).
The tests should fail on V8. The tests are disabled until the framework is fixed.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 12:44:13 +00:00
lrn@chromium.org
569d203ad8 Removed lots of new mozilla tests depending on "options" function.
Options is used to exclude tests when running jit.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 10:21:50 +00:00
christian.plesner.hansen@gmail.com
12774ab2d8 Fixed issue where regexps were parsed without having set up a zone
scope, leading to zone exhaustion.  Added assertion that a zone scope
exists on zone allocation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 14:00:24 +00:00
christian.plesner.hansen@gmail.com
917e91d1f2 - Added some expansion of assertions.
- Splitting of character classes into word and non-word parts.
- A bunch of refactorings.
- Made dispatch table construction lazy.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 15:42:35 +00:00
christian.plesner.hansen@gmail.com
5c39d9c741 Added checking in the regular expression parser that we're below the
stack limit and that the zone allocation limit hasn't been met.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 15:32:20 +00:00
lrn@chromium.org
b07b40b335 Allow the non-spec [a-\d] (i.e., ending a range with a character class) in RegExps.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 14:29:28 +00:00
lrn@chromium.org
0269851619 Fixes (last?) bugs in regexp-ia32 core functionality. All tests run!
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 09:57:14 +00:00
ager@chromium.org
2c2ae533ec Remove a couple of instances of wchar_t after counters change.
Review URL: http://codereview.chromium.org/12820

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 07:56:57 +00:00
erik.corry@gmail.com
49d05495d8 * Remove an unused layer of abstraction by not having both a macro assembler and
an assembler when compiling to bytecode.  This fixes
  http://code.google.com/p/v8/issues/detail?id=165
* Preload the 'current character' register when starting a match (byte code only
  at the moment).
Review URL: http://codereview.chromium.org/10995

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 10:37:06 +00:00
erik.corry@gmail.com
4722a886ec Implement $ for non-multiline.
Review URL: http://codereview.chromium.org/10992

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 08:53:53 +00:00
olehougaard
2b72eeedfb Change implementation of eval to make an exact distinction between direct eval and aliased eval.
Review URL: http://codereview.chromium.org/12673

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 13:55:06 +00:00
lrn@chromium.org
1a9e303e89 Made char comparisons work
Tracer for regexp macro-assembler instructions


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 13:54:31 +00:00
christian.plesner.hansen@gmail.com
7bdb653065 Fixed lint error.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 11:20:05 +00:00
christian.plesner.hansen@gmail.com
4213b46b1d Fixed some assertion propagation issues and added non-multiline $
propagation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 10:35:06 +00:00
erik.corry@gmail.com
ef59fde8de Fix native code Irregexp on MacOSX.
Review URL: http://codereview.chromium.org/10984

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 09:27:30 +00:00
sgjesse@chromium.org
80c0290714 Added a debugger call to run a JavaScript function in the debugger. When called the debugger will be entered and the JavaScript function will be called with the debugger ExecutionState object as its first parameter.
This makes it possible to get information like current line number, current script resource, backtrace information etc. which is not part of the normal API.
Review URL: http://codereview.chromium.org/12472

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 08:01:27 +00:00
christian.plesner.hansen@gmail.com
be6f6d0dc2 Graph node attribute printing.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 07:21:43 +00:00
lrn@chromium.org
d7e5f97b1e Made ARM/IA32 handling in Regexp symmetric (although without an ARM implementation yet).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 13:54:08 +00:00
christian.plesner.hansen@gmail.com
fe591b0ab5 Merge code review fixes.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 08:03:55 +00:00
christian.plesner.hansen@gmail.com
144c8c790a Fixed problem where the two lower-case sigmas would uncanonicalize to
themselves and upper-case sigma, but upper-case sigma would
uncanonicalize to just lower-case final sigma.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 06:05:07 +00:00
christian.plesner.hansen@gmail.com
02a4aeeb5f Really marked the assembler tests as crashing on mac.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 16:01:25 +00:00
christian.plesner.hansen@gmail.com
8e3093dd1c Marked MacroAssemblerIA32Simple as expected to fail on mac.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 15:43:42 +00:00
lrn@chromium.org
f72d8a4de4 IA32-tests won't be compiled on ARM (and not just not run).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 14:26:13 +00:00
lrn@chromium.org
50092cc31e Tests for RegExpMacroAssemblerIA32.
Disabled stack-limit checks.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 13:13:02 +00:00
ager@chromium.org
f15d07afe2 Update d8 so that it can be used to run the mjsunit tests.
Set the security token on the debugger context after all contexts have
been created in d8.  This ensures that all d8 contexts (including the
debugger context) can access eachother.

Copy extra command-line handling from the shell sample to d8.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@836 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 12:58:48 +00:00
christian.plesner.hansen@gmail.com
b57b4a15cd Merge regexp2000 back into bleeding_edge
Review URL: http://codereview.chromium.org/12427

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 11:07:48 +00:00
ager@chromium.org
95d1d40077 Revert r819, 821, and 822 which caused a big performance regression
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 15:01:41 +00:00
olehougaard
6d68f6fb91 Fixed two unexpected passes. We no longer expect them to fail.
Review URL: http://codereview.chromium.org/11351

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 13:41:25 +00:00
olehougaard
3877c91a19 Fixing the detection of aliased eval so that it is exact.
Fixing the semantics of aliased eval so that it is conformant.
Review URL: http://codereview.chromium.org/11563

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 12:49:57 +00:00
christian.plesner.hansen@gmail.com
ab0773040f Applied patch from Alexander Botero-Lowry to fix tests on fresh
checkout with git-svn.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 12:26:31 +00:00
ager@chromium.org
4bd0667324 When probing a dictionary backing storage in generated code, make sure
not to return functions that have not been loaded.

This fixes crashes on expedia.com:

  http://code.google.com/p/chromium/issues/detail?id=4526
Review URL: http://codereview.chromium.org/11272

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 09:18:08 +00:00
olehougaard
27e4365aba Fixing wrong reference to this in eval.
Review URL: http://codereview.chromium.org/11227

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-18 10:02:37 +00:00
olehougaard
4c9102021d Changing the semantics of cross-frame eval to be compatible with Safari and Firefox.
Review URL: http://codereview.chromium.org/11601

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-18 08:43:58 +00:00
iposva@chromium.org
4a31a4b638 Add an API test for v8::ScriptData::PreCompile() to make sure
that v8::V8::Initialize() does not have to be called to allow
pre-compilation. Currently this test would fail, which is
why a workaround has been applied and a bug filed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-18 07:32:38 +00:00
feng@chromium.org
2b3b337d24 Buildbot still is not happy. Looks like CRASH keyword is needed.
TBR = iposva

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 20:04:52 +00:00
feng@chromium.org
d1b9ab06e3 Adjust test status of ARM build to reflect the current situation.
TBR = iposva

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 19:01:37 +00:00
ager@chromium.org
5737edb967 Remove assert that I accidentally committed
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 18:43:04 +00:00
feng@chromium.org
b4e17a2345 fix lint issue (from ager's commit)
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 17:54:15 +00:00
ager@chromium.org
954bda3c46 Fix external string test.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 16:00:58 +00:00
ager@chromium.org
96d15ef6b4 Add experimental support for external two-byte symbols.
This might be a big win in a browser setting where a lot of string
conversions can be avoided.  On the other hand it adds extra pressure
on the global handle system.
Review URL: http://codereview.chromium.org/11404

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 15:13:40 +00:00
kasperl@chromium.org
d24556d1c5 Fix Chromium issue 176 by treating byte-order marks as whitespace.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 06:56:28 +00:00
olehougaard
2173d21458 Restrict application of eval so it can only be used in the context of the global object. For compatibility.
Review URL: http://codereview.chromium.org/10748

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-14 13:14:49 +00:00
feng@chromium.org
1555d130ad Enable api tests on Armulator.
Review URL: http://codereview.chromium.org/10883

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-13 20:24:28 +00:00
lrn@chromium.org
a03b447bd0 Arguments on the command line are made available as a global "arguments" array.
Fix for non-empty assertion in debug mode (string representation of empty arguments is a single space, not an empty string).


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-11 14:16:24 +00:00
kasperl@chromium.org
b14a2e4cb7 Revert r724 (breaks debug mode tests).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-10 17:27:49 +00:00
lrn@chromium.org
2889b1ea86 Flag passes rest of command line to the shell/scripts being run.
Arguments on the command line are made available as a global "arguments" array.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-10 14:27:08 +00:00
iposva@chromium.org
779af439ec Backport the changes from the readability review.
Review URL: http://codereview.chromium.org/8939

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-05 19:18:10 +00:00
erik.corry@gmail.com
b4e7335c0c Removed some unsafe uses of StringShape.
Simplified some uses of StringShape.
Removed unused function SlicedStringFlatten.
Review URL: http://codereview.chromium.org/9408

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-05 10:26:08 +00:00
lrn@chromium.org
4e3bbd8247 If a HeapNumber is the incoming value, it must be converted to Smi before
checking. This is not done in a fast way.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 13:33:13 +00:00
erik.corry@gmail.com
6951059c6a fuzz natives times out on some machines due to DebugReferencedBy
Review URL: http://codereview.chromium.org/9039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 12:07:22 +00:00
erik.corry@gmail.com
eca89dc765 Create an abstraction for the string type flags so that they can be cached.
Read the objects.h change first to understand what's going on here.
Review URL: http://codereview.chromium.org/9038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 10:16:05 +00:00
sgjesse@chromium.org
84170eeb99 Change the test status file parser to fail if the line contains unparsed tokens.
Refactor the platform.system() tests and use macos when running on Mac.
Review URL: http://codereview.chromium.org/8763

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 13:12:35 +00:00
olehougaard
bf3efa1c72 Fixing propertyIsEnumerable for properties that are *both* enumerable and read-only.
Review URL: http://codereview.chromium.org/8962

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 11:53:29 +00:00
olehougaard
77a92988d2 Introduce access control in propertyIsEnumerable.
Also, fix JSObject::getPropertyAttribute() so it deals correctly with access control modifiers.
Review URL: http://codereview.chromium.org/8834

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 09:42:14 +00:00
kasperl@chromium.org
744aedd2d0 Fix natives fuzzing: Let the StringIndexOf runtime function
deal with start indexes that are out of range.
Review URL: http://codereview.chromium.org/8762

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 08:51:26 +00:00
kasperl@chromium.org
95e880ad33 Extend test case to cover calling runtime functions
from JavaScript.
Review URL: http://codereview.chromium.org/8915

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 14:16:02 +00:00
ager@chromium.org
2013421859 Add support for API accessors that prohibit overwriting by accessors
defined in JavaScript code by using __defineGetter__ and
__defineSetter__.

Also, disable access checks when configuring objects created from
templates.
Review URL: http://codereview.chromium.org/8914

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 12:51:06 +00:00
sgjesse@chromium.org
52b2a12684 Added some missing initialization checks to the debugger API.
BUG=3723 (Chromium)
Review URL: http://codereview.chromium.org/8909

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 10:27:28 +00:00
kasperl@chromium.org
a2be3b6f84 Make sure that allocations through CALL_HEAP_FUNCTION
and runtime calls from JavaScript will always succeed
eventually if we have enough memory.
Review URL: http://codereview.chromium.org/8700

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 09:15:58 +00:00
sgjesse@chromium.org
4717ed1de9 Most of the crashing ARM tests failed in debug mode.
TBR=kasperl
Review URL: http://codereview.chromium.org/8698

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 15:50:50 +00:00
sgjesse@chromium.org
10e380400b Skip the tests which currently crash on the ARM simulator.
Review URL: http://codereview.chromium.org/8696

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 14:23:18 +00:00
sgjesse@chromium.org
0b96fb22f3 Added crash detection to tests on Linux.
Added the timeout condition to the CommandOutput class.
Review URL: http://codereview.chromium.org/8695

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 12:51:14 +00:00
kasperl@chromium.org
b5fe75f950 Fix issue with Array.concat not preserving holes in the
top-level arrays.
Review URL: http://codereview.chromium.org/8694

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 10:02:09 +00:00
kmillikin@chromium.org
3450c12ffb Because allocation in large object space can now require checking the
size of the entire old generation, the heap must be (more) properly
set up to test the large object space.
Review URL: http://codereview.chromium.org/8872

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 10:00:38 +00:00
feng@chromium.org
4c1a5810b9 Implement Array::concat function in C++.
The performance of Array::concat is critical of jQuery benchmark from
http://www.dromaeo.com. Our current implementation in JavaScript is very
generic and is several times slower than JSC and SpiderMonkey.

Re-implement Array::concat in C++ to take advantage of underlying implementation
details. This cuts dom-travesal-jquery execution time by half.

We may want to move Array specific implementation into a separate source file,
say jsarray.cc.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 14:47:50 +00:00
kasperl@chromium.org
a71cca5054 Allow string-compare-alignment to pass on ARM simulator.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 16:43:56 +00:00
erik.corry@gmail.com
5f4c9b0960 It seems we haven't nailed the unaligned string compare problem yet.
Review URL: http://codereview.chromium.org/8622

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 15:53:29 +00:00
erik.corry@gmail.com
d7c5ee9120 Test for a bug that was fixed in r554 where we used unaligned accesses on ARM
with surprising results.
Review URL: http://codereview.chromium.org/8619

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 14:42:23 +00:00