Commit Graph

3346 Commits

Author SHA1 Message Date
lrn@chromium.org
14b216bd61 X64: Change overflow checks to only jump on overflow.
Costs an extra move because the result is calculated in a scratch register
and only moved to destination on non-overflow in order to preserve source
registers in case of overflow.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 12:11:22 +00:00
whesse@chromium.org
2581562248 Prepare push to trunk. We are now working on version 2.2.19.
Review URL: http://codereview.chromium.org/2806009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 10:36:47 +00:00
kaznacheev@chromium.org
b251f14782 Port KeyedCallIC implementation to x64 and ARM.
Also edited ic-ia32.cc for clarity and better formatting.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 10:03:47 +00:00
ager@chromium.org
ed0fc41723 Change hash computation for transcendental cache to use arithmetic
shifts. Leads to fewer collisions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 08:29:25 +00:00
antonm@chromium.org
52975ae407 Remove old named property query API.
Review URL: http://codereview.chromium.org/2742007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 17:01:02 +00:00
mikhail.naganov@gmail.com
f213b096bc Heap profiler: publish API and add test.
Review URL: http://codereview.chromium.org/2822009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-15 11:44:07 +00:00
ager@chromium.org
31cb9f7090 Add external references used for regexp execution to the serializer.
Review URL: http://codereview.chromium.org/2838001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 21:03:59 +00:00
ricow@chromium.org
de512af068 Add support for elements and array indices in Object.defineProperty
(fixes bug 619).

This also fixes a bug in GetOwnProperty in runtime.cc discovered by
the new test cases. That part of the code was not testable before
since we had no way of correctly defining properties on elements.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 13:55:38 +00:00
sgjesse@chromium.org
76e24831a6 API: Added functions to retreive information on indexed properties managed by the embedding layer
BUG=737
TEST=test-api/PixelArrayInfo, test-api/ExternalArrayInfo
Review URL: http://codereview.chromium.org/2818003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 13:09:27 +00:00
ager@chromium.org
6b474bc1d8 Another x64 build fix. Actually builds now.
KExponentBits -> kExponentBits.

TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 12:55:37 +00:00
ager@chromium.org
1dbf2db4b6 Fix build by fixing a typo in codegen-x64.cc.
TBR=whesse@chromium.org
Review URL: http://codereview.chromium.org/2824002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 12:43:00 +00:00
ager@chromium.org
9a34337066 Remove direct reference from builtins code to global object. Load the
global object through the context instead.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 12:08:39 +00:00
sgjesse@chromium.org
1c5a9435ab ARM: Change code generation for function return
Generating code for function return on ARM is now aligned with the other platforms. The first non-shadowed return statement encountered will emit code for function return and all other returns including the fall through at the bottom of a function will jump to that.
Review URL: http://codereview.chromium.org/2815003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 11:37:05 +00:00
erik.corry@gmail.com
142de62819 ARM: Be more smart about switching instructions when immediates
don't fit in the instruction.  Use ubfx and sbfx more.
Review URL: http://codereview.chromium.org/2826001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 11:20:36 +00:00
whesse@chromium.org
317dcabe84 Change tests for string type in RegExpExecStub on all platforms.
Review URL: http://codereview.chromium.org/2772004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 10:21:24 +00:00
ager@chromium.org
8c9958e560 Only update the stub cache tables with monomorphic stubs used by
megamorphic call sites. This removes a lot of contention in the
tables.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 10:10:42 +00:00
ager@chromium.org
74cbb6ca2b Prepare push to trunk. We are now working on version 2.2.18.
Review URL: http://codereview.chromium.org/2824001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-14 07:27:25 +00:00
antonm@chromium.org
1688876682 Faster implementation of Heap::RecordWrites.
Naive algorithm for to update RSets for a span is rather inefficient
as it performs many unnecessary operations (retrieving a mask, updating
it with the same bit as many pointers go into a single region).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-11 17:03:19 +00:00
mikhail.naganov@gmail.com
7e13119880 The new JS Heap Profiler: the main part.
There is no test in this patch, because the test uses V8 API,
which is coming in a separate change list.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-11 16:34:59 +00:00
ager@chromium.org
a9d252749f Fix thinko in arm transcendental cache probing introduced just before
committing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-11 12:26:41 +00:00
ager@chromium.org
c3514589b8 Add missing files accidentally left out on last commit.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-11 10:25:34 +00:00
ager@chromium.org
89ffd6c2f2 Implement transcendental cache probing in generated code on ARM.
Fixed hash code computation on ia32 and x64 to match the runtime
system (change arithmetic shift right to logical shift right).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-11 10:18:44 +00:00
ricow@chromium.org
7b956716f7 Put code flushing behind flag - defaults to false.
Since we have an issue with code flusing on the trybots preventing us
from pushing to chromium, a new flag for enabling code flushing,
--flush_code, is introduced with this change (defaulting to false).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-11 07:06:51 +00:00
whesse@chromium.org
ab65809a62 Use static type information in ConstantIntBinaryOperation on x64.
Review URL: http://codereview.chromium.org/2754004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4836 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-10 14:37:49 +00:00
sgjesse@chromium.org
e045ca6898 Better handling of stepping out of a function
With the change in r4820 all return statements are now breakable like any statement, so stepping will stop before the return statement actually returning from a function. With this change the position when breaking in the function return (after executing the return statement) will be the actual end of the function. At this point the return value is available as it saved to the stack by the debug break at return handling. Added information on the actual value returned from the function to the debugger.
Review URL: http://codereview.chromium.org/2783002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-10 09:02:16 +00:00
kaznacheev@chromium.org
1dec9199ca Add logic from KeyedLoadIC generic stub to KeyedCallIC megamorphic stub.
This should make access faster for arrays of functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-10 05:06:39 +00:00
whesse@chromium.org
e1e4d985f9 Use static type information on x64 in LikelySmiBinaryOperation.
Refactor check for smi operands, using type information, on ia32 and x64.
Review URL: http://codereview.chromium.org/2771001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-09 11:15:54 +00:00
vegorov@chromium.org
7f0645a20a Prepare push to trunk. We are now working on version 2.2.17.
Review URL: http://codereview.chromium.org/2757004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-09 09:27:54 +00:00
sgjesse@chromium.org
4446355c26 ARM: Fix bug in r4820 related to code for additional break positions.
These issues where unly revealed in debug mode
Review URL: http://codereview.chromium.org/2733006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-09 07:40:35 +00:00
mikhail.naganov@gmail.com
e5bdf01d1e Factor out StringsStorage from CpuProfilesCollection.
Review URL: http://codereview.chromium.org/2769001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-09 07:00:33 +00:00
sgjesse@chromium.org
8227208d34 x64: Fix code to return from debug break slot
On x64 the return from debug break slot did not pop off the return address.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2731002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:50:42 +00:00
whesse@chromium.org
b93382d9ff Add test_b(Operand, imm8) to ia32 disassembler.
Review URL: http://codereview.chromium.org/2765001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:44:24 +00:00
sgjesse@chromium.org
baf100fc48 Add parenthesis around '&&' within '||'
Warning by some gcc versions. Adding the parenthesis made the condition correct.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2725003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:20:24 +00:00
sgjesse@chromium.org
634fb9152c More precise break points and stepping when debugging
Added support for more precise break points when debugging and stepping. To achieve that additional nop instructions are inserted where breaking would otherwise be impossible. The number of nop instructions inserted are sufficient to make place for patching with a call to a debug break code stub. On Intel that is 5 nop's for 32-bit and 13 for 64-bit. Om ARM 3 nop instructions (12 bytes) are required.

In order to avoid inserting nop's in to many places a simple ast checker have been added to check whether there are breakable code in a statement or expression. If it is possible to break in an expression no additional break enabeling code is inserted.

Added break locations to the true and false part of a conditional expression.

Added stepping tests to cover more constructs.

These changes are only in the full compiler.

Changed the default value for the option --debugger in teh d8 shell from true to false. The reason for this is that with --debugger turned on the full compiler will be used for all code in when running d8, which can be unexpeceted.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 12:04:49 +00:00
mikhail.naganov@gmail.com
a217c50ab2 Move token-related constants from CodeEntry to TokenEnumerator.
Review URL: http://codereview.chromium.org/2745002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 11:27:00 +00:00
sgjesse@chromium.org
aaaebbe50f Fix building without debugger suport.
Review URL: http://codereview.chromium.org/2733003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 11:23:48 +00:00
sgjesse@chromium.org
c7ab2b6aa3 Remove the SetExternalStringDiposeCallback API
Changed the disposal of external string resources to call a virtual Dispose method on the resource. The default inplementation of Dispose deletes the object and will capture the delete operator matching the new operator used to allocate the object.
Review URL: http://codereview.chromium.org/2658008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 09:35:47 +00:00
ager@chromium.org
6dc72b690c Add an overloaded PreCompile method that takes a Handle<String>.
Code review URL: http://codereview.chromium.org/2633004/show


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 06:20:49 +00:00
ricow@chromium.org
316092c364 Flushing of code from functions that we expect not to use again.
This adds an additional step to full gc, removing code from functions
that are no longer in the compilation cache. The code is replaced with
a lazy compile version enabling us to recompile the function in case
we do actually need it again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 15:39:10 +00:00
whesse@chromium.org
3c42d18a44 Revert change 4812 due to performance problems. This was a change in string addition on ia32.
Review URL: http://codereview.chromium.org/2706001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 13:16:05 +00:00
whesse@chromium.org
dd278e634e Improve generated code for string encoding tests on ia32.
Review URL: http://codereview.chromium.org/2673001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 12:15:10 +00:00
vegorov@chromium.org
68b8a50843 Count Mark-Compact/Mark-Sweep collections only after compaction decision was made
Review URL: http://codereview.chromium.org/2665001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 11:31:44 +00:00
lrn@chromium.org
8ff9083747 Prepare push to trunk. We are now working on version 2.2.16.
Review URL: http://codereview.chromium.org/2640007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 11:02:43 +00:00
vegorov@chromium.org
53923e9233 Revert r4782. Fix issues 728, 732.
Review URL: http://codereview.chromium.org/2701003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 09:36:30 +00:00
sgjesse@chromium.org
09acdc8446 Add an API to control the disposal of external string resources
A new callback have been added which - if set - will be called to dispose of external string resources passed from the embedder to the V8 engine.
Review URL: http://codereview.chromium.org/2645004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:49:07 +00:00
kaznacheev@chromium.org
ff61618c4b Extend CallIC to support non-constant names.
This speeds up constructs like this: 
var zz='replace'; '123'[zz]('3','4');

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:27:32 +00:00
ager@chromium.org
a40569e5a0 Port fast eval calls to x64 and ARM. For global variables that can
only be shadowed by eval-introduced variables we usually do not need
to do a context lookup in the runtime system.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 07:12:00 +00:00
vitalyr@chromium.org
8689b3bcea Direct load of global function prototype.
As most of call IC code is tied to a context anyway we can save a few dependent loads by having a direct reference to an initial map of a global function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 16:20:34 +00:00
sandholm@chromium.org
c9b1bf7eaa Fix issue in previous test optimization
Review URL: http://codereview.chromium.org/2653002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 13:43:41 +00:00
sandholm@chromium.org
6e7d663eed Simplify criteria for doing an optimized test call
Review URL: http://codereview.chromium.org/2662002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 13:37:28 +00:00
sandholm@chromium.org
52f52ae99f Simplify regexp test call when the regexp starts and ends with '.*'.
Review URL: http://codereview.chromium.org/2645002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:58:40 +00:00
ricow@chromium.org
8a4d49b65a Rename ThreadManager::IterateThreads to ThreadManager::IterateArchivedThreads
The IterateThreads method only iterates archived threads. If all
threads are to be iterated an additional iteration of the current active
stack is also needed.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:57:01 +00:00
antonm@chromium.org
12f6306420 First phase of migration to new named property query callbacks.
Eventually named property query callbacks will return attributes
(as an integer) or an empty handle if property is not intercepted.

To gradually migrate to this new API, USE_NEW_QUERY_CALLBACK
macro would control if old or new style API is used.

So the migration plan is:

1) introduce new API which should be explictily enabled;
2) switch to new API defining USE_NEW_QUERY_CALLBACK before
  include of <v8.h> (that would require changes to client code as well)
3) remove old API from v8
4) remove #define USE_NEW_QUERY_CALLBACK from clients.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:49:44 +00:00
lrn@chromium.org
d3d295efa7 Add optimized version of memcpy on ia32.
Only used in one place right now.
Still room for tweaking.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 11:30:55 +00:00
whesse@chromium.org
0fc3dca698 Add test_b(Operand, immediate) to ia32 assembler, and use it where possible. Improve comparison to a constant one-character string. Use CmpInstanceType in more places on ia32. Add IsObjectJSObjectType and IsInstanceJSObjectType to ia32 macro assembler, using a single branch for a range test.
Review URL: http://codereview.chromium.org/2586001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 10:46:04 +00:00
ager@chromium.org
723bed3105 Optimize calls to evals. Most of the time there is no reason to
perform a context lookup in the runtime system for the 'eval'
function. Instead load the 'eval' function from the global context in
generated code if it is not shadowed.

Will port to other platforms as a separate change.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-04 10:19:19 +00:00
vitalyr@chromium.org
6c74d30f83 Fix double to integer conversions in runtime string indexing.
Review URL: http://codereview.chromium.org/2577001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-03 11:31:19 +00:00
vitalyr@chromium.org
3ec0b86495 Make StringCharCodeAt runtime function do what it name implies and not
just indexed string access.

The difference is that String.prototype.charCodeAt accepts any number
as an index, whereas string[] only accepts array indices.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-03 09:32:07 +00:00
whesse@chromium.org
ebc21fc958 Change keyed load IC interface on x64 to pass arguments in registers.
Review URL: http://codereview.chromium.org/2470001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 14:37:47 +00:00
erik.corry@gmail.com
9fc31e1fed Fix last-minute thinko that I snuck into the last change.
It busted crypto-decrypt.
Review URL: http://codereview.chromium.org/2434005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 10:47:50 +00:00
erik.corry@gmail.com
b600905133 ARM: Track Smis on top 4 stack positions and Smi loop variables.
Improve code generation for known smis and suspected Smis.
Review URL: http://codereview.chromium.org/2452002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 09:37:02 +00:00
lrn@chromium.org
5b7e77acea Fix bug that could cause a string to be incorrectly tagged as an array index.
We should only mark a string as an array index if we can store the entire value
of the number in the hash field. We sometimes failed to reject larger numbers.

Fixes http://code.google.com/p/v8/issues/detail?id=728

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 09:31:01 +00:00
ager@chromium.org
f340073e5e Add missing initialization of a couple of variables which makes
some compilers complaint when compiling with -Werror.
Review URL: http://codereview.chromium.org/2492001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 08:58:44 +00:00
sgjesse@chromium.org
c2fad9d94f Prepare push to trunk. We are now working on version 2.2.15.
Review URL: http://codereview.chromium.org/2467004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 08:48:51 +00:00
erik.corry@gmail.com
d55c1adb0a Initialize variable to make gcc happy.
http://code.google.com/p/v8/issues/detail?id=727


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-02 08:17:19 +00:00
sgjesse@chromium.org
33973b7d13 ARM: Add more logic to the generic keyed load stub
The generic keyed load stub was missing converting string keys to numberign keys and lookup in the keyed lookup cache. This is now added together with an additional counter on all platforms.
Review URL: http://codereview.chromium.org/2441002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 21:11:38 +00:00
vitalyr@chromium.org
26be30912d Fix generated code for String.charCodeAt.
Review URL: http://codereview.chromium.org/2468001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 14:08:19 +00:00
mikhail.naganov@gmail.com
cdc09c5073 CPU profiler: sample call stack on profiling start.
This simplifies writing tests a lot, because it is now possible
to guarantee that certain function will present in a profile by
starting profiler from inside it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:52:49 +00:00
mikhail.naganov@gmail.com
f939ccbc26 Unreviewed. Revert r4766, r4767.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:42:48 +00:00
mikhail.naganov@gmail.com
c48b60d4a3 added function
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 13:35:09 +00:00
dimich@chromium.org
610ad370a3 Fix an occasional crash in Assembler::ldr() for arm.
A peephole optimization can be attempted on a buffer that contains only a single command. The crash happens when running debug on Snow Leopard with --simulator=arm.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-01 08:01:50 +00:00
whesse@chromium.org
019b8c4511 Change the interface of LoadIC on the x64 platform to take its arguments in registers.
Review URL: http://codereview.chromium.org/2330003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-31 13:26:12 +00:00
ricow@chromium.org
29cee68ea3 Prepare push to trunk. Now working on version 2.2.14.
Review URL: http://codereview.chromium.org/2417001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-31 10:13:11 +00:00
mikhail.naganov@gmail.com
bb0ba1e5ae Fix AddBlock invocations in CpuProfilesCollection.
It was a bad idea not to check the count of numbers to add.

Also fix a rollover: the comment in platform-linux.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-31 10:09:07 +00:00
erik.corry@gmail.com
44cfbe392c ARM: Remove LoadConditionAndSpill and VisitAndSpill.
Review URL: http://codereview.chromium.org/2414001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-31 08:52:57 +00:00
mikhail.naganov@gmail.com
63e79f5f68 Reapply r4702 "Fix teardown order"
I accidentaly reverted changes from r4702 in r4706. Now bringing them back.

Original commit message:

As TokenEnumerator cleans up global handles posessed, it's owner --
CpuProfiler must be shut down prior to global handles.

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

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-28 16:12:24 +00:00
antonm@chromium.org
ebba43f37a Make intercepted properties retrievable only by getter to be not enumerable.
Currently if there is no query callback, V8 finds out intercepted properties'
attributes using getter: if getter returns not empty handle V8 treats
such a property as property with NONE attribues which means this property
is enumerable.

However, if there is no enumerator, this property cannot be enumerated.
Thus I think we should treat such properties as not enumerable.

Drawback of this approach is now one has to implement both query and enumerator
callbacks to implement enumerable intercepted properties.

BUG=725

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-28 11:54:58 +00:00
erik.corry@gmail.com
7e460811b9 Missing file from last commit.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-28 11:27:14 +00:00
erik.corry@gmail.com
8a2637fba9 Get rid of LoadAndSpill on ARM since Load() knows whether it is
in a spilled scope or not.  Also get rid of some spilled scopes
that we don't need any more.  The generators for the %_ functions,
CodeGenerator::Generate*, are now not spilled by default.  Some
of them (IsObject and related) have been converted to register
allocated operation.
Review URL: http://codereview.chromium.org/2368001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-28 11:23:07 +00:00
lrn@chromium.org
1be589d844 X64: Fix issue 678. Bug in some Win64 C calls from generated code.
Win 64 C call ABI implementation requires space allocated on stack for four
argument registers, even when passing fewer arguments in registers.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-28 08:37:44 +00:00
whesse@chromium.org
527c7972c7 Refactor GenerateLoadInterceptor, removing LoadInterceptorCompiler class and CompileLoadInterceptor static function.
All platforms (x64, ia32, and ARM) changed.
Review URL: http://codereview.chromium.org/2251003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 14:14:46 +00:00
ager@chromium.org
e840870331 Fix presubmit error. Trailing whitespace.
TBR=erik.corry
Review URL: http://codereview.chromium.org/2224007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 13:57:55 +00:00
erik.corry@gmail.com
73256b05af Fix jump targets on ARM to merge virtual frames (really this time).
Use the jump targets to move the first deferred code to not flush
registers in the inlined case (KeyedLoad).
Review URL: http://codereview.chromium.org/2249002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 13:48:52 +00:00
erik.corry@gmail.com
67c0ec6f17 Update and improve support for ARMv7 bitfield instructions.
This is a commit of http://codereview.chromium.org/2124022
for Rodolph Perfetta.  I changed the test in
test-assembler-arm.cc so it only runs if ARMv7 is supported.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 13:46:18 +00:00
vegorov@chromium.org
fc7c5f789a Cardmarking writebarrier.
Reapply r4715 with fixes reviewed in http://codereview.chromium.org/2276002.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 12:30:45 +00:00
lrn@chromium.org
19dc4f4fd9 Revert try-commit.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 12:23:46 +00:00
lrn@chromium.org
72f192296d To be reverted.
Add extra checks for bad stack content in X64 RE-macro-assembler,
to check for crash that is only reproducible with the buildbot and
only in release mode.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 12:22:23 +00:00
antonm@chromium.org
0dd031aa01 Move assertions to not take case to check that it's safe to omit CheckPrototypes in this case.
Review URL: http://codereview.chromium.org/2279005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 11:16:04 +00:00
lrn@chromium.org
7bfe569088 X64: Many small tweaks and more usages of "load smi as int32".
Review URL: http://codereview.chromium.org/2266003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 10:25:33 +00:00
ricow@chromium.org
5058db86c4 Add support for getOwnPropertyDescriptor on array indices (fixes issue 599).
This fix adds support for retriving a property descriptor on elements. The
new version supports both fast and slow case elements. In the fast case
we always default configurable, writable, enumerable to true (we don't have
PropertyDetails for fast elements).

A few new tests are added to get-own-property-descriptor.js, I will
add a lot more to object-define-property when I add support for indices in
Object.defineProperty.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 07:43:43 +00:00
sgjesse@chromium.org
58ea4c20cd ARM: Default to use unaligned accesses in the simulator
Support building with or without unaligned accesses by using scons flag simulatorunalignedaccesses.

$ scons simulator=arm simulatorunalignedaccesses=off
$ scons simulator=arm simulatorunalignedaccesses=on

If simulatorunalignedaccesses is not specified (or specified as default) the default is to use unaligned accesses.
Review URL: http://codereview.chromium.org/2218003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 07:31:10 +00:00
sgjesse@chromium.org
fb0daff14e Implement OS::ReleaseStore for Solaris
Review URL: http://codereview.chromium.org/2282003


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 06:38:53 +00:00
vitalyr@chromium.org
64bc39a726 Fix: make string indexing work with Infinity.
NumberToUint32 that I was trying to use maps -0 to +0 (as desired) but
also maps +/-Infinity to +0, which made +/-Infinity a valid string
index. I fixed it by introducing a new runtime function with the right
semantics.

TEST=LayoutTests/fast/js/char-at.html,mjsunit/string-charat.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 16:11:30 +00:00
vitalyr@chromium.org
ad0e38909f Custom call IC-s for String.prototype.{charAt,charCodeAt}.
These string methods can be composed from two basic blocks: charCodeAt
and fromCharCode, both of which have fast cases for certain types of
inputs. In this patch these two blocks are refactored to allow
generating the fast cases without having to jump around the slow
cases. In the slow cases since they can now be invoked both from
inline runtime functions and from IC stubs we either have to
save/restore state of the current frame or enter/leave a new internal
frame. This is handled by new RuntimeCallHelper interface. Its
implementation for virtual frame is based on FrameRegisterState class
extracted from DeferredCode class.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 14:23:19 +00:00
antonm@chromium.org
3e88d0d2af Various refactorings in interceptor calling and loading.
1) do not push receiver early---that simplifies tail call preparation
on ia32/x64 and renders special cleanup unnecessary;
2) do not do second map check if interceptor's and cached holder
are the same;
3) do not push/pop receiver if receiver and holder registers are the same
(means that receiver is interceptor's holder);
4) do batch pushes on arm;
5) minor cosmetic improvements.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 14:04:37 +00:00
kmillikin@chromium.org
9c6cafaf65 Prepare push to trunk. Now working on version 2.2.13.
Review URL: http://codereview.chromium.org/2280001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 12:39:50 +00:00
whesse@chromium.org
fcc3d19321 Refactor x64 named loads to agree with ia32 implementation. Remove dead code and flag is_global from x64 keyed loads.
Review URL: http://codereview.chromium.org/2121022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 11:38:33 +00:00
sgjesse@chromium.org
6de39cd1f0 ARM: Add Ldrd/Strd to the macro assembler
The macro assembler now checks for ARMv7 support and generates instructions for Ldrd/Strd accordingly. INstructions ldrd/strd in the assembler requires ARMv7 support enabled. This removes the a check for CAN_USE_ARMV7_INSTRUCTIONS making the ARMv7 support in the simulator fully controled by the --enable-armv7 flag.
Review URL: http://codereview.chromium.org/2226003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 11:19:39 +00:00
lrn@chromium.org
4afc3d3c4f X64: Make smi memory operations work directly on the embedded value.
Adds Operand-relative Operand constructor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 10:02:07 +00:00
sgjesse@chromium.org
f952df4be1 Make ldrd and strd instructions take two register arguments
Review URL: http://codereview.chromium.org/2122021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4724 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 09:43:54 +00:00