Commit Graph

3301 Commits

Author SHA1 Message Date
vegorov@chromium.org
8fbac01b2c Improved GC statistics.
Collect cumulative (--print-cumulative-gc-stat) and per collection (--trace-gc-nvp) GC statistics and output it in a machine-readable name=value format.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 16:50:17 +00:00
whesse@chromium.org
eb1317756f Fix x64 compilation error in r4673.
Review URL: http://codereview.chromium.org/2129010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 15:18:23 +00:00
mikhail.naganov@gmail.com
3d7ce8ac19 CPU profiler: add secure profiles by filtering out functions using security tokens.
As several pages can run in a single V8 instance, it is possible to
have functions from different security contexts intermixed in a single
CPU profile.  To avoid exposing function names from one page to
another, filtering is introduced.

The basic idea is that instead of capturing return addresses from
stack, we're now capturing JSFunction addresses (as we anyway work
only with JS stack frames.)  Each JSFunction can reach out for
context's security token. When providing a profile to a page, the
profile is filtered using the security token of caller page. Any
functions with different security tokens are filtered out (yes, we
only do fast path check for now) and their ticks are attributed to
their parents.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 14:19:33 +00:00
erik.corry@gmail.com
73b2fc29b7 Remove unused relocation mode.
Review URL: http://codereview.chromium.org/2136012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 13:39:16 +00:00
whesse@chromium.org
cd6afbc617 Spill arguments for a function call from the virtual frame as they are produced.
Review URL: http://codereview.chromium.org/2103007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 11:19:34 +00:00
fschneider@chromium.org
b46757a4e1 Eliminate smi check using type information in x64 count operation.
Also simplify the assertion code for type information in the macro assembler.

Review URL: http://codereview.chromium.org/2130003/show



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 08:43:08 +00:00
sgjesse@chromium.org
2b1e19fe45 Fix presubmit error.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2117010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 06:59:23 +00:00
sgjesse@chromium.org
d25c36deee ARM: Pass arguments to keyed store IC in registers
The calling convention for keyed store IC on ARM is changed to receive the arguments value, key and receiver in registers r0, r1 and r2 instead of on the stack. When calling keyed store IC with a virtual frame the arguments are passed through the virtual frame and consumed by the call.

Changed the register usage in the IC code to postpone spilling the registers holding value, key and receiver to the stack until making  a call into the runtime system.

Runs all the tests with: 

  --special-command="@ --nofull-compiler"
  --special-command="@ --always-full-compiler"
  --special-command="@ --noenable-vfp3"
Review URL: http://codereview.chromium.org/2116003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 06:57:12 +00:00
sgjesse@chromium.org
02ca5fd8b2 ARM: Fix generating two ldr instructions in place of ldrd.
When ldrd is not available two ldr instructions are generated. This fixes these in the case where the register used in the memory operand is the same as the first register in the register pair receiving the values.

All tests now run on ARM with the flag --special-command="@ --noenable-vfp3". Running without VFP3 support in the simulator causes more ldrd instructions to be used, and the default build configuration does not utilize ldrd, but generated tow ldr instructions.
Review URL: http://codereview.chromium.org/2078013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 06:38:42 +00:00
mark@chromium.org
e9b5d7855b Allow build-time selection between ia32 and x86_64 in the GYP/Xcode Mac
Chromium build.

v8.gyp no longer sets any V8_TARGET_ARCH_* macro on the Mac. Instead, the
proper V8_TARGET_ARCH_* macro will be set by src/globals.h in the same way as
the V8_HOST_ARCH_* macro when it detects that no target macro is currently
defined. The Mac build will attempt to compile all ia32 and x86_64 .cc files.
#ifdef guards in each of these target-specific source files prevent their
compilation when the associated target is not selected. For completeness,
these #ifdef guards are also provided for the arm and mips .cc files.

BUG=706
TEST=x86_64 Mac GYP/Xcode-based Chromium build (still depends on other changes)
Review URL: http://codereview.chromium.org/2133003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-17 15:41:35 +00:00
mark@chromium.org
6046ae7bcd Fix dtoa for the LP64 model on 64-bit systems, where long is 64 bits.
dtoa.c:69 states: #define Long int on machines with 32-bit ints and 64-bit
longs. This change was made in Chromium's version of dtoa in r21901. I don't
know why this apparently hasn't caused a problem in v8 until now. I was
unable to build a snapshot on x86_64 Mac without this change.

BUG=706
TEST=x86_64 Mac GYP/Xcode-based Chromium build (still depends on other changes)


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-17 15:41:16 +00:00
antonm@chromium.org
c7b2af37ba Use direct loop when filling small arrays.
r3995 (http://code.google.com/p/v8/source/detail?r=3995) introduce performance
regression for the case when arrat size is small (think new Array(4)).

It turns out that in those cases rep stos is slower than plain loop (apprently
due to ecx increment, but I didn't check this hypothesis.)  The next thing
to try could be direct jump into right place of long sequence of stos'es.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-17 14:14:34 +00:00
erik.corry@gmail.com
a31c578f25 Push/pop is just one peephole optimization. Puth them all
under one flag.  Also other cosmetic changes to peephole
optimization.
Review URL: http://codereview.chromium.org/2104006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-17 11:19:10 +00:00
erik.corry@gmail.com
afe8c296a4 Better peephole optimization for ARM. This is a commit of
http://codereview.chromium.org/2004006 for Subrato De.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-17 10:51:41 +00:00
vegorov@chromium.org
5e91f6fa2f Prepare push to trunk. We are now vorking on version 2.2.11.
Review URL: http://codereview.chromium.org/2108006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-17 09:01:39 +00:00
peter.rybin@gmail.com
0fb04e3460 Remove tabs
Review URL: http://codereview.chromium.org/2132003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-14 19:20:07 +00:00
peter.rybin@gmail.com
1e8bf9db94 Add listbreakpoints command to protocol
Review URL: http://codereview.chromium.org/2050007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-14 15:24:25 +00:00
sgjesse@chromium.org
3a7bf08847 Modified codegen-arm.cc to no longer use V8_NATIVE_REGEXP, but to use
V8_INTERPRETED_REGEXP (as per Issue 1635001). 

BUG=none 
TEST=Ran v8 tests, as well as against current Chromium browser.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-14 13:53:26 +00:00
lrn@chromium.org
773c503d30 Simplified replace JS.
Refactored code so global/non-global regexps are handled in separate functions.
Inlined ApplyReplaceFunction at its only call point.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-13 12:13:27 +00:00
antonm@chromium.org
d24efe5348 Remove unused labels.
TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 16:42:51 +00:00
antonm@chromium.org
46263611c7 Initialize jsfunction caches earlier.
If --nolazy is on, we compile ArraySort which requires these caches
to be set up.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 12:44:00 +00:00
antonm@chromium.org
e8e35eccac Properly process arrays with overridden prototype in various Array's functions.
Bailout to JS Array builtins if array's prototype is different from
Array.prototype.  Otherwise there might be inherited elements coming
from this prototype.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 12:22:09 +00:00
lrn@chromium.org
44fb6cc8d3 X64: Made bit-fiddling fallback for double-to-int32 conversion.
Review URL: http://codereview.chromium.org/2048007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 11:16:35 +00:00
ricow@chromium.org
39e248602f Fix arm debug build.
Review URL: http://codereview.chromium.org/2054010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 11:15:55 +00:00
ager@chromium.org
a33720502d Build fix. Remove unused variable.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/2058005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 09:20:58 +00:00
ager@chromium.org
75cd61a912 Refactor the fast-case code for loading local/global variables and
arguments in the presence of eval to avoid code duplication. Almost
the same code was duplicated for loading properties and calling
properties.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 09:12:23 +00:00
erik.corry@gmail.com
e5a188c2fc ARM: Fix jumptargets to actually merge virtual frames.
Make use of the new functionality to make ++ and --
non-spilled operations.
Review URL: http://codereview.chromium.org/2041010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-12 09:00:29 +00:00
sgjesse@chromium.org
48d38e3063 ia32: Helper function for getting an element of a fixed array from object pointer and smi index.
Review URL: http://codereview.chromium.org/1990012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-11 12:38:30 +00:00
whesse@chromium.org
596adcf675 Optimize loading the global object for a named load on x64.
This is a port of r3911 to x64.
Review URL: http://codereview.chromium.org/1983005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-11 08:32:13 +00:00
erik.corry@gmail.com
663f8fa240 ARM: Optimize shifts by constant integers, especially
shifts by zero or arithmetic shifts.  Updated to also
eliminate ASR followed by LSL as per part two of
http://codereview.chromium.org/1987008/show
Review URL: http://codereview.chromium.org/2054007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-11 08:27:56 +00:00
lrn@chromium.org
764dc66556 Made format string match arguments for GenericBinaryOpStub::GetName.
Review URL: http://codereview.chromium.org/2014010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-11 08:07:42 +00:00
lrn@chromium.org
e867e63281 RegExp: Remove use of 16-bit immediates on ia32/x64.
Also check more than one character at a time.
16-bit immediates requires a prefix that changes the length of the instruction.
This causes predecoder mispredictions and subsequent pipeline stalls.
Also removed redundant "atStart" local variable which is equivalent to startIndex == 0.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-11 07:29:10 +00:00
erik.corry@gmail.com
b8f5c5e1ac Move __C99FEATURES__ define to compile for Solaris
Patch from ry.
http://codereview.chromium.org/1990010/show

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-11 07:04:42 +00:00
ager@chromium.org
afdb1dd2bd Added Heap:: prefix to kFixedArrayMapRootIndex in ARM
codegenerator. The missing scoping breaks the build with some
compilers.

TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/2036007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 17:19:48 +00:00
sgjesse@chromium.org
1ae585b0a2 Support both TOS register combinations in inlined keyed load
When popping key and receiver for an inlined keyed load support either order of r0/r1. The possible swap to have key in r0 and receiver in r1 is postponed to the deferred code calling the keyed load IC.
Review URL: http://codereview.chromium.org/1992012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 13:23:42 +00:00
ager@chromium.org
f54b7767c6 Implement fast load and call of arguments in the presence of eval.
Load the arguments object from the context if there are no extensions
objects on the way. Then load the argument with a keyed load ic.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 12:20:06 +00:00
lrn@chromium.org
9f859fef26 Make X64 double-to-int32 conversion use the 64-bit version of cvttsd2si.
Use type info to allow ia32 to use the 32-bit versions in some cases.
Remove sse3-specific code from X64 GenericBinaryOpStub.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 11:38:58 +00:00
erik.corry@gmail.com
fa7c92eaf5 First step towards making JumpTarget work on ARM. Instead
of having a list of virtual frame pointers in the jump
target we have one virtual frame, which is the frame that
all have to merge to to branch to that frame.  The virtual
frame in the JumpTarget is inside the JumpTarget, rather than
being an allocated object that is pointed to.  Unfortunately
this means that the JumpTarget class has to be able to see
the size of a VirtualFrame object to compile, which in turn
lead to a major reorganization of related .h files.  The
actual change of functionality in this change is intended
to be minimal (we now assert that the virtual frames match
when using JumpTarget instead of just assuming that they do).
Review URL: http://codereview.chromium.org/1961004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 11:32:25 +00:00
sgjesse@chromium.org
0631dab992 Add missing constant
Missed this file in last commit (r4629)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 11:29:07 +00:00
sgjesse@chromium.org
b7df730e69 Fix inlined keyed property load on ARM
The change r4608 accidently disabled the inlined keyed load as the key/receiver registers was mixed up. Also make sure that the registers for the keyed load IC is not clobbered before bailout to deferred code. This adds one instriction to the inlined code path.
Review URL: http://codereview.chromium.org/2018005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 10:45:18 +00:00
sandholm@chromium.org
67c04c8744 One element cache for localtime.
Review URL: http://codereview.chromium.org/2023005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 09:27:37 +00:00
ricow@chromium.org
b9df5aa295 Create IS_SPEC_OBJECT macro to simplify javescript code.
v8natives and runtime.js updated to use new macro and simplified when possible.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 08:58:41 +00:00
sgjesse@chromium.org
94288590a8 Prepare push to trunk. We are now vorking on version 2.2.10.
Review URL: http://codereview.chromium.org/1996011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 07:04:43 +00:00
sgjesse@chromium.org
6d54362dbd Fixes bug with v8::StackTrace for non-zero script line offsets
Change by jaimeyap see http://codereview.chromium.org/1985004 for details.
Review URL: http://codereview.chromium.org/2049004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-10 06:24:01 +00:00
ricow@chromium.org
8d51195778 Fixed issue 619 allowing Object.create to be called with a function.
This change allows Object.create to take a function as input in the
proto argument. The spec says that Type(O) for the proto argument
should be true but our IS_OBJECT does not check for this. I will make a
IS_SPEC_OBJECT in macros.py and refactor v8natives in another CL.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-09 08:43:59 +00:00
erik.corry@gmail.com
44c17de1b3 Add friend declaration.
http://codereview.chromium.org/2024008/show
Committed for evan@chromium.org with apologies for getting
his email address wrong last time.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-08 06:54:36 +00:00
erik.corry@gmail.com
429f0065fe Mark a function in assembler-x64-inl.h inline.
Without this annotation, it can be multiply-defined when it is
included in multiple source files.  This is a commit for
evanm@chromium.org.  See http://codereview.chromium.org/2044004


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 20:31:24 +00:00
erik.corry@gmail.com
d5738c0e6d Add ldrd and strd instructions to the ARM port. This is a
commit for zhangk@codeaurora.org.  See
http://codereview.chromium.org/568029 and
http://codereview.chromium.org/2019003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 20:02:57 +00:00
sgjesse@chromium.org
ae4cc3c287 Add a flag to the ARM version of new space allocation in generated code
The flag SIZE_IN_WORDS indicate that the requested size is in words and not in bytes, The default is to specify the size in bytes.
Review URL: http://codereview.chromium.org/2047002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 14:06:55 +00:00
antonm@chromium.org
a83a88cd58 Moving more code to lookup an item from the native cache into code generator.
To bypass expensive invocation of JS functions from C++ and omit runtime
call overhead for searching the cache, more elaborate deferred code is generated.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 12:48:18 +00:00
ricow@chromium.org
74fb282ba9 Fix presubmit error.
Review URL: http://codereview.chromium.org/1998010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 12:00:12 +00:00
sgjesse@chromium.org
9f583d05a2 Remove unused function in ia32 code generator
Review URL: http://codereview.chromium.org/1996006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 11:55:24 +00:00
ricow@chromium.org
fb3e01a306 Correct issue 696 with Date.parse returning a value when called on a non date string.
The error was introduced in revision 4557 where support was added for
ES5 date time format strings. Because there was no check for a valid
year a random string starting with a non-digit character would be
parsed.

This change disallows ES5 formatted dates where there is no date
fraction (i.e., with only a timestamp). Since none of the other
browsers support Date.parse on only timestamps I have disabled this
totally instead of just correcting the parser.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 11:53:20 +00:00
lrn@chromium.org
876c3e06b5 Synchronizing Comparison codegen between X64 and ia32.
Review URL: http://codereview.chromium.org/2010007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 11:25:29 +00:00
sgjesse@chromium.org
347b578c91 Fix virtual frame height on ARM
Bug introduced in r4608 where Dup2 increses the frame height with 4 instead of 2 when in a spilled scope.

Also removed a bogus ASSERT and used Push from macro assemler for double pushes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 11:24:04 +00:00
antonm@chromium.org
5ce4f8059b Turn {mov,add}q into {mov,add}l.
All the cases fixed are safe as registers hold 32-bit value, but that looks
safer to operate on proper sizes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 10:56:22 +00:00
ager@chromium.org
856135af42 Implement fast calls of functions in the presence of eval (if the eval
calls do not introduce new bindings).

The infrastructure is already in place for fast loads from context
slots in the presence of eval.  This change simply uses that
infrastructure for calls as well as loads.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 10:25:11 +00:00
sgjesse@chromium.org
89a7341d3f Pass key and receiver in registers for keyed load IC on ARM
The calling convention for keyed load IC's on ARM now passes the key and receiver in registers r0 and r1.

The code path in the ARM full compiler for handling keyed property load now has the same structure as for ia32 where the keyed load IC is also called with key end receiver in registers.

This change have been tested with an exhaustive combinations of the flags

  --special-command="@ --nofull-compiler"
  --special-command="@ --always-full-compiler"
  --special-command="@ --noenable-vfp3"

to the test runner.
Review URL: http://codereview.chromium.org/2024002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 10:16:11 +00:00
vitalyr@chromium.org
9c7f6267bf Remove unused declarations.
Review URL: http://codereview.chromium.org/2040001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 13:35:30 +00:00
vitalyr@chromium.org
4724826f4a Refactored custom call IC generators:
* All generators are listed in a single place.
 * Generators are installed as a separate pass in the bootstrapper.
 * Replaced pointers to generator functions with integer ids.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 13:21:53 +00:00
serya@chromium.org
9c245f168a Fixing a performance bug introduced in r4581.
Review URL: http://codereview.chromium.org/1910005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 12:57:11 +00:00
erik.corry@gmail.com
6a03e12123 Allow unaligned memory accesses on ARM targets that support it.
The build process must add -DCAN_USE_UNALIGNED_ACCESSES=1 to the
C++ flags to activate the support.  This is a commit for
Subrato of CodeAurora.  See http://codereview.chromium.org/1731013
Small edits by Erik Corry to activate unaligned accesses by
default on the simulator and testing Android builds.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 12:49:12 +00:00
whesse@chromium.org
fc41b41fc2 Allocate the right number of fast context slots on X64 and ARM. Port from ia32.
This is ported from change 3505 on ia32.
Review URL: http://codereview.chromium.org/1992003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 11:59:10 +00:00
serya@chromium.org
eaa95c523b Inlined load of string.length and array.length.
http://compute1.aar:9013/golem/r4583-v8-serya-length-inlined-vs-4583-v8.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 10:50:22 +00:00
lrn@chromium.org
23064a1b28 X64: Skip smi-test on GenericBinaryOpStub if static type test says we have smis.
Review URL: http://codereview.chromium.org/2032001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 10:31:34 +00:00
erik.corry@gmail.com
d18b73c2fe Add a single-element global positive and negative cache to
the implementation of instanceof.
Review URL: http://codereview.chromium.org/1765012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 09:35:18 +00:00
whesse@chromium.org
1f13b58b97 Correct bug with left shift on X64 platform from change 4571 (http://code.google.com/p/v8/source/detail?r=4571). Speed up left shift with a constant left hand side on X64 platform. Add unit test for this bug. Remove unused failure target argument from MacroAssembler::SmiShiftLeft and MacroAssembler::SmiShiftLeftConstant.
Review URL: http://codereview.chromium.org/1934004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 08:15:15 +00:00
sgjesse@chromium.org
f5b5edf2a3 Adds C++ API for retrieving a stack trace without running JavaScript
This API is extensible, and parameterized with flags so that callers can specify what subset of information they want to capture for each stack frame. 

Patch by jaimeyap, see http://codereview.chromium.org/1694011 for details.
Review URL: http://codereview.chromium.org/2028001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 07:32:44 +00:00
floitschV8@gmail.com
7fc98eb1f4 Dtoa for fixed notation.
Review URL: http://codereview.chromium.org/1956005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 13:51:27 +00:00
antonm@chromium.org
f1c5cdbb1f Fix Mac OS build.
Remove a typo.

TBR=mnaganov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 12:44:06 +00:00
antonm@chromium.org
25be9fa35c Fix windows build.
SmartPointer doesn't have -> operator and conversion to bool.

This a quick fix, I'll try to add -> operator with a separate CL.

TBR=mnaganov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 12:39:21 +00:00
antonm@chromium.org
1e744a3011 Turn some usages of NewArray with DeleteArray in the same scope into ScopedVector or SmartPointer.
That makes it easier to maintain the code---one should care less
about releasing the memory as smart pointers would take care of
this.

Switch to ScopedVector instead Vector for the same semantics in
src/builtins.cc

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 12:25:58 +00:00
floitschV8@gmail.com
92a9e30cd8 Revert r4591
Review URL: http://codereview.chromium.org/1968003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 10:33:27 +00:00
floitschV8@gmail.com
b441d246b3 Provide (non Gay) dtoa for fixed notation.
Review URL: http://codereview.chromium.org/1865001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 09:29:18 +00:00
sgjesse@chromium.org
f2751effa4 Prefer r0 as TOS when performing virtual frame dup on ARM
Review URL: http://codereview.chromium.org/1956004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 09:11:21 +00:00
whesse@chromium.org
cbcec49cd7 Make sure that type info of results is correctly recorded when results are moved to registers by generated code.
Review URL: http://codereview.chromium.org/1905002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 08:56:16 +00:00
ager@chromium.org
5ce05f66ef Prepare push to trunk. Now working on version 2.2.9.
Review URL: http://codereview.chromium.org/1914006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 07:23:26 +00:00
sgjesse@chromium.org
5a3ea1c83e Add some comments to the ia32 code generator
Review URL: http://codereview.chromium.org/1918002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 06:57:41 +00:00
sgjesse@chromium.org
efe9f30fbe Handle loading the property name for load IC in the virtual frame
Review URL: http://codereview.chromium.org/1946001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 06:50:15 +00:00
sgjesse@chromium.org
a355e45e22 Pass key in register for keyed load IC
The calling convention for keyed load IC is changed to have the key passed both in a register (r0) and on the stack.

Next steps will be first to remove the key from the stack and then pass the receiver in a register (r1).
Review URL: http://codereview.chromium.org/1937003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-05 06:40:14 +00:00
antonm@chromium.org
4501cea97b Throw an exception when wrong arguments are passed into SwapElements.
This runtime function should operate on elements and thus 'receiver'
must be JSObject and indices should be numbers.

TBR=lrm@chromium.org,ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 17:24:41 +00:00
antonm@chromium.org
6617fac3d4 Clean JS function results cache on each major GC.
We don't want to retain cached objects for too long.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 16:42:11 +00:00
serya@chromium.org
16d3811d50 Changing string length field type from int to SMI. It will make it be a regular field. Code generated in EmitNamedLoad could be patched for faster access to string.length.
Review URL: http://codereview.chromium.org/1706013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 14:49:50 +00:00
mikhail.naganov@gmail.com
3e54b5cbb0 Do a GC pass prior to collecting a heap profile.
It seems that doing an extra GC pass results in less cluttered heap snapshots.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 14:30:22 +00:00
lrn@chromium.org
4fdf57ace0 X64: Faster push/pop implementation.
Also snuck in an intended optimization for fast api call preparation and a few indentation fixes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 13:23:58 +00:00
peter.rybin@gmail.com
5435396701 Make LiveEdit natives fuzzy
Review URL: http://codereview.chromium.org/1687022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 13:07:36 +00:00
lrn@chromium.org
001f020d04 X64: Minor change of control flow in inline transcendental cache.
Move NaN-handling away from main code path.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 12:05:55 +00:00
whesse@chromium.org
852cebb1cb Improve static type information in (constant SHL smi) computation.
Review URL: http://codereview.chromium.org/1910002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 11:17:45 +00:00
ager@chromium.org
6230f5397d Port inline swapping of elements for the sort function in array.js
from ia32 to arm.

Original change: http://codereview.chromium.org/1709008


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 11:06:59 +00:00
sgjesse@chromium.org
528ab2bc7d Refactor assignment in the ARM code generator
This is mainly a port of r3899. It also adds handling of initilization blocks in ARM which had no special handling before.

The "calling conventions" used for

  EmitNamedLoad
  EmitNamedStore
  EmitKeyedLoad
  EmitKeyedStore

are somewhat mixed, but will become more aligned as the use of register allication and passing of argument in registers to IC's is extended.
Review URL: http://codereview.chromium.org/1846002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 09:33:12 +00:00
podivilov@chromium.org
d9587ab8d6 Port string keyed load IC improvements (r4444) to ARM.
Review URL: http://codereview.chromium.org/1769014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 09:32:07 +00:00
sandholm@chromium.org
5affd79e77 Reverting 2635
Review URL: http://codereview.chromium.org/1940001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 08:41:26 +00:00
whesse@chromium.org
1f9fef3d51 Add inlined code for (constant SHL smi), ported from ia32 to x64. Improve type information on ia32 version of code.
Review URL: http://codereview.chromium.org/1869001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4571 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 08:10:05 +00:00
erik.corry@gmail.com
b685df1caa Make bleeding edge compile (since r4561 made Handle ctor explicit). http://codereview.chromium.org/1936001. Committed for Dmitry Titov of Google
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 07:28:29 +00:00
ager@chromium.org
cf54120a58 Port inlined version of swap primitive for sorting from ia32 to x64.
Original code review for ia32 version: http://codereview.chromium.org/1709008
Review URL: http://codereview.chromium.org/1858002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 18:18:25 +00:00
whesse@chromium.org
130d6adf78 Change calling convention of BinaryOperation code generation functions on x64 platform to match ia32 platform.
Review URL: http://codereview.chromium.org/1844002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 10:53:03 +00:00
lrn@chromium.org
1790c3534a X64: Port inline transcendental cache to X64.
Review URL: http://codereview.chromium.org/1860001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 10:43:49 +00:00
erik.corry@gmail.com
9d5f6d0b46 Partial and small update to the codegen to use the new register allocator framework. See http://codereview.chromium.org/1732024. Committed for Rodolph Perfetta.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 10:22:25 +00:00
lrn@chromium.org
289b245d2b X64: Use allocation with no scratch registers to avoid push/pop.
Minor prettifications.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 09:54:48 +00:00
erik.corry@gmail.com
3906e2b109 No implicit conversion between a Foo** and a Handle<Foo>.
Review URL: http://codereview.chromium.org/1861001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 09:53:47 +00:00
ager@chromium.org
b83486c5f6 Port handling of heap numbers in deferred code for binary ops from
ia32 to x64.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 08:46:23 +00:00
lrn@chromium.org
c815de4f52 X64: Update allocation to work with no scratch registers at all.
Review URL: http://codereview.chromium.org/1856001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 07:44:55 +00:00
kmillikin@chromium.org
1a750a2110 Prepare push to trunk. Now working on version 2.2.8.
Review URL: http://codereview.chromium.org/1855001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 07:25:26 +00:00
ricow@chromium.org
6ceb02e6eb Added support for ES5 date time string format to Date.parse.
Review URL: http://codereview.chromium.org/1704016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-03 06:43:25 +00:00
antonm@chromium.org
8e56358e1d Use ScopedVector instead of dynamically allocated array.
This ensures that it'll be released on any control path leaving
the function thanks to desctuctor semantics.

BUG=42925

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4554 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-30 10:27:25 +00:00
whesse@chromium.org
e7a3875bb4 Cut-and-paste port from ia32 to x64: Delay load of trivial left operand of binary operation until after right operand loaded.
Review URL: http://codereview.chromium.org/1736023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-30 08:40:31 +00:00
antonm@chromium.org
55e32d2f3b Introduce faster swapping primitives.
Keyed store stub sits high in sorting profiles.

Swapping allows to save us additional type checks as we could both read and
write elmenets (on fast path) without them.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 15:14:39 +00:00
oleg@chromium.org
c98c930b1f Simplify double to number convertion.
Review URL: http://codereview.chromium.org/1694004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 14:01:37 +00:00
antonm@chromium.org
6cff35044d Add ability to bail out from custom call generators to x64 and ARM platforms.
http://code.google.com/p/v8/source/detail?r=4503 added this functionality to ia32.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 13:58:39 +00:00
sgjesse@chromium.org
a788b8ce56 Remove unused code
The SmiOperation function was not used anymore. Remove it and rename VirtualFrameSmiOperation to SmiOperation.
Review URL: http://codereview.chromium.org/1723021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 13:09:31 +00:00
sgjesse@chromium.org
0b4c1efd18 Improve the success rate for inline keyed store on x64
Added a simple new space check on the elements fixed array which can allow
updating with other values than smis without updating the remembered set.

Also combined the positive smi and range check so that a separate smi check can be avoided when the key is known to be a smi.

This is a port of r4543.
Review URL: http://codereview.chromium.org/1702013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 12:52:09 +00:00
floitschV8@gmail.com
0aa67676f6 Switch to vectors instead of bare char* arrays.
Review URL: http://codereview.chromium.org/1732019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 12:15:02 +00:00
whesse@chromium.org
3e689b5283 Add inline floating point comparisons for comparison operators to x64 platform.
Review URL: http://codereview.chromium.org/1703019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 11:44:17 +00:00
dgozman@chromium.org
a0c1310479 Make Empty function to have no prototype and use it as __proto__ for all functions without prototype.
Review URL: http://codereview.chromium.org/1769013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 10:39:36 +00:00
sgjesse@chromium.org
22a8a1e770 Improve the success rate for inline keyed store
Added a simple new space check on the elements fixed array which can allow updating with other valies than smis without updating the remembered set.
Review URL: http://codereview.chromium.org/1692014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 07:47:56 +00:00
podivilov@chromium.org
1872574f4d Port string keyed load IC improvements (r4444) to x64.
http://compute1.aar:9013/golem/r4502-v8-podivilov-string-char-at2-x64-vs-4502-v8-x64.html
Review URL: http://codereview.chromium.org/1750017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 17:16:51 +00:00
ager@chromium.org
62e8d5a789 Port inline version of Math.sqrt and Math.pow from ia32 to x64.
Review URL: http://codereview.chromium.org/1774010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 14:43:51 +00:00
podivilov@chromium.org
c973f99ce4 Port inlining of type checks in call ICs for API functions to x64 and arm (issue 602, r3825).
Review URL: http://codereview.chromium.org/1650011


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 14:06:35 +00:00
peter.rybin@gmail.com
6f099e4ce6 LiveEdit: clean JS sources a bit
Review URL: http://codereview.chromium.org/1697016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 13:29:07 +00:00
dgozman@chromium.org
8fee5e810a Added ability to remove prototype from function. In this case, [[Construct]] from function will not be allowed.
Added runtime function %FunctionRemovePrototype for this.
Removed prototypes from all builtin functions.
Some sputnik tests marked as fixed.
Added test to check builtins behavior.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 12:05:40 +00:00
lrn@chromium.org
ffedb9ea3f Prepare push to trunk. Now working on 2.2.7.
Review URL: http://codereview.chromium.org/1759011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 12:03:25 +00:00
yurys@chromium.org
cf63fc5b9e Ensure v8 is initialized before initializing debug context
Review URL: http://codereview.chromium.org/1756018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 11:59:43 +00:00
peter.rybin@gmail.com
80453231fe LiveEdit: breakpoints updates and fixes for related problems
Review URL: http://codereview.chromium.org/1800007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 11:38:43 +00:00
sgjesse@chromium.org
ff0775c38f Minor tweaks to the ia32 inlined keyed store.
Review URL: http://codereview.chromium.org/1810001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 11:14:58 +00:00
sgjesse@chromium.org
15a6a43aa8 Add inlining of keyed store on ARM
This ports the inlining of keyed store to the ARM port. As the inlined code does not handle the write barrier it only supports storing of smis.
Review URL: http://codereview.chromium.org/1719021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 11:14:31 +00:00
yurys@chromium.org
9a9a268756 Fix test-debug: make sure debugger is unloaded before running next test
Review URL: http://codereview.chromium.org/1704015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 09:18:53 +00:00
erik.corry@gmail.com
ea1d2ad87b Fix keyed load inlining after my last commit accidentally
broke it.
Review URL: http://codereview.chromium.org/1780010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 09:12:04 +00:00
vegorov@chromium.org
ef464f0c59 Switch to aggresive promotion in mark-sweep collections.
Review URL: http://codereview.chromium.org/1759005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 08:32:46 +00:00
yurys@chromium.org
0908fdc2f8 Don't unload debug context after it was requested through public API
Review URL: http://codereview.chromium.org/1731011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 08:23:20 +00:00
erik.corry@gmail.com
a63d2bcd8d Put the icache checks in the ARM simulator behind a flag,
off by default, to speed up debug mode.
Review URL: http://codereview.chromium.org/1787006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-28 07:15:34 +00:00
peter.rybin@gmail.com
6684b3c5d3 Rename Compare -> Comparator to resolve name conflict in v8::internal
Review URL: http://codereview.chromium.org/1737009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 21:20:02 +00:00
erik.corry@gmail.com
c690c2ba77 Change the LoadIC calling convention so that the receiver
is both on top of the stack and also in r0.  This makes
sense because the receiver is usually in r0 anyway.  We may
remove it from the stack later.  Also removes some spilled
scopes from the code generator allowing it to keep expression
temporaries in registers more.
Review URL: http://codereview.chromium.org/1751019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 19:24:36 +00:00
whesse@chromium.org
f0f62a06d4 Fix logical error in change 4515.
Review URL: http://codereview.chromium.org/1769011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 15:02:22 +00:00
podivilov@chromium.org
5a999d8b18 Port number string cache lookup for heap numbers in generatred code to x64 and ARM.
Review URL: http://codereview.chromium.org/1575047


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 14:56:56 +00:00
whesse@chromium.org
52a5ebc70f Port improved ia32 CompareStub to x64. Add framework for inlined floating point compares, to be implemented in next change.
Review URL: http://codereview.chromium.org/1687014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 14:02:24 +00:00
erik.corry@gmail.com
3206d70dec Fix search-for-string and replace global to avoid hangs
and spurious exceptions.
Review URL: http://codereview.chromium.org/1687013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 11:45:08 +00:00
sgjesse@chromium.org
9b5ca37545 Inline keyed load on ARM
This uses the same infrastructure as is used by the inlining of named property load. The code patching if the inlined code is simpler as the key is provided in a register os the only patching required is the map check directing the inlined code to the deferred code block or not.
Review URL: http://codereview.chromium.org/1735007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 11:16:05 +00:00
sgjesse@chromium.org
2e1298944f Fix presubmit errors
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/1736018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 09:23:33 +00:00
sgjesse@chromium.org
3470a0c9c0 Fix use of live register as temporary
When flag --naive-counters was used this code trashed r1 which is actually live.
Review URL: http://codereview.chromium.org/1725009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 09:11:33 +00:00
sgjesse@chromium.org
daf1ea3970 Avoid constant pool blocking for too long
The generation of the deferred code for named property load where the load was inlined did a constant pool blocking for the whole deferred code. Having large numbers of this type of deferred code generated one ofter the other effectively blocked the constant pool for all the deferred code causing 

Removed the BeforeGenerate/AfterGenerate for the deferred code and made macro assembler StartBlockConstPool/EndBlockConstPool non-public. Re-introduced BlockConstPoolFor instead to use with BlockConstPoolScope to block some more instructions cross function calls.

Also handle the use of native code counters for inlined named property load.
Review URL: http://codereview.chromium.org/1787005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-27 09:09:51 +00:00
antonm@chromium.org
e35fbc93c2 Fix a build---increase array's size.
TBR=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 15:34:25 +00:00
lrn@chromium.org
1a0bb51069 Fix bug in word-boundary-lookahead followed by end-of-input assertion.
Review URL: http://codereview.chromium.org/1712013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 15:10:42 +00:00
antonm@chromium.org
6acdd84a61 Current custom call generators cannot cope with the case when receiver is not a JSArray.
Add a support for bailout from custom call generators (just return undefined).

BUG=684

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 15:08:07 +00:00
antonm@chromium.org
ad9312cdaa Unify treatment of sorting with and without custom comparator.
Review URL: http://codereview.chromium.org/1706010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 14:34:48 +00:00
erik.corry@gmail.com
507e9b26a6 Simplify the use of the stm instruction on ARM.
Review URL: http://codereview.chromium.org/1694016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 14:25:29 +00:00
antonm@chromium.org
53f93b11d2 Remove duplicate LeftTrimFixedArray function.
Review URL: http://codereview.chromium.org/1701008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 14:18:50 +00:00
fschneider@chromium.org
fa14cdbf31 Prepare push to trunk. Now working on version 2.2.6.
Review URL: http://codereview.chromium.org/1792001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 13:17:55 +00:00
erik.corry@gmail.com
280af55178 Cosmetic changes to the ARM port.
Review URL: http://codereview.chromium.org/1790002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 11:41:39 +00:00
erik.corry@gmail.com
ed6817d58c Fix a bug where a GC at an unlucky moment caused a wrong
calculation on ARM.
Review URL: http://codereview.chromium.org/1733016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 11:06:37 +00:00
sgjesse@chromium.org
da52a841a3 Add a V8 specific target architecture to the GYP file
The V8 GYP file now uses its own target architecture. It default to the standard target_arch, but can be set to a separate value. E.g. using

  export GYP_DEFINES="target_arch=ia32 v8_target_arch=arm"

makes it possible to have the V8 ARM simulator be used in a IA32 build.

Added some checking of supported host/target architecture combinations.
Review URL: http://codereview.chromium.org/1790001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 10:59:14 +00:00
fschneider@chromium.org
a3b551ab2f Fix bug in the ARM full code generator for inlined count operations.
The inlined add needs to set the condition codes to correctly detect
smi overflows.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-26 10:31:51 +00:00
vitalyr@chromium.org
559ba2ccf0 Don't share function result caches between contexts.
A reference to the caches array was embedded directly into the builtin
code and this allowed sharing objects between contexts.

Unfortunately, clearing the cache on GC won't prevent sharing so we
either have to have per-context builtin code or load the cache
indirectly from the current context. This change implements the second
approach. The first approach may be interesting to consider in the
future for some perfomance critical functions, and the current
approach can still be improved by putting the caches directly into the
global context (or even global objects).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-25 10:31:52 +00:00
ager@chromium.org
c0f1f18f80 Fix bug in KeyedLoadIC generic stub where signed instead of unsigned
comparison was used.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 12:57:41 +00:00
vegorov@chromium.org
1760038348 - Fix Win64 build.
- Style cleanup: use Page::is_valid() instead of NULL-check, use Heap::CreateFillerObjectAt() instead of dummy free list nodes
Review URL: http://codereview.chromium.org/1691009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 12:45:05 +00:00
kaznacheev@chromium.org
3ca99e722b Fix BinaryOpIC implementation on ARM.
On a pair of smis HEAP_NUMBERS stub is significantly slower than GENERIC. This slows
down some tests dramatically (crypto-aes from SunSpider).
With this change HEAP_NUMBERS stub switches to GENERIC stub the first time it sees 2 smis
as its operands.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 10:08:24 +00:00
whesse@chromium.org
6f34ff44e3 Fix typo - remove stray character from change 4481
Review URL: http://codereview.chromium.org/1753008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 08:14:11 +00:00
whesse@chromium.org
07f68ec357 Compute static type information for remaining expression types on x64 platform.
Review URL: http://codereview.chromium.org/1751008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 08:05:13 +00:00
sgjesse@chromium.org
931f0a031a Changed inlined property load detection on ARM
Instaed of having a nop after all non-inlined calls to load IC use a different nop (mov r1, r1 instead of mov r0, r0) to detect an inlined load IC.

Added more infrastructure to the deferred code handling to make it possbile to block constant pool emitting in a deferred code block, including the branch instruction ending the deferred code block.

Addressed a couple of comments to http://codereview.chromium.org/1715003, including adding an assert to make sure that the patching of an ldr instruction is always possible.
Review URL: http://codereview.chromium.org/1758003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-23 07:42:45 +00:00
antonm@chromium.org
c20fcec3af Use Heap::CreateFillerArrayAt to create a filler instead of copied code.
Review URL: http://codereview.chromium.org/1770001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 18:50:27 +00:00
erik.corry@gmail.com
8ceb9ad8de Speed up random on ARM. Patch committed for rodolph.perfetta@googlemail.com. See http://codereview.chromium.org/1689007
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 17:25:42 +00:00
vegorov@chromium.org
cb27d09534 Fix bugs introduced by r4475:
- RelinkPageListInChunkOrder might relink unused pages into the middle of a sequence of used pages. Filler objects should be placed at the beginning of such unused pages otherwise generic iterators (e.g. HeapObjectIterator) would not handle them correctly. 
- ObjectAreaEnd() should not be used as an allocation limit for pages from FixedSpace. Pages in such spaces do not use top page_extra_ bytes of object area.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 16:43:38 +00:00
vegorov@chromium.org
3fa49f8b91 Put empty pages discovered during sweeping to the end of the list of pages
instead of adding them to the free list.
Review URL: http://codereview.chromium.org/1683001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 14:42:21 +00:00
erik.corry@gmail.com
5fab20edcd Add checks to the ARM simulator to ensure that we flush the icache all
the places we should.
Review URL: http://codereview.chromium.org/1523030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 12:41:10 +00:00
ager@chromium.org
0720377a66 Port apply with arguments optimization to ARM. This avoid allocating
the arguments object when not necessary.
Review URL: http://codereview.chromium.org/1738003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 12:20:36 +00:00
whesse@chromium.org
5db2af4873 Fix error in static type information computation for bitwise shift.
Review URL: http://codereview.chromium.org/1756007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 09:02:10 +00:00
sgjesse@chromium.org
49d685684a Minor formatting changes.
Review URL: http://codereview.chromium.org/1766005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 07:35:43 +00:00
sgjesse@chromium.org
5a8d9a4257 Fix ARM debug build breakage caused by r4468
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/1730005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 07:26:07 +00:00
sgjesse@chromium.org
968a524432 Add inlining of property load on ARM
Generate inlined named property load for in-object properties. This uses the same mechanism as on the Intel platforms with the map check and load instruction of the inlined code being	patched by the inline cache code. The map check is patched through the normal constant pool patching and the load instruction is patched in place.
Review URL: http://codereview.chromium.org/1715003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-22 07:18:30 +00:00
peter.rybin@gmail.com
af63e61605 Support multi-chunk differences
Review URL: http://codereview.chromium.org/1672006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 16:59:58 +00:00
mikhail.naganov@gmail.com
e44869ae6d Fix issue 683: change the order of CPU profiler setup actions.
BUG=683

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 14:07:13 +00:00
whesse@chromium.org
9cf54367e9 Port inlined quick equality check for non-NaN to x64.
Review URL: http://codereview.chromium.org/1756002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 13:33:36 +00:00
iposva@chromium.org
1a31f9a2f7 - Fix unitialized variable error found by compiler warning.
Review URL: http://codereview.chromium.org/1700004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 12:16:36 +00:00
antonm@chromium.org
0710de75c0 Fix one off error.
Proper condition to start eviction is when next possible index is equal
to cache length.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 11:13:53 +00:00
sgjesse@chromium.org
e9f818b242 Fix lint errors
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/1749002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 10:20:55 +00:00
sgjesse@chromium.org
8ced007f5a Update comment to provide the correct usage of the Disassembler class.
TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/1755001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 09:45:06 +00:00
sgjesse@chromium.org
786c213dc6 Use an object to control the blocking of the constant pool
Instead of indicating for how many instructions the constant pool needs to be blocked the constant pool is now blocked while at least one instance of ScopedConstPoolBlocker exists.
Review URL: http://codereview.chromium.org/1673006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 09:43:45 +00:00
lrn@chromium.org
0adfe842a5 Fix incorrect handling of global RegExp properties for nested replace-regexp-with-function.
Review URL: http://codereview.chromium.org/1695002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 08:33:04 +00:00
sgjesse@chromium.org
5c7ffe9f1c Return the correct statement position.
Whether this was a typo or a deliberate decision at some point I don't know. Anyway it was wrong.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 07:32:04 +00:00
ricow@chromium.org
486662b532 Prepare push of version 2.2.4 to trunk.
Review URL: http://codereview.chromium.org/1687004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-21 07:10:20 +00:00
vitalyr@chromium.org
b8ba4deacc Reapply: Inline fast cases in string keyed load IC.
(Fixed handling of out-of-bounds keys.)

String keyed load used to call STRING_CHAR_AT builtin that performs
two steps (get a char code, construct a one-char string from the
code), both of which have fast cases implemented as inline runtime
functions. In this chage most of the code from these functions is
extracted to a set of common generator functions in StringStubBase and
the fast cases are grouped together in the IC code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 17:33:14 +00:00
lrn@chromium.org
1e46286091 Add missing check to StringBuilderConcat runtime function.
Review URL: http://codereview.chromium.org/1578036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 13:10:18 +00:00
antonm@chromium.org
cdbbd7fa49 Do not preconvert to string as it apparently has minimal performance benefit.
Review URL: http://codereview.chromium.org/1525040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 11:29:32 +00:00
ager@chromium.org
c678e44805 Add missing smi check in IC for nonexistent properties.
Add regression test.

BUG=v8:681
Review URL: http://codereview.chromium.org/1673005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 10:20:39 +00:00
vitalyr@chromium.org
fae2b0f175 Revert r4444 "Inline fast cases in string keyed load IC."
Review URL: http://codereview.chromium.org/1633024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 09:26:32 +00:00
vitalyr@chromium.org
e504873d2a Inline fast cases in string keyed load IC.
String keyed load used to call STRING_CHAR_AT builtin that performs
two steps (get a char code, construct a one-char string from the
code), both of which have fast cases implemented as inline runtime
functions. In this chage most of the code from these functions is
extracted to a set of common generator functions in StringStubBase and
the fast cases are grouped together in the IC code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-20 08:27:48 +00:00
erik.corry@gmail.com
e1b3b92a2c Make not sucking at regexp the default
(remove V8_NATIVE_REGEXP flag, add
V8_INTERPRETED_REGEXP flag).
Review URL: http://codereview.chromium.org/1635001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 19:30:11 +00:00
ager@chromium.org
e422cd3291 Fix arm simulator build on Max OS X. For some reason the GCC version
on Mac is more pedantic.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 16:34:19 +00:00
peter.rybin@gmail.com
8fdc7a5ae1 LiveEdit: calculate a real script difference
Review URL: http://codereview.chromium.org/1652008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 16:08:26 +00:00
ager@chromium.org
07db17ce1b Remove some remaining references to boilerplate functions.
Review URL: http://codereview.chromium.org/1605037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 12:39:07 +00:00
mikhail.naganov@gmail.com
5590b23666 Really fix WebKit buildbot crashes on StopProfiling.
This time I hope I'm doing the right check.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-16 13:57:14 +00:00
sgjesse@chromium.org
5423170113 Tweak D8 remote debugger
When D8 is used as remote debugger the command 'break' (shorthand 'b') can be used to break JavaScript execution.

Fixed the printing of the prompt 'dbg>' and printing of error messages.
Review URL: http://codereview.chromium.org/1566049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-16 12:19:47 +00:00
mikhail.naganov@gmail.com
74cd871d3b Make StopProfiling resilient to calls in unusual moments.
Review URL: http://codereview.chromium.org/1658005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-16 08:44:17 +00:00
vegorov@chromium.org
ab6394b274 Fix constant offset check for inlined write barrier to work in cases when offset is given from tagged object pointer.
Review URL: http://codereview.chromium.org/1646008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 14:43:32 +00:00
mikhail.naganov@gmail.com
324eee1f3f Only put VM state entry if a symbolized stacktrace is empty.
This makes more sense than putting "(program)" as the root of
every stack trace in broswer mode.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 14:12:17 +00:00
sgjesse@chromium.org
88fc8f1fb5 Add tracking of loop nesting to ARM code.
Review URL: http://codereview.chromium.org/1645008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 14:06:57 +00:00
sgjesse@chromium.org
f6cce43255 Add stack alignment check to ia32 and x64
The stack is now checked for proper alignment before calling into C code when the flag --debug-code is turned on.
Review URL: http://codereview.chromium.org/1637015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 12:41:30 +00:00
mikhail.naganov@gmail.com
61085478c6 Report approximated duration in milliseconds for profile nodes.
The simple formula "ms = ticks * sampler_interval" doesn't work,
because e.g. on Linux, the actual sampling rate can be 5 times
lower than the one set up in the code. To calculate actual sampling
rate, current time is periodically queried and processed along with
actual sampling ticks count.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 11:37:29 +00:00
ager@chromium.org
afc15bb48f Reapply load ICs for nonexistent properties.
We need to be careful to check global property cells for the property
encountered during lookup.  Therefore, the ICs have to be specific to
the name of the property if global objects are involved.  In
principle, this means that we could get a large number of monomorphic
ICs for the same map if there is a global object in the prototype
chain.  However, since this is only done for normal load ICs and not
for keyed load ICs I do not expect this to be a problem.  I will
experiment with it once this goes in.

BUG=675
Review URL: http://codereview.chromium.org/1559033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 11:25:41 +00:00
sgjesse@chromium.org
09aa20da08 Ensure stack alignment in ARM port
In the CEntryStub keep track of the actual skew from the correct alignment to ensure proper alignment before calling the runtime. Add checks to test the expected skew when running on hardware.

Use the PrepareCallCFunction/CallCFunction in a few other places.

Add check to the ARM simulator for correct alignment.

Add option --sim-stack-alignment to set the stack alignment in the simulator. Currntly only values 4 and 8 makes sense. 8 is the default to make snapshots generated with the simulator work on hardware requiring 8 byte stack alignment.
Review URL: http://codereview.chromium.org/1530043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 09:34:47 +00:00
sgjesse@chromium.org
9b31f11df6 Avoid warning on ARM reported by newer GCC versions
Review URL: http://codereview.chromium.org/1540038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-15 08:45:27 +00:00