Commit Graph

124 Commits

Author SHA1 Message Date
kmillikin@chromium.org
dc30b11fbc Fix some defects identifies by Coverity Prevent. All are false
positives, but I've restructured the code to be more explicit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 11:29:38 +00:00
kmillikin@chromium.org
2126c36279 Change RegExpMacroAssemblerIA32::CaseInsensitiveCompareUC16 so that it
does not use stack-allocated character as a one-element character
array.

The use at this site was actually safe (Ecma262Canonicalize will only
write to the first character of the array), but not obviously so.

BUG=17103

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 12:12:24 +00:00
whesse@chromium.org
f8e622a620 Added inline caching for calls to a field to X64. Changed a use of Array::kHeaderSize to FixedArray::kHeaderSize on all platforms.
Review URL: http://codereview.chromium.org/149798

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 08:55:01 +00:00
kasperl@chromium.org
38f5a84701 Avoid more static variables in inline functions.
Review URL: http://codereview.chromium.org/149799

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 08:22:07 +00:00
kasperl@chromium.org
124ef540c0 Patch by Mark Mentovai. Don't put static variables inline.
Original review: http://codereview.chromium.org/149768

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-17 05:37:09 +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
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
whesse@chromium.org
10605879f6 Disable inline caching on X64 separately for loads, stores, and calls, while they are being implemented and tested one-by-one.
Review URL: http://codereview.chromium.org/149673

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 12:30:28 +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
kasperl@chromium.org
55a8088bd8 Add support for tracking down leak of the hole value.
Review URL: http://codereview.chromium.org/149522

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 09:17:04 +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
kmillikin@chromium.org
726c29c0be Skip the write barrier for global property cell writes. The heap
verification code was refactored to avoid verifying that property
cells have correct remembered sets.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:17:57 +00:00
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
kmillikin@chromium.org
8e0e670bde Change a few sites where the Handle<T>(NULL) constructor is used so
that they use the static Handle<T>::null() member function instead.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-07 11:41:21 +00:00
erik.corry@gmail.com
1a3d633edc Fix thinko in IC code.
Review URL: http://codereview.chromium.org/149175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 12:43:59 +00:00
bak@chromium.org
6bc979e879 Improved code for megamorphic stub on ia32.
Review URL: http://codereview.chromium.org/150225

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 06:34:59 +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
92bb897081 Tweaks to global object inline cache code.
Remove the check for deleted properties in the global load inline cache if the property is known to be read only.

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

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 13:52:13 +00:00
kasperl@chromium.org
f1ffd50257 Optimize %ClassOf() on IA-32 and use it instead of the
custom %HasXXXClass() calls.
Review URL: http://codereview.chromium.org/151018

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-29 09:32:06 +00:00
kasperl@chromium.org
a1622491af Optimize %IsConstructCall() on IA-32.
Review URL: http://codereview.chromium.org/150018

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-25 11:35:03 +00:00
lrn@chromium.org
76ac8bc73b Removed static type inference and add a dynamic test for string addition.
The complexity of static type inference never really paid off, and as an
analysis it didn't fit well with codegen frame propagation.

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


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 08:01:38 +00:00
whesse@chromium.org
c19fde4f1c X64 implementation: Change argument to relocator to take a 64-bit delta. Change maximum relocation info encoding length.
Review URL: http://codereview.chromium.org/146021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 09:50:51 +00:00
ager@chromium.org
094d17ffeb x64: Generate code for loading from, storing to and calling properties.
Review URL: http://codereview.chromium.org/141056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-23 06:12:14 +00:00
whesse@chromium.org
1ae3423af8 X64 implementation: Emit correct merge code for virtual frames at CFG merges.
Review URL: http://codereview.chromium.org/141043

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-22 12:36:01 +00:00
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
bak@chromium.org
7dab62ee96 Changed allocation to allow large objects to be allocated in new space.
This avoids back-to-back mark-sweep collections.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 14:06:36 +00:00
whesse@chromium.org
da49c0f8a2 X64 implementation: Add function literals and function calls.
Review URL: http://codereview.chromium.org/131029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 11:46:38 +00:00
erik.corry@gmail.com
5f77401b0c Inline mod for integer powers of 2.
Review URL: http://codereview.chromium.org/126293

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-18 07:33:44 +00:00
lrn@chromium.org
e9b13d9c39 X64: Implementation of a bunch of stubs, and some new opcodes.
Review URL: http://codereview.chromium.org/125185


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-17 11:50:33 +00:00
kasperl@chromium.org
01216a069b Add fast negative checks for symbol equality: If we're comparing
two symbols, they're only equal if the objects are identical.
Review URL: http://codereview.chromium.org/125184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 12:54:07 +00:00
kmillikin@chromium.org
73fe551048 Remove the unused support for jump-table switch statements.
Review URL: http://codereview.chromium.org/126193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 09:50:37 +00:00
kasperl@chromium.org
7f27314644 Fix stack alignment issue with the new fast Math.random() code
under Mac OS.
Review URL: http://codereview.chromium.org/125123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2168 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 13:17:09 +00:00
ager@chromium.org
c1d0401b3d Two small fixes for the Math.sin and Math.cos optimizations.
Review URL: http://codereview.chromium.org/125122

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 12:06:48 +00:00
kasperl@chromium.org
ce7cdbd799 Change the implementation of Math.random to use George
Marsaglia's multiply-with-carry instead of mixing the
bits obtained from calling the system random() twice.

This seems to be a bit faster and gives a better 
distribution than the system random() in particular on 
Windows. 
Review URL: http://codereview.chromium.org/126113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 08:04:47 +00:00
kmillikin@chromium.org
6ed860b7d6 Remove branching and binding with two arguments from the JumpTarget
class.  Manually manage off-frame results at the two sites where they
were used.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 14:43:27 +00:00
kmillikin@chromium.org
b318835cdc First round of JumpTarget simplification. Remove dead functions (jumps,
branches, and bind with more than two arguments).  Remove unneeded
variable (the "watermark" on virtual frames).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 11:25:13 +00:00