Commit Graph

5548 Commits

Author SHA1 Message Date
fschneider@chromium.org
12ba2dd435 Improve dead phi elimination.
This change splits the existing phi elimination into two phases:
1. Remove redundant phis
2. Remove dead phis with a fixed point iteration.

The new approach allows us to remove dead phis that are connected
in a cycle.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-08 10:04:23 +00:00
mmaly@chromium.org
927f341d3c Strict mode arguments do not share binding with formal parameters.
Move strict mode flag from TemporaryScope to Scope so that it can be accessed from variable binding code.
Arguments do not alias in strict mode (ia32, x64 and arm, codegen and full codegen).
Hydrogen tolerates null arguments_shadow().
In codegen-<arch> arguments object is allocated eagerly to capture values before they get modified.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 19:23:46 +00:00
kmillikin@chromium.org
4a9056cbce Fix a stack-height mismatch during deoptimization.
When deoptimizing after a conditional expression in an effect context, we
should not see the value of the conditional expression.

BUG=v8:1237

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 17:01:12 +00:00
fschneider@chromium.org
ade4b7506b Make the typefeedback oracle use a NumberDictionary instead of JSObject as its backing store.
This avoids problems when getters/setters are defined on Object.

BUG=v8:1232


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 16:09:56 +00:00
kmillikin@chromium.org
2662624988 Refactor inlined functions to avoid using subgraphs.
Function inlining no longer uses subgraphs.  We detect inlining in an
effect context and avoid materializing a return value earlier than we
did before.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 15:42:23 +00:00
karlklose@chromium.org
4e05f1a091 Prepare push to trunk. Now working on version 3.2.1.
Review URL: http://codereview.chromium.org/6623053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 13:48:02 +00:00
kmillikin@chromium.org
5c6b3ae6c6 Fix presubmit errors.
TBR=whesse

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 12:08:51 +00:00
kmillikin@chromium.org
c3172a6b7e Refactor polymorphic load and inline function graph construction.
Change the way we construct the graph for polymorphic loads to match that of
polymorphic stores.

Introduce a stack-allocated helper for saving and restoring all the
function-specific graph builder state that needs to change when we begin
translating an inlined function.  Make this class authoritative by moving
redundant state out of the builder and deferring to the current function's
state.

Ensure that we always print a tracing message when abandoning an inlining
attempt.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 11:52:36 +00:00
whesse@chromium.org
632e79bfe7 X64 Crankshaft: Revert r7071 and fix DoStoreContextSlot in a different way.
Review URL: http://codereview.chromium.org/6627048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 11:26:43 +00:00
lrn@chromium.org
56753adbb8 X64: Ensure that there is always room for a call between recoreded safepoints.
Fixes issue 1234.

BUG=v8:1234

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 10:30:58 +00:00
whesse@chromium.org
3ea38d412b X64 Crankshaft: Fix bug in DoStoreContextSlot, and enable it.
Review URL: http://codereview.chromium.org/6627046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 10:28:37 +00:00
whesse@chromium.org
30676b0abc X64: Make sure that all Win64 Visual Studio project file builds have a large enough stack.
Review URL: http://codereview.chromium.org/6626013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 09:27:43 +00:00
lrn@chromium.org
cd04469f78 Optimize loads from root-array in X64.
Move the value of the root-array register to offset 128 from the start of
the root array. This allows indices 16..31 to be reached using only an
8-bit displacement, saving three bytes per access.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-07 08:35:19 +00:00
mmaly@chromium.org
3c51baa1ac Throw if setting length of a string in strict mode.
BUG=
TEST=test/mjsunit/strict-mode.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 21:12:29 +00:00
cira@chromium.org
0f6709330c Fix memory corruption with AdoptText method.
Icu setText method keeps pointer to text, it doesn't copy it so we have to keep text around for the lifetime of the break iterator object,
or next setText operation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 17:22:03 +00:00
whesse@chromium.org
76a6c73960 X64: Fix error in Win64 platform specific code in regexp stub.
Review URL: http://codereview.chromium.org/6626011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 13:01:47 +00:00
whesse@chromium.org
8a0e217186 Fix X64 Crankshaft error on Win64 platform, in deoptimizer-x64.cc parameter passing.
Review URL: http://codereview.chromium.org/6623013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 12:34:05 +00:00
fschneider@chromium.org
ff6190946c Reorganize code for range analysis and suppress unnecessary debug printing of unknown ranges.
Review URL: http://codereview.chromium.org/6611020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 12:09:54 +00:00
vitalyr@chromium.org
eee3c5196a Start sampler for the runtime profiler even when we can't setup a signal handler.
Review URL: http://codereview.chromium.org/6625013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 10:12:33 +00:00
kmillikin@chromium.org
36f63b8476 Change the translation of polymorphic stores.
They do not use subgraphs or subgraph scopes.  Instead of computing a list
of single-block subgraphs and then adding all the edges afterward, build
both the blocks and edges directly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 10:07:43 +00:00
sgjesse@chromium.org
f6a366a851 Add missing cast.
Review URL: http://codereview.chromium.org/6623010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 09:36:04 +00:00
ricow@chromium.org
e772d9ea45 Remove unused label from lithium-codegen-ia32
Review URL: http://codereview.chromium.org/6615007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 09:07:31 +00:00
sgjesse@chromium.org
18a9bf69c5 Minor bug in int32 TypeRecordingBinaryOpStub.
BUG=none
TEST=none
Patch by Rodolph Perfetta from ARM Ltd.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 07:36:52 +00:00
mmaly@chromium.org
88b60ebc24 Fix presubmit.
TBR=ager@chromium.org

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 00:28:54 +00:00
mmaly@chromium.org
9dc156ac62 Passing strict mode throughout SetElement.
Throw if assigning to read only element.
Adding tests for element assignment in strict mode.

Fix tests for strict mode SetElement.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-04 00:21:52 +00:00
cira@chromium.org
a0f0faa8e4 Adding break iterator support to the i18n api extension.
This is vendor specific, and is prefixed by v8.

WebKit layout tests will be added in a separate CL.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 17:32:18 +00:00
mmaly@chromium.org
30bd09cbd6 Renaming strict to strict_mode for uniformity.
Review URL: http://codereview.chromium.org/6611003/

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 16:17:28 +00:00
whesse@chromium.org
9cc9ecbfe9 Revert change 7048
Review URL: http://codereview.chromium.org/6613019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 16:09:52 +00:00
whesse@chromium.org
721d8d5b57 X64 Crankshaft: Fix and enable StoreContextSlot in lithium codegen on x64.
Review URL: http://codereview.chromium.org/6614017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 15:36:13 +00:00
fschneider@chromium.org
db9e6dcd86 Mark HChange that convert to int32 with truncation with the appropiate flag.
Before we would compute the flag by iterating over all uses. The truncating 
flag is always determined at construction time since we already computed
the flag for all other instructions before inserting HChange instructions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 13:50:16 +00:00
lrn@chromium.org
df5c259bb2 Remove tests for being the normal array constructor from the ArrayConstructCode builtin.
Review URL: http://codereview.chromium.org/6613016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 13:36:31 +00:00
kmillikin@chromium.org
84aceb526a Refactor translation of short-circuit logical operations to avoid subgraphs.
Do not use a subgraph or subgraph scope for the Hydrogen translation
of the short-circuit logical operations.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 13:02:56 +00:00
lrn@chromium.org
f5839996fb More cases of CallFunction that doesn't work correctly.
Review URL: http://codereview.chromium.org/6603015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 12:56:14 +00:00
lrn@chromium.org
30c0420b39 Undo change from .call to %_CallFunction.
The latter doesn't handle promotion of null/undefined to global object as
receiver for non-strict functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 12:44:39 +00:00
whesse@chromium.org
5a40de9b21 Add new ARM macro assembler function CompareRoot left out of previous commit.
Review URL: http://codereview.chromium.org/6614015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 12:21:37 +00:00
whesse@chromium.org
8ff9165055 Simplify test for typeof x == 'y' on all platforms.
Review URL: http://codereview.chromium.org/6606005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 12:16:21 +00:00
lrn@chromium.org
4707d7ac08 Stop using plain Arrays internally in built-in functions.
In built-in code we use arrays for internal computations.
This makes it possible to affect the built-in code by putting getters
or setters on the Array prototype chain.
This adds a new internal Array constructor that creates Arrays with
a very simplistic prototype chain that doesn't include any publicly
visible objects. These Arrays shoudl ofcourse never leak outside the
builtins, since that would expose the prototype object.
The prototype object contains only the array functions that we use:
push, pop and join (and not even a toString, so it doesn't stringify
well).

Also change uses of .call to %_CallFunction.

BUG=1206

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 11:49:03 +00:00
lrn@chromium.org
8fddb2a664 Handled return-value of SetElement in some cases, or avoided it in other.
SetElement can cause an exception to be thrown. If its return value
isn't checked, this exception might not be handled at the correct time.
In some cases, it's a matter of returning Exception::Failure() from
a runtime function.
In other cases, code using SetElement on a JSArray has been changed
to setting directly on a FixedArray and only creating the JSArray
at the end.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 10:16:22 +00:00
sgjesse@chromium.org
e3c95a645f Fix mistake in r7033
TBR=karlklose@chromium.org
Review URL: http://codereview.chromium.org/6614012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 09:46:27 +00:00
sgjesse@chromium.org
98d82ea9de Add lithium support for %_GetCachedArrayIndex for IA32 and X64
BUG=v8:1093
Review URL: http://codereview.chromium.org/6611014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 09:33:08 +00:00
sgjesse@chromium.org
1c210fc221 Remove unwanted character
TBR=karlklose@chromium.org
Review URL: http://codereview.chromium.org/6615008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 08:50:35 +00:00
sgjesse@chromium.org
53764d16f5 Turn on crankshaft as the default for X64 and ARM
Review URL: http://codereview.chromium.org/6603012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 08:43:55 +00:00
sgjesse@chromium.org
39efab0df6 ARM: Support %_SwapElements in the full compiler
Review URL: http://codereview.chromium.org/6597106

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 07:36:04 +00:00
sgjesse@chromium.org
37214d189d Fixed lol SetProperty() calls to specify the needed strict mode.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-03 07:14:55 +00:00
whesse@chromium.org
9d89ec5c00 Add ArithmeticD(MOD) to x64 optimizing code generator. Minor changes to ArithmeticD on other platforms.
Review URL: http://codereview.chromium.org/6594118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-02 15:04:20 +00:00
karlklose@chromium.org
64191ccc8d ARM: Implement untagged input for TranscendentalCacheStub.
Review URL: http://codereview.chromium.org/6591073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-02 14:40:38 +00:00
kmillikin@chromium.org
d6a041b8f9 Remove some more uses of subgraphs and more cleanup of the graph builder.
Do not use subgraphs to implement the translation of simple branching
control flow, for the function body entry, or for labeled blocks.

Combine all the loop construction functions into a single one.

Resolve a possible problem with duplicate AST IDs used both for joined loop
break blocks, the normal loop exit, and for their common successor, by never
introducing the extra (successor) block and instead making the normal loop
exit a predecessor of the break join block.  There is a similar issue with
joined continue blocks.

Remove a (never needed) two-element zone list per each time we replace one
hydrogen value with another.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-02 14:09:59 +00:00
ager@chromium.org
9390c69a54 Delete empty directories.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-02 13:51:41 +00:00
ager@chromium.org
b0aa981b61 Prepare push to trunk. Now working on version 3.2.0.
Review URL: http://codereview.chromium.org/6588118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-02 13:29:59 +00:00
whesse@chromium.org
af77b5a878 Add MarkAsCall to the LArithmeticD::MOD instruction, that calls a C function, on ia32 platform
Review URL: http://codereview.chromium.org/6596105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-02 12:26:20 +00:00