Commit Graph

4843 Commits

Author SHA1 Message Date
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