Commit Graph

31 Commits

Author SHA1 Message Date
fschneider@chromium.org
903301248e Improve keyed loads on strings by using a new stub.
Instead of going through a runtime function for keyed loads
on strings we invoke a separate specialized stub that
assumes string as receiver type and the key to be a number.

The stub calls a JS builtin function to return the corresponding one-character string.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-07 10:25:20 +00:00
kmillikin@chromium.org
6af6a82ae3 Streamline the calling convention of the call ICs by passing the
property name in a register rather than on the stack below the
receiver and arguments.

Implemented only for IA32, passing the name in the ecx register to
match the calling convention of the load ICs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 10:23:20 +00:00
kasperl@chromium.org
4839eb611f Try to make the contextuality check in the IC code faster
by checking if the receiver is a global object before diving
into traversing reloc info.
Review URL: http://codereview.chromium.org/491075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-14 09:54:13 +00:00
ager@chromium.org
483828660d Reapply keyed load cache probing in generated code. I introduced a
bug just before committing which broke snapshot builds.  The code is
nearly identical to the previous submit.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 15:10:50 +00:00
ager@chromium.org
1a6893cda9 Revert keyed load cache probing in generated code.
Crashes on Windows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 12:52:28 +00:00
ager@chromium.org
87496c61aa Probe keyed load cache in generic keyed load stub.
Only implemented on ia32 and x64 for now.  The generic keyed load stub
on arm is falling behind and it is time to fix that, but that will be
a separate change.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 09:21:23 +00:00
kbr@chromium.org
46e6297e3e Added infrastructure for optimizing new CanvasArray types in WebGL
specification under development. The optimizations are patterned after
those previously done for CanvasPixelArray. This CL adds all of the
necessary framework but continues to use the generic KeyedLoadIC and
KeyedStoreIC code, to create a baseline for benchmarking purposes. The
next CL will add the optimized ICs to ic-ia32.cc and ic-x64.cc.

These new CanvasArray types have different semantics than
CanvasPixelArray; out-of-range values are clamped via C cast
semantics, which is cheaper than the clamping behavior specified by
CanvasPixelArray. Out-of-range indices raise exceptions instead of
being silently ignored.

As part of this work, pulled FloatingPointHelper::AllocateHeapNumber
up to MacroAssembler on ia32 and x64 platforms. Slightly refactored
KeyedLoadIC and KeyedStoreIC. Fixed encoding for fistp_d on x64 and
added a few more instructions that are needed for the new ICs. The
test cases in test-api.cc have been verified by hand to exercise all
of the generated code paths in the forthcoming specialized ICs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 15:26:17 +00:00
whesse@chromium.org
996f1d4ee3 Rename a constant to kCallTargetAddressOffset
Review URL: http://codereview.chromium.org/192075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-11 12:41:27 +00:00
lrn@chromium.org
fdf31f7f5e X64: Implement debugger hooks.
Debugger is now fully functional.
Fix difference in emitting statement positions to match ia32.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 10:18:30 +00:00
lrn@chromium.org
dc8ca16931 X64: Added inline keyed load/store and a bunch of other missing functions.
Review URL: http://codereview.chromium.org/160272


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-30 09:18:14 +00:00
antonm@chromium.org
0d2c81584b Compile precanned answers for the case of failed interceptor for some combinations.
Review URL: http://codereview.chromium.org/140069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 12:34:21 +00:00
whesse@chromium.org
a1cf7d6e3d X64: Enable inline caching for calls, with some stubs stubbed out.
Review URL: http://codereview.chromium.org/149674

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 08:38:52 +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
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
ager@chromium.org
f706cfa30c Fix debugger after inlined keyed store change.
Make sure that the IC is always hit when debugging and make sure to
restore the fast case when leaving the debugger.
Review URL: http://codereview.chromium.org/125044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 11:24:13 +00:00
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
kmillikin@chromium.org
d30bc90b9c Inline the inobject property case for named property loads.
Review URL: http://codereview.chromium.org/99120

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 14:48:54 +00:00
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
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
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
bak@chromium.org
9dadae1bfb - Fixed Issue 3201: Embedded Google Calendar crashes the renderer
ExtendStorage did not work with keyed store IC.
- Reduced instructions generated when performing a tail call to 
  kSharedStoreIC_ExtendStorage
- Moved test/mjsunit/bugs/bug-109.js
  to test/mjsunit/keyed-storage-extend.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-07 09:28:04 +00:00
bak@chromium.org
f42636b26f - Added fast case for extending the JSObject properties storage.
- Changed date to compute local_time_offset at load time.
  
Review URL: http://codereview.chromium.org/6441

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-03 09:16:12 +00:00
sgjesse@chromium.org
8391b19b07 Refactor the enum RelocMode changing the naming scheme from lower case to
upper case. Moved it into the RelocInfo class together with the associated
is_xxx functions. Renamed is_xxx to IsXxx in the process.

Removed the exit_js_frame mode as it was no longer used.

Patch Set 2 renames RELOC_MODE_COUNT to NUMBER_OF_MODES and fixes a couple of lint errors.
Review URL: http://codereview.chromium.org/3186

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-22 13:57:03 +00:00
ager@chromium.org
6a3d1868e4 Revert revision 331. The propagation of monomorphic prototype failure
information does not work.  In certains situations, it will keep
alternating between unrelated monomorphic states instead of going
megamorphic.
Review URL: http://codereview.chromium.org/2959

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-18 10:22:46 +00:00
ager@chromium.org
950ad34a94 Propagate the information that a monomorphic prototype failure has
occured.  After a monomorphic prototype failure has been detected,
other monomorphic inline caches for the same type will have a code
object in the map's code cache which is not the current target.  We
recognize this case and use the code object that is in the cache
instead of going megamorphic.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-18 06:55:14 +00:00
christian.plesner.hansen@gmail.com
9bed566bdb Changed copyright header from google inc. to v8 project authors.
Added presubmit step to check copyright.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-09 20:08:45 +00:00
feng@chromium.org
5d0d354e09 Fix issue http://code.google.com/p/v8/issues/detail?id=32
Allows numberical strings as array index and make a call. e.g.,
callbacks['0']();

Added more test case for regexp (disabled by default, requires --call_regexp)
and call_as_function object created by API.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-08 16:47:23 +00:00
mads.s.ager
31e7138e1a Improved performance of garbage collection by changing the way we use the marking stack in the event of stack overflow during full garbage collection and by changing the way we mark roots.
Cleaned up ARM version by removing top of stack caching and by introducing push/pop elimination.

Cleaned up the way runtime functions are called to allow runtime calls with no arguments.

Changed Windows build options to make sure that exceptions are disabled and that optimization flags are enabled.

Added first version of Visual Studio project files.



git-svn-id: http://v8.googlecode.com/svn/trunk@13 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-13 09:32:07 +00:00
christian.plesner.hansen
43d26ecc35 Initial export.
git-svn-id: http://v8.googlecode.com/svn/trunk@2 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-03 15:10:15 +00:00