Commit Graph

252 Commits

Author SHA1 Message Date
lrn@chromium.org
c8b0f822ee Fix overflow in failure "requested size" field.
Review URL: http://codereview.chromium.org/275016


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-14 09:26:16 +00:00
whesse@chromium.org
c67291155b Changes to comments only, fixing errors and grammar.
Review URL: http://codereview.chromium.org/269050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-12 12:42:20 +00:00
whesse@chromium.org
cc0c626d70 Add near calls (32-bit displacement) to Code objects on X64 platform.
Review URL: http://codereview.chromium.org/200095

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-06 13:11:05 +00:00
christian.plesner.hansen@gmail.com
87fbbd5dfc Changed structure of accessor arguments passing to allow accessor
callbacks to be called directly from native code.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-30 12:25:46 +00:00
whesse@chromium.org
b026021215 Stop "cooking" targets of jumps and calls in code objects. Do not convert jump and call targets to absolute pointers to Code objects during GC, heap verification, and serialization.
Review URL: http://codereview.chromium.org/203070

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-21 10:35:47 +00:00
christian.plesner.hansen@gmail.com
87dab2f5cd Add Object::IsDirty function in the API.
Review URL: http://codereview.chromium.org/209013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-17 08:58:06 +00:00
whesse@chromium.org
e58287a1bb Use GetCodeFromTargetAddress everywhere, uniformly.
Review URL: http://codereview.chromium.org/193111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-15 11:39:47 +00:00
mikhail.naganov@gmail.com
0411b14ffa Heap profiler: account primitive string objects as being constructed using 'String'.
Also:
- move constructor name getter near similar class name getter method;
- if the constructor is not present, use 'Object', as for class name, this eliminates a special case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 11:46:09 +00:00
sgjesse@chromium.org
5ce6842dd9 Don't use the same descriptor array in several maps.
Make a copy of the descriptor array when copying a map with pre-allocated properties. The garbage collector assumes that no two maps point to the same descriptor array.

A simple reduction is missing.

BUG=http://crbug.com/20330
TEST=none
Review URL: http://codereview.chromium.org/177018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-28 11:10:33 +00:00
sgjesse@chromium.org
717394492d Generate specialized constructor code for constructing simple objects.
For objects which only have simple assignments of the form this.x = ...; a
specialized constructor stub is now generated. This generated code allocates the
object and fills in the initial properties directly. If this fails for some
reason code continues in the generic constructor stub which in turn might pass
control to the runtime system.

Added counter to see how many objects are constructed using a specialized stub.

The specialized stub is only implemented for ia32 architecture in this change.
For x64 and ARM the generic construct stub is used.

This is change is identical to http://codereview.chromium.org/174392 (committed in r2753 and reverted in r2754) except that a few parts have already been committed from http://codereview.chromium.org/173469 (committed in r2762).
Review URL: http://codereview.chromium.org/173470

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 12:22:44 +00:00
sgjesse@chromium.org
681440e273 Handle pre-allocated properties when copying map.
When copying a map always set the descriptor array to describe the pre-allocated properties, even when descriptors are to be dropped.

Added a test which otherwise failed with an assert on ARM in debug mode. The reason for it only surfasing on ARM is that the NewObject runtime function is always used for allocating new JSObjects on ARM.

This change includes a few parts of http://codereview.chromium.org/174392 needed to trigger the error.
Review URL: http://codereview.chromium.org/173469

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 11:03:07 +00:00
sgjesse@chromium.org
3fdbc0848c Reverting 2753.
Review URL: http://codereview.chromium.org/173349

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 15:00:07 +00:00
sgjesse@chromium.org
53531ed48a Generate specialized constructor code for constructing simple objects.
For objects which only have simple assignments of the form this.x = ...; a specialized constructor stub is now generated. This generated code allocates the object and fills in the initial properties directly. If this fails for some reason code continues in the generic constructor stub which in turn might pass control to the runtime system.

Added counter to see how many objects are constructed using a specialized stub.

The specialized stub is only implemented for ia32 architecture in this change. For x64 and ARM the generic construct stub is used.
Review URL: http://codereview.chromium.org/174392

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 12:23:58 +00:00
sgjesse@chromium.org
4e03645dc4 Analyze functions for assignment to this properties.
During parsing functions are analyzed for statements of the form this.x = ...;. These assignments are categorized in two types: simple and non simple. The simple ones are where the right hand side is known to be either a constant or an argument to the function. If a function only contains statements of this type the property names are collected and for the simple assignments the index of the argument or the constant value assigned are stored as well.

When the initial map for a function is created and the function consists of only this type of assignemnts the initial map is created with a descriptor array describing these properties which will be known to always exist in an object created from the function.

The information on this property assignments is not collected during pre-parsing so if compiling using pre-parse data these optimization hints are not available.

Next step will be to use the information collected for the simple assignments to generate constructor code which will create and initialize the object from this information without calling the code for the function.
Review URL: http://codereview.chromium.org/172088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 07:30:20 +00:00
vitalyr@chromium.org
d6fcda0044 API: added function to find instance of template in prototype chain.
Also inlined Object::IsInstanceOf.

This new function is intended to be used to speed up DOM bindings.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-06 13:35:21 +00:00
sgjesse@chromium.org
cffc051177 Avoid dictionary expansion during bootstrapping.
Allocate the code stubs dictionary and non monomorphic cache dictionary with an initial size which avoids these dictionaries to be expanded during bootstrapping. This gets rid of 9 dictionary expansions during bootstrapping.

Preallocate the dictionary when normalizing an object to a size sufficient for holding the number of properties which is expected to be added to the object. This is used when ceating an object from an object literal boilerplate where multiple properties are known to be added.  This gets rid of 10 dictionary expansions during bootstrapping.

There are now 3 dictionary expansions left during bootstrapping.
Review URL: http://codereview.chromium.org/160382

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 09:13:48 +00:00
sgjesse@chromium.org
d8563e4d1e Allocate global object as a normalized object.
The global object is now allocated and initialized as a normalized object.
Review URL: http://codereview.chromium.org/159587

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 07:33:05 +00:00
iposva@chromium.org
9a5a3fd6a5 - Clamp double values as doubles to get a free NaN check and
to handle infinity properly.

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



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 18:11:12 +00:00
antonm@chromium.org
4354661a49 Get rid of unnecessary handle management when invoking interceptors.
Review URL: http://codereview.chromium.org/155682

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 14:46:06 +00:00
kasperl@chromium.org
f68b31403c Change custom NaN check to use isnan to fix pixel array
failures on ARM hardware.
Review URL: http://codereview.chromium.org/160269

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 12:50:58 +00:00
kasperl@chromium.org
b2fc0598c1 Fix lint issues. TBR=iposva@chromium.org
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 09:05:05 +00:00
iposva@chromium.org
1ce28eda0b - Expose CanvasPixelArray functionality directly in JavaScript
indexed property accesses.
- The IC stubs have not been updated to handle these directly, but
  at least we do not have to leave the VM to access bytes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 08:43:51 +00:00
kasperl@chromium.org
94c4760225 Revert r2486, r2487, and r2488 until I get the chance to fix
the performance issue with number dictionaries.

TBR=kmillikin@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 04:57:17 +00:00
bak@chromium.org
752a8fbaba Changed the dictionary code to use original hash value when starting linear scan.
This is necessary for hash codes for string where the array index is encoded.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 14:59:28 +00:00
bak@chromium.org
78ffa1df4d Added two spaces to make presubmit.py happy.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 13:25:45 +00:00
bak@chromium.org
e0047e4331 Changed hash table to use more of the hash value when probing.
Review URL: http://codereview.chromium.org/155350

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 16:55:32 +00:00
kasperl@chromium.org
067b3af8b7 Attempt at work-around for http://crbug.com/16276 by explicitly checking
for global objects in the assembly code for dictionary loads.
Review URL: http://codereview.chromium.org/155418

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 13:24:32 +00:00
ager@chromium.org
00cdc3f1a3 Remove the descriptor stream abstractions.
The abstractions have led to bugs because it looks like descriptor
streams are GC safe but they are not.

I have moved the descriptor stream helper functions to descriptor
arrays and I find most of the code just as readable now as it was
before.
Review URL: http://codereview.chromium.org/149458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 19:25:18 +00:00
kasperl@chromium.org
875dbe6584 Re-enable ICs for loads and calls that skips a global object during
lookup through the prototype chain.
Review URL: http://codereview.chromium.org/155344

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 09:40:47 +00:00
erik.corry@gmail.com
8f73ae0325 * Move almost all roots into an array ready for use by a constant-pool
register on ARM.
* Make some compile-time loops into run-time loops for compactness.
Review URL: http://codereview.chromium.org/149324

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 14:06:08 +00:00
antonm@chromium.org
12c7246cff Use attributes to communicate failed lookup instead of retval.
Review URL: http://codereview.chromium.org/151151

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-06 11:00:53 +00:00
kasperl@chromium.org
0fedb6fcc0 Fix win32 build by moving template function definition.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-06 06:57:32 +00:00
bak@chromium.org
9aa0f380a6 Fixed arm/mac errors and presubmitting 2324.
Review URL: http://codereview.chromium.org/151193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 06:50:43 +00:00
ager@chromium.org
e75a173ff7 Revert r2324 until we can fix build and test errors.
TBR=bak@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 16:49:54 +00:00
bak@chromium.org
5cbb209425 Removed virtual behavior from Dictionaries.
Review URL: http://codereview.chromium.org/150168

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 15:38:25 +00:00
kasperl@chromium.org
6cfc5f1ef9 Treat the builtins object like other global objects (with
cells in old space for properties) and avoid allocating tons
of unused properties in new space when creating new contexts.
Review URL: http://codereview.chromium.org/151146

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-30 10:05:36 +00:00
bak@chromium.org
b9995e035c Changed HashTable::EnsureCapacity to gurantee at least 50% of the entries are free (up from 25%).
This reduces the mount of probing in large hash tables.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 07:19:17 +00:00
bak@chromium.org
ab3d1e1a43 Added descriptor lookup cache to eliminate some search overhead.
Reduced the KeyedLookupCache length to 64.
Review URL: http://codereview.chromium.org/141046

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 07:41:15 +00:00
kasperl@chromium.org
5f5fbd4e4a Allow functions to have custom construct stubs that are called
when the function is instantiated.
Review URL: http://codereview.chromium.org/132063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-19 07:36:16 +00:00
ager@chromium.org
885259ffab Inline fast case of the method that ensures that an array has a
certain size.
Review URL: http://codereview.chromium.org/126265

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 10:55:58 +00:00
bak@chromium.org
1155ba8e8e Reimplemented the KeyedLookupCache to speed up access.
Review URL: http://codereview.chromium.org/126262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 06:07:49 +00:00
ager@chromium.org
a8507cb43d Inline keyed stores if the code is in a loop and the key is likely to
be a smi.

The inlined version works for stores to JSArrays where the key is a
smi that is within bounds of the array and the value is either
constant or a smi so we can skip the write-barrier.
Review URL: http://codereview.chromium.org/122035

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

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

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

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

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


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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-04 19:19:53 +00:00
antonm@chromium.org
06fdc01543 In case of holder with fast properties that allows to fetch the property
immediately if holder has this property or saves binary search on holder if
property doesn't belong to holder.  Of course, in the cases when named getter
returns nothing.

That gives ~20% for dom benchmark/Document Object String Get, speeds up overall
dom_perf (not dramatically) and overall score for peacekeeper.  Strange, but DOM
part of peacekeepr runs somewhat slower.
Review URL: http://codereview.chromium.org/118118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-03 11:25:34 +00:00
erik.corry@gmail.com
01f7c87f22 This patch much improves our tracking of whether function is
called from within a loop or not.  In the past we lost the
information if a call site went megamorphic before a lazily
compiled callee was called for the first time.  Now we track
that correctly (this is an issue that affects richards).
We still don't manage to track the in-loop state through a
constructor call, since constructor calls use LoadICs instead
of CallICs.  This issue affects delta-blue.  So in this patch
we assume that lazy compilations that don't happen through a
CallIC happen from inside a loop.  I have an idea to fix this
but this patch is big enough already.
With our improved tracking of in-loop state I have switched
off the inlining of in-object loads for code that is not in
a loop.  This benefits compile speed.  One issue is that
eagerly compiled code now doesn't get the in-object loads
inlined.  We need to eagerly compile less code to fix this.
Review URL: http://codereview.chromium.org/115744

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

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


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

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


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

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

Make the ComputeIntegerHash globally available.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 13:14:37 +00:00
kasperl@chromium.org
edf51c0fa9 Optimize the scope creation code by lazily allocating the hash maps
for dynamic variables (only do it for the scopes that need them).
Review URL: http://codereview.chromium.org/113393

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 22:07:10 +00:00
lrn@chromium.org
142fe3431a X64: General fixes - added inline definitions and changed some places to intptr_t.
Review URL: http://codereview.chromium.org/113199


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

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

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

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


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

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

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

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


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


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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 08:13:09 +00:00
ager@chromium.org
7d4fed590f Adding hidden values always turned the object slow case because the
hidden symbol is not an identifier.  Make sure to keep objects fast
case when adding hidden values if possible.
Review URL: http://codereview.chromium.org/93004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 07:38:08 +00:00
christian.plesner.hansen@gmail.com
0d21e7b3b0 review
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:34 +00:00
christian.plesner.hansen@gmail.com
d26e6dd0b4 force-set
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 13:28:11 +00:00
feng@chromium.org
ea48d53bad Add ENABLE_DEBUGGER_SUPPORT macro.
ENABLE_DEBUGGER_SUPPORT is enabled by default unless it is on Android platform.
On Android platform, it can also enabled by passing -DENABLE_DEBUGGER_SUPPORT flag to the compiler.

This should not affect any existing build (I hope, cross my fingers) except the build in real Android environment (in other word, it only affects me now).

There are lot of room for code refactoring in stead of using #ifdef all over the place. I will leave this to v8 folks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 16:36:13 +00:00
ager@chromium.org
59d4539f38 If an external string enters the symbol table, make sure to set the
resource to NULL when removing it from the symbol table.  This makes
sure that the debugger can recognize the external string as being
"deleted".  Now, whenever an external resource is deleted, the
resource pointer is set to NULL.

This is really a workaround of a debugger problem.  We need to make
sure that the debugger only finds scripts in the heap that are
actually live.
Review URL: http://codereview.chromium.org/69029

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 11:30:55 +00:00
kmillikin@chromium.org
5d8a34e0c8 Remove some unused macros from objects.cc.
Review URL: http://codereview.chromium.org/67211

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 11:30:00 +00:00
kasperl@chromium.org
bca37da6af Verify the symbol table contents before and after all
GCs (not just mark-compacts) and make the mark-compact
shortcutting of cons-strings identical to the scavenge
version.
Review URL: http://codereview.chromium.org/67125

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

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-06 14:55:01 +00:00
kmillikin@chromium.org
99ba650f71 Mark some of the places we leave V8 via callbacks as transitions to
state EXTERNAL rather than OTHER.
Review URL: http://codereview.chromium.org/55007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 12:32:28 +00:00
lrn@chromium.org
c8c5d9820d Test a few assertions that should hold.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 10:16:30 +00:00
ager@chromium.org
4d6b3a54ad Fix lint.
TBR=iposva
Review URL: http://codereview.chromium.org/50026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 19:29:23 +00:00
iposva@chromium.org
ea653021fc - Allow hidden properties to be set on any JSObject through the V8 C++ API.
- Use the hidden properties to expose a IdentityHash accessor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 18:50:00 +00:00
ager@chromium.org
2fcad0aec1 Revert change 1509 that flush ICs when adding setters on an object or
when setting a __proto__ to an object that holds a setter.

This seems to cause a major page load regression, so we need to tune
the clearing.
Review URL: http://codereview.chromium.org/50011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 15:06:00 +00:00
erik.corry@gmail.com
223ea84e56 Lint...
Review URL: http://codereview.chromium.org/42276

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 10:46:53 +00:00
erik.corry@gmail.com
608a99a90c Remove all uses of StringShape variables, since that has proven
to be error-prone and of little benefit in terms of performance.
Review URL: http://codereview.chromium.org/45010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-17 09:33:06 +00:00
christian.plesner.hansen@gmail.com
8dffcb9efa Flush ICs when adding setters to an object or setting a __proto__ to
an object that holds a setter.  If there are no store ics then no
flushing is done.  The implementation has been tweaked so that no ICs
are cleared during normal context creation.
This may cost us some performance but I'm submitting it as it is and
if there are problems we can either decide to be smarter about when,
what and/or how we clear, or back this change out altogether.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 13:43:07 +00:00
olehougaard
74722e199f Implementing __defineSetter__ and __defineGetter__ with an array index as argument as described in issue 242. For performance reasons, the change is not applied to arrays. This conforms to the behavior of Safari.
Review URL: http://codereview.chromium.org/46030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 11:40:09 +00:00
erik.corry@gmail.com
912c8eb03a * Reapply revisions 1383, 1384, 1391, 1398, 1401, 1402,
1418, and 1419 from bleeding_edge, reverted in 1429.
* Fix of $1 accessor on sliced strings.
* Fix of lastParen method when last parenthesis did not match.
Review URL: http://codereview.chromium.org/43075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-11 14:00:55 +00:00
kasperl@chromium.org
1a9dc2d002 Move InitLineEnds and GetLineNumber to handles.cc to avoid
issues with a raw this pointer and GC.

Fix issue with FlattenString where we may keep a StringShape
alive across a GC.
Review URL: http://codereview.chromium.org/43020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-10 15:08:45 +00:00
whesse@chromium.org
7977c6c680 Fix garbage collection of unused maps. Null descriptors, created
by map collection, are now handled correctly everywhere.  The 
map-collect flag is now true by default.
Review URL: http://codereview.chromium.org/40218

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 16:24:46 +00:00
olehougaard
2185cbaf49 Allocate getters and setters in old space to avoid failing assertion in TransformToFastProperties.
Review URL: http://codereview.chromium.org/39344

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-09 15:52:56 +00:00
kasperl@chromium.org
e9e8628380 Revert revisions 1383, 1384, 1391, 1398, 1401, 1402,
1418, and 1419 from bleeding_edge until we have a fix
for the crashers we see on the distributed test infra-
structure.

We know that revision 1383 is causing issues, but I 
had to revert some of the other recent RegExp changes
in order to get this part out.
Review URL: http://codereview.chromium.org/39186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-05 15:23:17 +00:00
erik.corry@gmail.com
a85e72c1d1 Put 'this' in a handle in EnsureSize to avoid crash caused by GC at
unlucky moment.
Review URL: http://codereview.chromium.org/40108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 13:23:39 +00:00
iposva@chromium.org
be0c1e26e9 Add a meaningful name when disassembling code. This makes it easier
to match generated code to the originating source.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 06:14:34 +00:00