Commit Graph

4797 Commits

Author SHA1 Message Date
sandholm@chromium.org
37567c42da Introduce NUMBER_IS_FINITE macro to avoid ToNumber() conversion.
Review URL: http://codereview.chromium.org/5977006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 13:19:25 +00:00
sgjesse@chromium.org
716e6282e9 Refactoring out object printing functions into objects-printer.cc.
Patch by Mark Lam from Hewlett-Packard Development Company, LP

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 13:04:47 +00:00
vitalyr@chromium.org
52d2ce3b5a Clean up is-ASCII checks.
Review URL: http://codereview.chromium.org/5963003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 11:31:18 +00:00
whesse@chromium.org
4330070e32 Use Assembler::Set() to assign constants to registers in more places. Commit of http://codereview.chromium.org/6016007/ .
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 09:55:19 +00:00
erik.corry@gmail.com
92d163e156 Fix a couple of cast errors for gcc-3.4.3. Patch by Ryan Dahl. http://codereview.chromium.org/5976006/
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-22 09:49:26 +00:00
whesse@chromium.org
1c63e53675 Fix assert error in r6083 by allowing stub calls from TranscendentalCacheStub.
Review URL: http://codereview.chromium.org/6021004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 15:10:45 +00:00
ager@chromium.org
a609cf61c5 Avoid decoding overhead when allocating ascii strings.
The assumption is that most utf8 strings allocated are actually ascii
and that if they are not we will encounter a non-ascii char pretty
quickly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 13:24:23 +00:00
whesse@chromium.org
bc5fb1a148 Prepare push to trunk. Now working on version 3.0.5.
Review URL: http://codereview.chromium.org/6056003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 12:05:32 +00:00
kmillikin@chromium.org
7171df741a Fix for issue 1007.
The Hydrogen environment only tracks values for stack-allocated variables.
It is a precondition of HEnvironment::Lookup(variable) that variable is
stack-allocated.  The check was missing at one call site.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 11:21:04 +00:00
karlklose@chromium.org
16837c1f33 Implement inlining of instanceof tests on ARM.
TBR=sgjesse

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:52:50 +00:00
vegorov@chromium.org
640243a975 Fix leak of a global handle in Debug::Load().
Bootstrapper::CreateEnvironment() returns a global handle to the created context so there is no need to create another one explicitly.

BUG=v8:1006

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:51:50 +00:00
mikhail.naganov@gmail.com
a968ed0470 Implement HeapIterator that skips over unreachable objects.
I'm using it when creating heap snapshots. I decided that it will
be more convenient to have it as a separate piece of code, instead
of embedding into the snapshot generator.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:49:40 +00:00
whesse@chromium.org
8df57d740d Ensure that the SSE2 TranscendentalCache stub calls GC if it runs out of memory in new space. Previously, it would just use an alternate algorithm, that did not cache the result.
Review URL: http://codereview.chromium.org/5996001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-21 10:25:51 +00:00
lrn@chromium.org
5741575327 Tweak quicksort loop to reduce number of compares slightly.
Review URL: http://codereview.chromium.org/6039002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:57:51 +00:00
whesse@chromium.org
da934d1f26 Fix error in r6083
Review URL: http://codereview.chromium.org/6026004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:42:05 +00:00
antonm@chromium.org
ae476ecd6c Teach C++ ArraySlice builtin to deal with arguments object.
Array.prototype.slice.call(arguments, ...) idiom is pretty common (up to 97% of invocations
in GMail), so we'd better handle it efficiently too.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:41:41 +00:00
vitalyr@chromium.org
c35cd839ae Allow 4 more fast properties for objects.
Review URL: http://codereview.chromium.org/6016003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 14:20:43 +00:00
whesse@chromium.org
5656d64ece Add untagged double versions of Math.sin and Math.cos. Merge classes TranscendentalCacheStub and TranscendentalCacheSSE2Stub.
Review URL: http://codereview.chromium.org/5996002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 13:52:14 +00:00
fschneider@chromium.org
7cc61e6973 Fix GVN for polymorphic loads.
They must not be hoisted above the compare-map-and-branch.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 13:18:47 +00:00
sandholm@chromium.org
a496150a9e Minor optimization in regexp parse.
Review URL: http://codereview.chromium.org/6014002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 10:44:41 +00:00
sgjesse@chromium.org
e21d76a0e3 1. Added support for object printing for release mode using the
objectprint=on (defaults to off) option (which defines OBJECT_PRINT).
2. Added the ability to print objects to a specified file instead of
   just stdout.
3. Added a use_verbose_printer flag (true by default) to allow some
   object printouts to be less verbose when the flag is false.
4. Fixed a bug in VSNPrintF() where it can potentially write into an
   empty char vector.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 10:38:19 +00:00
lrn@chromium.org
c91f5606d0 Fix smi-comparison to use correct macros in X64-SwapElements.
Review URL: http://codereview.chromium.org/5967002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-20 09:38:56 +00:00
erik.corry@gmail.com
e24362b50f Remove the atomic/thread safe stuff from the chunk table, since we don't
use cross thread synchronization in Crankshaft.
Review URL: http://codereview.chromium.org/5979001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 14:50:24 +00:00
vitalyr@chromium.org
b2dbea6c60 Extend code printing:
o Add --print-unopt-code to print unoptimized code before printing
  optimized code based on it. This is useful to see the states of ICs
  and the effects of code patching.

o Use debug function names in disassembly output.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 14:16:00 +00:00
fschneider@chromium.org
6cc0310a72 Mark map-transition stores as map-changing instructions.
This prevents code motion from hoisting map-checks across such stores
which may result in unnecessary deoptimizations.

In the following example program we would move a map-check from the inner loop out before the outer loop which is not desirable:

function f() {
  var o = {};
  var j = 0;
  o.a = 1;
  do {
    o.b = 6;  // Map transition
    for (var i=0; i<10; i++) {
       o.a = o.b + i;
    }
  } while(++j < 1) {}
}

for (var i = 0; i < 1000000; i++) f();


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 13:44:19 +00:00
ager@chromium.org
06ac3b18a0 When setting property on a context extension object do not inherit the
attributes from an existing property on a prototype object.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 13:04:53 +00:00
sgjesse@chromium.org
648fcd906e Adding Date::ResetCache() API so that the cache values in the Date object
can be reset to allow DST / timezone changes to be re-cached and reflected
in the Date object.

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

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 12:45:27 +00:00
vitalyr@chromium.org
8ff6c23c84 Allow rapid socket reuse on POSIX platforms.
Review URL: http://codereview.chromium.org/5990001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 12:31:42 +00:00
sandholm@chromium.org
578e70a552 Improve regexp split, replace and test.
Review URL: http://codereview.chromium.org/5959002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 11:57:10 +00:00
whesse@chromium.org
83b28cd1fc Avoid comparing a pointer-to-member to NULL, even though C++ is supposed to support it.
Review URL: http://codereview.chromium.org/5988001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 11:52:10 +00:00
lrn@chromium.org
9f1bcdf8ac Change quicksort pivot from random to median-of-three.
Tweak quicksort bailout parameter to minimize time.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 10:06:11 +00:00
erik.corry@gmail.com
7b6d7f5ba4 Add a couple of missing includes.
Review URL: http://codereview.chromium.org/5899001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 08:58:04 +00:00
ager@chromium.org
0cb7623801 Prepare push to trunk. Now working on version 3.0.4.
Also fix files because of missing prepare for push of version 3.0.2
which was pushed directly.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 08:24:54 +00:00
ager@chromium.org
02382a6d57 Fix 'Optimizations' typo in gyp file.
BUG=http://code.google.com/p/v8/issues/detail?id=998
Review URL: http://codereview.chromium.org/5970001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 07:52:20 +00:00
ricow@chromium.org
717153274f Reduce number of iterations in new regression test, this times out on arm and the regression is hit with an order of magnitude less iterations.
Review URL: http://codereview.chromium.org/5963001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-17 07:23:06 +00:00
vitalyr@chromium.org
2ba48c0a45 Support loading constant functions in hydrogen.
Review URL: http://codereview.chromium.org/5878004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 22:30:53 +00:00
fschneider@chromium.org
73737fcdb6 Fix bugs in the range analysis for integers.
The overflow conditions were not correctly detected for 
certain add, sub and mul instructions.

I replaced the previous code by using 64-bit arithmetic
to correctly identify overflows for *, + and -.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 18:01:36 +00:00
vitalyr@chromium.org
5e86c6c752 Use near labels in write barrier code.
Review URL: http://codereview.chromium.org/5939003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 17:45:26 +00:00
vitalyr@chromium.org
3dd300df48 Emit better code when pushing a constant.
Review URL: http://codereview.chromium.org/5884003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 16:56:45 +00:00
ager@chromium.org
6e30a77ab5 A number of instructions use GVN but do not provide a comparison
function for the data. This leads to wrong results where operations
are wrongly assumed to have the same value as a previous (different)
operation.

Provide the data comparison functions.

BUG=995

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 15:40:02 +00:00
kmillikin@chromium.org
4f231f59b4 Fix an issue discovered in regress-969.
When running with 10 stress runs we get polymorphic stores.  This revealed
an incorrect bailout ID for the state following a polymorphic store.  The ID
should be the internal ID of the assignment side-effect, not the ID of the
end of the expression.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 14:18:41 +00:00
ricow@chromium.org
a362f1d0f7 Add flag for running with a non standard number of stress-runs.
This allows easy testing with more than 5/2 stress runs in
release/debug and will allow us to have a nightly run with e.g., 10
stress runs in debug mode.



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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 13:24:23 +00:00
kmillikin@chromium.org
4a6ef3ee28 Fix issue 977, occasional failure of the DeltaBlue benchmark.
Before, when we deoptimized after a branch we jumped to before the branch
was taken in the unoptimized code with a token value that indicated when
edge to take.  There was a lot of machinery to track this value through the
short-circuit logical operations and logical negation, and to handle it
properly at inline function return sites.  There was also machinery to
prevent incorrectly seeing this environment with the extra value never
actually materialized in the unoptimized code.

Instead, now we deoptimize directly to one of the targets of the branch.
Much but not yet all of the extra machinery has been removed or simplified.
The cost is that branching control structures (the looping statements, if
statements, conditional expressions, and the short-circuit binary logical
operations) need extra AST IDs to identify the branch targets.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 13:13:36 +00:00
ager@chromium.org
1b67320800 Perform more aggressive time to NaN conversions. Our internal date
methods rely on the time values passed in being within a certain range
- not significantly larger than the the ECMA 262 specified time
range. When creating a time, always make it NaN if there is no way
that it can be within range even after UTC conversion.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 13:02:09 +00:00
lrn@chromium.org
b20f0968fa Change DefaultString and DefaultNumber to match the spec required behavior.
Previously it did two reads of the .toString and .valueOf properties where
only one was allowed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:49:55 +00:00
mikhail.naganov@gmail.com
75d5ad65c4 Fix presubmit errors
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:26:04 +00:00
ricow@chromium.org
357afa385b Change Object.defineProperty to accept undefined as getters and setters and to correctly accept overriding an accessor with a data property.
In the past we only accepted functions as argument for setting an
accessor. Since one should be able to set an accessor to undefined
this had to be changed to take either.

In addition, we did not lookup properties in the prototype chain,
causing us to call the setter of an existing accessor up the prototype
chain when trying to replace an existing accessor (that was not local)
with a data property.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:21:08 +00:00
mikhail.naganov@gmail.com
e521db4afa Make V8 compilable with profiling support turned off.
BUG=990

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:14:56 +00:00
fschneider@chromium.org
cdc7d3908e Fix a SEGV in the register allocator.
This occasionally caused the regress-806 unit test to crash.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:01:22 +00:00
sgjesse@chromium.org
d559d8c6c0 IA32: Optimize instanceof
The instanceoff stub now supports arguments in registers and checks for null,
smi and string values without going to runtime.

Needs porting to X64 and ARM.
Review URL: http://codereview.chromium.org/5828004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 08:58:42 +00:00