Commit Graph

883 Commits

Author SHA1 Message Date
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
ager@chromium.org
ced1493d01 Remove use of strtoll in favor of strtol which should be supported on
more platforms.
Review URL: http://codereview.chromium.org/11607

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 08:36:30 +00:00
iposva@chromium.org
8831e4ab8f - Make sure to not mix allocators by using the correct StrDup function.
- Include needed system header.
Review URL: http://codereview.chromium.org/11547

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 23:53:18 +00:00
iposva@chromium.org
3fc91f93a9 Remove OS::WcsCpy from platform.h. This function is unused
and is giving us headaches on platforms not supporting wchar_t.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 23:16:26 +00:00
feng@chromium.org
3f0cc0434a Turn ASSERT(!rn.is(ip)) into CHECK so the error can be caught in release mode.
It addresses the problem of 'cmp' instruction that has the side-effect that ip register
shouldn't be used as rn.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 18:12:48 +00:00
feng@chromium.org
1e75177958 fix lint
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 17:44:08 +00:00
feng@chromium.org
5db6acda1d ip cannot be used in cmp instruction. Revert to r1.
Review URL: http://codereview.chromium.org/11322

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 17:33:53 +00:00
feng@chromium.org
631ad72ffc More work on completing Keyed IC code on ARM port.
Added stats counter support in macro-assembler-arm.*.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 16:59:00 +00:00
feng@chromium.org
5dea882447 Minor cleanup code in GenerateStoreField.
Review URL: http://codereview.chromium.org/11276

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 16:31:22 +00:00
ager@chromium.org
9ee294b302 Explicitly change a floating point division with a constant into a
multiplication by its inverse.

In optimized builds GCC does this on its own, but this may be useful
when using other compilers.
Review URL: http://codereview.chromium.org/11524

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 11:33:50 +00:00
sgjesse@chromium.org
40cd237bae Change the handling of OS::Abort on Windows to enter the debugger if the process is being debugged.
Review URL: http://codereview.chromium.org/11522

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 10:00:36 +00:00
ager@chromium.org
917bf2200a Disable map collection since there is a bug in it somewhere. Leave in
the code so we can work on it.
Review URL: http://codereview.chromium.org/11806

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

This fixes crashes on expedia.com:

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 09:18:08 +00:00
sgjesse@chromium.org
cabd500409 Removed som unused function from the JavaScript side of the debugger.
Review URL: http://codereview.chromium.org/11269

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-19 12:27:55 +00:00
ager@chromium.org
d54583f140 Removed one more occurrence of a failure in a handle.
Review URL: http://codereview.chromium.org/11469

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-19 09:50:50 +00:00
ager@chromium.org
6e931081e3 Ensure that external symbols have hash codes.
Review URL: http://codereview.chromium.org/11443

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-18 08:43:58 +00:00
feng@chromium.org
736c7a9d35 Some debugging support fixes on ARM simulator port.
1) Let SaveContext remember the top JS frame stack pointer so it works in simulator where C stack and JS stack are separated;
2) Use the new calling convension in %DebugBreakCallHelper function;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 17:44:16 +00:00
ager@chromium.org
96d15ef6b4 Add experimental support for external two-byte symbols.
This might be a big win in a browser setting where a lot of string
conversions can be avoided.  On the other hand it adds extra pressure
on the global handle system.
Review URL: http://codereview.chromium.org/11404

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 15:13:40 +00:00
ager@chromium.org
23a3ecbebd Prepare push to trunk. Now working on version 0.4.5.
Review URL: http://codereview.chromium.org/11201

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 08:57:04 +00:00
kasperl@chromium.org
d24556d1c5 Fix Chromium issue 176 by treating byte-order marks as whitespace.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 06:56:28 +00:00
kasperl@chromium.org
7940adb1ec Track loop nesting across function calls when the function
is called through an IC the first time.
Review URL: http://codereview.chromium.org/10746

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-17 05:50:52 +00:00
olehougaard
2c680b97e6 Oops. Forgot to throw *new* $EvalError.
Review URL: http://codereview.chromium.org/10749

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-14 14:36:46 +00:00
olehougaard
2173d21458 Restrict application of eval so it can only be used in the context of the global object. For compatibility.
Review URL: http://codereview.chromium.org/10748

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-14 13:14:49 +00:00
feng@chromium.org
9d06372cfe Enable IC stubs for KeyedLaod/Store on ARM.
Several functions are not complete yet, always fall back to slow case.
It fixes test-api/AccessControlIC test.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-13 01:18:31 +00:00
feng@chromium.org
98525aabe3 Fix the exception order by remember JS handler in an external handler.
Review URL: http://codereview.chromium.org/10625

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-12 23:21:54 +00:00
feng@chromium.org
47c71e84a8 Some fixes in ARM simulator:
1) create a simulator per thread and using thread storage;
2) capitalize two function names;
3) use sscanf instead of sscanf_s in arm simulator;
4) disable warning of sscanf when building with arm simulator;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-12 22:57:04 +00:00
kmillikin@chromium.org
45e88ce988 Minor cleanup of the code generators to reduce (eventual) register
pressure and to avoid gratuitous merges in the CFG.  No real
performance impact is expected.
Review URL: http://codereview.chromium.org/10404

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-12 11:00:12 +00:00
feng@chromium.org
01230b25b2 cl.exe complains about missing parens around the boolean expression.
Review URL: http://codereview.chromium.org/10298

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-12 01:05:41 +00:00
lrn@chromium.org
cf4747c709 Use OS::StrDup to duplicate strings.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-11 14:51:56 +00:00
lrn@chromium.org
a03b447bd0 Arguments on the command line are made available as a global "arguments" array.
Fix for non-empty assertion in debug mode (string representation of empty arguments is a single space, not an empty string).


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-11 14:16:24 +00:00
ager@chromium.org
f6911f6be8 Make sure that data functions return 0 instead of -0 for a number of
date functions such as getHours for dates before 1970.

This is consistent with the behavior of other JavaScript engines.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-11 13:30:05 +00:00
deanm@chromium.org
8bea254650 Use shorter encoding for mov REG, IMM. Use Set() in two places to generate smaller code when the immediate is 0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-11 06:10:07 +00:00
feng@chromium.org
3ccdce6d83 Fix CALL_NON_FUNCTION.
Using two flags to specify the state of targets:
1) FixupIsPCRelative specifies where to patch (relative to pc or at pc);
2) FixupUseCodeObject specifies what to patch (code object or start address).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-10 22:53:19 +00:00
kasperl@chromium.org
b14a2e4cb7 Revert r724 (breaks debug mode tests).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-10 17:27:49 +00:00
ager@chromium.org
cc055d2dee Destroyed global handles should not be touched. Added extra
assertions to get errors when first touching the destroyed handle
instead of getting the error when allocating a new handle at some
later point.
Review URL: http://codereview.chromium.org/9741

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-10 14:36:03 +00:00
lrn@chromium.org
2889b1ea86 Flag passes rest of command line to the shell/scripts being run.
Arguments on the command line are made available as a global "arguments" array.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-10 14:27:08 +00:00
sgjesse@chromium.org
ebdd02ebd3 Removed some unused debugger functions.
Review URL: http://codereview.chromium.org/10249

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-10 09:45:50 +00:00
deanm@chromium.org
8ee441ea9f Use shorter SIB encoding. For example, the previous:
8d044500000000 lea eax,[eax*2+0x0]
Will be encoded with the much shorter:
8d0400         lea eax,[eax+eax*1]

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-09 17:48:34 +00:00
feng@chromium.org
47ac6ff1e0 fix lint, approved offline by iposva
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-07 23:00:09 +00:00
feng@chromium.org
fc8a0e3fa5 Fix OOM handler code. Old code didn't pop up the state slot.
Review URL: http://codereview.chromium.org/10223

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@720 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-07 22:56:41 +00:00
kmillikin@chromium.org
6edea51f89 Reporting -1 as the size of an ILLEGAL reference which actually has
size 0 was too cute.
Review URL: http://codereview.chromium.org/9689

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-07 08:58:23 +00:00
kmillikin@chromium.org
bdb896cc40 Emit pushes and pops through the virtual frame on ARM. Merging of
frames is not yet handled.  The ARM code generator should be back in
line with the IA32 one.
Review URL: http://codereview.chromium.org/9182

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-07 08:21:07 +00:00
whessev8
a6554f8785 Adds a --help option and usage message listing all flags to V8.
Review URL: http://codereview.chromium.org/9420

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-06 10:43:15 +00:00
iposva@chromium.org
1af131cbed Handle stack overflow errors correctly when rewriting the AST
for likely Smis.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-05 20:39:41 +00:00
iposva@chromium.org
779af439ec Backport the changes from the readability review.
Review URL: http://codereview.chromium.org/8939

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-05 10:26:08 +00:00
kmillikin@chromium.org
47e55a77a7 Initial port of VirtualFrame to the ARM architecture. To reduce the
size of the change, the initial implementation provides read access to
the frame (eg, locals, parameters, and expression stack elements) but
no mutation.
Review URL: http://codereview.chromium.org/7302

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-05 08:44:54 +00:00
olehougaard
31520bc34a Removed a comment that is no longer valid.
Review URL: http://codereview.chromium.org/8960

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-05 08:43:22 +00:00
ager@chromium.org
439f3e6708 Do not put failures in handles.
Assert in the Handle constructor that the object is not a failure.

I have run our own tests in debug mode and the WebKit layout tests in
debug mode and there are no regressions.
Review URL: http://codereview.chromium.org/9114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-04 16:23:56 +00:00
deanm@chromium.org
a62c678814 Use 1 byte push REG instructions instead of the 2 byte ModRM version.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-04 14:02:24 +00:00
deanm@chromium.org
44fe15dbfb Remove duplicated code, the two emit_operand were basically identical.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-04 14:00:35 +00:00
whessev8
eb9c7f3265 Code cleanup & simplification.
Moves the calls to tracer and UpdateLiveObjectCount inside the call to
(inlined) SetMark.  Removes global object counter.
Review URL: http://codereview.chromium.org/8910

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-04 13:05:56 +00:00
ager@chromium.org
801e168dcc Prepare push to trunk. Now working on version 0.4.4.
Review URL: http://codereview.chromium.org/9324

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-04 11:38:08 +00:00
ager@chromium.org
af16174b19 Make buildbots green. StringShapes can change during GC when we
shortcut cons strings.
Review URL: http://codereview.chromium.org/9245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 15:33:45 +00:00
ager@chromium.org
240d818bb8 Smi ranges are not symmetrical. -kMinSmiValue is not a Smi.
Review URL: http://codereview.chromium.org/9041

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 13:33:13 +00:00
erik.corry@gmail.com
c390485090 Fix place where linter complains about lonely {
Fix place where ARM compiler loses track of whether variables were initialized.
Review URL: http://codereview.chromium.org/9244

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 12:08:01 +00:00
erik.corry@gmail.com
ed8d093e72 Add file accidentally omitted from last change.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 10:35:24 +00:00
erik.corry@gmail.com
eca89dc765 Create an abstraction for the string type flags so that they can be cached.
Read the objects.h change first to understand what's going on here.
Review URL: http://codereview.chromium.org/9038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-03 10:16:05 +00:00
kmillikin@chromium.org
ec3c4ced39 Reverted 671.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 13:18:52 +00:00
kmillikin@chromium.org
67ae89e417 Simplify the way we materialize boolean values that are not yet pushed
on the stack frame.
Review URL: http://codereview.chromium.org/8764

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 11:53:29 +00:00
olehougaard
2a6c90e668 Fixed some details in GetPropertyAttributeWithFailedAccessCheck
Review URL: http://codereview.chromium.org/8959

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-31 08:51:26 +00:00
kasperl@chromium.org
25421c9cde Ignore result of calling Heap::CollectGarbage and continue
to try the next allocation. This is consistent with how we
handle it when calling from JavaScript to C++.
Review URL: http://codereview.chromium.org/8916

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 12:51:06 +00:00
ager@chromium.org
69e8060636 Move assertion that might cause garbage collections to before
extracting raw pointers.
Review URL: http://codereview.chromium.org/8913

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 11:38:22 +00:00
erik.corry@gmail.com
128c1ab8fe Silly pointer thinko.
Review URL: http://codereview.chromium.org/8912

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 11:35:48 +00:00
kasperl@chromium.org
3a296601ae Prepare for pushing version 0.4.2.
Review URL: http://codereview.chromium.org/8911

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 11:19:31 +00:00
kasperl@chromium.org
ff1088d698 Fix lint issue.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 11:15:29 +00:00
erik.corry@gmail.com
8a8a24870b Fix 3 places where we were doing retry after GC without using the macros that
were defined for that purpose.
Review URL: http://codereview.chromium.org/8734

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-30 09:15:58 +00:00
feng@chromium.org
24cb757ae3 Fix Chromium issue 3607.
Make Date::toLocaleDateString output be the same format as Safari.

Someone famililar with Date builtin object should check other functions.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 23:30:25 +00:00
iposva@chromium.org
156c1323e3 Fix out-of-date comment.
TBR=ager

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 18:31:55 +00:00
erik.corry@gmail.com
21228af2c0 Get the ARM simulator to throw an exception on unaligned accesses.
Review URL: http://codereview.chromium.org/8830

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 14:12:13 +00:00
kasperl@chromium.org
a26b3535de Allow three runtime call attempts before throwing an out of
memory exception. Still needs work in Runtime_PerformGC to
make sure we'll allow future allocations.
Review URL: http://codereview.chromium.org/8873

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 12:16:34 +00:00
whessev8
28cee257b6 Remove unused maps during marking garbage collections.
Review URL: http://codereview.chromium.org/8831

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 10:02:09 +00:00
sgjesse@chromium.org
d9285da2a8 By default disable the general protection fault message box when
running tests on Windows. This requires 

Added the option --win-error-box to enable general protection fault
message box which can be convenient when debugging failing tests on
Windows.

Added crash detection when running tests on Windows. The output
is not fully polished but crashed indications are printed for the
different progess indicators.

Changed the OS::Abort on Windows from generating a "crash" (int3)
to calling abort(). This is to avoid tests which are known to fail
with out of memory errors to be detected as crashed tests.
Review URL: http://codereview.chromium.org/8676

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 09:52:31 +00:00
kmillikin@chromium.org
af989d9e94 Check the growth of the old generation before expanding the paged
spaces (during normal allocation) and when allocating large objects.
If the promotion limit is reached, fail allocation to trigger a
garbage collection.
Review URL: http://codereview.chromium.org/8657

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-29 09:27:59 +00:00
iposva@chromium.org
a74efbd120 Fix compile failure with very strict gcc warning rules on Linux.
TBR=kasperl

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 22:47:51 +00:00
iposva@chromium.org
35939fd987 Track whether a node or variable are likely to be a Smi value. Propagate that
knowledge in the AST and inline the Smi check into the generated code if it
is deemed high value (e.g. in loops).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 22:33:00 +00:00
feng@chromium.org
d0b263c37b Fix the lint error.
TBR=iposva

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 17:32:01 +00:00
feng@chromium.org
6ac8e45528 Check that an index is in the range of 0 to array length in ArrayConcatVisitor.
Elements out of range are discarded.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 17:23:10 +00:00
feng@chromium.org
91dffb0c4e fix build error in debug mode, TBR=iposva
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 16:27:09 +00:00
kasperl@chromium.org
51058d276f Fix lint issues.
TBR=feng@chromium.org
Review URL: http://codereview.chromium.org/8659

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 14:47:50 +00:00
ager@chromium.org
44340e39c5 Change the order of two assignments, to make sure that the script type
field is always initialized to a Smi before we get any GCs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 13:46:04 +00:00
ager@chromium.org
b595d914a8 In my final round of refactoring, I accidentally broke my string
lenght optimization.  Here is the fix: check that the instance type
not the receiver is JS_VALUE_TYPE.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 10:25:35 +00:00
olehougaard
867d504395 Fixing profiling when using snapshot.
Review URL: http://codereview.chromium.org/8655

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 09:53:52 +00:00
kasperl@chromium.org
66a1567bf5 Get ready for pushing version 0.4.1 to trunk.
Review URL: http://codereview.chromium.org/8829

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 08:42:47 +00:00
kasperl@chromium.org
e79ebd5ceb Work around issue 131 by checking for empty handles
in a few places.
Review URL: http://codereview.chromium.org/8828

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 08:29:23 +00:00
ager@chromium.org
8813d15d18 Revert revision 593. This was a cleanup change but it caused layout
test regressions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 07:30:10 +00:00
feng@chromium.org
1706231d78 Fast check undefined in EQUALS.
Review URL: http://codereview.chromium.org/7979

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-28 03:39:17 +00:00
ager@chromium.org
721b7298e2 Allow inline caching for getting the length of string wrapper objects.
Review URL: http://codereview.chromium.org/8620

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 14:36:08 +00:00
kasperl@chromium.org
2dcb4d2c59 Fix issue 120 by patching the on-stack receiver in the
IC stubs for calls just before invoking the target
function instead of doing it before resolving the
function.
Review URL: http://codereview.chromium.org/8192

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 14:12:02 +00:00
erik.corry@gmail.com
3cd77583e1 Fix mistake in ARM version of string length stub.
Review URL: http://codereview.chromium.org/8193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 14:01:04 +00:00
whesse@chromium.org
d08b095bce Revert changes 601 and 602. TBR
Review URL: http://codereview.chromium.org/8190

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 12:45:24 +00:00
erik.corry@gmail.com
1158879625 Add missing ARM files from last change!
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 12:44:11 +00:00
erik.corry@gmail.com
0fc72f2b4e Serendipitously arrange the tags so that String.length() becomes a branch-free
operation.  I have another version of this change that does not remove the
special inline caches for difference sized strings.  The other version is ever
so slightly faster, but the nice thing about this version is that it removes
253 lines of code.
Review URL: http://codereview.chromium.org/8187

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 12:39:34 +00:00
whesse@chromium.org
724f5648b9 Rewrites a ternary choice operator to fix a compiler
linkage bug.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 12:24:22 +00:00
whesse@chromium.org
6941a4f389 Collects unused maps that are only kept alive by map transitions.
If a map has descendents in the map transition tree that are alive,
it is kept.  Only maps such that they and all their descendants
have no live objects are collected.  This happens in mark-sweep and
mark-compact garbage collections.
Review URL: http://codereview.chromium.org/8099

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 11:55:31 +00:00
kasperl@chromium.org
a510287b66 Fix issue 128.
Review URL: http://codereview.chromium.org/8617

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-27 09:48:47 +00:00
erik.corry@gmail.com
6e00a80354 You can't use BinarySearch on an unsorted array and other
sillinesses found while trying to get rid of medium-sized strings.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-26 20:50:05 +00:00
feng@chromium.org
f26baa4a4c remove unused strcasecmp on windows, it conflicts with the one from webkit, check in on behave of dglazkov@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 23:20:25 +00:00
sgjesse@chromium.org
c204f48529 Revorked version of http://codereview.chromium.org/8101. The only change is
that the exception stored in the TryCatch is not cleared as that was the
cause of the regression.

So the actual difference to http://codereview.chromium.org/8101 is:
Index: src/top.h
===================================================================
--- src/top.h   (revision 576)
+++ src/top.h   (working copy)
@@ -154,10 +154,6 @@
     if (has_pending_exception()) {
       thread_local_.external_caught_exception_ =
           thread_local_.pending_external_caught_exception_;
-    } else {
-      if (thread_local_.try_catch_handler_ != NULL) {
-        thread_local_.try_catch_handler_->Reset();
-      }
     }
     thread_local_.pending_external_caught_exception_ = false;
   }
@@ -312,14 +308,14 @@
 };



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 20:50:26 +00:00
kasperl@chromium.org
4e4fc50842 Get ready for fixing issue 120: Pin point the places
where the receiver needs to be patched with the proxy
and get ready of unnecessary function patching on ARM.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 12:58:17 +00:00
kasperl@chromium.org
c128b8d9de Improve code for looking up in context slots in runtime.cc and
use safe casting operations to slot access on contexts when
possible.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@588 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 10:59:40 +00:00
kmillikin@chromium.org
681ae19bd4 Change a few runtime functions that took and returned a dummy argument
to instead take no arguments and return the undefined value.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 10:13:22 +00:00
sgjesse@chromium.org
5ffd290217 Changed the workarround for a GCC compiler bug to be only active for the GCC
version range for which the bug is known to exist.

Added include to compile with GCC 4.3.1.

BUG=122


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 09:35:27 +00:00
christian.plesner.hansen@gmail.com
9d9f608a38 - Added caching of regexp data in the compilation cache.
- Changed the structure of regexp objects from having two internal
  fields to having a single field containing a fixed array, since it's
  easier to store the whole fixed array in the cache.
- Move printing of the command to after printing std{err,out} in the
  compact progress indicators in the test framework.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 08:40:02 +00:00
sgjesse@chromium.org
5d36cc8061 Fix build.
Review URL: http://codereview.chromium.org/8144

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 07:19:00 +00:00
sgjesse@chromium.org
27154148cf Reverted r576 as it caused a regression.
TBR=kasperl
Review URL: http://codereview.chromium.org/7970

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 06:40:43 +00:00
sgjesse@chromium.org
39a5ffbd85 Cleanup of http://codereview.chromium.org/8101.
Changed the catcher_ field to a boolean value and renamed it. Modified the
propagation of the external caught exception to also clear the current
TryCatch if there is no exception as it might hold an exception which has
been bypassed by code in a finally block.

Minor formatting changes to a test.
Review URL: http://codereview.chromium.org/8102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 06:22:47 +00:00
feng@chromium.org
a5ead4a421 Addressing Ivan's comments of using INVALID_TYPE in Factory::CreateApiFunction.
Review URL: http://codereview.chromium.org/7925

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 22:27:16 +00:00
bak@chromium.org
69686b1435 Fixed usage of NewArgumentsObject for accessor.
Review URL: http://codereview.chromium.org/7917

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 15:06:31 +00:00
bak@chromium.org
d296a22917 - Fixed performance regression caused by ComputeContextSlotReceiver.
- Eliminated a few write barriers.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 14:55:45 +00:00
kasperl@chromium.org
e1c2887a64 Get ready for pushing 0.4.0 to trunk. We're now working
towards version 0.4.1.
Review URL: http://codereview.chromium.org/8100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 13:33:11 +00:00
sgjesse@chromium.org
f7367a9fe6 Posponed the setting of "external_caught_exception" to when leaving JavaScript
execution. This is achieved by storing a pointer to the C++ TryCatch when the
exception is thrown and checking that this is the handler active when leaving
JavaScript.
Review URL: http://codereview.chromium.org/8101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 12:54:13 +00:00
christian.plesner.hansen@gmail.com
e08ce319ca Added v8::Object::GetProperties method that returns an array of all
the enumerable properties of an object.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 10:31:49 +00:00
bak@chromium.org
187879a25a - Added conditional write barrier to object accessors.
- Sped up allocation of Arguments object.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 08:46:32 +00:00
kasperl@chromium.org
b727198587 Fix issue 124 by computing the receiver correctly when
the property is found in a context slot.
Review URL: http://codereview.chromium.org/8097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 08:42:22 +00:00
sgjesse@chromium.org
63afc7bad3 Changed the message reporting for try { ... } finally { ... } statements to
report the exception when they happen in the try block and not as previously
when re-thrown after execution of the finally block. There is no longer any
message generated by re-throw.

Added test cases for various combinations of try/catch/finally with throw in
different places.

Added a regression directory to the messages tests which is processed by the
test runner.

Added regression tests for the specific bugs fixed.

Runs all the test suites.

BUG=73
BUG=75
Review URL: http://codereview.chromium.org/8050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 08:40:19 +00:00
christian.plesner.hansen@gmail.com
c7ed0707a3 - Added const in a few places.
- Changed WeakReferenceCallback to take a Persistent<Value> instead of
  a Persistent<Object>.
- Removed Message::GetUnderline and Message::GetScriptData.
- Added Value::IsDate, Date::Cast and Date::Value.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 08:25:23 +00:00
erik.corry@gmail.com
dbc6dd66e4 Fix some style issues.
Review URL: http://codereview.chromium.org/8055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 07:28:21 +00:00
erik.corry@gmail.com
631519c3df Copy strings 1 word at a time when flattening etc.
Review URL: http://codereview.chromium.org/7885

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 07:20:28 +00:00
ager@chromium.org
8e0979e2ff Introduce a lookup cache class in the runtime system and use it for
keyed loads that enter the runtime.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 07:04:56 +00:00
kasperl@chromium.org
b75da76a2b Apply Daniel's patch for array index strings.
Review URL: http://codereview.chromium.org/7869

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-23 06:20:57 +00:00
sgjesse@chromium.org
03e44f3f75 Add a workaround for a compiler gug in GCC 4.2.3. See issue 122 for details.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 15:04:40 +00:00
kmillikin@chromium.org
65821f321c Rename member variables and functions and clarify comments to try to
make the operation of LabelShadows more understandable.
Review URL: http://codereview.chromium.org/7868

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 12:45:33 +00:00
christian.plesner.hansen@gmail.com
b338967098 Replaced the implementation of %StringEquals, which was a poorly
optimized duplicate of String::Equals, with a simple call to
String::Equals.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 12:33:20 +00:00
christian.plesner.hansen@gmail.com
85251f756c - Changed regexp logging to include the string being matched and to
escape commas.
- Fixed issue with block-comparing unaligned strings on arm.
- Added short documentation to one of the Persistent constructors.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 12:00:19 +00:00
erik.corry@gmail.com
8e9bdd7b69 Fix warning from Windows about loss of data in cast-less assignment.
Review URL: http://codereview.chromium.org/7865

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 11:13:48 +00:00
bak@chromium.org
b26322d4c1 - Applied FixedArray::WriteBarrierMode to NewArgumentsFast.
Review URL: http://codereview.chromium.org/8052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 09:47:20 +00:00
kasperl@chromium.org
50d9f5e256 Incorporate patches by Paolo Giarrusso to allow profiling
C++ functions in shared libraries, building in directories
containing spaces, and using named constants better.
Review URL: http://codereview.chromium.org/7864

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 09:46:09 +00:00
erik.corry@gmail.com
1aae797ddd Use direct copy and templates to speed up flattening of strings.
Review URL: http://codereview.chromium.org/8011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 09:09:07 +00:00
bak@chromium.org
bf948c8313 - Optimized CopyFixedArray and CopyJSObject.
- Refactored block copying.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 08:21:18 +00:00
kasperl@chromium.org
034b89cc05 Refactor the smi case inlining for binary operations, so
it's easier to inline the code on demand. Right now, we still
only inline the smi case code for bitwise operations.
Review URL: http://codereview.chromium.org/7669

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 07:47:02 +00:00
sgjesse@chromium.org
ca37dab981 Added handling of empty handles to String::AsciiValue and String::Value.
Review URL: http://codereview.chromium.org/7832

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-22 06:30:29 +00:00
iposva@chromium.org
ba6502bd64 - ip register cannot be used when accessing large constants in the instruction
stream. Enhance the debug code to save and restore the unused holder_reg
  at these points.
- Fix lint issues.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 22:40:14 +00:00
feng@chromium.org
202dedbdb3 No more failures than before. It is ready to be reviewed.
Review URL: http://codereview.chromium.org/7420

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 20:11:50 +00:00
feng@chromium.org
648f6d21c6 Fix style issues.
TBR=iposva

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 20:08:49 +00:00
feng@chromium.org
4bb03e97a6 Fixed the build error in debug mode.
TBR = iposva

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 19:52:07 +00:00
feng@chromium.org
df3aea2cc0 Initialize the variable to a valid value.
Review URL: http://codereview.chromium.org/7826

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 19:14:22 +00:00
feng@chromium.org
42ef2c3d77 Split window support from V8.
Here is a description of the background and design of split window in Chrome and V8:
https://docs.google.com/a/google.com/Doc?id=chhjkpg_47fwddxbfr

This change list splits the window object into two parts: 1) an inner window object used as the global object of contexts; 2) an outer window object exposed to JavaScript and accessible by the name 'window'. Firefox did it awhile ago, here are some discussions: https://wiki.mozilla.org/Gecko:SplitWindow. One additional benefit of splitting window in Chrome is that accessing global variables don't need security checks anymore, it can improve applications that use many global variables.

V8 support of split window:
  There are a small number of changes on V8 api to support split window:
Security context is removed from V8, so does related API functions;
A global object can be detached from its context and reused by a new context;
Access checks on an object template can be turned on/off by default;
An object can turn on its access checks later;

  V8 has a new object type, ApiGlobalObject, which is the outer window object type. The existing JSGlobalObject becomes the inner window object type. Security checks are moved from JSGlobalObject to ApiGlobalObject. ApiGlobalObject is the one exposed to JavaScript, it is accessible through Context::Global(). ApiGlobalObject's prototype is set to JSGlobalObject so that property lookups are forwarded to JSGlobalObject. ApiGlobalObject forwards all other property access requests to JSGlobalObject, such as SetProperty, DeleteProperty, etc.

  Security token is moved to a global context, and ApiGlobalObject has a reference to its global context. JSGlobalObject has a reference to its global context as well. When accessing properties on a global object in JavaScript, the domain security check is performed by comparing the security token of the lexical context (Top::global_context()) to the token of global object's context. The check is only needed when the receiver is a window object, such as 'window.document'. Accessing global variables, such as 'var foo = 3; foo' does not need checks because the receiver is the inner window object.

  When an outer window is detached from its global context (when a frame navigates away from a page), it is completely detached from the inner window. A new context is created for the new page, and the outer global object is reused. At this point, the access check on the DOMWindow wrapper of the old context is turned on. The code in old context is still able to access DOMWindow properties, but it has to go through domain security checks.


It is debatable on how to implement the outer window object. Currently each property access function has to check if the receiver is ApiGlobalObject type. This approach might be error-prone that one may forget to check the receiver when adding new functions. It is unlikely a performance issue because accessing global variables are more common than 'window.foo' style coding.

I am still working on the ARM port, and I'd like to hear comments and suggestions on the best way to support it in V8.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 19:07:58 +00:00
feng@chromium.org
00c0784acc Make one-ascii-character-string a symbol in its cache.
Review URL: http://codereview.chromium.org/7521

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 16:28:44 +00:00
sgjesse@chromium.org
711ada81d1 Minor fixes
- support changes to js2c in Visual Studio build
  - handle empty handles in Utf8Value
  - add /nologo to sample link in SCons build

TBR=plesner
Review URL: http://codereview.chromium.org/7816

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 15:24:58 +00:00
kasperl@chromium.org
ed08619bec Minor cleanups.
Review URL: http://codereview.chromium.org/8008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 14:11:22 +00:00
christian.plesner.hansen@gmail.com
1e52e36a8c Added development shell (d8) including readline support, counters and
completion.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 09:12:27 +00:00
bak@chromium.org
000825645c - Cleaned up Heap::CopyObject. Inlined fast case.
Review URL: http://codereview.chromium.org/8004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 08:48:11 +00:00
erik.corry@gmail.com
99f5ae88a3 Fix bug 1439135 (slicedstring on constring not flat)
Review URL: http://codereview.chromium.org/7809

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-21 08:08:17 +00:00
christian.plesner.hansen@gmail.com
2b7c9edbb1 Added string equality by reading int-sized blocks of characters for
flat strings with the same representation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-20 11:38:32 +00:00
bak@chromium.org
d73595a2a4 -Fixed non debug build with an ifdef.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-20 07:37:51 +00:00
bak@chromium.org
63670beae0 - Changed gc-greedy to ignore boostrapping.
This change reduces the running time of tests without snapshotting.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-20 07:31:33 +00:00
bak@chromium.org
9276b48a5b - Optimized copying of FixedArray.
Review URL: http://codereview.chromium.org/7516

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-20 06:35:28 +00:00
bak@chromium.org
5bf3e4f527 - Eliminated superfluous type tests in IsMatch.
Review URL: http://codereview.chromium.org/7622

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 12:36:23 +00:00
bak@chromium.org
33b050dd85 - Missing files
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 11:36:42 +00:00
ager@chromium.org
fc6ff0fa20 Allow larger semispaces.
Review URL: http://codereview.chromium.org/7476

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 11:33:13 +00:00
bak@chromium.org
617bdc34a4 - Specialized IsClassOf for Number, Boolean, Arguments, and Function.
Review URL: http://codereview.chromium.org/7475

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 11:33:04 +00:00
lrn@chromium.org
dc87d51f70 Changed Boyer-Moore's bad-char table code:
- Reduce it to half size if the pattern is ASCII, saving on initialization
- If pattern is ASCII and subject is not, any non-ASCII char can cause a
  full pattern-length shift, even if we haven't indexed the entire pattern.
- Use memset to initialize buffer in the common case where the pattern is
  shorter than the max significant suffix limit.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 11:15:54 +00:00
kmillikin@chromium.org
ebd11b7382 Code formatting changes.
Review URL: http://codereview.chromium.org/7346

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 09:54:34 +00:00
bak@chromium.org
7cd44cea9b - Removed a few indirections by making the two SemiSpaces
part of NewSpace and made NewSpace statically allocated.
- Eliminated indirection in MigrateObject.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 09:13:27 +00:00
kasperl@chromium.org
c63477df3d Fix issue 116 by returning the value from SetFastElement.
Review URL: http://codereview.chromium.org/7615

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-17 06:36:35 +00:00
lrn@chromium.org
c04546333a * Special case for last char in BM-match
* Patch from Erik Corry to separate BM-algoritm into special case
  functions. Also changes condition for bailing out of simple search.
* Added simple search with no bailout for very short patterns.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-16 11:33:19 +00:00
ager@chromium.org
d335ce6926 Update ChangeLog and version number to prepare for new trunk version.
We are now working on version 0.4.0.
Review URL: http://codereview.chromium.org/7433

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-16 08:02:51 +00:00
bak@chromium.org
884345a789 -Eliminated a excessive memory traffic in CopyObject.
Review URL: http://codereview.chromium.org/7432

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-16 07:17:26 +00:00
iposva@chromium.org
d4320b1053 Addressed review comment by Kasper:
- Factor out property load from CALL_IC and LOAD_IC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-16 05:58:09 +00:00
iposva@chromium.org
6d97b325db - Fix instance size calculation to ensure that the object cannot
overflow the maximum object size.
- Added a test that will crash previous revisions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-16 05:45:33 +00:00
whesse@chromium.org
f12e120463 Fixes bug 1426704.
Constructors no longer print out their source code.  They print [native code]
instead.  Some web applications don't like constructors with complex ToString
results.
Review URL: http://codereview.chromium.org/7345

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-15 10:22:26 +00:00
christian.plesner.hansen@gmail.com
5d4c72efb4 Review-related changes
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-15 08:50:34 +00:00