Commit Graph

956 Commits

Author SHA1 Message Date
erik.corry@gmail.com
bbc2a73f31 Remove JSCRE
Review URL: http://codereview.chromium.org/21504

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 08:08:01 +00:00
sgjesse@chromium.org
57dfd336db Remove obsolete function NewArrayLiteral.
This function (which creates a tenured JS array) was not use by any code.
Review URL: http://codereview.chromium.org/28070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 20:55:11 +00:00
mikhail.naganov@gmail.com
1338c33eed A refinement of cl 28068.
Review URL: http://codereview.chromium.org/28069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 14:58:48 +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
kmillikin@chromium.org
0c1c8d1876 Cleanup the ARM code generator for try...catch and try...finally by
clarifying the comments and simplifying code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-23 12:05:40 +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
ager@chromium.org
b6a1cd6787 Simplify non-smi bit operation optimization. The explicit range
checks are not needed.  If we fail to store the float as a 64-bit
integer, we just go to the runtime system.  The only extra case in
which we enter the runtime system is for NaN which should not matter.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 14:23:54 +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
sgjesse@chromium.org
aeafc3bba4 Minor fix to fix building without ENABLE_LOGGING_AND_PROFILING defined.
Review URL: http://codereview.chromium.org/21534

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 13:21:41 +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
sgjesse@chromium.org
563287b02f Introduced a platform independent version of strchr, as the return value is const on Windows.
This fixes building of D8 on Windows.

Mac OS and FreeBSD changes have not been tested.
Review URL: http://codereview.chromium.org/20534

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 11:31:44 +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
b1fbed8cca A little peephole optimization for the Irregexp bytecode interpreter.
Review URL: http://codereview.chromium.org/21481

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 10:03:27 +00:00
erik.corry@gmail.com
9c608b2c5a Limit how many places we generate code to flush the same actions. This gives a
13% code size reduction in the php regexp with no discernable performance loss.
Review URL: http://codereview.chromium.org/20457

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 08:24:28 +00:00
ager@chromium.org
195753ff7b Commit of eval changes left out because they were stuck in another changelist.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 07:22:53 +00:00
patrick@chromium.org
1c0ebb7e1c Update d8 preemption mode to support multiple files per line. Each line is run
in its own context.  Files are separated by spaces, and will be run in order,
left to right.

Also add support for comment lines, which start with '#'.
Review URL: http://codereview.chromium.org/20319

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 04:26:04 +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
cafe25f258 ARM side of load optimization in the presence of eval.
Review URL: http://codereview.chromium.org/20453

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 13:54:13 +00:00
ager@chromium.org
74ac71d846 Fix lint errors because of long line.
Review URL: http://codereview.chromium.org/21449

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 13:17:40 +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
sgjesse@chromium.org
98208125cb Include all the code in code creation log events. The code object header size is now added to the size Before ticks the last instructions of a JavaScript functions ended up as unaccounted in the profile.Include ticks in the the last created code object in the profile.Show the unaccounted ticks in the profile as a percentage together with the rest. Added an option to ignore unaccounted ticks in the percentage calculation.
Review URL: http://codereview.chromium.org/21410

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-18 10:29:56 +00:00
mikhail.naganov@gmail.com
a23fd3284a Added the simplest call stack sampling and call profile in tick processor output.
Currently only two stack frames are sampled (current function and its caller).

Output of tick processor looks like this:

 [Call profile]:
   total  call path
   15.2%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: montReduce crypto.js:583
    6.5%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpSquareTo crypto.js:431
    2.9%  Builtin: KeyedStoreIC_Generic  <-  LazyCompile: montReduce crypto.js:583
    2.3%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpMultiplyTo crypto.js:415

Tested under Windows, Linux and OS X.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 14:45:45 +00:00
sgjesse@chromium.org
969d43e785 Changed all log messages to be handled through the LogMessageBuilder instead of through fprintf directly to the log file.
Added a flag for the runtime %Log call and fixed its arguments checking. Use of %Log is only for debugging.
Review URL: http://codereview.chromium.org/21406

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 12:49:35 +00:00
lrn@chromium.org
8cd31d295b Array sort was changed in a way that completely undid another optimization.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 08:56:36 +00:00
sgjesse@chromium.org
2ffc8d981e Fixed Linux build.
TBR=ager
Review URL: http://codereview.chromium.org/21402

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 08:31:53 +00:00
sgjesse@chromium.org
577741308b First step in refactoring the logging system to allow the logging messages to have other destinations than an open file.
This change introduces a log message builder which builds the log message in a static string buffer instead of formatting the log message through fprintf. Currently this message can only be written to a file afterwards.

Changed the code related events to use the log message builder.
Review URL: http://codereview.chromium.org/20406

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 08:21:24 +00:00
ager@chromium.org
d81fad1766 Fix debugger function that treated retry-after-gc failure as an
exception.

Minor indentation cleanup.
Review URL: http://codereview.chromium.org/20404

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-16 13:31:13 +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
5344151ecb Added check for existing frames to the evaluate debugger request.
Fixed output of evaluated expressions from the debugger in the developer shell.

Use global evaluate request from developer shell if there is no JavaScript stack.

Remove use of JS2C macros in developer shell JavaScript code.
Review URL: http://codereview.chromium.org/21350

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 14:20:03 +00:00
sgjesse@chromium.org
b10926644c Modified printing of some types of heap objects to make the printing more uniform.
Review URL: http://codereview.chromium.org/21348

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 12:56:44 +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
ager@chromium.org
be5767575b Prepare push to trunk containing two irregexp crash fixes and support
for morphing strings to external strings.  Now working on version
1.0.2.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 10:03:06 +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
ager@chromium.org
4b6d4f6b3b Fix a couple of typos reported as V8 issue 226.
Review URL: http://codereview.chromium.org/20298

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-12 09:29:02 +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
olehougaard
e7150a8d8a Fixing a few bugs to make the --log-state-change option work.
Review URL: http://codereview.chromium.org/20220

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-11 07:38:31 +00:00
lrn@chromium.org
15ef421bc7 Fix for issue 228.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-10 08:25:25 +00:00
iposva@chromium.org
4ce82a17d0 Prepare push to trunk. Now working on version 1.0.1.
Review URL: http://codereview.chromium.org/21194

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-10 00:31:58 +00:00
sgjesse@chromium.org
2bd60ab80f Fix linking of mksnapshot
Changelist http://codereview.chromium.org/20177 caused linking of mksnapshot to fail as link libraries where not specified. Updated build to link mksnapshot with pthread on Linux and Mac OS and with winmm on Windows.
Review URL: http://codereview.chromium.org/21171

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 16:00:55 +00:00
sgjesse@chromium.org
85584333f9 Support for building V8 with MinGW
V8 can now be build with MinGW. It still fails the following four tests in debug mode:

  mjsunit/parse-int-float
  mjsunit/mirror-array.js
  mjsunit/integer-to-string.js
  mjsunit/regress/regress-114.js

Building with MinGW has been tested with version 5.1.4 using GCC 3.4.5.

In addition to supporting MinGW this change also makes it more explicit which targets needs to link with which libraries.

BUG=64
Review URL: http://codereview.chromium.org/20177

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 15:06:07 +00:00
sgjesse@chromium.org
a85f5c86bc Moved some IA32 specific code from to the architecture dependent part of the debugger code.
Renamed functions related to patching of code with call instructions to match the naming conversion.

BUG=1240753
Review URL: http://codereview.chromium.org/20176

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 12:17:39 +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
ager@chromium.org
05a56bf1ea Add explicit null checks after string conversions in the shells.
This fixes issue 224.
Review URL: http://codereview.chromium.org/20081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 13:53:41 +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
ager@chromium.org
5fa3bd8440 Remove unused code. This code used to be used to "decide" if a call
to eval is aliased.  Now that we correctly track eval aliasing, we do
not need this code.
Review URL: http://codereview.chromium.org/20078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 10:06:41 +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
a5e55c4584 Fix the not-at-start optimization to trigger on the V8 regexp benchmark.
Review URL: http://codereview.chromium.org/20040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-04 13:05:40 +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
mikhail.naganov@gmail.com
2258704e69 Refactor code for determining line position in a source file.
1. Make Script::line_ends initialization two-pass to avoid
   dynamic memory allocation
2. Get rid of the original code in messages.js and use
   Script::line_ends instead.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-04 12:07:45 +00:00
sgjesse@chromium.org
93bd4954e1 Minor debugger cleanup. Store the running state of the previous debugger response to avoid having to parse the just generated JSON response just to pick out the running state. Also removed an unused function.
Review URL: http://codereview.chromium.org/20039

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-04 11:36:30 +00:00
sgjesse@chromium.org
4b05db4ee0 Added check for logging enabled in two places where processing/allocation was performed only to be used only as parameters for the LOG macro. Looked through all the uses of the LOG macro and found only these two places where additional checking was required.
Fixed a couple of comments looking through all the uses of the LOG macro.
Review URL: http://codereview.chromium.org/20018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 14:44:39 +00:00
lrn@chromium.org
78ec586391 RegExp: Small bugfix in debug mode.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 13:39:25 +00:00
sgjesse@chromium.org
ee7c5dd64a Use Handle version of AddKeysFromJSArray when building line endingd array.
Review URL: http://codereview.chromium.org/21013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 13:00:40 +00:00
lrn@chromium.org
cf1e1b1b98 Trace contains information about whether we know that we are at the start of input.
Choice nodes may know that they are never not at the start of input.
This can remove start_of_input assertions in cases where they are statically known to fail.
The initial loop is unrolled once if the regexp might check for the start of input. Only the first iteration may be at the start, the following loop knows that it isn't.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 11:43:55 +00:00
mikhail.naganov@gmail.com
3835e915c4 Adding src_file_name:line_number into perf log entries for compiled JS functions.
Thus, instead of the following profiler records:
   1.5%    1.5%   LazyCompile: <anonymous>
we'll now have these:
   1.5%    1.5%   LazyCompile: <anonymous> richards.js:309

Basically, I translated two functions from messages.js into C++.
In the next CL I will update messages.js to use added native functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 10:52:02 +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
erik.corry@gmail.com
7f6afa5bf4 The optimizations performed by Irregexp could possible hide bugs or
could themselves be a source of bugs.  Add a flag to switch off
optimizations (--noirregexp-optimization) to aid testing.
Review URL: http://codereview.chromium.org/19538

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 16:27:31 +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
erik.corry@gmail.com
b88dbfee5c Fix http://code.google.com/p/chromium/issues/detail?id=7258 crash in IsFlat.
You can't keep a StringShape across things that can cause GC.
Review URL: http://codereview.chromium.org/19749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-02 08:23:42 +00:00
sgjesse@chromium.org
58e3ae93c4 Remove unused macro definition.
Review URL: http://codereview.chromium.org/19709

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 14:25:10 +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
olehougaard
dd2051ca2f Enabling splitting building with snapshots in to building the mksnapshot executable and building with a snapshot to facilitate building for ARM with a crosstool compiler.
Review URL: http://codereview.chromium.org/19014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-30 09:34:55 +00:00
mike@belshe.com
75037cbd6e Enable programmatic access to Profile pause/resume
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-29 19:47:00 +00:00
lrn@chromium.org
ef8d48ead5 Added check for invalid repetition in RegExp parser
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-29 14:14:13 +00:00
deanm@chromium.org
aa8662545a Further minify non-visible JavaScript.
This imports a Python version of Douglas Crockford's JSMin.  JavaScript files can annotate that they want to be run through the minifier.  Currently debug and mirror are minified.

This results in ~12k savings on the final binary size.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-28 10:15:11 +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
lrn@chromium.org
1e98f72cad Allow larger regexp stack if necessary, which includes specific layout tests.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-27 13:43:42 +00:00
deanm@chromium.org
269763d51b Reduce the size of a release sample shell by 55k.
The ExternalReferenceTable population code was code driven, using the list macro callbacks to call an Add() function.  Additionally this Add() function was defined in the class defintion, making it inline.  This caused this single function to be ~100k of code.  It is now mostly table driven, but there are still some cases left as code, and these could be improved in the future for further reduction in binary size.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-27 11:30:44 +00:00
ager@chromium.org
92047bd3fa Prepare push to trunk. Now working on version 1.0.0.
Review URL: http://codereview.chromium.org/18843

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1171 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-27 09:44:41 +00:00
erik.corry@gmail.com
e091488b3e Lint error
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 20:55:31 +00:00
erik.corry@gmail.com
260cd876d1 Eliminate the code that handles fallback to JSCRE. The only way to get
JSCRE now is to use the --noirregexp flag.  Also add code to check that
we react sensibly to some very large regexps.
Review URL: http://codereview.chromium.org/18587

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 20:09:35 +00:00
erik.corry@gmail.com
34b47563ff Reduce work done in EatsAtLeast to a sane level.
Review URL: http://codereview.chromium.org/18753

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 19:38:26 +00:00
iposva@chromium.org
0d11b5885a Fix white space issues.
Review URL: http://codereview.chromium.org/18806

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 18:23:01 +00:00
iposva@chromium.org
ff3433d0fd - Preserve bootstrapper state across thread switches (fixes issue 143).
- Make sure stack guards are properly setup even when preemption is active.
- Fix missing v8::Locker and v8::Unlocker use in d8.cc.
- Threads forked in d8 do get their own context setup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 18:09:46 +00:00
lrn@chromium.org
01198feda3 A field might be incorrectly set, causing registers to be pushed and popped
instead of just cleared on backtrack - or, worse, the other way around!


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 15:26:44 +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
335a73aa4b Added a simple wrapping of the debugger JSON responses.
Added a 'dir' command to the command line debugger to display the details of an object including the handle number for the object and the objects that it references.

Added the ability to use #XXX# to a 'print' or 'dir' request. XXX is the handle number for the object.
Review URL: http://codereview.chromium.org/18589

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 14:03:03 +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
ager@chromium.org
7a523e2f92 Handle strndup in freebsd in the same way it is handled on other
platforms that do not support it directly.
Review URL: http://codereview.chromium.org/18585

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 11:28:51 +00:00
whessev8
78de0cef11 Fixes two lint errors in codegen-ia32.cc.
Review URL: http://codereview.chromium.org/18743

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 10:32:39 +00:00
olehougaard
dd5cda5dde Change type of snapshot from char array to byte array to avoid portability problems between different compilers.
Review URL: http://codereview.chromium.org/18583

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 10:21:09 +00:00
whessev8
8faf0da7b6 Revert change to Smi check that was a performance regression.
Review URL: http://codereview.chromium.org/18582

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 09:15:48 +00:00
erik.corry@gmail.com
50e5ad72cb Fix bug where strings were not flattened before regexp.
Review URL: http://codereview.chromium.org/18552

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 08:35:41 +00:00
iposva@chromium.org
e33a8ee184 Fix Windows build (maybe).
TBR=fqian

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 17:48:58 +00:00
iposva@chromium.org
e718576d4f Split handle scopes into an internal version and a version accessible
through the API. This allows us to verify state on entry through the API.
In this change verification in the API entry is checking that the current
thread holds the V8 lock when a HandleScope is instantiated if a v8::Locker
has ever been used by the V8 instance.
Review URL: http://codereview.chromium.org/18707

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 17:22:23 +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
whessev8
29d28e7cc9 Optimizes an assembly-language conversion from int to Smi in codegen.
Review URL: http://codereview.chromium.org/18551

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 13:58:49 +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
whessev8
ffd1b25cfb Optimizes check for Smi range in the code generator.
The check whether a 32-bit signed integer is in the Smi
range is now Sign bit( value + 0x40000000 ) == 0,
done with a single cmp instruction.
Review URL: http://codereview.chromium.org/18710

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 13:06:15 +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
kmillikin@chromium.org
6b2a2c1fff Clean up the mark-sweep/compact collector by removing outdated
verification code and updating outdated comments.
Review URL: http://codereview.chromium.org/18502

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1131 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 08:13:12 +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
5ffd6a6137 Apply Jeff Bailey's patch to use %p instead of %i to print pointer
values.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 14:00:23 +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
kmillikin@chromium.org
74a17e90fc Fix incorrect issue number.
Review URL: http://codereview.chromium.org/18493

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 12:52:39 +00:00
kasperl@chromium.org
5fdc70b80d Avoid memmove when emitting operands in the assembler
and get rid of the mutability of the Operand byte buffer.
Review URL: http://codereview.chromium.org/18656

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 12:12:15 +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
lrn@chromium.org
0381d3dd18 Irregexp-32 frame-align code uses a register. This is no longer hard-coded to ebx.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 09:05:00 +00:00
sgjesse@chromium.org
f16d7d2903 Check for valid frame number when processing the debugger frame request.
BUG=1250705
Review URL: http://codereview.chromium.org/18492

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-22 08:31:40 +00:00
christian.plesner.hansen@gmail.com
140f687b96 Enabled irregexp by default. I have deliberately made this change
minimal so it's easier to revert partially or fully.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-21 13:16:03 +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
05a04b1023 Fix endianism issues in regexp interpreter.
Review URL: http://codereview.chromium.org/18613

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-21 08:20:40 +00:00
ager@chromium.org
bfbda9c871 Fix an unsound use of a string shape in the parser.
Review URL: http://codereview.chromium.org/18612

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-21 08:08:15 +00:00
erik.corry@gmail.com
4e1713e861 Lint fixes.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-20 18:58:30 +00:00
erik.corry@gmail.com
263bac505b * Irregexp: Move from a byte-oriented bytecode format to a 32-bit oriented
bytecode format.  This provides a nice speedup on Intel and probably an
even better one on ARM.  Also removes the 256-register limitation on the
interpreter.
Review URL: http://codereview.chromium.org/18363

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-20 18:50:01 +00:00
christian.plesner.hansen@gmail.com
ad3fdf168b Added -p option to d8 that runs a list of source files in a separate
thread with preemption enabled.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-20 14:14:22 +00:00
sgjesse@chromium.org
41e55f245a Added missing property types to debug print.
Review URL: http://codereview.chromium.org/18405

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-20 13:27:11 +00:00
erik.corry@gmail.com
585e36b40e Optimization: The quick check should ignore the negative lookahead instead of
insisting that it should match.
Review URL: http://codereview.chromium.org/18360

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-20 11:36:28 +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
olehougaard
60e5d024ef Reverting change that made flexo sad.
TBR=ager
Review URL: http://codereview.chromium.org/18150

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 14:53:36 +00:00
olehougaard
3291fd4de2 Writing snapshot.cc in a form that can be compiled by the crosstool compiler.
Changed a cast that caused alignment problems on ARM.
Review URL: http://codereview.chromium.org/18312

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 14:12:56 +00:00
ager@chromium.org
49d9334955 Prepare push to trunk. Now working on version 0.4.9.
Review URL: http://codereview.chromium.org/18310

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 10:09:55 +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
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
deanm@chromium.org
b7c1200462 Fix a bunch of spelling mistakes :\
Review URL: http://codereview.chromium.org/18094


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 19:08:34 +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
erik.corry@gmail.com
503c1c249c Lint error.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 13:09:23 +00:00
erik.corry@gmail.com
43e9e343dd Noone really liked the name "GenerationVariant" so here it gets renamed
to "Trace".
Review URL: http://codereview.chromium.org/18091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 12:45:48 +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
olehougaard
958316400f Fixed some external references in the ARM code generator to use an ExternalReference wrapper.
Review URL: http://codereview.chromium.org/18266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 08:32:50 +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
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
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
70af3cc4ba The "enter" opcode was slow and crashes for large arguments on Windows.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 10:16:02 +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
olehougaard
e78a32eb59 Introducing a kUninitialized constant used for clearing the function cache.
Review URL: http://codereview.chromium.org/17639

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 07:37:53 +00:00
olehougaard
e13aed2da3 Do not cache functions until we know they are fully constructed. This is needed in case of a stack overflow during construction.
Review URL: http://codereview.chromium.org/17354

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-13 07:13:33 +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
cb94595cfc Fix comment typo.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-12 11:07:02 +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
christian.plesner.hansen@gmail.com
66c2603a40 Fixed lint.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-08 11:44:06 +00:00
christian.plesner.hansen@gmail.com
569fb985ce Added more constness to the api. There are still some methods back
that could be const but aren't, but now at least all the obvious ones
should be.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-08 11:35:34 +00:00
sgjesse@chromium.org
741bf3b6ed Remove unused code.
Review URL: http://codereview.chromium.org/17410

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-08 10:40:09 +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
christian.plesner.hansen@gmail.com
4e78736900 Fixed build with no ENABLE_LOGGING_AND_PROFILING
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-07 14:24:08 +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
0d22bce302 Update version number to fix small small whoopsie I committed when
pushing to trunk.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-06 14:53:10 +00:00
christian.plesner.hansen@gmail.com
01488cca7f Preparing push to trunk (0.4.7)
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-06 14:11:19 +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
sgjesse@chromium.org
2458742734 Fixed double printing of exceptions when enabeling the debugger.
Detect the response to the continue command.
Review URL: http://codereview.chromium.org/17071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-06 09:43:18 +00:00
lrn@chromium.org
74b7d4ad00 Recognizes character classes like whitespace and non-newline and generates more efficient code.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-02 12:23:17 +00:00
ager@chromium.org
5f1ef9cbf8 Update comment and add assert.
Fix typo where underscore is used instead of a dash.
Review URL: http://codereview.chromium.org/16238

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-23 08:58:56 +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
erik.corry@gmail.com
16852b987d Some irregexp optimizations around keeping track of when the current character
register contains the next n characters.
Review URL: http://codereview.chromium.org/16410

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-22 12:48:14 +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
christian.plesner.hansen@gmail.com
d7c933e7ae Added support in the profiler for creating 'regions' that cover part
of the generated code.  These can be used by the profiler to
categorize the ticks that occur within generated code and thereby show
more detailed information about where time is spent in generated code.
For instance, this is what the profiler displayed for a simple regexp
benchmark with irregexp-native before:

[JavaScript]:
   total  nonlib   name
   87.2%   87.2%   RegExp: (?:\w*\W+)*

This is what we can display now:

[JavaScript]:
   total  nonlib   name
   87.2%   87.2%   RegExp: (?:\w*\W+)*
                   -  53.0%  56.7% BranchOrBacktrack
                   -  14.9%  59.8% CheckCharacterLT
                   -  13.7%  20.4% CheckStackLimit
                   -   6.7%   6.7% SafeCall
                   -   2.7%   7.0% CheckCharacterGT
                   -   2.4%   2.4% SafeReturn
                   -   2.1%   2.1% LoadCurrentCharacter
                   -   1.8%   1.8% PushRegister
                   -   0.9%   0.9% PopRegister
                   -   0.9%   0.9% AdvanceRegister
                   -   0.3%   0.3% PopCurrentPosition
                   -   0.3%   0.3% CheckGreedyLoop
                   -   0.0%  20.4% PushBacktrack
                   -   0.0%  22.3% CheckCharacter
                   -   0.0%   2.4% IfRegisterLT


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-19 13:12:43 +00:00
erik.corry@gmail.com
3dc722b555 Fix ARM build.
Review URL: http://codereview.chromium.org/14887

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-19 12:13:11 +00:00
lrn@chromium.org
d7290b6b6e Instead of jumping over a conditional backtrack, jump to a single instance somewhere else.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-19 12:08:29 +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
erik.corry@gmail.com
00b0b67c03 Unroll + and ? to reduce loop-related work.
Review URL: http://codereview.chromium.org/14836

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 15:17:24 +00:00
erik.corry@gmail.com
fbc7a2a1a9 Fix lint error.
Review URL: http://codereview.chromium.org/15036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 15:17:02 +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
christian.plesner.hansen@gmail.com
e5270bd6e4 Removed propagation of information about preceding nodes by expanding
following nodes.  Found a better solution.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 14:30:53 +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
sgjesse@chromium.org
b372ecdf95 Added option --shell to D8 and updated the usage text.
Review URL: http://codereview.chromium.org/14192

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 10:39:11 +00:00
sgjesse@chromium.org
5561365269 Removed tabs from d8.js.
TBR=ager
Review URL: http://codereview.chromium.org/14835

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 10:38:09 +00:00
sgjesse@chromium.org
e0c7b0f366 Added command line debugger to D8 shell.
break location [condition]
  clear <breakpoint #>
  backtrace [from frame #] [to frame #]]
  frame <frame #>
  step [in | next | out| min [step count]]
  print <expression>
  source [from line [num lines]]
  scripts
  continue
  help

It is enabled through the option --debugger which is on by default.
Review URL: http://codereview.chromium.org/14509

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 10:06:49 +00:00
sgjesse@chromium.org
e33f70db93 Fix an issue of a raw pointer being returned after possible allocation.
Review URL: http://codereview.chromium.org/14833

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 09:39:18 +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
281845d37c Changed (1<<31)-1 into INT_MAX.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 12:08:27 +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
lrn@chromium.org
4fe637066d Minor changes, mostly cosmetic, in string search.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 09:53:06 +00:00
sgjesse@chromium.org
e116a24896 Removed some unused code to make Linux builders happy.
TBR=ager
Review URL: http://codereview.chromium.org/14189

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 09:02:31 +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
sgjesse@chromium.org
2d66455dc0 Give an error when setting break points in functions either defined through the API or in functions which are part of the V8 builtins.
BUG=178
Review URL: http://codereview.chromium.org/13785

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-15 09:15:05 +00:00
olehougaard
f7168008ea Introduced a TempAssign utility because I just couldn't watch this anymore. YMMV.
Review URL: http://codereview.chromium.org/14422

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-15 08:55:35 +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
ager@chromium.org
2a84fa4128 Fix lint issue.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 13:04:22 +00:00
ager@chromium.org
96f7a76fc8 Prepare pushing new v8 version to trunk (now working on version 0.4.7).
Review URL: http://codereview.chromium.org/13385

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:38:02 +00:00
sgjesse@chromium.org
4ddee48218 Continue running if failing to make a debug event into a JSON event for sending to the debugger.
This partly fixes Chromium issue 5349 (http://code.google.com/p/chromium/issues/detail?id=5349).
Review URL: http://codereview.chromium.org/13384

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:25:06 +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
sgjesse@chromium.org
2ea951c641 Add handling of empty stack in the backtrace debug request.
Add accessor function for the exception in an ExceptionEvent.
Review URL: http://codereview.chromium.org/13382

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 09:35:44 +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
kmillikin@chromium.org
6ef835e5d2 A recursive call to the code generator could (conceivably) clobber any
register.  Generate code to evaluate both arguments of FastCharCodeAt
before popping either from the stack.
Review URL: http://codereview.chromium.org/13706

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@958 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-10 13:49:19 +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
sgjesse@chromium.org
19bb4fd646 Fixed lint error.
Review URL: http://codereview.chromium.org/13661

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 12:30:05 +00:00
sgjesse@chromium.org
173b5c8e4b Fixed Linux build by removing unused code.
Review URL: http://codereview.chromium.org/13284

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 11:24:53 +00:00
sgjesse@chromium.org
1d388d0778 Moved the code generation for debug break stubs from builtins* to debug*. From builtins* all code generation delegate to debug*. Added files debug-ia32.cc and debug-arm.cc for platfoem specific code generation of debugger stubs.
Removed a dead file reference (frames-ia32-inl.h) from the Visual Studio project.

Updated the ARM Visual Studio project to build again by adding all the RegExp files.
Review URL: http://codereview.chromium.org/13657

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 11:12:14 +00:00
olehougaard
f1aa70ac24 Simplify the logic determining whether to report an exception.
Review URL: http://codereview.chromium.org/13283

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 10:36:31 +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
86df8fc27c Fixed compiler warning C4244 when compiling with the ARM simulator in Windows.
Review URL: http://codereview.chromium.org/13282

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 09:43:16 +00:00
deanm@chromium.org
fa04fa8a19 Make Logger::SuspectReadEvent extract the class name from the object. This makes the lone caller cleaner, and also avoids a tiny bit of work in the default case of not running with --log-suspect.
Review URL: http://codereview.chromium.org/13655

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 09:19:02 +00:00
erik.corry@gmail.com
df727ffd43 Fix build (someone tell gcc you can't take the address of a static
const int and someone tell MSVC it's OK to define a static const int
in a .cc file).
Review URL: http://codereview.chromium.org/13656

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 09:17:41 +00:00
erik.corry@gmail.com
7b4b4959c8 * Have an ASCII and a UC16 interpreter for Irregexp bytecodes -
never have to convert an ASCII string to UC16 for Irregexp.
* Generate slightly different code when we know the subject string
  is ASCII.
Review URL: http://codereview.chromium.org/13247

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-09 08:30:49 +00:00
lrn@chromium.org
67c26a869f Minor presentation changes
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 13:33:24 +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
ager@chromium.org
c023ec3a77 Fix trailing whitespace.
TBR=sgjesse
Review URL: http://codereview.chromium.org/13616

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 11:23:38 +00:00
erik.corry@gmail.com
c642237b78 Fixes to IA32 code generator to cope with new
code generation machinery.
Review URL: http://codereview.chromium.org/13244

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 10:33:10 +00:00
ager@chromium.org
1c7c655193 Make sure to set property attributes in GetProperty in the case of
failed access checks.

Added assert to GetPropertyWithReceiver which was hit by our tests in
debug mode.
Review URL: http://codereview.chromium.org/13242

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 10:29:03 +00:00
sgjesse@chromium.org
8d8012586c Moved the builtins used by the debugger to a separate list.
Review URL: http://codereview.chromium.org/13241

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 10:16:57 +00:00
erik.corry@gmail.com
8bbd1be424 Irregexp (bytecodes) don't forget to update current position
on a no-case successful backref.
Review URL: http://codereview.chromium.org/13615

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 09:43:34 +00:00
erik.corry@gmail.com
bf9d096326 Improve speed of String.replace by around 33% by not constructing
sliced strings for the interstices of the matches.  This can be
speeded up further.
Review URL: http://codereview.chromium.org/13614

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 09:22:24 +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
iposva@chromium.org
72c07041a8 - Simplify the code slightly by using Max().
TBR=kasperl

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 21:51:46 +00:00
iposva@chromium.org
f455d7afc4 Fix lint error.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 17:53:03 +00:00
iposva@chromium.org
925a27c023 Partial fix for issue 173:
- Do not keep growing the zone segment size exponentially. By putting
  an upper limit on the segment size we limit the requirements for
  contiguous memory allocation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 17:37: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
sgjesse@chromium.org
07e14578c0 Fixed the caching of counters. This also fixes the --dump-counters which reads the counters from the cache when dumping.
Review URL: http://codereview.chromium.org/13171

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 10:40:13 +00:00
olehougaard
9378b1afb4 Checking and reporting for stack overflow in the right places.
Review URL: http://codereview.chromium.org/12986

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-05 09:57:36 +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
sgjesse@chromium.org
99fb47aa06 Added type method to the debug events.
Fixed handling of script break points past the length of the script.
Review URL: http://codereview.chromium.org/13126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 13:39: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
2fd187d0cd ByteArrayProvider increments free-pointer correctly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 08:33:32 +00:00
kmillikin@chromium.org
291147e2f1 Enable printing code generated for builtins in release mode when the
disassembler is enabled.  It's convenient to be able to see them.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-04 08:26:08 +00:00
christian.plesner.hansen@gmail.com
2ce3df8336 Fixed lint error.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 16:21:19 +00:00
christian.plesner.hansen@gmail.com
f56c10598b Made d8 console=readline work on leopard.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 15:51:16 +00:00
ager@chromium.org
73398bcf17 Preparing to push to trunk.
Review URL: http://codereview.chromium.org/13091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 13:58:36 +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
christian.plesner.hansen@gmail.com
dc2077465f Added support in d8 for memory-mapped counters and added the python
stats-viewer tool.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 09:35:21 +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
whessev8
739cf6802e Change Windows daylight saving time calculations to
use C stdlib local time functions, not Win32 functions.
Win32 time functions slowed down with Windows XP SP3.
Change all platforms to use equivalent years between 2008 and
2035 for years outside the range 1970..2037.
Review URL: http://codereview.chromium.org/12824

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 13:20:00 +00:00
lrn@chromium.org
9aaa8d985b Builds on Windows too.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 10:19:10 +00:00
lrn@chromium.org
70a3ba75be Optimization of single character indexOf. Gives small improvement on GCC4.2, but large improvement on GCC 4.3 (which was much worse on that particular code).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 09:50:39 +00:00
christian.plesner.hansen@gmail.com
cc3e472843 - Fixed regexp logging issue.
- Removed use of std::set.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 08:16:12 +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
2110b71373 Added assignment to variable after UNIMPLEMENTED macro, to keep compiler happy.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 11:46:08 +00:00
lrn@chromium.org
467de7e8cf Fixes stray IA32-reference in ARM builds
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 10:17:24 +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
ager@chromium.org
88d4740d89 Commiting Evan's change to use char instead of wchar_t for counter names.
Code review URL:

  http://codereview.chromium.org/13011/show


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 07:40:43 +00:00
iposva@chromium.org
f87ad6741f Fix issue http://code.google.com/p/v8/issues/detail?id=166 which I have run
across as well.

TBR=plesner

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-30 00:19:08 +00:00
erik.corry@gmail.com
038c2c6f27 Fix build error in debug mode by making sure the tracer has the
new method too.
Fix spacing in tracer.
Review URL: http://codereview.chromium.org/12806

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 12:11:36 +00:00
erik.corry@gmail.com
94ce4d302f Add an operation that checks whether we are at the start of the string.
Review URL: http://codereview.chromium.org/10998

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 11:48:22 +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
lrn@chromium.org
54f8a1eacc Calling native irregexp now returns captures correctly.
Reduces failing tests in native mode to 2(!)


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 09:51:26 +00:00
erik.corry@gmail.com
96001672ae Lint lint lint.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 09:08:13 +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
319fddf6af Fixed build on windows. Msvc is an idiot.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 12:10:16 +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
erik.corry@gmail.com
75eda4766f * Complete case independent support in Irregexp.
Review URL: http://codereview.chromium.org/12473

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 07:27:08 +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
feng@chromium.org
ef6aa241f7 Add v8::jscre namespace around jscre functions to avoid link errors with jsc pcre files in Chrome.
Review URL: http://codereview.chromium.org/12496

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 22:45:21 +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
erik.corry@gmail.com
1dd110b800 Address comments about my code in http://codereview.chromium.org/12427
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 12:18:17 +00:00
lrn@chromium.org
b8013e590f Fixed some outstanding formatting issues.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 11:29:26 +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
0974883a6e Made irregexp flags available in release mode
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 14:26:45 +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
b6a83bc924 Scanning for captures only happen when a decimal escape gives a number that
is too big to be a useful back reference. It won't happen at all in meaningfull
ECMAScript compliant regexps.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 14:14:04 +00:00
erik.corry@gmail.com
9cc65da3c3 Oh, it has to work on Intel CPUs too?
Review URL: http://codereview.chromium.org/12432

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 13:23:49 +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
erik.corry@gmail.com
9367637dd2 Old gcc on ARM can't cope with template stuff we weren't using anyway.
Review URL: http://codereview.chromium.org/12429

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 12:45:31 +00:00
lrn@chromium.org
4eb1913cea New regexp files are now included in VS project.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 12:08:13 +00:00
erik.corry@gmail.com
01456e8bc3 Case independent back references.
Reviewed at http://codereview.chromium.org/12406


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 11:39:20 +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
sgjesse@chromium.org
acb4ff9955 Removed all functions for parsing the debugger command line commands. The core debugger should only support the JSON protocol. Expect these functions to re-appear in d8.
Added processDebugRequest to the debugger which will only process a JSON request. Use that function in the debugger.
Review URL: http://codereview.chromium.org/11395

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-24 10:31:22 +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
a2ec5d90cb Removing assert to make flexo happy.
TBR=ager
Review URL: http://codereview.chromium.org/11565

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 13:37:38 +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
sgjesse@chromium.org
64f0dca263 Added support for building V8 on Windows with either the shared or static version of MSVCRT. The selection of the MSVCRT version is through the new SCons flag msvcrt which can have values static or shared with static being the default.
Review URL: http://codereview.chromium.org/11564

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 11:19:01 +00:00
ager@chromium.org
41a5c9212e Apply patch from Alexander Botero-Lowry that adds FreeBSD platform
support.
Review URL: http://codereview.chromium.org/11347

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 10:06:29 +00:00