Commit Graph

5030 Commits

Author SHA1 Message Date
sgjesse@chromium.org
20f0b65df0 Fix porting bug in r6929
Review URL: http://codereview.chromium.org/6579036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 12:41:26 +00:00
ricow@chromium.org
77fffe2207 X64: Implement DoComputeOsrOutputFrame and fix Generate_OnStackReplacement.
The existing version does not have a correct implementation of
Generate_OnStackReplacement since we do not correctly find the loop
depth. This is mainly because EmitStackCheck in full-codegen-x64.cc
did not write it and partly due to us reading at the wrong offset
(which had no effect when it was not written in the first place, we
simply got a random number from the next instruction).

The DoComputeOsrOoutputFrame is very similar to the ia32 version.



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 12:01:24 +00:00
sgjesse@chromium.org
bd2fb51375 ARM: Port r5445
r5445: Implement for-in cache validity checking in the full codegen on IA-32.
Review URL: http://codereview.chromium.org/6581031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 11:39:27 +00:00
sgjesse@chromium.org
c8f8c69fd6 X64: Port r6635 and r6659
r6635: Remove the redundant load on every context lookup.
r6659: Do not compile the unreachable body of functions with illegal redeclarations.

The crankshaft part of these changes are already ported.
Review URL: http://codereview.chromium.org/6581029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 11:36:14 +00:00
ricow@chromium.org
cfd6268256 Fix wrong assertion in assembler causing the shell to crash with --code-comments.
Since writting a code comment can include a pc-jump the assertion
should just check that we are greater than or equal to
kMinRelocCommentSize (renamed from kRelocCommentSize), not that we are
actually equal to.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 10:29:01 +00:00
karlklose@chromium.org
5572d24fc5 ARM: Fix DoubleToI.
BUG=1811
TEST=test/mjsunit/regress/regress-1181.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 10:07:35 +00:00
fschneider@chromium.org
a23b4f2da9 Prepare push to trunk. Now working on version 3.1.7.
Review URL: http://codereview.chromium.org/6580027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 09:54:37 +00:00
sgjesse@chromium.org
15c9091a85 Fix presubmit error.
TBR=ricow@chromium.org
Review URL: http://codereview.chromium.org/6580026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 08:23:08 +00:00
sgjesse@chromium.org
acd4f89999 ARM: Port r6635 and r6659
r6635: Remove the redundant load on every context lookup.
r6659: Do not compile the unreachable body of functions with illegal redeclarations.
Review URL: http://codereview.chromium.org/6572003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-24 07:17:43 +00:00
fschneider@chromium.org
bdcf0ec270 Fix debug tracing of live ranges and remove unused code.
When printing the sub-parts of a live range, only print the use intervals
belonging to each part.

Add a flag to print all use positions (incl. environment uses)


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 15:25:04 +00:00
whesse@chromium.org
0d067b56c7 Temporarily disable DoStoreContextSlot in x64 lithium codegen to diagnose non-reproducible buildbot error. Fix presubmit error.
Review URL: http://codereview.chromium.org/6572002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 13:52:11 +00:00
whesse@chromium.org
c61ac2cd84 X64 Crankshaft: Add DoOuterContext to x64 lithium.
Review URL: http://codereview.chromium.org/6570008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 13:26:28 +00:00
kmillikin@chromium.org
791c9e2c21 Remove most uses of HSubgraph as an argument.
In a lot of cases where we were passing a subgraph (a pair of basic blocks),
we actually only needed a basic block.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 11:59:18 +00:00
whesse@chromium.org
65443b3879 X64 Crankshaft: Add Typeof and TypeofIs to x64 lithium. Fix presubmit.
Review URL: http://codereview.chromium.org/6568004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 11:29:11 +00:00
karlklose@chromium.org
a0b8d5a55c Fix presubmit for r6908.
TBR=whesse

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 11:25:27 +00:00
fschneider@chromium.org
288b4fb8f4 HIR refactoring.
Review URL: http://codereview.chromium.org/6538080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 11:19:50 +00:00
karlklose@chromium.org
16cc528316 ARM: Implement DoPower in the lithium code generator.
Review URL: http://codereview.chromium.org/6532020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 10:41:13 +00:00
whesse@chromium.org
337f6a953d X64 Crankshaft: Disable incompletely implemented on-stack replacement.
Review URL: http://codereview.chromium.org/6567003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 10:33:49 +00:00
ager@chromium.org
a4ffbdc61b x64: Implement delete property in lithium backend.
Review URL: http://codereview.chromium.org/6570005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 10:10:47 +00:00
ager@chromium.org
bfb1cb4288 x64: Implement context stores and loads, unknown osr value, and osr
entry in lithium backend.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 09:51:53 +00:00
ager@chromium.org
ae328e61b0 Properly reset external catcher if exception couldn't be externally caught.
We can wrongly assume that exception which is not intended to be caught
by external try/catch should be caught if this exception inherits
external catcher from some previous exception.  To prevent that,
clear external catcher when processing exceptions which cannot be
externally caught.

BUG=v8:1184
TEST=test/mjsunit/regress/regress-1184.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-23 06:55:47 +00:00
mmaly@chromium.org
3ff7aa0ea9 Fix for bug http://code.google.com/p/v8/issues/detail?id=1176.
Review URL: http://codereview.chromium.org/6469083/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 17:20:25 +00:00
rossberg@chromium.org
3af35dc96f Optimize functions needing a local context.
Allocate the context in the prologue. Two issues had to be solved:
(1) deoptimization needs to handle functions with a local context,
(2) we need a safepoint in the prologue.
(Thanks to Kevin.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 16:56:57 +00:00
mikhail.naganov@gmail.com
56788625b6 Fix CPU profiling for Crankshaft.
The main issue was due to multiple recompilations of functions.  Now
code objects are grouped by function using SFI object address.
JSFunction objects are no longer tracked, instead we track SFI object
moves. To pick a correct code version, we now sample return addresses
instead of JSFunction addresses.

tools/{linux|mac|windows}-tickprocessor scripts differentiate
between code optimization states for the same function
(using * and ~ prefixes introduced earlier).

DevTools CPU profiler treats all variants of function code as
a single function.

ll_prof treats each optimized variant as a separate entry, because
it can disassemble each one of them.

tickprocessor.py not updated -- it is deprecated and will be removed.

BUG=v8/1087,b/3178160
TEST=all existing tests pass, including Chromium layout tests

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 16:31:24 +00:00
whesse@chromium.org
08377c8449 X64 Crankshaft: Implement CallKeyed in optimizing compiler.
Review URL: http://codereview.chromium.org/6541069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 14:40:13 +00:00
ricow@chromium.org
2e7a41f944 Add file left out of last commit.
Review URL: http://codereview.chromium.org/6549016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 12:42:40 +00:00
ricow@chromium.org
45c63ffa6a Add more generic version of reloc info padding to ensure enough space for reloc patching during deoptimization (fixes issue 1174).
The old version only added extra space when we did indirect calls, but
the problem remains the same with normal calls that can be represented
as a single byte. When doing patching each call will always be at
least 2 bytes long because we use RUNTIME_ENTY as the reloc mode.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 12:28:33 +00:00
ricow@chromium.org
8162d9029d Fix second half of issue 1151, the first change (r6765) only fixed FunctionGetPrototype, not FunctionSetPrototype.
Review URL: http://codereview.chromium.org/6548008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 12:27:36 +00:00
sgjesse@chromium.org
0a15b9116a X64: Refactor the string add in the type recording binary operation stub
This makes the code have the same structore as on IA32 and ARM, and will also support possible fast adding a smi and string where the string is to the right and fast adding of String objects.
Review URL: http://codereview.chromium.org/6542060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 12:26:31 +00:00
fschneider@chromium.org
031062d246 Fix bug with input representation of HValueOf.
The class did not correctly implement the RequiredInputRepresentation.
I changed this functions to be abstract so that all hydrogen classes
must implement it.

As a convention instructions with zero input operands return None as input
representation.

Instructions that can handle all input representations without converting before
also have None as required input representation (e.g. HTest)

All other instructions need a proper required input representation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 12:14:53 +00:00
whesse@chromium.org
b5c3b18f29 X64 Crankshaft: Implement DoubleToI in optimizing compiler.
Review URL: http://codereview.chromium.org/6551009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 12:02:47 +00:00
sandholm@chromium.org
9d4b0fa932 Improve parseInt.
Review URL: http://codereview.chromium.org/6546055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 11:21:15 +00:00
kmillikin@chromium.org
3c02d036a8 Partial refactoring of subgraphs.
Change the interface to the Hydrogen graph builder to appear like it
directly holds a current basic block and a current environment.
Remove some direct accesses to the current subgraph, and remove
subgraph accessors that simply forwarded to the exit block.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 10:32:16 +00:00
sgjesse@chromium.org
b0fa94777e Refactored PathTracer in heap.cc.
This is so that it can be reused by LOL code later.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 10:05:30 +00:00
sgjesse@chromium.org
2ab5691ac1 ARM: Add support for just one string argument in the string add stub
Having a string add stub which can handle a string in just one of the arguments is essencial for the type recording binary operation stub when expecting strings. Otherwise string added with e.g. smi will always call the runtime for a type transition which will be back to the same types as the transition code keeps it in string arguments when one argument is a string.

This fixes the regression (especially Delta Blue) caused by replacing the generic binary operation stub with the type recording binary operation stub in the ARM lithium code generator.
Review URL: http://codereview.chromium.org/6551008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 09:35:37 +00:00
ager@chromium.org
823f9feb05 Revert "Expand fast case of parseInt to include radix == 10 and radix == 0."
Causes Mozilla failures.

TBR=sandholm@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 09:14:47 +00:00
sandholm@chromium.org
4e2101d928 Expand fast case of parseInt to include radix == 10 and radix == 0.
Review URL: http://codereview.chromium.org/6532087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 09:01:06 +00:00
kmillikin@chromium.org
14e185b31b Change the translation of break/continue into Hydrogen.
Resolve break and continue when we see them, rather then deferring
them until later.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6878 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 08:40:10 +00:00
kmillikin@chromium.org
663da3df40 Fix presubmit failure.
TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 06:41:32 +00:00
kmillikin@chromium.org
c1386c3381 Shorten live ranges for arguments to runtime calls.
Before, the live ranges of the arguments extended to the call itself, and
they were pushed immediately before the call.  Now, they are spilled eagerly
as soon as their value is available and they are spilled to the right place.

The inlined runtime calls in the optimized backend are changed to work as in
all the other backends: they get their arguments untranslated and can choose
their own custom evaluation order.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 06:25:01 +00:00
mmaly@chromium.org
fb20f7fc75 CallIC and KeyedCallIC not wrapping this for strict mode functions.
Fix CallIC and KeyedCallIC to correctly use Handle<Object>.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-22 00:39:21 +00:00
antonm@chromium.org
6aec28f447 Minor refactoring: unify lazy function compilation for in loop and no in loop variants.
Review URL: http://codereview.chromium.org/6542017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 18:28:20 +00:00
mikhail.naganov@gmail.com
3eb151ebea Bug: OS::MemoryMappedFile::open() should not truncate a pre-existing file.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 17:17:26 +00:00
kmillikin@chromium.org
123dbb2f5e Change the baseline compiler to match the Hydrogen graph builder.
The Hydrogen graph translation does not build a branch for unary negation in
an effect context, so the baseline compiler should not do so either.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 16:49:39 +00:00
vegorov@chromium.org
58600281e8 Heap::gc_count_, last_gc_count, and kGCsBetweenCleanup should be unsigned
in order to not be vulnerable to overflow issues.

Patch by Mark Lam of Hewlett-Packard Development Company, LP

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 16:11:46 +00:00
ager@chromium.org
c2969bfb1a Implement pixel array elements access in the presence of an
interceptor that does not handle the elements load.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 15:59:23 +00:00
fschneider@chromium.org
f13f84ae5d Fix broken build by removing more const qualifiers.
Review URL: http://codereview.chromium.org/6532085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 13:27:36 +00:00
fschneider@chromium.org
e9162d53fe Remove const qualifier in a few places in the hydrogen IR files.
This is a preparation step for a larger refactoring of the 
hydrogen instructions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 12:05:17 +00:00
whesse@chromium.org
e1448ebd34 X64 Crankshaft: Add ModI and ModT to x64 optimizing compiler.
Review URL: http://codereview.chromium.org/6548005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 11:32:28 +00:00
ager@chromium.org
ea0dda89bb Unifying the handling of storing and loading from safepoint stack
slots across architectures.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 11:29:45 +00:00
karlklose@chromium.org
24b73a04b0 ARM: Implement DoMathRound in the lithium code generator.
Review URL: http://codereview.chromium.org/6519051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 10:30:25 +00:00
ager@chromium.org
1e89c4aa67 x64: implement apply with arguments in lithium backend.
Includes the plumbing to make sure that all calls generated by the macroassembler for lithium will generate record a safepoint.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-21 07:54:55 +00:00
vegorov@chromium.org
c411adca55 Adjust pointer maps for branches when connecting live ranges.
Review URL: http://codereview.chromium.org/6541024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 16:29:41 +00:00
ager@chromium.org
5ec91a4279 x64: Fix safepoint register index calculation.
We leave room for all registers on the stack so we have to add a bit.

This is not nicely factored and I need to do that. This will fix the breakage and I
will fix the rest on Monday.

TBR=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 16:16:17 +00:00
whesse@chromium.org
4ac9f20601 X64 Crankshaft: Implement MathRound, MathFloor, MathSqrt, and MathPowHalf UnaryMathOperations in optimizing code generator. Remove unneeded bailout on Math.pow(-0, 0.5) from ia32 and x64 platforms - we produce the correct value without bailing out.
Review URL: http://codereview.chromium.org/6532054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 14:34:17 +00:00
antonm@chromium.org
d00e3225f7 Minor cleanup.
Do not relookup code object and use optimized_code instead
shadowing existing code local.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 14:22:29 +00:00
ager@chromium.org
c52e397db6 Fix presubmit.
TBR=lrn@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 14:10:42 +00:00
ager@chromium.org
b8f0b88b54 x64: Implement regexp literals and string CharCodeAt in lithium backend.
Review URL: http://codereview.chromium.org/6469052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 14:00:46 +00:00
ager@chromium.org
fc7e79a838 x64: Implement the missing generic load and store operations.
Review URL: http://codereview.chromium.org/6541019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 12:54:43 +00:00
whesse@chromium.org
4752373976 X64 Crankshaft: Implement LValueOf and (dummy) LArgumentsObject.
Review URL: http://codereview.chromium.org/6542011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 12:06:52 +00:00
antonm@chromium.org
e79bfcaf3f Use [[DefineOwnProperty]] to put 'constructor' field on the protoype object.
That better follows ECMA-262 (see 13.2 Creating Function Objects) and allows
to ignore nasty JS accessors for 'constructor' property.

BUG=v8:1172
TEST=test/mjsunit/regress/regress-1172.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 10:53:38 +00:00
ricow@chromium.org
95892799e1 Add access checks to Object.preventExtensions + add regression test for 1027.
Object.preventExtensions can currently be used cross-domain. With this
change we follow firefox (IE9 has our current behaviour). In addition
this includes a regression test for 1027 and access tests for
Object.seal and Object.freeze.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 10:39:02 +00:00
mmaly@chromium.org
f0df4a6c9e Revert "This is not wrapped for strict mode and builtin functions."
This reverts commit 6845

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 21:56:37 +00:00
ager@chromium.org
963472c516 Change behavior of global declarations in the presence of setters.
Call accessors in the global object prototype when initializing global
variables. Function declarations are special cased for compatibility
with Safari and setters are not called for them. If this special
casing was not done webkit layout tests would fail.

Make the declaration of global const variables in the presence of
callbacks a redeclaration error.

Handle const context slot declarations conflicting with a CALLBACK as
a redeclaration error. That is, unless it is on a context extension
object which is not a real object and therefore conceptually have no
accessors in prototype chains. Accessors in prototype chains of
context extension objects are explicitly ignored in SetProperty.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 21:04:53 +00:00
mmaly@chromium.org
bb7b014988 This is not wrapped for strict mode and builtin functions.
CallIC and KeyedCallIC do not wrap this when calling builtin
and strict mode functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 17:52:03 +00:00
antonm@chromium.org
749c5ea72e Make OutOfMemory exception thrown from JS call into FatalProcessOutOfMemory as well.
That unifies the behaviour with CALL_HEAP_FUNCTION macro.

BUG=v8:1165

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 17:21:59 +00:00
ager@chromium.org
65addc5165 Revert change to const and global variable declarations. It causes
may WebKit layout test failures.

I will look into it tomorrow.
TBR=kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 16:54:49 +00:00
vegorov@chromium.org
73c2b84b33 Cygwin support
Patch by Bert Belder.

BUG=v8:64
BUG=v8:964
BUG=v8:1029

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 16:33:10 +00:00
ager@chromium.org
dc38755aba Call accessors in the global object prototype when initializing global
variables.

Make the declaration of global const variables in the presence of
callbacks a redeclaration error.

Handle const context slot declarations conflicting with a CALLBACK as
a redeclaration error. That is, unless it is on a context extension
object which is not a real object and therefore conceptually have no
accessors in prototype chains. Accessors in prototype chains of
context extension objects are explicitly ignored in SetProperty.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 16:30:15 +00:00
vegorov@chromium.org
b4f3795ae7 Avoid clobbering register containing name in CompilerStoreGlobal.
Review URL: http://codereview.chromium.org/6519052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 16:02:12 +00:00
whesse@chromium.org
3245a23de0 ARM: Port new version of ParallelMove's GapResolver to ARM. Fix error in vstr(DoubleRegister, MemOperand), where it was implemented as a vldr, in r6830.
Review URL: http://codereview.chromium.org/6311010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 15:25:38 +00:00
lrn@chromium.org
246560b902 Revert 6832.
The test contains a syntax error that shouldn't be detected, but it sometimes is.

TBR: kmillikin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6836 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 14:13:25 +00:00
kmillikin@chromium.org
b02107284a Fix incorrect deoptimization for logical not in an effect context.
The baseline compiler does not materialize a value for expressions of
the form !expr in an effect context so the graph translation should
not produce such an environment, otherwise we risk targeting it by
deoptimization.

BUG=v8:1167

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 13:05:49 +00:00
lrn@chromium.org
cf50c5e27c Handle exceptions thrown while parsing lazy functions for inlining.
We currently leave the exception as pending without returning a Failure::Exception() value. This is either caught immediately if running with --debug-code, or caught later by an assert in debug mode.

This change makes the pending exception be cleared before returning from the failed optimization attempt.

BUG=v8::1145
TEST=test/mjsunit/regress/regress-1145.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 12:23:18 +00:00
kmillikin@chromium.org
82cdd48b2f Fix a bug in deoptimization after logical expressions in an effect context.
When deoptimizing to after an expression of the form (expr0 || expr1)
or (expr0 && expr1) in an effect context, the unoptimized code could
incorrectly see the value of the expression.

Handle the short-circuit binary operators specially in effect contexts.
This fixes the issue and will generate better code when the left
subexpression is boolean-valued.

BUG=v8:1166

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 11:06:50 +00:00
whesse@chromium.org
2642168331 ARM: Enable loads and stores of VFP registers with offsets >= 1024 bytes.
Review URL: http://codereview.chromium.org/6530002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 10:07:13 +00:00
sgjesse@chromium.org
fd0744844e ARM: Don't try to flush the icache when there is nothing to flush
The simulator implementation of the icache did not like size being zero.

BUG=v8:1090
Review URL: http://codereview.chromium.org/6526052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-17 07:47:05 +00:00
vegorov@chromium.org
cd3365c867 GBDJIT: Do not check unwinding information correctness on x64.
This does not affect correctness of most common use cases.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 17:40:28 +00:00
whesse@chromium.org
7e38b1bb01 X64 Crankshaft: Start using LCallFunction, remove errors in it.
Review URL: http://codereview.chromium.org/6529053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 15:45:45 +00:00
whesse@chromium.org
8e1796a4b0 X64 Crankshaft: Implement LCallFunction.
Review URL: http://codereview.chromium.org/6529052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 15:15:52 +00:00
whesse@chromium.org
8986022133 X64 Crankshaft: Implement InstanceOf and InstanceOfKnownGlobal
Review URL: http://codereview.chromium.org/6529024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 15:15:20 +00:00
sgjesse@chromium.org
f622a23254 ARM: Remove crankshaft dependency on the generic binary operation stub
The crankshaft code now only relies on the type recording binary operation stub.

Added check for overwritable heap number in the type recording binary operation stub.
Review URL: http://codereview.chromium.org/6529050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 14:48:41 +00:00
danno@chromium.org
181bdc5f06 Fix syntax error, feel sheepish.
Review URL: http://codereview.chromium.org/6525052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 13:59:26 +00:00
danno@chromium.org
e8c012c99a Fix presubmit problem.
Review URL: http://codereview.chromium.org/6526048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 13:52:46 +00:00
danno@chromium.org
12b4e0efe7 Implement crankshaft support for pixel array stores.
Review URL: http://codereview.chromium.org/6528013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 13:31:12 +00:00
kmillikin@chromium.org
6b0fa2382c Prepare push to trunk. We are now working on version 3.1.6.
Review URL: http://codereview.chromium.org/6530001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 12:19:14 +00:00
ager@chromium.org
a0364d795d Handle indexed properties on value objects correctly.
As with named properties, search the value wrapper prototypes for properties.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 12:10:48 +00:00
antonm@chromium.org
6b4ff18b5b Properly process try/finally blocks.
In some circumstances, try/finally block can actually catch the exception:

function f() {
  try {
    throw 42;
  } finally {
    return 0;
  }
}

Therefore when propagating exception to v8::TryCatch, we must be sure
there is no try/finally blocks as well.

When bulding the messages we should be more conservative and expect that
any v8::TryCatch with no JS try/catch in between can potentionally
be the right exception handler.

Plus various minor refactorings.

BUG=1147
TEST=cctest/test-api/TryCatchAndFinallyHidingException, cctest/test-api/TryCatchAndFinally

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 11:40:48 +00:00
ricow@chromium.org
fba910c313 X64: Enable OSR as default on x64
Review URL: http://codereview.chromium.org/6480109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 10:10:59 +00:00
sgjesse@chromium.org
4ce06204f9 ARM: Add inlined smi binary operations in full code generator
Review URL: http://codereview.chromium.org/6529022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 09:20:16 +00:00
lrn@chromium.org
abbcadf221 Fix non-simulated ARM calling of RegExp code.
Review URL: http://codereview.chromium.org/6526043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 09:18:19 +00:00
karlklose@chromium.org
7de60ef84d ARM: Implement GetCachedArrayIndex in the lithium code generator.
Add GetCachedArrayIndex to the Hydrogen instruction set and implement GetCachedArrayIndex in the lithium code generator. The x64 and ia32 code generators implementations abort in the chunk builder.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 08:21:45 +00:00
lrn@chromium.org
9ec16dfe68 Fix bug 1137. No longer allow the RegExp /(*)/.
BUG=v8:1137
TEST=test/mjsunit/regexp.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-16 08:10:47 +00:00
vegorov@chromium.org
316a12dea9 Added gdb-jit interface support for ARM. Compressed .debug_line table by 1)
removing duplicate adjacent entries having the same line number, and 2) using
special opcodes to encode multiple machine register state changes in one byte.
Also made a fix involving the order in which static initializers are performed.

Patch by Shasank Chavan of Hewlett-Packard Development Company, LP

BUG=none
TEST=Try building for arm

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 21:11:31 +00:00
mmaly@chromium.org
32c10a53f8 Fix presubmit.
TBR= ager@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 19:15:59 +00:00
mmaly@chromium.org
582cf097e9 Strict mode "this" transformation in Function.call/Function.apply.
In strict mode the transformation of "this" is skipped.

Code review feedback.
Testing memory operand against 8 bit IMM on ia32 and x64.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 18:57:37 +00:00
rossberg@chromium.org
ae8c5defbc Enable compound assignment to context slots.
Review URL: http://codereview.chromium.org/6523025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 16:37:40 +00:00
ricow@chromium.org
0976d48ba6 Fix wrong assert in ia32 deoptimizer.
In revision 6795 I introduced an assertion in the deoptimizer that was
wrong. We check that curr_address - prev_address > patch_size(), but
prev_address is actually the address right after the last patched
call, so we just need to be larger than or equal to prev_address.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 16:12:46 +00:00
vitalyr@chromium.org
4143e4c097 Fix issue 1160: check array elements in ArrayJoin.
Review URL: http://codereview.chromium.org/6529020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 15:12:51 +00:00
ricow@chromium.org
a8d4360d65 Make sure we always have room for patching the reloc info during lazy deoptimization (fixes issue 1156).
Before we could have calls to builtins that would not be in the
relocation info since this used a register as target. Whenever we have
this case (from lithium codegen) we now emit a comment in the reloc
info.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 14:36:12 +00:00
lrn@chromium.org
b4fd72b335 Change native RegExp call code to properly set C++ structures and
to handle exceptions on return from RegExp.

BUG=1108
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6794 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 13:53:51 +00:00
vitalyr@chromium.org
54e7423007 Fix issue 1152: temporary JS array invariant violation in ArrayConcat.
Review URL: http://codereview.chromium.org/6524010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 13:53:30 +00:00
ricow@chromium.org
0648103e8c x64: Port OSR to the x64 platform.
Review URL: http://codereview.chromium.org/6515012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 13:37:10 +00:00
whesse@chromium.org
e25f3baf2b X64 Crankshaft: Fix another error in pushed registers at safepoints.
Review URL: http://codereview.chromium.org/6525014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 12:17:53 +00:00
whesse@chromium.org
52baacf51f Fix FastPixelArrayStore on X64 platform.
TEST=test-api/PixelArray
Review URL: http://codereview.chromium.org/6529014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 12:17:42 +00:00
karlklose@chromium.org
b9f83f91af Fix ARM debug build: remove ASSERT.
TBR=ricow@

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 10:50:09 +00:00
ricow@chromium.org
4d07390196 Add access check when Object.keys is called on the global js proxy (fixes issue 1154)
I will land access checks for a range of ES5 features in another patch (we added a bunch of cases like this in the past few weeks, i.e., cases where we simply use the global object instead of the js global proxy).


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 10:39:22 +00:00
karlklose@chromium.org
6008d59392 ARM: Implement DoHasCachedArrayIndex and DoHasCachedArrayIndexAndBranch.
Review URL: http://codereview.chromium.org/6519009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 10:22:24 +00:00
karlklose@chromium.org
e8b9ebb073 ARM: Enable OSR by default.
Review URL: http://codereview.chromium.org/6526012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 08:47:14 +00:00
kmillikin@chromium.org
f2e38c6276 Refactor construction of polymorphic loads, stores, and calls.
Rather than passing in a pair of unequal-length lists, pass the default
subgraph separately.  Construct the typecase from the top down rather than
the bottom up, so it doesn't need an intermediate zone list.

Also, change a basic block's 'last' instruction field to really be its last
instruction by correctly updating it when inserting and removing
instructions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-15 07:58:04 +00:00
mmaly@chromium.org
9adaeb6a17 Strict mode delete of non-configurable property.
Strict mode flag is passed to runtime DELETE function
and then to JSObject::Delete(Property/Element) as STRICT_DELETION enum.
When deleting non-configurable property/eleemnt, TypeError is thrown.
Adding mozilla test to .gitignore.
Incorporate CR feedback.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 23:41:47 +00:00
danno@chromium.org
36088cb64f Implement specialized IC code stubs for pixel array stores.
Review URL: http://codereview.chromium.org/6478027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 21:21:33 +00:00
mmaly@chromium.org
7e6bbab2c8 Strict mode delete of unqualified identifier.
SyntaxError is reported in strict mode when deleting
an unqualified identifier. (11.4.1 of Ecma-262 5th ed)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6780 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 18:44:26 +00:00
whesse@chromium.org
6f2e90b1cb X64 Crankshaft: Fix bug in pushed registers at safepoints. Fixes issue 1153 completely.
BUG=1153
TEST=mjsunit/mul-exhaustive
TBR=kmillikin@chromium.org
Review URL: http://codereview.chromium.org/6475012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 18:34:05 +00:00
mmaly@chromium.org
3711b87e8c Refactoring codegen for delete.
* keep handling of VariableProxy and Property together
* place clauses in the order of discovery

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 17:33:06 +00:00
antonm@chromium.org
186d832c79 Introduce new runtime function to make join with lower memory usage.
Do not use generic StringBuilderConcat which requires array passed
to keep both elements and separator (which roughly double size
of the array).  That should be faster as well.

BUG=crbug.com/54580

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 17:25:12 +00:00
whesse@chromium.org
1e4800b918 X64 Crankshaft: Fix error in pushed register indices for safepoints. Fixes issue 1153.
BUG=1153
TEST=mjsunit/date-parse

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 16:02:02 +00:00
whesse@chromium.org
7233a930b5 X64 Crankshaft: Add test that fails on x64 Crankshaft build to list of skipped mjsunit tests. Fix comments and remove unused function from date.js.
BUG=1153
TEST=mjsunit/date-parse
Review URL: http://codereview.chromium.org/6516011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 13:57:15 +00:00
ricow@chromium.org
38c8b823da Change kPointerSize to kIntSize in ia32 specific stack check patching.
The call uses a 32 bit displacement relative to the next instruction. Althoug this has no actual impact on the 32 bit platform I think this is more correct (and will make the x64 and ia32 code more alike).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 13:39:53 +00:00
fschneider@chromium.org
ad70b7de39 Fix a potential crash bug in keyed calls for non-string keys.
BUG=v8:1146

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 13:13:41 +00:00
kmillikin@chromium.org
c73ce4f126 Fix a duplicate AST ID recorded for for/in.
Avoid visiting the subexpressions of a variable that rewrites to a property
when occurring as the 'left-hand side' of for/in.

BUG=v8:1149

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 12:51:25 +00:00
ager@chromium.org
7dd0cc2db6 More x64 work.
x64: Implement DoArgumentsElements, DoNumberUntagD, DoArgumentsLength,
DoAccessArgumentsAt, DoStringLength in lithium x64 backend.

Fix a bug in DoConstantD where only 32-bits of a double was loaded to
an xmm register.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 12:34:11 +00:00
karlklose@chromium.org
e0552d77cf ARM: Implement PatchStackCheckCodeAt and RevertStackCheckCode.
Remove a failing test expectation from mjsunit.status.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 12:07:48 +00:00
whesse@chromium.org
ba97312891 Add ArithmeticD instruction to x64 Crankshaft.
Review URL: http://codereview.chromium.org/6515010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 11:42:06 +00:00
ricow@chromium.org
34eeb88ee4 Use ForceSetObjectProperty in DefineOrRedefineDataProperty (fixes crbug 72736).
The current version uses SetObjectProperty which will not set the
value in case this is a readonly property. The spec explictly says
that a configurable but non writable property can have its value
changed with Object.defineProperty (because the same thing can be
accomplished by doing 3 calls (set writable to true, update the value,
set writable to false).


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 10:43:21 +00:00
ricow@chromium.org
6d9fde492c Do not allow calls to SetProtoType on functions that should not have a prototype (fixes issue 1151)
Review URL: http://codereview.chromium.org/6518003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 09:37:56 +00:00
sgjesse@chromium.org
ab3cd77667 Prepare push to trunk. We are now working on version 3.1.5.
Review URL: http://codereview.chromium.org/6484030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 09:32:33 +00:00
fschneider@chromium.org
9bbb257b02 Small cleanup of unused code in hydrogen IR.
Review URL: http://codereview.chromium.org/6513008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 09:23:26 +00:00
ricow@chromium.org
46bde305b5 Add support for the global object in Object.keys (fixes issue 1150)
We do not currently handle the case where the JSGlobalProxy is passed
as argument to LocalKeys in runtime.cc.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-14 07:49:13 +00:00
karlklose@chromium.org
d52e6f7649 Revert r6759.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/6484025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-13 18:39:14 +00:00
mmaly@chromium.org
e0be3072b5 Implement assignment to undefined reference in ES5 Strict Mode.
Strict mode assignment to undefined reference.
Simple assignments (x = <value>) use CODE_TARGET_CONTEXT.
StoreIC stores its own strictness in extra_ic_state.
The strcitness is propagated as further ic stubs are generated.

Details:
* ReferenceError on assignment to non-resolvable reference in strict mode.
* Fix es5conform test expectation file.
* Add es5conform test suite into .gitignore.
* Fix Xcode project.
* Change implemented in virtual frame code generator, as well as full-codegen
  for all architectures.
* Fix debugger test.
* Fix comment for CODE_TARGET_CONTEXT
* Implement remaining StoreIC stubs to be strict mode aware.
* Trace extra_ic_state() for ic code stubs.

Code Review URL: http://codereview.chromium.org/6474026/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-13 16:19:53 +00:00
karlklose@chromium.org
26df17e714 ARM: Implement PatchStackCheckCodeAt and RevertStackCheckCode.
This patch also adds platform independent CPU instruction cache flushing.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-13 13:49:57 +00:00
karlklose@chromium.org
dd68fcc7ab ARM: Implement OSR infrastructure.
Review URL: http://codereview.chromium.org/6460034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-13 10:24:39 +00:00
mmaly@chromium.org
3f4701df7f Revert r6756. Check failed on V8 arm - debug - crankshaft.
Need to investigate.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 23:25:07 +00:00
mmaly@chromium.org
fd6338bdda Implement assignment to undefined reference in ES5 Strict Mode.
Strict mode assignment to undefined reference.
Simple assignments (x = <value>) use CODE_TARGET_CONTEXT.
StoreIC stores its own strictness in extra_ic_state.
The strcitness is propagated as further ic stubs are generated.

Details:
* ReferenceError on assignment to non-resolvable reference in strict mode.
* Fix es5conform test expectation file.
* Add es5conform test suite into .gitignore.
* Fix Xcode project.
* Change implemented in virtual frame code generator, as well as full-codegen
  for all architectures.
* Fix debugger test.
* Fix comment for CODE_TARGET_CONTEXT
* Implement remaining StoreIC stubs to be strict mode aware.
* Trace extra_ic_state() for ic code stubs.

Code Review URL: http://codereview.chromium.org/6474026/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 21:39:59 +00:00
fschneider@chromium.org
56f6cbbeae Revert r6748.
I'm seeing some crashes after this change which I need to investigate.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 14:34:02 +00:00
antonm@chromium.org
e96c24bf03 Properly treat exceptions thrown while compiling.
BUG=v8:1132
TEST=test/mjsunit/regress/regress-1132.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 14:26:56 +00:00
erik.corry@gmail.com
1f6ed9304d Fix http://code.google.com/p/chromium/issues/detail?id=72555 incorrect
value for Math.LOG10E
Review URL: http://codereview.chromium.org/6489027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 14:23:47 +00:00
sandholm@chromium.org
1efb5784ab Fix sputnik regression introduced in r6747.
Review URL: http://codereview.chromium.org/6485025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 13:30:37 +00:00
kmillikin@chromium.org
3ef7ca6c28 Remove the uses of the arguments from all calls.
Before, Hydrogen call instructions had uses of the PushArgument instructions
for their arguments.  These operands were unneeded, bloated the IR, and
caused calls to be the only Hydrogen instructions with an unpredictable
number of operands.

Now, PushArgument is a pure side-effecting instruction that has no uses.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 13:20:06 +00:00
fschneider@chromium.org
bbba0dbd61 Add a genuine unary minus instruction to Crankshaft.
This change introduces an instruction for negation instead
of generating a multiplication with -1.

The code for x64 and ARM is not included in this change.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 12:56:30 +00:00
sandholm@chromium.org
356c8ec24b Improve StringIndexOf.
Review URL: http://codereview.chromium.org/6489028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 12:33:30 +00:00
mikhail.naganov@gmail.com
efe7129277 removed
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 12:25:41 +00:00
kmillikin@chromium.org
2e08148b06 Fix the semantics of delete on parameters.
Before, an attempt to delete a parameter in a function that used the
arguments object in any way would succeed with true and delete both
the parameter and the corresponding arguments object property.

Now, an attempt to delete such a parameter does not delete and
evaluates to false.

Parameters can be deleted, as before, from functions that use the
arguments object, by deleting the corresponding arguments object
property (this is a spec violation).

BUG=fixes v8:1136

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 11:57:11 +00:00
kmillikin@chromium.org
bea46a2723 Port bug fixes to optimized Function.prototype.apply to ARM.
There were a couple of bug fixes to this code on IA32 which have not yet
been ported to ARM.  They are: failure to correctly handle non-JSObject
receivers and failure to restore the context register after calling JS code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 11:24:38 +00:00
sgjesse@chromium.org
e3fd635f26 Small cleanup of bug ids
Review URL: http://codereview.chromium.org/6486028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 10:36:58 +00:00
kmillikin@chromium.org
7bb857db19 Prohibit moving instructions with side effects via 'EmitAtUses'.
It's not generally safe to decide to delay the evaluation of an expression
with side effects until it is used.

BUG=v8:1138

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-11 10:17:52 +00:00
sgjesse@chromium.org
505b46753e ARM: Add shift operations to the type recording binary operation stub
Review URL: http://codereview.chromium.org/6471023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 20:04:54 +00:00
ricow@chromium.org
b02f9c2ba1 Fix presubmit.
TBR: ager



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 16:45:03 +00:00
lrn@chromium.org
fdfbdfbcf5 Fix typo in ASSERT in object-verifier for RegExp.
BUG=v8::1129
TEST=test/mjsunit/regress/regress-1129.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 16:43:01 +00:00
ricow@chromium.org
512a02764f X64: Add DoCallNamed, DoContext, DoCallGlobal, and DoLoadFunctionPrototype lithium instructions.
Review URL: http://codereview.chromium.org/6471025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 16:33:01 +00:00
ricow@chromium.org
091237ce5b Port revision 6732 to arm.
I discussed with Soeren, and they do need this on arm as well.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 16:26:44 +00:00
ricow@chromium.org
eda4c9126f X64: Add VisitGlobalPropertyCell to the relocinfo visitor.
This fixes GC issues when in the threading tests.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 16:13:21 +00:00
ricow@chromium.org
1c8a1bc492 X64: Fix Generate_NotifyLazyDeoptimized to actually call with the LAZY flag.
This should fix the flaky cctest failure on the debug run of x64 with
crankshaft enabled.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 15:17:38 +00:00
antonm@chromium.org
ab24485760 Bypass JS accessors when building error array.
In the presence of JS accessors for elements on Object.prototype JSArray::SetFastElement
may throw or its behaviour can be altered.  Instead operate on plain FixedArrays and
turn them into JSArry later.

BUG=v8:1130
TEST=test/mjsunit/regress/regress-1130.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 15:02:13 +00:00
antonm@chromium.org
2a25c444d5 Fix various places which do not check if SetProperty threw an exception.
Review URL: http://codereview.chromium.org/6480003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 14:41:16 +00:00
antonm@chromium.org
5d3430a509 Fix forging of object's identity hashes.
Do not do standard property lookup on hidden properties object as it might
reach Object.prototype which can be altered to forge identity hashes.
Instead do only local lookup.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 14:09:52 +00:00
fschneider@chromium.org
5b753cecb6 Check holder before optimizing calls to global functions.
In the case where the function is not found in the global object,
we have to generate a generic call.

BUG=v8:1106
TEST=mjsunit/regress/regress-1106.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 12:33:51 +00:00
vegorov@chromium.org
49adfd0f0a Bailout from PrepareSlowElementsForSort when hiting a key outside of smi-range.
BUG=v8:1131
TEST=test/mjsunit/regress/regress-1131.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 12:33:34 +00:00
danno@chromium.org
1bd9f602be Implement crankshaft support for pixel array loads.
Review URL: http://codereview.chromium.org/6410112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 12:02:36 +00:00
fschneider@chromium.org
73fe82426f Strengthen requirements for fixed registers at calls.
Already done on ia-32. This change is for x64 and ARM.
We now always require fixed input registers at calls to
avoid overlap with temp registers.

This fixes the affected instructions on ARM.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 10:31:55 +00:00
kmillikin@chromium.org
c0fd053982 Fix a representation change bug in the Hydrogen graph construction.
We could try to treat an HPhi as an HInstruction because the code did
not properly handle the case of a phi in a block with itself as one of
the predecessors.

BUG=v8:1134

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 10:28:59 +00:00
kmillikin@chromium.org
e88f25f6dc Insert a space to please our presubmit overlords.
Review URL: http://codereview.chromium.org/6480027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 09:16:33 +00:00
fschneider@chromium.org
de06cd58a3 Fix bug in register requirements for function.apply.
Whenever we use a fixed temp at a call that can eagerly deopt we
now allow fixed register exclusively to avoid any overlap.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 09:12:38 +00:00
kmillikin@chromium.org
ebebcae4c2 Allow esi to be an allocatable register on IA32.
Make esi available to the register allocator rather than dedicating it
permanently to the context.

The context is still passed in register esi to JavaScript and to the runtime
as part of the calling convention.  Because some stubs might end up calling
JS or the runtime, it is also conservatively passed to stubs.

Roughly half the calls have been modified to use the context as an input
value in fixed register esi.  The other half are marked as calls or deferred
code so esi is spilled and can be explicitly set.

It is no longer necessary to restore the context to esi after a call that
might change it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-10 09:00:50 +00:00
antonm@chromium.org
2f17f3e5d7 Do not invoke any setters when forming stack trace JS object.
Review URL: http://codereview.chromium.org/6463022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 19:34:04 +00:00
antonm@chromium.org
47a22dcecd Reapply http://code.google.com/p/v8/source/detail?r=6555
Compare JSObjects by identity immediately.

When invoking EQUALS JS builtin, 1st argument is passed as a receiver and
if it's a global object, it gets overwritten with global proxy object and
thus one gets incorrect results.

BUG=v8:1082

TBR=ricow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 19:09:26 +00:00
kmillikin@chromium.org
dc91c4218b Make optimized Function.prototype.apply safe for non-JSObject first arguments.
If we have a property access of the form this.x, where the access site sees
the global object, we can specialize the IC stub so that it performs a map
check without first performing a heap object check.

Ensure that we do not get in JS code with a non-JSObject this value by
deoptimizing at Function.prototype.apply if the first argument is not a
JSObject.

BUG=v8:1128

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 16:43:23 +00:00
whesse@chromium.org
e0422e5401 Make VS2005 project files compile without errors: changelist http://codereview.chromium.org/6286135/.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 15:58:55 +00:00
sgjesse@chromium.org
dabc590527 ARM: Add type-feedback recording for compare
Change the comparison in the full code generator to use CompareIC instead of the CompareStub to record the types. This also implements the patching in the full code generator where the inlined smi code is de-activated by default to call the CompareIC once and then activating the inlined smi code by patching the code.

Fixed the smi comparison in the ICCompareStub.

Fixed ToBooleanStub to ensure that the scratch register used is not the input. Use r9 as default as that will never be input with Crankshaft.

Implemented lithium instruction CmpTAndBranch.

Make sure that the lithium instruction CmpID have operands in registrers as the current optimized code expects that.
Review URL: http://codereview.chromium.org/6461017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 14:57:24 +00:00
ager@chromium.org
d5851dcde0 x64: Enable inline smi code patching to reenable the inlined code in
the code generated by the full code generator after my previous
change.

The generated code is the same as on ia32 and so is the patching.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 14:51:38 +00:00
erik.corry@gmail.com
6cfac3c48b Prepare push to trunk. Now working on version 3.1.4.
Review URL: http://codereview.chromium.org/6458026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 14:41:22 +00:00
lrn@chromium.org
d358e2ecd3 Fix incorrect asserts in scanner.
BUG=v8::1126
TEST=test/mjsunit/regress/regress-1126.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 14:16:25 +00:00
whesse@chromium.org
8d3d77055c Fix assert error on ARM triggered by large numbers of function parameters.
Review URL: http://codereview.chromium.org/6458027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 13:56:35 +00:00
whesse@chromium.org
afec61e870 Fix typo in r6697: Use assertThrows correctly in the added test regress-1122.js.
Review URL: http://codereview.chromium.org/6460030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 13:16:40 +00:00
whesse@chromium.org
602d5cf427 Fix a bug that occurs when functions are defined with more than 16,382 parameters.
Review URL: http://codereview.chromium.org/6447007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 12:46:22 +00:00
fschneider@chromium.org
eec7bc8e60 Change the code for materializing double constants on ia32.
Instead of using the stack, use a temporary integer register
and avoid memory access.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 12:39:15 +00:00
ricow@chromium.org
baa3eed710 Change our zap values from hex numbers tagged as a heap object to hex numbers tagged as a failure.
Since our zap values are valid heap object addreses we might hit asserts if a heap object gets the value of a zap constant as its address. 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 12:35:18 +00:00
kmillikin@chromium.org
991a1cae12 Fix an assertion failure in stack trace construction.
When constructing stack traces we interpret the deoptimization data for
optimized frames to find the receiver value.  This value could sometimes be
eliminated from the deoptimization data if we though it was unused.

BUG=v8:1118

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 11:45:50 +00:00
antonm@chromium.org
d724993138 Use GC-safe version when setting elements.
BUG=1125
TEST=test/mjsunit/regress/regress-1125.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-09 11:38:10 +00:00
antonm@chromium.org
492ef6ee7a Do sanity check of exception state when returning from native to JS.
If --debug-code is on, check that returned value and Top::has_pending_exception
agree on exception state.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 20:13:08 +00:00
antonm@chromium.org
cf30cefda7 Check if Array.prototype.__proto__ has been reset to null.
BUG=v8:1121
TEST=test/mjsunit/regress/regress-1121.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 19:56:44 +00:00
ager@chromium.org
40dd216b53 Port fix for duplicate AST ID for deoptimization to ARM and x64.
Review URL: http://codereview.chromium.org/6458001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 19:42:24 +00:00
antonm@chromium.org
0273e8185b Propagate exceptions thrown when setting elements.
Plus use more robust path when formatting messages---work
directly with fixed arrays.

BUG=v8:1107
TEST=test/mjsunit/getter-in-prototype.js,test/mjsunit/regress/regress-1107.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 19:42:14 +00:00
antonm@chromium.org
e300c3cccc We cannot assert that v8 is running in fatal error callback.
BUG=v8:1111

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 19:19:42 +00:00
antonm@chromium.org
da8b72f2b8 1) Return failure if any of property sets failed;
2) We cannot assert the declared property will go to the extension in the presence of callbacks and interceptors.

BUG=1119
TEST=test/mjsunit/regress/regress-1119.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 19:04:17 +00:00
ager@chromium.org
096c21522b Fix wrong assumption in parser that parsing a function literal cannot throw an exception.
Review URL: http://codereview.chromium.org/6453009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 18:46:13 +00:00
ager@chromium.org
a9a9111938 ARM: Fix condition usage in DeoptimizeIf().
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 18:09:19 +00:00
vegorov@chromium.org
721b60d3f5 Check for overflow when bumping new space's top in inlined allocation.
BUG=v8:1109
TEST=test/mjsunit/regress/regress-1109.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 17:25:40 +00:00
ager@chromium.org
8c6c273236 Fix issues with using defineProperty on the global proxy object.
Review URL: http://codereview.chromium.org/6452004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 16:31:58 +00:00
kmillikin@chromium.org
27ed4d3a1a Prepare for bailout with the proper state at labeled block entries.
The state here should be NO_REGISTERS.  It was spuriously changed to from
NO_REGISTERS to TOS_REG when TOS_EAX was renamed to TOS_REG.

BUG=v8:1113

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 15:51:49 +00:00
ricow@chromium.org
f64966085e x64: Add MulI and DivI to lithium instructions.
Review URL: http://codereview.chromium.org/6448001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 14:37:50 +00:00
lrn@chromium.org
2f32f27e8f Correct propagation of exceptions from setters.
BUG=v8:1105
TEST=test/mjsunit/regress/regress-1105.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 14:04:27 +00:00
kmillikin@chromium.org
bf3c3eb9cb Fix a possible duplicate AST ID for deoptimization.
For redeclarations of variables that alias the parameters in functions
using arguments, we need to avoid re-visiting the shared variable
rewrite.

BUG=v8:1104

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 14:00:22 +00:00
whesse@chromium.org
39c855bd48 Bailout from crankshaft if a global property is found in the prototype chain of the global object, not on the global object itself.
Review URL: http://codereview.chromium.org/6449002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 13:28:09 +00:00
ricow@chromium.org
20f2c1c98a Make sure that we do not call is_extensible on the global proxy.
When calling Object.isExtensible we did not do a check for the global
js proxy. This caused the check on the extensible bit on the map to
return true, even when the bit was set to false on the global js
object.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 13:09:07 +00:00
vegorov@chromium.org
a2c9ca7464 Speedup decodeURI/decodeURIComponent by switching from charAt(i) to charCodeAt(i) in Decode.
Original patch by Alexander Karpinsky.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 13:01:34 +00:00
ricow@chromium.org
81787f986b Make sure that we never call prevent extension on the global proxy,
but instead call this on the global object.

BUG: 1103

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 12:41:16 +00:00
lrn@chromium.org
48fadffcc4 Fix bug in JSON.parse for objects containing "__proto__" as key.
It added the __proto__ key as a normal key, which made it visible
in enumeration, while reading still hit the hard-coded accessor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 11:38:15 +00:00
whesse@chromium.org
46e82e2f7e X64 Crankshaft: Implement DoCodeStub on X64 platform.
Review URL: http://codereview.chromium.org/6451001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 11:26:42 +00:00
fschneider@chromium.org
f740d1adbe Refactor lithium instructions for constants.
1. Remove unnecessary superlcass LConstant.
2. Use hydrogen accessor instead of duplicating the value.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 10:45:21 +00:00
vegorov@chromium.org
76cf30d9c8 Support %_IsConstructCall in the Crankshaft pipeline.
Provide special case for f.bind(obj).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 10:08:47 +00:00
whesse@chromium.org
fde8419697 X64 Crankshaft: Use TypeRecordingBinaryStub in crankshaft.
Review URL: http://codereview.chromium.org/6449001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 09:43:24 +00:00
ager@chromium.org
52cfd6ab16 Fixed a number of issues on x64 crankshaft port:
- Don't use SmiSub when overflow can occur. It asserts that overflow
  does not happen.

- Actually use CompareICs and signal to crankshaft whether or not smi
  code was inlined.

- Fix bug in CmpI where 64 bits were compared instead of 32 bits.

- Implement Throw, DeferredStackCheck, StoreKeyedFastElement in
  lithium backend.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-08 07:49:59 +00:00
lrn@chromium.org
254915608e X64: Add Crankshaft operation LoadGlobal.
Copied some serializer-related checks and counters from ia32.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6667 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-07 14:15:05 +00:00
ager@chromium.org
596b25511d x64: Implement SmiUntag, SmiTag, LoadHeapObject and LoadNamedGeneric
in the lithium backend.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-07 14:11:53 +00:00
lrn@chromium.org
19be2622bb X64: Disable crankshaft if serializerion is enabled.
Review URL: http://codereview.chromium.org/6413017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-07 13:41:02 +00:00
ricow@chromium.org
7baa1198cd Prepare push to trunk. Now working on version 3.1.3.
Review URL: http://codereview.chromium.org/6286145

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6661 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-07 12:33:21 +00:00
kmillikin@chromium.org
919610969c Do not compile the unreachable body of functions with illegal redeclarations.
Revision 6635 added an assert on IA32 that there were no 'const' parameters.
This assert could be hit at compile time because we compiled the unreachable
body of functions with illegal redeclarations, which are thrown at runtime.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-07 09:55:42 +00:00
sandholm@chromium.org
f64976e62d Improve ScanJsonNumber.
Review URL: http://codereview.chromium.org/6334106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-07 08:57:06 +00:00
sgjesse@chromium.org
247beac285 Fix an issue in DoMulI and address mjsunit test failure.
BUG=v8:1098
TEST=mjsunit/compiler/regress-intoverflow.js

Patch by Rodolph Perfetta from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-07 07:39:40 +00:00
peterhal@chromium.org
39957aa741 Issue 117 - strict mode and future reserved words
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 18:36:37 +00:00
mmaly@chromium.org
87233c49c8 Pass strict mode to eval.
Code review feedback.

Code Review URL: http://codereview.chromium.org/6286043/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 18:15:49 +00:00
vegorov@chromium.org
10f715e3ff Restore context after LApplyArguments.
BUG=v8:1099
TEST=test/mjsunit/regress/regress-1099.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 15:42:02 +00:00
lrn@chromium.org
19b734fd82 Fix potential overwriting of debug jumps of following code.
Add JSArrayLength, CallKnownFunction, and InstanceType operations.
Remove LadGlobal and StoreGlobal again (they fail).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 14:09:03 +00:00
fschneider@chromium.org
d86ac17a6e Fix ARM debug build. Insert missing declaration.
Review URL: http://codereview.chromium.org/6250160

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 13:46:09 +00:00
antonm@chromium.org
aecb05354b Landing for Zaheer Ahmad.
Direct call api functions (arm implementation)

See: http://codereview.chromium.org/6170001/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6639 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 13:43:38 +00:00
fschneider@chromium.org
17da434b29 Remove instruction summaries.
Instead of constructing a temporary container for all LOperands of each
instruction, the register works directly on the LIR instructions that
 provide an abstract interface for input/output/temp operands.

This saves allocation of zone memory and speeds up LIR construction,
but makes iterating over all uses in the register allocator slightly
more expensive because environment uses are stored in a linked list of
environments. We can fix this by using a flat representation of LOperands.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 13:28:23 +00:00
whesse@chromium.org
f1acd1299d X64 Crankshaft: Port TaggedToI to X64.
Review URL: http://codereview.chromium.org/6368097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 13:16:51 +00:00
ricow@chromium.org
8a7889182e Make sure that we don't actually overwrite a property that has failed access checsk with Object.defineProperty.
Review URL: http://codereview.chromium.org/6246103

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6636 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 12:14:56 +00:00
kmillikin@chromium.org
32cd13ebf1 Remove the redundant load on every context lookup.
There was an unnecessary load on every statically-resolved context lookup.
Remove it.

This revealed a hidden bug in const initializers inside 'with'.  They claim
to be statically resolved (having slot type CONTEXT) but they occur in a
spot where the runtime context chain and the static scope chain do not
agree.  This is fixed by special casing const initializers in the backend.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 12:06:41 +00:00
karlklose@chromium.org
f4575b5d39 ARM: Implement DoCmpID and DoCmpIDAndBranch in the lithium code generator.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6633 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 11:22:18 +00:00
whesse@chromium.org
c5de2c95fa X64 Crankshaft: Add bit operations and shifts to x64 crankshaft.
Review URL: http://codereview.chromium.org/6246099

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 11:10:39 +00:00
sgjesse@chromium.org
8d4e0bb39c ARM: Add support for and, or and xor to the type recording binary op stub.
Review URL: http://codereview.chromium.org/6250126

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 10:52:19 +00:00
vegorov@chromium.org
b254d727a6 Fix compliance bug in decodeURI/decodeURIComponent.
Review URL: http://codereview.chromium.org/6349105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 10:38:49 +00:00
sgjesse@chromium.org
84de496896 Implements DoubleToI on ARM. Refactor some VFP code at the same time and
fix the simulator behaviour.

BUG=none
TEST=added to cctest/test-assembler-arm.cc

Patch by Rodolph Perfetta from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 07:08:50 +00:00
ager@chromium.org
3a214b8f50 x64: Implemented object, array and function literals in lithium codegen.
Review URL: http://codereview.chromium.org/6371019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 06:54:45 +00:00
peterhal@chromium.org
c894b1f317 Fix bugs 992, 1083 and 1092
My previous patch added an assert which uncovered 1092 in the sputnik tests.
This patch adds the fix for 1092, which is to ensure that NormalizeProperties
does not get called for a JSGlobalProxy along all code paths.

Add sputnik tests to .gitignore.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 19:29:10 +00:00
antonm@chromium.org
710fbd2cfb Do proper security checks when accessing elements with getOwnPropertyDescriptor.
This extends logic applied to regular properties to elements.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 18:09:51 +00:00
ager@chromium.org
c554faa74d X64: Implement FixedArrayLength, BoundsCheck, LoadElements,
LoadKeyedFastElement in lithium codegen.

Tested locally by hardcoding DoTaggedToI to convert smis to untagged.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 17:01:10 +00:00
ager@chromium.org
8cdcbd7064 Don't use eax on x64. :)
TBR=ricow

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 16:07:52 +00:00
ager@chromium.org
63d1b2c7f4 X64: Implement DoCallConstantFunction, DoLeaveInlined and DoCompareMap
in lithium-x64.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 15:40:20 +00:00
whesse@chromium.org
13e8360d94 X64 Crankshaft: Add TypeRecordingBinaryStub to X64
Review URL: http://codereview.chromium.org/6366028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 15:36:44 +00:00
ager@chromium.org
015e72bbf5 Minor cleanup in messages.js. Remove unused variables and fix formatting.
Review URL: http://codereview.chromium.org/6410058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6620 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 14:02:13 +00:00
ricow@chromium.org
a2aa84873e Add regression test for the deoptimizer immediately followed by gc bug.
In addition to the regression test I changed the gc-extension to take
a boolean flag specifying if compaction should be used (default is
false, existing tests will not change behaviour)

The regression test is disabled on arm and x64 with crankshaft
enabled. I made a bug to track this:
http://code.google.com/p/v8/issues/detail?id=1094


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 13:47:27 +00:00
kmillikin@chromium.org
97ccdd1e99 Introduce a hydrogen value for contexts, support context slot assignment.
Each context in the context chain has a corresponding hydrogen value.
The context values are used for global object lookup and context slot
lookup.  Add simple (non-compound) assignment to context slots.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 13:10:28 +00:00
danno@chromium.org
a2fb4a12bb Create specialized code stubs for PixelArray loads.
Review URL: http://codereview.chromium.org/6287030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 12:50:50 +00:00
antonm@chromium.org
0da3dc3e43 Properly process getOwnPropertyDescriptor for elements on global proxy object.
We need to go down to actual global object to perform those operations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 10:19:41 +00:00
kmillikin@chromium.org
e4a4804546 Streamline the code for patching optimized code for lazy deopt.
Rewrite the lazy deopt patching code on IA32 to use addresses throughout,
rather than offsets and a base address.

Also, rename a couple of ambiguous Code fields from _start to _offset.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 10:07:22 +00:00
fschneider@chromium.org
26287403ae Fix bug in pretenuring function literals from optimized code.
Review URL: http://codereview.chromium.org/6368074

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 09:10:54 +00:00
sgjesse@chromium.org
d86e430630 Implements Modulo operation on ARM for DoArithmeticD.
BUG=none
TEST=none

Patch by Rodolph Perfetta from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 08:59:14 +00:00
mikhail.naganov@gmail.com
2d9c65901b Heap profiler: fix removed DOM wrappers reporting.
Aggregated snapshots: don't report unreachable objects.
Full snapshots: restore forcing GC prior to taking a snapshot.

I played with the repro page provided for the bug and found that GC
must be performed prior to taking a snapshot even if we only report
reachable objects. GC allows weak handles to finalize.  Now heap
profiler produces aligned results for the repro page in both modes.

BUG=crbug/70434
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 08:45:38 +00:00
ager@chromium.org
25eb1a57c2 Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8
directory to make it easy for embedders to reproduce the copyright
notice for binary redistribution.

Removed now obsolete strongtalk directory.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-03 07:10:06 +00:00
antonm@chromium.org
fed5622671 Better security checks when accessing named properties via Object.getOwnPropertyDescriptor.
Current approach returns undefined descriptor if caller is not granted v8::HAS_ACCESS.
If the caller has v8::HAS_ACCESS, for no JS accessors regular v8::GET_ACCESS check is
performed and value property of the descriptor is set to undefined if caller doesn't
have proper access.  For JS accessors both v8::GET_ACCESS and v8::SET_ACCESS are checked
and affect if getter and setter would be stored in the descriptor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 17:44:29 +00:00
kmillikin@chromium.org
f0573de367 Prepare push to trunk. Now working on version 3.1.2.
Review URL: http://codereview.chromium.org/6312090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6587 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 16:02:11 +00:00
kmillikin@chromium.org
ca936dae9e More of the fix for V8 issue 1079.
The arguments property of functions, if we find an optimized frame for
the function, is always a freshly allocated object.  We never try to
find an existing arguments object.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 15:08:29 +00:00
antonm@chromium.org
be1f20f828 Follow up to r6540: remove early return from C++ builtin as well.
Review URL: http://codereview.chromium.org/6347037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 14:17:47 +00:00
erik.corry@gmail.com
0097f005fd Fix code generation bug on ARM in classic codegen.
Review URL: http://codereview.chromium.org/6246045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 14:14:55 +00:00
kmillikin@chromium.org
63593f0996 Fix x64 DEBUG build.
TBR=whesse@chromium

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 14:08:30 +00:00
lrn@chromium.org
2d15eb9a90 Fix bug in object literals with large array indexes as strings.
Review URL: http://codereview.chromium.org/6410028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 14:02:58 +00:00
kmillikin@chromium.org
f1149734fc Partial fix for V8 issue 1079.
Record a safepoint with a deoptimization id for throw in optimized code.  We
don't seem to much care what the AST ID is because we will not be using it
for lazy deoptimization (throw doesn't return to the point of throw).  For
hygiene we use the actual ID of the throw expression.  Throw is no longer a
control-flow instruction, but it's followed by an unconditional abnormal
exit.  This is required to insert a simulate between the throw and the exit.

Make our optimized treatment of Function.prototype.apply act like a call and
have side effects.  This ensures that it will get a lazy deoptimization
environment.  Use that deoptimization ID in the safepoint for the call.

Deleting a property was also missing a deoptimization ID, though there was a
deoptimization environment assigned to the instruction.  Record the
environment and use the deoptimization ID at the safepoint.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 13:55:29 +00:00
vegorov@chromium.org
09b3041a57 GDBJIT: emit .eh_frame section on x64.
This enables proper stack unwinding on x64.

Currently this requires V8 to be compiled without snapshot and --gdbjit-full to be enabled.

Original patch by Sanjoy Das (http://codereview.chromium.org/6371011/)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 13:32:18 +00:00
ager@chromium.org
73a4ecfae1 A MessageObject is a purely internal object to hold information about
an error message that needs to be generated and reported. This change
hides all of the error information from JavaScript code so user
callbacks cannot get hold of it.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 13:31:52 +00:00
whesse@chromium.org
a5f94a4862 Fix Math.pow(-0, 0.5) and Math.pow(-0, -0.5). These are not equal to sqrt(-0) and 1/sqrt(-0). Add tests for these cases. Fixes V8 issue 1088.
BUG=1088
TEST=test/mjsunit/math-pow.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 12:54:58 +00:00
karlklose@chromium.org
8152635387 Extract platform independent part of RevertStackCheckCode.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 11:58:24 +00:00
sgjesse@chromium.org
8fe563cba6 ARM: Refactor duplicated floating point code in type recording binary operation stub.
Review URL: http://codereview.chromium.org/6334045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6570 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 10:30:41 +00:00
vegorov@chromium.org
6751627615 Require typed input representation for HTypeof hydrogen instruction.
BUG=http://code.google.com/p/chromium/issues/detail?id=71647
TEST=test/mjsunit/regress/regress-71647.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 09:52:57 +00:00
ricow@chromium.org
cb0a7bc748 This fixes the issue with the deoptimizer trashing the reloc info before patching the code.
If we, immediately after the deoptimization, but before actually
running the patched code, get a compacting GC, the addresses from the
calls might no longer be valid.

I have validated that this works by patching the existing code to
always do a compacting gc after we finish deoptimizing. I will create
a real regression test for this, but this includes additional code for
allowing us to force a deopt/opt from javascript test code. I will
land this in a seperate change.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 09:40:09 +00:00
ricow@chromium.org
0dd951ee84 Revert revision 6555 as it causes win32 debug to fail.
Review URL: http://codereview.chromium.org/6349044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6564 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-02 08:14:06 +00:00
vegorov@chromium.org
2c93e885f3 Switch from template functions overloading to partial template specialization.
This should fix compilation on old GCC.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 20:47:53 +00:00
peterhal@chromium.org
5ca89179d7 Revert "Fix bugs 992 and 1083"
This reverts commit 6561 as the new assert caused failures in sputnik.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 20:08:01 +00:00
peterhal@chromium.org
9c89aa6dd9 Fix bugs 992 and 1083
Fixes JS portion of DefineOwnProperty when there is
an existing property and the new descriptor is generic.

Makes code follow spec steps more closely.

Fixes typo for check for unchanged enumerable in step 6.

Adds regression tests.
Fixes errors in object-define-property test

Don't normalize the JSGlobalProxy. Gets webkit http/tests/security/xss-DENIED-defineProperty.html working.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 17:08:14 +00:00
sgjesse@chromium.org
a453a3ce65 ARM: Add multiplication and modulus to the type recording binary operation stub.
For now the smi part only handles power of two right hand side operands.

Fixed a bug when loading floating point value into core registers with VFP supported.
Review URL: http://codereview.chromium.org/6312059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 16:38:25 +00:00
mmaly@chromium.org
a0c96dc3fb Fix error message name.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 16:08:44 +00:00
vegorov@chromium.org
03e1036fde Fix control flow resolution bug in lithium register allocator.
Review URL: http://codereview.chromium.org/6312057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 14:33:23 +00:00
antonm@chromium.org
32a631d8bc Compare JSObjects by identity immediately.
When invoking EQUALS JS builtin, 1st argument is passed as a receiver and
if it's a global object, it gets overwritten with global proxy object and
thus one gets incorrect results.

BUG=v8::1082

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 13:29:37 +00:00
ager@chromium.org
471c0d2983 Avoid callbacks to user code during error formatting in a couple of
other situations.

Do not use overwritten Object.prototype.hasOwnProperty and
Array.prototype.pop. Do not use split and join in the error formatting
implementation. They are too big to control and their generality is
not needed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 12:31:16 +00:00
karlklose@chromium.org
5264d17d8f Change OSR stack check patching to use the stack check table.
Change OSR stack check patching to use the stack check table to iterate over the calls to stack guards platform independent. Introduce Deoptimizer::PatchStackCheckAt for each platform to perform the platform specific patch at a given pc.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 11:18:45 +00:00
mmaly@chromium.org
aa779b3842 Fix V8 bug 1084: allow "\0" in strict mode as valid escape sequence.
http://code.google.com/p/v8/issues/detail?id=1084

Code Review URL: http://codereview.chromium.org/6386014/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-31 22:35:27 +00:00
antonm@chromium.org
a38a8ffab0 ArraySplice builtin should return empty array and not alter receiver if invoked with no arguments.
Review URL: http://codereview.chromium.org/6357025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-31 14:54:53 +00:00
antonm@chromium.org
1023f569b9 Perform security checks before fetching the value in Object.getOwnPropertyDescriptor.
Review URL: http://codereview.chromium.org/6386022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-31 13:49:15 +00:00
whesse@chromium.org
cc90e3e54b Fix typo in Changelog, date in version.cc.
Review URL: http://codereview.chromium.org/6287016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-31 12:37:19 +00:00
fschneider@chromium.org
4e7ddab6dc Fix a bug in the placement of minus-zero checks and in GVN.
1. The placement of checks for negative zero has to be computed after
all conversion instructions have been inserted. I separated the code
into its own phase.

2. GVN need to take instruction flags into account when comparing
instructions for redundancy.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-31 12:36:54 +00:00
whesse@chromium.org
09368a0af6 Prepare push to trunk. Now working on version 3.1.1.
Review URL: http://codereview.chromium.org/6347035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-31 10:25:44 +00:00
ager@chromium.org
8198db7934 ARM: Add support for DoMathAbs with double inputs.
Adds vabs instruction to simulator, assembler, disassembler and tests.

BUG=none
TEST=Added to cctest.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-31 10:16:28 +00:00
ager@chromium.org
0a9004aa07 Adding vendor prefix to Locale class (becoming v8Locale) to minimize risk of future changes.
Review URL: http://codereview.chromium.org/6332022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-31 09:58:12 +00:00
fschneider@chromium.org
e3366d8bf5 Fix bug in tail call of builtin in the ToNumber stub on ARM.
Review URL: http://codereview.chromium.org/6255017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-28 17:24:10 +00:00
kmillikin@chromium.org
78b9981b90 Revert "Add custom typed ICs for pixel array loads. "
This change caused failures in (out of bounds) keyed loads of strings.

TBR'd.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-28 15:07:04 +00:00
fschneider@chromium.org
24843d6310 Introduce ToNumber stub and use it in non-optimized code for to-number conversion.
This stub is used for increment/decrement operations and unary plus.
The resulting code is more compact and faster than calling a JS builtin.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-28 14:18:26 +00:00
danno@chromium.org
afd0906204 Add custom typed ICs for pixel array loads.
Review URL: http://codereview.chromium.org/6323002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-28 14:06:20 +00:00
ager@chromium.org
f8b74a1541 Avoid using Function.prototype.call in a number of places in our
builtins files. We should always use %_CallFunction for a couple of
reasons: it cannot be overwritten and it does not wrap basic types in
wrapper objects.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6524 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-28 10:33:10 +00:00
ager@chromium.org
4968d50d8f Prepare push to trunk. Now working on version 3.1.0.
Review URL: http://codereview.chromium.org/6286014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-28 07:55:43 +00:00
antonm@chromium.org
c5c4f0eda5 Revert "Unification: introduce ExternalReference::pending_exception_address()."
This reverts r6518.

TBR=ager@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 18:21:07 +00:00
antonm@chromium.org
bea909a9bf Unification: introduce ExternalReference::pending_exception_address().
Review URL: http://codereview.chromium.org/6335016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 18:10:45 +00:00
ricow@chromium.org
b4a2e91d45 Implement DoGlobalReceiver and DoCheckFunction lithium instructions on x64
Review URL: http://codereview.chromium.org/6277024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 16:41:43 +00:00
antonm@chromium.org
1c144edd95 Do not set result_ prematurely.
If ConfigureGlobalObjects below will fail, we still decide that initialidation
went smoothly as we check emptiness of result_ handle to see if initialisation
failed or not.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 16:17:13 +00:00
antonm@chromium.org
67f3a0e7f5 Better name for ShouldReturnException which actually should be ShouldReportException.
Review URL: http://codereview.chromium.org/6368019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 14:25:37 +00:00
fschneider@chromium.org
d82332ebb7 Cleanup unused code from the type oracle.
Review URL: http://codereview.chromium.org/6135004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 14:04:07 +00:00
vegorov@chromium.org
af81c537b2 Fix id for HandleScope::DeleteExtensions and Factory::arguments_marker() in serializer.
Review URL: http://codereview.chromium.org/6357020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 13:17:34 +00:00
lrn@chromium.org
35a85c1b06 X64 Crankshaft: Added yet more operations.
Added operations:
DoStoreGlobal
DoLoadNamedField
DoStoreNamedField
DoCheckPrototypeMaps
DoEnterInlined

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 13:02:48 +00:00
lrn@chromium.org
4f11447073 X64 Crankshaft: Reapply reverted operations with DoLoadGlobal disabled.
Review URL: http://codereview.chromium.org/6397002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 11:58:31 +00:00
sgjesse@chromium.org
3e811483f2 Change an invalid assert
BUG=v8:1079
Review URL: http://codereview.chromium.org/6332019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 11:55:58 +00:00
ager@chromium.org
dc61921bbf Fix reintroduction of global variables that have been deleted.
Deletion of global properties puts 'the hole' in the global property
cell and updates the property details in the property dictionary with
the information that the property has been deleted. When setting
global properties that have been deleted in generated code we just
store the new value in the global property cell. This does not update
the property details in the property dictionary. Therefore, it looks
like the property is not there eventhough it was just reintroduced.

Perform 'the hole' checks in generated code for global property stores
and bail out of ICs and optimized code if storing to a property cell
that contains 'the hole'.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 08:35:39 +00:00
karlklose@chromium.org
592089419d ARM: Implement DoInstanceOfAndBranch in the lithium code generator.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-27 03:22:08 +00:00
sgjesse@chromium.org
4c6329c8f8 ARM: Try to fix broken commit r6504
Commit contained wrong assert and was missing call to the runtime system for MUL.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 21:15:46 +00:00
karlklose@chromium.org
3141494c3e Refactor recording of safepoints.
Refactor SafepointTableBuilder::DefineSafepoint and ARM LCodeGen::RecordSafepoint to use an enum for different kinds of safepoints. This change removes a lot of duplicated code and makes it easier to include new kinds of safepoints in the future. The remaining variants of LCodeGen::RecordSafepoint remain as a convinient way to record common safepoint kinds.

BUG=http://code.google.com/p/v8/issues/detail?id=1043
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 20:48:48 +00:00
sgjesse@chromium.org
33c591b4ad ARM: Add multiplication to the type recording binary operation stub
Review URL: http://codereview.chromium.org/6391004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 20:25:33 +00:00
mmaly@chromium.org
d07f1d62ff Strict mode eval/arguments LHS.
Review URL: http://codereview.chromium.org/6335013/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 19:21:46 +00:00
mmaly@chromium.org
498e3ce3cc Compress Variable class.
Review Link: http://codereview.chromium.org/6246019/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 18:15:43 +00:00
kmillikin@chromium.org
c1bbd04dce Remove the HInstruction utilities taking flag mask arguments.
It is a type error to treat a flag (an enum) as if it were a flag mask (an
int derived from shifting a bit by the enum value).  It is error prone to
have functions that take flag mask arguments because they will silently
accept flags.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 17:32:02 +00:00
kmillikin@chromium.org
09e967b38f Use more detailed compilation info for inlined functions.
Construct the statically-known compilation info for inlined functions using
the target closure (which knows about its scope chain) and not from the
shared function info (which doesn't).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6499 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 17:30:22 +00:00
fschneider@chromium.org
38b91a4ffe Fix issue 1076 by resetting labels of switch-clauses before use.
If we compile a function literal twice with the full code generator,
we must make sure that the labels embedded in the AST are reset.

BUG=1076

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 15:28:17 +00:00
ager@chromium.org
eb3970c822 Fix another message object leak.
Review URL: http://codereview.chromium.org/6269021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 15:16:13 +00:00
antonm@chromium.org
be9f5d8548 Fix indentation.
TBR=serya@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 15:02:02 +00:00
kmillikin@chromium.org
884221f8f0 Change the default implementation of DataEquals for Hydrogen instructions.
The former default was true. The new default is false and the default
implementation is UNREACHABLE so it asserts in debug builds.  The function
is overridden in all concrete instruction classes that might have the flag
kUseGVN set.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 14:51:21 +00:00
whesse@chromium.org
75c6bffbd1 X64 Crankshaft: Fix compilation error on Windows X64.
Review URL: http://codereview.chromium.org/6338018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 13:54:25 +00:00
kmillikin@chromium.org
a1a46fb1ce Clean up Hydrogen's HLoadFunctionPrototype.
This instruction was setting an incorrect collection of Changes/Depends
flags.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 13:37:51 +00:00
whesse@chromium.org
cd935a417b X64 Crankshaft: Remove relative jump to deoptimization code. Fixes logical error, and compilation error on Windows.
Review URL: http://codereview.chromium.org/6310018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 13:24:19 +00:00
sgjesse@chromium.org
9d463bd6a1 ARM: Fix the type recording binary operation stub subtract
Failure exposed by Sputning tests where the generic case tried to string add for subtract.
Review URL: http://codereview.chromium.org/6339013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 12:31:35 +00:00
kmillikin@chromium.org
97f09782fa Disable all code motion on the final optimization attempt.
Before, we disabled code motion for check instructions on the final
optimization attempt.  It is unsafe to prevent movement of check
instructions but to allow movement of instructions that assume the checks
were performed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 10:25:43 +00:00
sgjesse@chromium.org
26a8dc3818 ARM: Make the ARM hardware builder green
Fix a bug in the --debug-code alignment check in the C entry stub.

Don't force the --debug-code flag in the ARM disassembler tests. The framework does support passing flags and the test runner will when running tests in debug mode.

Skip some deserialization tests which crashes from time to time.
Review URL: http://codereview.chromium.org/6393007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 09:52:25 +00:00
ager@chromium.org
0e183035a2 ARM: Merging constants in simulator and assembler header files and other cleanup.
First stab at a general ARM cleanup patch. It merges ARM constants so that they can be used across simulator, assembler and disassembler, and tidies up some syntax and ambiguities.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 08:32:54 +00:00
erik.corry@gmail.com
591eb3f406 Minor cleanup: Use MaybeObject instead of bool and Failure** in
stub cache generation.
Review URL: http://codereview.chromium.org/6392003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 08:12:56 +00:00
fschneider@chromium.org
1c4dfa30fa Revert r6543 and r6441.
This fixes a crash in the code generator.

BUG=1074

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 08:03:48 +00:00
sgjesse@chromium.org
0282f707af Fix presumbit.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/6250031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 08:00:51 +00:00
sgjesse@chromium.org
06515b6f1b ARM: Change BranchOnSmi/BranchOnNotSmi to JumpIfSmi/JumpIfNotSmi
Review URL: http://codereview.chromium.org/6272019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 07:44:45 +00:00
sgjesse@chromium.org
12c74ba0c6 ARM: Add subtract to the type recording binary operation stub.
Review URL: http://codereview.chromium.org/6324013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-26 07:41:02 +00:00
mmaly@chromium.org
2b47762e3a Strict mode object property validation.
Review URL: http://codereview.chromium.org/6335010/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 18:42:35 +00:00
mmaly@chromium.org
f5a2860534 Strict mode parameter validation.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 17:21:45 +00:00
whesse@chromium.org
948265619b Revert change 6468: X64 Crankshaft functions added.
Review URL: http://codereview.chromium.org/6260018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 16:37:18 +00:00
vitalyr@chromium.org
76483f871b Support StringLength in hydrogen (similar to ArrayLength).
To avoid deopts a few extra changes were needed:

o Enable megamorphic state for special property loads on
  primitives. We used to flip between monomorphic stubs.
o Extract pure string (no string wrapper support) version of the
  string length stub.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 15:51:10 +00:00
sgjesse@chromium.org
99a5b9f713 ARM: Initial type recording binary operation stub
This implements the type recording binary operation stub for ARM. This first iteration only supports ADD. Handling of 32-bit integers is currently not implemented but just transitions. The generic case for now delegates to the generic binary operation stub.
Review URL: http://codereview.chromium.org/6342019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 14:52:35 +00:00
lrn@chromium.org
1494beed42 X64 Crankshaft: Added some functions needed for delta-blue.
Review URL: http://codereview.chromium.org/6262013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 14:03:20 +00:00
ager@chromium.org
d57f91aa15 Prepare push to trunk. Now working on version 3.0.12.
Review URL: http://codereview.chromium.org/6324012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6467 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 13:59:23 +00:00
kmillikin@chromium.org
013860d42e Revert "Reapply change to with/arguments interaction."
Revert this change again.  Somewhat mysteriously we sometimes get empty
contexts that we do not expect in the context chain.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 13:01:45 +00:00
sgjesse@chromium.org
a6a80b9121 Fixed typo in calling Thread::set_name() on freebsd.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:59:43 +00:00
whesse@chromium.org
4c9254c054 Add compilation guard to new x64-only file, for Mac platform.
Review URL: http://codereview.chromium.org/6249016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:50:18 +00:00
sgjesse@chromium.org
c5e4800963 Adding GC hooks to support LiveObjectList functionality.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:35:06 +00:00
sgjesse@chromium.org
63378e2e5d Script changes so that we can build debug/release with
liveobjectlist=on/off and objectprint=on/off.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:28:45 +00:00
vitalyr@chromium.org
331b482332 Fix bug 1070: set correct holder for primitive checks.
Code generated for checks starting with primitive receivers skips one step
in the usual prototype checking algorithm, so the holder must always be set.

Not setting the holder did not cause an immediate failure because our
primitives have additional hidden prototypes before the real prototypes.
These extra objects in the chain usually contain no properties and so
allowed the right holders to be selected.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:21:03 +00:00
ricow@chromium.org
2a741d4946 Do not shuffle parameters when doing sub on ia32 and arm.
Review URL: http://codereview.chromium.org/6283012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:17:02 +00:00
sgjesse@chromium.org
17cb50b926 IA32: Refactor common string add code.
Review URL: http://codereview.chromium.org/6279011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6457 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 12:14:56 +00:00
ricow@chromium.org
6c800fa6fd Implement x64 lithium instructions DoGlobalObject and DoSub
Review URL: http://codereview.chromium.org/6324011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6456 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 11:33:03 +00:00
lrn@chromium.org
43d7951677 X64 Crankshaft: Added a bunch of operations.
Review URL: http://codereview.chromium.org/6366010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6455 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 11:30:47 +00:00
fschneider@chromium.org
2444e3f247 Port to ARM and x64: Record the lazy deoptimization environmnent only at LLazyBailout-instructions.
This is a port of the change http://codereview.chromium.org/6348016/
to ARM and x64 platform.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 10:35:57 +00:00
whesse@chromium.org
136db7b861 Port new version of ParallelMove's LGapResolver to X64.
Review URL: http://codereview.chromium.org/6366003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 10:10:36 +00:00
ricow@chromium.org
cadb9cb635 Port changes from x64 deoptimizer to ia32 and remove commented out code from last patch.
Review URL: http://codereview.chromium.org/6368013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 08:59:16 +00:00
ager@chromium.org
d69ef26f7d Another fix for leaking error objects. User code can overwrite
ReferenceError.prototype.__proto__ which will make "error instanceof
Error" fail. However, the ReferenceError.prototype object itself
cannot be modified. Therefore, the error checks must check for
concrete error instances instead of only checking for Error.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 08:48:59 +00:00
ricow@chromium.org
d5cab38a33 Add support for deoptimization on x64.
I did not take out the code relating to osr from the generate method
since this makes it easier to compare to ia32 (we will abort anyway when we hit the osr code so there should be no issues with having this in)
 

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 07:57:56 +00:00
sgjesse@chromium.org
161d631b5e Change ARM exit frame layout and alingment handling
Change the ARM exit frame to have the same layout as the IA32 exit frame. This basically re-arranges the order of fp and sp and changes the sp location of the entry frame to hold the sp used by the gc and not the sp for popping the arguments. This removes the option of tearing down the frame and returning using one ldm instruction.

The main motivation for this is to avoid pushing an alignment word before generating the entry frame. The GC handling of optimized frames process the registers pushed as part of a safepoint and asumes that these are at the top of the frame, so if an alignment word is pushed this processing will be one off.

The alignment handling in the C entry stub have also been simplified. Now the value of lr is stored to a stack slot already reserved avoiding pushing it and keeping track of "frame skew".

This does result in more instructions in the exit frame on ARM, but we can look into improving this later.
Review URL: http://codereview.chromium.org/6247019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6448 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 07:49:39 +00:00
lrn@chromium.org
2e8b8d3ddf Fix bad assumption in object literal interpretation.
We allow symbols that are array indices.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-25 07:48:19 +00:00
mmaly@chromium.org
8d79f3a788 Strict mode octal literals.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 18:13:18 +00:00
ager@chromium.org
4c8fbaffa1 Move stack check patching to the architecture dependent deoptimizer
files. On ARM it is not enough to iterate the relocation information
because that will only give us access to the constant pool and not to
the place in the instruction stream where the target in the constant
pool is called.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 14:54:45 +00:00
kmillikin@chromium.org
9c2d52eb0e Fix a bug in delete for lookup slots.
The function Runtime_LookupContext searches the context chain for a
LOOKUP slot and returns the object holding the slot.  It returned the
global context if the slot was not found or if it was found in a
function's context or arguments object.  This is not the correct
object to use for 'delete'.

Since this lookup function is only ever used when deleting LOOKUP
slots (those that have to go through a with or a scope with eval), it
is simply replaced with a Runtime_DeleteContextSlot function that does
the appropriate thing for all kinds of context lookups.

This fixes Chromium bug 70066.
http://code.google.com/p/chromium/issues/detail?id=70066

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 14:03:30 +00:00
fschneider@chromium.org
811e778592 Record the lazy deoptimization environmnent only at LLazyBailout-instructions.
This saves one pointer per LIR instructions. The change relies on the fact
that there is a LazyBailout instruction at all the places where we need
to register a lazy deoptimization environment.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 13:29:39 +00:00
ager@chromium.org
883a56717d ARM: Implement DoIsObject and DoIsObjectAndBranch in the lithium code generator.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 12:28:38 +00:00
vegorov@chromium.org
3650601588 Prepare push to trunk. We are now working on 3.0.11.
Review URL: http://codereview.chromium.org/6272015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 12:01:42 +00:00
fschneider@chromium.org
672f5ffab6 Port lithium template classes to ARM.
This is a port of the IA32 version and is needed to allow 
changing the register allocator interface in a later change.



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 09:43:14 +00:00
ager@chromium.org
b5151d118d Avoid calling overwritten toString methods for internal error
formatting. I missed a couple of places. Extracting the error object
check to a separate function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 07:59:40 +00:00
ricow@chromium.org
8a1416c78d Fix double allocation of register on arm in DoDeferredMathAbsTaggedHeapNumber.
This should fix the sputnik issue on the arm simulator.

Priorly tmp2 and tmp3 could potentially be the same register as input.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 07:56:57 +00:00
ager@chromium.org
73e8bc9e1a WebKit build needs to be told where to look for ICU package.
Chromium already sets this variable in common.gypi which is force included to all gyp files in the build.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-24 06:54:51 +00:00
kbr@chromium.org
cbc1c0fca6 Truncate rather than round to nearest when performing float-to-integer
conversions for external array types, which implement the Typed Array
spec. (Revision of http://codereview.chromium.org/6315004 .)

Prefer SSE2 code path on x86 processors. Non-SSE2 processors now make
a slow runtime call for float-to-int conversions. Use SSE3 for 32-bit
signed and unsigned int array types where possible.

The movement of code from ic-arm.cc to stub-cache-arm.cc caused the
VFP3 code path to be tested for the first time. Fixed bugs in the
register usage and in the constant value stored into integer arrays
for NaN and +/-Infinity.

Added new truncation test to test-api.cc. Storage of NaN and +/-Inf
was already covered. Ran unit tests on x86, x64 and ARM simulator.
Tested ia32 and x64 code in Chromium on Mac and Linux respectively
with Typed Array unit tests and WebGL content.

BUG=http://code.google.com/p/chromium/issues/detail?id=50972
TEST=test-api/ExternalArrays

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 23:58:00 +00:00
ager@chromium.org
bb9c9fe92c Change recursive error printing to just replace recursively
encountered error objects with the empty string. This actually does
match the Safari behaviour.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 14:11:35 +00:00
ager@chromium.org
ca14680556 Return the empty string when formatting recursive error messages. This
matches the behavior of Safari and Firefox. Our old behavior was to
throw a stack overflow exception.

BUG=crbug.com/70334
TEST=mjsunit/cyclic-error-to-string.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 11:44:29 +00:00
vegorov@chromium.org
fd250a2244 GDBJIT: do not register NULL lineinfo when gdbjit integration is disabled.
Review URL: http://codereview.chromium.org/6255008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 11:36:19 +00:00
kmillikin@chromium.org
8a9eeaf8da Reapply change to with/arguments interaction.
This is svn r6415 with a bugfix.

The bug was that we can have scopes with 0 heap slots (functions with
such scopes do not need a local context) and scopes with at least
Context::MIN_CONTEXT_SLOTS.  The code generator only allocated a local
context if there were strictly more than Context::MIN_CONTEXT_SLOTS.
Before the change to with/arguments, it was impossible to actually get
a function scope with exactly Context::MIN_CONTEXT_SLOTS because every
such scope included a heap-allocated arguments (and arguments shadow)
slot.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 11:28:35 +00:00
fschneider@chromium.org
c630134ed2 Remove default template parameter T for the number of temps.
Instead require that the number of temps be specified at each declaration.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 10:31:28 +00:00
vitalyr@chromium.org
7d96f2d40f Fix Smi::IsValid assert in StringCharCodeAt deferred code.
Review URL: http://codereview.chromium.org/6303013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-21 08:30:13 +00:00
mmaly@chromium.org
4cb51b51e6 First part of strict mode.
- var eval | arguments
- catch (eval | arguments)
- 'with' is disabled
- function can't be named eval or arguments

Add FLAG_strict_mode

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 18:51:47 +00:00
karlklose@chromium.org
f914324293 Implement fast code for the common cases of left hand sides that are less than three times larger as the right hand side and and right hand sides that are powers of two up and including 32.
In the covered special cases the result is computed directly, else the generic stub is called. The implementation deoptimizes only for mod 0 and if the result may be a negative zero.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 17:42:29 +00:00
fschneider@chromium.org
5b2dff9806 Remove unused function AddGapMove from the register allocator.
Review URL: http://codereview.chromium.org/6355009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 14:37:28 +00:00
ager@chromium.org
49d646b14c ARM: Implement StringLength and StringCharCodeAt in the lithium-arm
backend.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 14:20:54 +00:00
kmillikin@chromium.org
6b89b5975f Revert "Make 'with' mark only variables occurring in the body as used."
This reverts SVN revision 6415 due to layout test failures.

TBR=ricow

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 12:58:57 +00:00
kmillikin@chromium.org
3d15b43393 Begin changing Hydrogen branch instructions.
Rename HBranch (the instruction that coerces an arbitrary HValue to
control flow) to HTest to free up the term Branch to refer to any
control instruction with two successors.

Change the virtual FirstSuccessor and SecondSuccessor functions on
control instructions to a pair of data members.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 12:56:34 +00:00
fschneider@chromium.org
89e74000a0 Use typefeedback for bitwise operations.
Add a generic tagged version for all bitwise operation that
invoke the generic stub. This allows us to perform generic
bitwise operations (i.e. on non-integers) without deoptimizing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 12:47:22 +00:00
kmillikin@chromium.org
7f43cf0539 Make 'with' mark only variables occurring in the body as used.
Before, we conservatively marked every variable in a scope as used if the
scope contained 'with'.  Instead, just mark the variables occurring in the
body of the with.  This avoids marking 'arguments' as used whenever 'with'
occurs, which incurs an extra performance penalty (a use of arguments is
seen as an instruction to redirect all parameter accesses to the arguments
object).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 12:32:43 +00:00
sgjesse@chromium.org
198bcbaa13 Adding build script changes to support LiveObjectList functionality.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:38:01 +00:00
sgjesse@chromium.org
4653cc0aff Fix Windows compile
Review URL: http://codereview.chromium.org/6260014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:21:40 +00:00
sgjesse@chromium.org
e528223fe2 Stubbed out empty liveobjectlist files.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:11:53 +00:00
ager@chromium.org
1c2fddb4c8 ARM: Implement Math.abs in lithium code generator for the integer and
tagged case. I couldn't find a way to test the double case yet so I'm
leaving that unimplemented for now.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 08:08:36 +00:00
vitalyr@chromium.org
b4ff318e4b Support StringCharCodeAt in hydrogen/lithium.
This patch adds H- and L-variants of StringCharCodeAt and StringLength.

StringCharCodeAt is used to inline a constant function call of
String.prototype.charCodeAt and to implement the corresponding inline
runtime function. It does not yet use the recently introduced extra IC
state. (We can specialize on string encoding and avoid deopts because
of out of bounds accesses.)

StringLength needs more work because the stub version of it also
supports strings wrappers and it matters in some cases. (We have to
separate the string only case.)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 20:05:22 +00:00
ager@chromium.org
f6e177f075 Fix the ARM simulator's stop support and add conditional breakpoint.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 15:39:40 +00:00
kmillikin@chromium.org
70910af7a0 Fix an assertion failure in the full code generator.
We hit an assertion failure when we tried to record the AST ID of
the (shared) .arguments variable proxy more than once.  This was hit
when we had multiple calls to the same parameter in a function that
used the arguments object.  The fix is to not visit the subexpressions
of the (shared) property access expression.

BUG=1060

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 15:26:54 +00:00
sgjesse@chromium.org
3ff8e4d3fa ARM: Implement DoInstanceOfKnownGlobal stub
BUG=none
TEST=none

Patch by Martyn Capewell from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 14:53:38 +00:00
mikhail.naganov@gmail.com
0f1a2bda1a Fix Linux x64 compilation
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 14:51:01 +00:00
mikhail.naganov@gmail.com
7984684ec9 Introducing MemoryMappedExternalResource for creating an external
resource from a memory mapped file for creating strings.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

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

Relanded with Windows compilation issues fixed.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 14:28:15 +00:00
fschneider@chromium.org
ac0b1ded7b Move LOperand class to lithium.h and move implementations out of .h into .cc files.
Review URL: http://codereview.chromium.org/6378004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 13:55:56 +00:00
lrn@chromium.org
93a0b80609 X64: Fix bug in DoBranch that miss detecting NaN as falsy.
Review URL: http://codereview.chromium.org/6369005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 13:52:08 +00:00
ager@chromium.org
56073b733f ARM: Implement HasInstanceType in lithium backend.
Review URL: http://codereview.chromium.org/6283006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 13:04:21 +00:00
ager@chromium.org
fb43b16e2b ARM: Implement DoCmpJSObjectEqAndBranch.
Review URL: http://codereview.chromium.org/6381001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:56:32 +00:00
vegorov@chromium.org
1db0a6a000 Make V8 more Valgrind-friendly.
While we don't have to flush icache on Intel CPUs when we patch code we still have to call CPU::FlushICache() to notify Valgrind otherwise Valgrind will run incorrect translations which will lead to strange crashes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:42:43 +00:00
ager@chromium.org
e65647eafc ARM: Implement StringCharAtStub.
Review URL: http://codereview.chromium.org/6334007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:35:41 +00:00
mikhail.naganov@gmail.com
53cbbe4a23 Revert "Introducing MemoryMappedExternalResource for creating an external"
Windows compilation is broken. Will fix and reland later.

This reverts commit fe13ffaa6d0c3435bfe1ae930813e456650ec980.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:20:10 +00:00
antonm@chromium.org
b0abe13ed2 Using unsigned shifts and masks when dealing with 64-bit addresses.
BUG=v8:1037

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 11:16:23 +00:00
mikhail.naganov@gmail.com
890a0f6b52 Introducing MemoryMappedExternalResource for creating an external
resource from a memory mapped file for creating strings.

Patch by Mark Lam from Hewlett-Packard Development Company, LP

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 10:48:06 +00:00
lrn@chromium.org
e66ceb9079 X64 Crank: Implemented DoBranch and all *AndBranch comparisons.
Review URL: http://codereview.chromium.org/6374002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 10:17:18 +00:00
erik.corry@gmail.com
8d3b675586 Prepare push to trunk. We are now working in 3.0.10.
Review URL: http://codereview.chromium.org/6380003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 09:42:17 +00:00
sgjesse@chromium.org
7d4e4a325b Fix possibly wrong use of strncpy_s
This should also fix MinGW build.
Review URL: http://codereview.chromium.org/6376003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 08:34:24 +00:00
ager@chromium.org
6b4d29766c Revert r6376 and r6373 which changes external array support. The ARM
version did not work.

TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/6295013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 08:20:42 +00:00
antonm@chromium.org
49144ee6b6 Properly create variables to access outer arguments and function names.
Review URL: http://codereview.chromium.org/6266007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 08:16:17 +00:00
sgjesse@chromium.org
9e23f65bec Adding inspector module and macro-ized object type list.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 08:04:48 +00:00
ager@chromium.org
9ab1970860 Fix ARM compilation after external array changes.
TBR=kbr@chromium.org
Review URL: http://codereview.chromium.org/6261014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 07:18:04 +00:00
mmaly@chromium.org
d6f88b6688 Revert strict mode (Mozilla test failure).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 23:01:50 +00:00
kbr@chromium.org
27f0ae7aad Truncate rather than round to nearest when performing float-to-integer
conversions for external array types, which implement the Typed Array
spec. The new code paths are for SSE3 and SSE2 capable processors.
The code for non-SSE2 processors is unchanged for now. The ARM port
appears to already be correct.

Moved the generation of the external array load and store intrinsics
to the stub cache (on all platforms) so that they are generated at run
time and can take advantage of CPU features.

This functionality is covered by the array-unit-tests.html test in the
WebGL conformance test suite:
http://khronos.org/webgl/wiki/Testing/Conformance
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/array-unit-tests.html

Manually verified all of the SSE3/SSE2/non-SSE2 code paths by enabling
each in turn. Tested in Chromium on 32-bit Mac OS X and 64-bit Linux.

BUG=http://code.google.com/p/chromium/issues/detail?id=50972
TEST=none (see above)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 21:51:50 +00:00
vitalyr@chromium.org
11a4cb5718 Introduce extra IC state to record additional feedback from IC-s.
Extra IC state is only two bits and only supported for call IC-s for
now. To change its extra state an IC stub jumps to a new miss stub
that goes to runtime as usual but then instead of going megamorphic
generates a monomorphic stub with the updated state.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:54:48 +00:00
mmaly@chromium.org
b4c88d5de4 First part of ES5 strict mode.
- var eval | arguments
- catch (eval | arguments)
- 'with' is disabled
- function can't be named eval or arguments
- function parameter name cannot be eval or arguments
- no duplicate parameter names allowed

Add FLAG_strict_mode

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:43:53 +00:00
vegorov@chromium.org
80b7a0e164 Fix lint error introduced by r6367.
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:16:00 +00:00
vegorov@chromium.org
3003b2156b Basic GDB JIT Interface integration.
It has certain overheads even when gdb is not attached so it is guarded by ENABLE_GDBJIT_INTERFACE define and --gdbjit flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 16:11:01 +00:00
whesse@chromium.org
9cee28138a X64 Crankshaft: Add addition of tagged and int32 values to Crankshaft on x64. Enable CallIC to global function to call optimized code.
Review URL: http://codereview.chromium.org/6329006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 14:32:13 +00:00
fschneider@chromium.org
2ecfe94997 Fix operand type for keyed calls.
Record the key as a input operand for keyed call instructions instead
of wrongly making it a temp operand.

This bug does currently not show up as a problem because the 
uses are recorded only in the instruction summary.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-18 14:25:05 +00:00