platform/upstream/v8.git
12 years agoBailout on possible direct eval calls.
vegorov@chromium.org [Tue, 10 Apr 2012 13:41:00 +0000 (13:41 +0000)]
Bailout on possible direct eval calls.

Environment structure for such calls is different from normal global calls.

R=fschneider@chromium.org
BUG=chromium:122681

Review URL: https://chromiumcodereview.appspot.com/10024060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11256 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoInsert three missing FP register stack pop instructions.
fschneider@chromium.org [Tue, 10 Apr 2012 13:39:28 +0000 (13:39 +0000)]
Insert three missing FP register stack pop instructions.

We use fstp(0) already in other places. ffree does not pop the stack,
but only marks a FP register as empty.

BUG=v8:2065
Review URL: https://chromiumcodereview.appspot.com/9960066

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoUse SortedListBSearch instead of custom one in heap profiler
yurys@chromium.org [Tue, 10 Apr 2012 11:24:09 +0000 (11:24 +0000)]
Use SortedListBSearch instead of custom one in heap profiler
Review URL: https://chromiumcodereview.appspot.com/10006032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoDo not assume that names of function expressions are context-allocated.
kmillikin@chromium.org [Tue, 10 Apr 2012 11:07:16 +0000 (11:07 +0000)]
Do not assume that names of function expressions are context-allocated.

The heap profile generator assumes that for named function expressions, the
name is context allocated.  This is not necessary true.

BUG=v8:2051
TEST=WebKit layout test inspector/profiler/heap-snapshot-inspect-dom-wrapper.html

Review URL: https://chromiumcodereview.appspot.com/9960065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.10.2.
fschneider@chromium.org [Tue, 10 Apr 2012 11:01:29 +0000 (11:01 +0000)]
Prepare push to trunk. Now working on version 3.10.2.
Review URL: https://chromiumcodereview.appspot.com/10024057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoEnsure that a call to String.prototype.match with a
erikcorry [Tue, 10 Apr 2012 10:42:25 +0000 (10:42 +0000)]
Ensure that a call to String.prototype.match with a
global regexp after a call to String.prototype.replace
with a function argument sets the last match info
correctly.  Bug=2058
Review URL: http://codereview.chromium.org/10029009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRevert "External references should not affect dominance relation."
alexeif@chromium.org [Sun, 8 Apr 2012 19:18:06 +0000 (19:18 +0000)]
Revert "External references should not affect dominance relation."

This reverts commit 6e46549d13df2b211ea9b4fac9c09fe5013ec465.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10025014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoExternal references should not affect dominance relation.
alexeif@chromium.org [Sun, 8 Apr 2012 18:28:32 +0000 (18:28 +0000)]
External references should not affect dominance relation.

Review URL: https://chromiumcodereview.appspot.com/10007009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix presubmit warnings after r11245
yurys@chromium.org [Fri, 6 Apr 2012 14:52:20 +0000 (14:52 +0000)]
Fix presubmit warnings after r11245

TBR=mnaganov
Review URL: https://chromiumcodereview.appspot.com/10012040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoWe can avoid putting all nodes into a hash map from HeapEntry to ID and sorting that...
yurys@chromium.org [Fri, 6 Apr 2012 14:16:45 +0000 (14:16 +0000)]
We can avoid putting all nodes into a hash map from HeapEntry to ID and sorting that map as the nodes are already stored in right order in HeapSnapshot::entries_ list.
Review URL: https://chromiumcodereview.appspot.com/10012013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix presubmit error in r11243.
mstarzinger@chromium.org [Thu, 5 Apr 2012 16:40:13 +0000 (16:40 +0000)]
Fix presubmit error in r11243.

R=ulan@chromium.org
TEST=cctest/test-heap/OptimizedAllocationAlwaysInNewSpace

Review URL: https://chromiumcodereview.appspot.com/10010010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoEnsure HAllocateObject always allocates in new-space.
mstarzinger@chromium.org [Thu, 5 Apr 2012 15:36:31 +0000 (15:36 +0000)]
Ensure HAllocateObject always allocates in new-space.

This is needed so that we can start removing write-barriers in optimized
code if we can prove that the receiver object is always in new-space.

TEST=cctest/test-heap/OptimizedAllocationAlwaysInNewSpace

Review URL: https://chromiumcodereview.appspot.com/10008007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix glibc presence checks that are incorrectly triggered in some cases.
danno@chromium.org [Thu, 5 Apr 2012 15:22:51 +0000 (15:22 +0000)]
Fix glibc presence checks that are incorrectly triggered in some cases.

This allows compilation of V8 using uClibc.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9702067
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Remove static initializers in v8.
danno@chromium.org [Thu, 5 Apr 2012 15:18:22 +0000 (15:18 +0000)]
MIPS: Remove static initializers in v8.

Port r11010 (1daa81bc).

MIPS-specific changes:
-register codes and registers are defined using a macro to avoid redundancy
-renamed s8_fp to fp, removed the "fp" alias
-removed kSavedValueRegister (found by check-static-initializers.sh)

Original commit message:

Landing for pliard@chromium.org: Remove static initializers in v8.

This change includes two CLs by pliard@chromium.org:

1. http://codereview.chromium.org/9447052/ (Add CallOnce() and simple LazyInstance implementation):

Note that this implementation of LazyInstance does not handle global destructors (i.e. the lazy instances a

This CL was initially reviewed on codereview.appspot.com:
http://codereview.appspot.com/5687064/

2.  http://codereview.chromium.org/9455088/ (Remove static initializers in v8):
This CL depends on CL 9447052 (adding CallOnce and LazyInstance).
It is based on a patch sent by Digit.

With this patch applied, we have only one static initializer left (in atomicops_internals_x86_gcc.cc). This

This CL also modifies the presubmit script to check the number of static initializers.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9689069
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Ensure proper alignment of LazyInstance objects.
danno@chromium.org [Thu, 5 Apr 2012 15:12:28 +0000 (15:12 +0000)]
MIPS: Ensure proper alignment of LazyInstance objects.

The template system converts the actual struct type to an array of chars.
Make sure the alignment is kept by the compiler.

This fixes a lot of serialization-related HW tests, for example cctest test-serialize/Serialize.

BUG=
TEST=cctest test-serialize

Review URL: https://chromiumcodereview.appspot.com/9702114
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMinimize uses of lazy initialization by adding explicit initialization functions.
danno@chromium.org [Thu, 5 Apr 2012 14:10:39 +0000 (14:10 +0000)]
Minimize uses of lazy initialization by adding explicit initialization functions.

BUG=118686

Review URL: https://chromiumcodereview.appspot.com/9976003
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdjust stack limit again to avoid overflow on 64 bit windows
danno@chromium.org [Thu, 5 Apr 2012 14:01:39 +0000 (14:01 +0000)]
Adjust stack limit again to avoid overflow on 64 bit windows

Also add additional stack check.

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10006010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCheck for NaN in inlined versions of Math.min, Math.max.
ulan@chromium.org [Thu, 5 Apr 2012 13:24:52 +0000 (13:24 +0000)]
Check for NaN in inlined versions of Math.min, Math.max.

R=danno@chromium.org
BUG=V8:2056
TEST=mjsunit/regress/regress-2056.js

Review URL: https://chromiumcodereview.appspot.com/10006008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix stack overflows on Windows x64.
danno@chromium.org [Thu, 5 Apr 2012 12:32:35 +0000 (12:32 +0000)]
Fix stack overflows on Windows x64.

R=mstarzinger@chromium.org
TEST=win 64 not red anymore

Review URL: https://chromiumcodereview.appspot.com/10008005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoEnsure default isolate is present in Context::New().
danno@chromium.org [Thu, 5 Apr 2012 10:54:11 +0000 (10:54 +0000)]
Ensure default isolate is present in Context::New().

R=danno@chromium.org
BUG=chromium:118686
TEST=Run chrome with --single-process.

Review URL: https://chromiumcodereview.appspot.com/9949008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRollback 11231: Add regression test case for issue 2025.
danno@chromium.org [Thu, 5 Apr 2012 08:35:32 +0000 (08:35 +0000)]
Rollback 11231: Add regression test case for issue 2025.

TBR=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10006006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd regression test case for issue 2025.
danno@chromium.org [Thu, 5 Apr 2012 08:08:05 +0000 (08:08 +0000)]
Add regression test case for issue 2025.

R=ulan@chromium.org
BUG=v8:2056
TEST=test/mjsunit/regress/regress-2056.js

Review URL: https://chromiumcodereview.appspot.com/10006004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoUpdate test262 expectations for 64-bit precision double for ARM and MIPS.
mstarzinger@chromium.org [Thu, 5 Apr 2012 07:59:01 +0000 (07:59 +0000)]
Update test262 expectations for 64-bit precision double for ARM and MIPS.

The two tests (S8.5_A2.1, S8.5_A2.2) fail on ia32 Linux and simulators.
They do pass on ARM and MIPS hardware under Linux, and on the other
supported platforms and architectures.

They are now marked PASS || FAIL_OK.

BUG=
TEST=test262/S8.5_A2.1, test262/S8.5_A2.2

Review URL: https://chromiumcodereview.appspot.com/9959146
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRegression test for large string joins.
mstarzinger@chromium.org [Wed, 4 Apr 2012 14:37:07 +0000 (14:37 +0000)]
Regression test for large string joins.

BUG=none
TEST=cctest/test-strings/AsciiArrayJoin

Review URL: https://chromiumcodereview.appspot.com/9963104
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix presubmit checks after r11223
yurys@chromium.org [Wed, 4 Apr 2012 14:33:03 +0000 (14:33 +0000)]
Fix presubmit checks after r11223

TBR=mnaganov
Review URL: https://chromiumcodereview.appspot.com/9961008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoEnsure default isolate is present in Add/RemoveCallCompletedCallback.
danno@chromium.org [Wed, 4 Apr 2012 14:28:00 +0000 (14:28 +0000)]
Ensure default isolate is present in Add/RemoveCallCompletedCallback.

R=ulan@chromium.org,pliard@chromium.org
BUG=ui_tests don't crash in Chrome

Review URL: https://chromiumcodereview.appspot.com/9979003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix rewriter to not treat throw as an expression.
mstarzinger@chromium.org [Wed, 4 Apr 2012 13:41:05 +0000 (13:41 +0000)]
Fix rewriter to not treat throw as an expression.

Now we can correctly optimize top level code that contains a throw (or
return) as it's last statement.

R=ulan@chromium.org
BUG=v8:2054
TEST=mjsunit/regress/regress-2054

Review URL: https://chromiumcodereview.appspot.com/9969146

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSwitching to a custom itoa implementation reduces serialization time at least by...
yurys@chromium.org [Wed, 4 Apr 2012 13:36:57 +0000 (13:36 +0000)]
Switching to a custom itoa implementation reduces serialization time at least by the factor of 2.
Review URL: https://chromiumcodereview.appspot.com/9950146

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReset function info counters after context disposal in incremental marking step.
ulan@chromium.org [Tue, 3 Apr 2012 17:22:05 +0000 (17:22 +0000)]
Reset function info counters after context disposal in incremental marking step.

R=mstarzinger@chromium.org
BUG=117767,V8:1902
TEST=test/cctest/test-heap/ResetSharedFunctionInfoCountersDuringIncrementalMarking

Review URL: https://chromiumcodereview.appspot.com/9903019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix array boilerplate object transitioning.
mstarzinger@chromium.org [Tue, 3 Apr 2012 16:54:28 +0000 (16:54 +0000)]
Fix array boilerplate object transitioning.

Array literal boilerplate objects can be transitioned while existing
un-transitioned clones are still being populated. This adds a check that
prevents us from performing the same transition twice.

R=danno@chromium.org
BUG=v8:2055
TEST=mjsunit/regress/regress-2055

Review URL: https://chromiumcodereview.appspot.com/9950095

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix stack overflow test failures with no snap.
danno@chromium.org [Tue, 3 Apr 2012 15:54:07 +0000 (15:54 +0000)]
Fix stack overflow test failures with no snap.

R=mstarzinger@chromium.org
BUG=chromium:119429

Review URL: https://chromiumcodereview.appspot.com/9963108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoDon't crash on stack overflow entering the debugger.
danno@chromium.org [Tue, 3 Apr 2012 13:45:56 +0000 (13:45 +0000)]
Don't crash on stack overflow entering the debugger.

R=ager@chromium.org, sgjesse@chromium.org
BUG=chromium:119429
TEST= test/mjsunit/regress/regress-119429.js

Review URL: https://chromiumcodereview.appspot.com/9965101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSwitch regexp strategy for regexps that are just plain
erik.corry@gmail.com [Tue, 3 Apr 2012 12:24:55 +0000 (12:24 +0000)]
Switch regexp strategy for regexps that are just plain
strings with a small alphabet.  We already have code
that handles these regexps well, we were just not always
activating it.
Review URL: https://chromiumcodereview.appspot.com/9959096

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix race condition in test-thread-termination.
mstarzinger@chromium.org [Tue, 3 Apr 2012 10:15:12 +0000 (10:15 +0000)]
Fix race condition in test-thread-termination.

The test case failed to stop the preemption thread before destroying the
isolate which led to a race condition where the isolate was accessed
after it had been destroyed.

R=ulan@chromium.org
BUG=v8:2049
TEST=cctest/test-thread-termination/TerminateMultipleV8ThreadsDefaultIsolate

Review URL: https://chromiumcodereview.appspot.com/9969092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoProperly support shrinking arrays in CopyDictionaryToObjectElements.
danno@chromium.org [Tue, 3 Apr 2012 08:13:59 +0000 (08:13 +0000)]
Properly support shrinking arrays in CopyDictionaryToObjectElements.

R=mstarzinger@chromium.org
BUG=chromium:121407
TEST=test/mjsunit/regress/regress-121407.js

Review URL: https://chromiumcodereview.appspot.com/9968056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMake progress in incremental marking if scavenge is delaying mark-sweep.
ulan@chromium.org [Tue, 3 Apr 2012 07:32:19 +0000 (07:32 +0000)]
Make progress in incremental marking if scavenge is delaying mark-sweep.

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9965054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdding missing SetCC before conditional branch.
danno@chromium.org [Mon, 2 Apr 2012 15:53:38 +0000 (15:53 +0000)]
Adding missing SetCC before conditional branch.

BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9950015
Patch from Rodolph Perfetta <rodolph.perfetta@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoLoosen up the test for boot time memory use on 64 bit.
erik.corry@gmail.com [Mon, 2 Apr 2012 13:29:04 +0000 (13:29 +0000)]
Loosen up the test for boot time memory use on 64 bit.
Review URL: https://chromiumcodereview.appspot.com/9969051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCheck code kind when resetting profiler ticks.
ulan@chromium.org [Mon, 2 Apr 2012 13:27:41 +0000 (13:27 +0000)]
Check code kind when resetting profiler ticks.

BUG=121147
TEST=chromium gpu_tests/WebGLConformanceTests

Review URL: https://chromiumcodereview.appspot.com/9956060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCosmetic (ARM/MIPS): Use FieldMemOperand where appropriate.
erik.corry@gmail.com [Mon, 2 Apr 2012 13:26:05 +0000 (13:26 +0000)]
Cosmetic (ARM/MIPS): Use FieldMemOperand where appropriate.
Review URL: https://chromiumcodereview.appspot.com/9963051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: RegExp: Add support for table-based character class code generation. This...
erik.corry@gmail.com [Mon, 2 Apr 2012 11:27:37 +0000 (11:27 +0000)]
MIPS: RegExp: Add support for table-based character class code generation.   This is a commit of codereview.chromium.org/9968032/ for Daniel Kalmar

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoChange ASSERT(kind() == FUNCTION) to ASSERT_EQ(FUNCTION, kind()).
ulan@chromium.org [Mon, 2 Apr 2012 10:57:17 +0000 (10:57 +0000)]
Change ASSERT(kind() == FUNCTION) to ASSERT_EQ(FUNCTION, kind()).

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9958062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRegexp: Improve the speed that we scan for an initial point where a non-anchored
erikcorry [Mon, 2 Apr 2012 09:38:07 +0000 (09:38 +0000)]
Regexp: Improve the speed that we scan for an initial point where a non-anchored
regexp can match by using a Boyer-Moore-like table.  This is done by identifying
non-greedy non-capturing loops in the nodes that eat any character one at a time.
For example in the middle of the regexp /foo[\s\S]*?bar/ we find such a loop.
There is also such a loop implicitly inserted at the start of any non-anchored
regexp.

When we have found such a loop we look ahead in the nodes to find the set of
characters that can come at given distances.  For example for the regexp
/.?foo/ we know that there are at least 3 characters ahead of us, and the sets
of characters that can occur are [any, [f, o], [o]].  We find a range in the
lookahead info where the set of characters is reasonably constrained.  In our
example this is from index 1 to 2 (0 is not constrained).  We can now look 3
characters ahead and if we don't find one of [f, o] (the union of [f, o] and
[o]) then we can skip forwards by the range size (in this case 2).

For Unicode input strings we do the same, but modulo 128.

We also look at the first string fed to the regexp and use that to get a hint
of the character frequencies in the inputs.  This affects the assessment of
whether the set of characters is 'reasonably constrained'.

We still have the old lookahead mechanism, which uses a wide load of multiple
characters followed by a mask and compare to determine whether a match is
possible at this point.
Review URL: http://codereview.chromium.org/9965010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReduce initial boot-up memory use. This is an other attempt at what
erik.corry@gmail.com [Mon, 2 Apr 2012 08:32:31 +0000 (08:32 +0000)]
Reduce initial boot-up memory use.  This is an other attempt at what
http://codereview.chromium.org/9179012 was trying to achieve.  This
time I am going for 80% of the benefit with around 5% of the complexity.

It works by reducing the size of the first page in each space.  Unlike the
previous change there is no attempt to grow pages, we just allocate more
full-sized pages when we need more memory.  For this reason the first pages are
not quite as small (compare
http://codereview.chromium.org/9179012/diff/1/src/snapshot.h with the changes
in spaces.cc in this cl):  We want to be able to do a little bit of allocation
before we have to add a full-sized page to the space.
Review URL: https://chromiumcodereview.appspot.com/9950048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix hidden properties to ignore [[Extensible]].
mstarzinger@chromium.org [Mon, 2 Apr 2012 08:26:30 +0000 (08:26 +0000)]
Fix hidden properties to ignore [[Extensible]].

The [[Extensible]] property prevented the very first hidden property
from being added. If any hidden property was added to the object before
preventing extension, adding subsequent hidden properties would have
succeed however.

R=svenpanne@chromium.org
BUG=v8:2034
TEST=mjsunit/regress/regress-2034

Review URL: https://chromiumcodereview.appspot.com/9844025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix broken build on Windows due to r11198.
danno@chromium.org [Fri, 30 Mar 2012 20:48:32 +0000 (20:48 +0000)]
Fix broken build on Windows due to r11198.

This also fixes a style issue in lazy-instance.h.

Review URL: https://chromiumcodereview.appspot.com/9960006
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd support for Mac OS X 64bit builds with GYP
jkummerow@chromium.org [Fri, 30 Mar 2012 15:01:11 +0000 (15:01 +0000)]
Add support for Mac OS X 64bit builds with GYP

Note that in order to build for 64bits mode, you'll have
to specify the target architecture explicitely, the default
is still 32bits for Mac OS X.

Example with make and gcc:

$ export GYP_GENERATORS=make
$ make dependencies
$ make -j 8 library=shared x64.release

Example with make and clang:

$ export GYP_GENERATORS=make
$ export CC=/usr/bin/clang
$ export CXX=/usr/bin/clang++
$ export GYP_DEFINES="clang=1"
$ make dependencies
$ make -j 8 library=shared x64.release

Example with xcode:

$ export GYP_GENERATORS=xcode
$ build/gyp_v8 -Dtarget_arch=x64
$ xcodebuild -project build/all.xcodeproj -configuration Release

Contributed by Filipe David Manana <fdmanana@gmail.com>

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9808065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix performance regressions due to lazy initialization.
danno@chromium.org [Fri, 30 Mar 2012 14:30:46 +0000 (14:30 +0000)]
Fix performance regressions due to lazy initialization.

This CL:
- Adds a new trait parameter to LazyInstance to let it initialize the instance
  without paying the cost of atomic operations (which are expensive on Mac).
  This only works for users who don't care about thread-safety and this is now
the default initialization trait used by LazyInstance in v8.

- Reverts the changes that were made in r11010 in isolate.{cc,h}. That lets
  Isolate's accessors be as cheap as they were before (but adds one static initializer).

- Adds OS::PostSetup() used to initialize the math functions which depend on CPU features.
That lets the math functions get rid of CallOnce().

BUG=118686

Review URL: https://chromiumcodereview.appspot.com/9873023
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix scoping of v8::HandleScope to prevent use-after-dispose
danno@chromium.org [Fri, 30 Mar 2012 13:49:40 +0000 (13:49 +0000)]
Fix scoping of v8::HandleScope to prevent use-after-dispose

R=jkummerow@chromium.org
TEST=shell_g doesn't crash

Review URL: https://chromiumcodereview.appspot.com/9959014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoEnsure that arguments object is materialized when deoptimizing from inlined function.
vegorov@chromium.org [Fri, 30 Mar 2012 13:22:39 +0000 (13:22 +0000)]
Ensure that arguments object is materialized when deoptimizing from inlined function.

Lithium translation rebuilds hydrogen environments from scratch so we have to ensure that arguments object is correctly bound on function entry otherwise deoptimization will not materialize it.

This fix was implemented as part of r11109 and then reverted.

R=danno@chromium.org
BUG=v8:2045
TEST=test/mjsunit/regress/regress-2045.js

Review URL: https://chromiumcodereview.appspot.com/9963008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.10.1.
jkummerow@chromium.org [Fri, 30 Mar 2012 08:35:30 +0000 (08:35 +0000)]
Prepare push to trunk.  Now working on version 3.10.1.

R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9966002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix missing static cast on Windows.
erik.corry@gmail.com [Fri, 30 Mar 2012 07:55:16 +0000 (07:55 +0000)]
Fix missing static cast on Windows.
Review URL: https://chromiumcodereview.appspot.com/9963006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRegExp: Add support for table-based character class
erik.corry@gmail.com [Fri, 30 Mar 2012 07:43:48 +0000 (07:43 +0000)]
RegExp: Add support for table-based character class
code generation.  This is performance neutral for
all our tests, but a factor 6 faster for the Unicode
based regexp in the new test (and much more compact
code).
Review URL: https://chromiumcodereview.appspot.com/9854020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix presubmit check.
loislo@chromium.org [Thu, 29 Mar 2012 14:50:26 +0000 (14:50 +0000)]
Fix presubmit check.

BUG=none
TEST=none
TBR=mnaganov

Review URL: https://chromiumcodereview.appspot.com/9921014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCurrent schema of calculation max_snapshot_js_object_id is not always correct.
loislo@chromium.org [Thu, 29 Mar 2012 14:18:11 +0000 (14:18 +0000)]
Current schema of calculation max_snapshot_js_object_id is not always correct.
As the result the test is flaky.

BUG=v8/2042
TEST=HeapEntryIdsAndGC
R=mnaganov

Review URL: https://chromiumcodereview.appspot.com/9918005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix offset computation for EmitProfilingCounterReset in x64.
ulan@chromium.org [Thu, 29 Mar 2012 14:04:41 +0000 (14:04 +0000)]
Fix offset computation for EmitProfilingCounterReset in x64.

R=jkummerow@chromium.org
BUG=v8:2039

Review URL: https://chromiumcodereview.appspot.com/9903015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoUn-bork v8.gyp after r11010
jkummerow@chromium.org [Thu, 29 Mar 2012 14:01:21 +0000 (14:01 +0000)]
Un-bork v8.gyp after r11010

TEST=no more warning "Missing input file tools\gyp\..\..\src\src\list-inl.h"

Review URL: https://chromiumcodereview.appspot.com/9924006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoValgrind cleanliness, part 5: Delete extensions on exit.
svenpanne@chromium.org [Thu, 29 Mar 2012 09:45:46 +0000 (09:45 +0000)]
Valgrind cleanliness, part 5: Delete extensions on exit.

This fixes 4 leaks, returning 196 bytes of lost memory.

Review URL: https://chromiumcodereview.appspot.com/9864034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAllow a commit message to be specified to merge-to-branch.sh
danno@chromium.org [Thu, 29 Mar 2012 07:01:36 +0000 (07:01 +0000)]
Allow a commit message to be specified to merge-to-branch.sh

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9844015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd missing regression test for r11173.
mstarzinger@chromium.org [Wed, 28 Mar 2012 15:17:14 +0000 (15:17 +0000)]
Add missing regression test for r11173.

R=svenpanne@chromium.org
BUG=chromium:12009
TEST=mjsunit/regress/regress-120099

Review URL: https://chromiumcodereview.appspot.com/9873027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoValgrind cleanliness, part 2: Delete lithium operand caches on exit.
svenpanne@chromium.org [Wed, 28 Mar 2012 13:12:00 +0000 (13:12 +0000)]
Valgrind cleanliness, part 2: Delete lithium operand caches on exit.

This fixes 5 leaks, returning 1.6kB of lost memory.

Shocking news: I've actually introduced a 2nd-order macro for myself. I guess
I've been assimilated... ;-)

Review URL: https://chromiumcodereview.appspot.com/9860028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: First implementation of fast path for instantiation of array literals composed...
svenpanne@chromium.org [Wed, 28 Mar 2012 12:44:04 +0000 (12:44 +0000)]
MIPS: First implementation of fast path for instantiation of array literals composed of doubles.

Port r11114 (d8c975164).

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9834044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoHard-code GYP_GENERATORS=make into top-level Makefile
jkummerow@chromium.org [Wed, 28 Mar 2012 12:42:49 +0000 (12:42 +0000)]
Hard-code GYP_GENERATORS=make into top-level Makefile

removing the need to manually specify this on platforms where it's not the default (Mac).

Review URL: https://chromiumcodereview.appspot.com/9877002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReset the optimization_disabled flag in function info after context disposal.
ulan@chromium.org [Wed, 28 Mar 2012 09:47:53 +0000 (09:47 +0000)]
Reset the optimization_disabled flag in function info after context disposal.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9873022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix store IC writability check in strict mode.
mstarzinger@chromium.org [Wed, 28 Mar 2012 09:34:52 +0000 (09:34 +0000)]
Fix store IC writability check in strict mode.

The store ICs should only check writability attributes for actual
properties and not for map transitions.

R=jkummerow@chromium.org,svenpanne@chromium.org
BUG=chromium:120099
TEST=mjsunit/regress/regress-120099

Review URL: https://chromiumcodereview.appspot.com/9874015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix test harness for Test262 to not use symlinks.
mstarzinger@chromium.org [Wed, 28 Mar 2012 09:33:19 +0000 (09:33 +0000)]
Fix test harness for Test262 to not use symlinks.

This is necessary for the --download-data option to work on Windows
where we do not have symlinks available. Note that we still have no
automatic way of bumping the existing Test262 revision without deleting
the data directory manually.

R=jkummerow@chromium.org
TEST=test262

Review URL: https://chromiumcodereview.appspot.com/9866046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd missing cast in d8
jkummerow@chromium.org [Tue, 27 Mar 2012 12:46:44 +0000 (12:46 +0000)]
Add missing cast in d8

Review URL: https://chromiumcodereview.appspot.com/9866035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoResynchronize timers if the Windows system time was changed.
ulan@chromium.org [Tue, 27 Mar 2012 12:34:32 +0000 (12:34 +0000)]
Resynchronize timers if the Windows system time was changed.

R=jkummerow@chromium.org
BUG=119815
TEST=Change the system time one day back: (new Date()) will return incorrect time.

Review URL: https://chromiumcodereview.appspot.com/9865021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoProfiler experiments: remove "stable on startup" rule
jkummerow@chromium.org [Tue, 27 Mar 2012 12:26:58 +0000 (12:26 +0000)]
Profiler experiments: remove "stable on startup" rule

Review URL: https://chromiumcodereview.appspot.com/9864030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agofix for TestHeapEntryIdsAndGC
loislo@chromium.org [Tue, 27 Mar 2012 12:25:05 +0000 (12:25 +0000)]
fix for TestHeapEntryIdsAndGC
BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9864035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMove profiler_ticks to Code object, don't walk the stack when patching ICs
jkummerow@chromium.org [Tue, 27 Mar 2012 12:19:50 +0000 (12:19 +0000)]
Move profiler_ticks to Code object, don't walk the stack when patching ICs

Review URL: https://chromiumcodereview.appspot.com/9866030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoThis value is required for showing the heap snapshot delta in Summary view of DevTool...
loislo@chromium.org [Tue, 27 Mar 2012 11:54:47 +0000 (11:54 +0000)]
This value is required for showing the heap snapshot delta in Summary view of DevTools.Profiler.
At the moment it is evaluating on the front-end side and this is cost us 2 * (load time + parse time + traverse via snapshot) because I need this value for two previous snapshots.

BUG=none
TEST=test-heap-profiler

Review URL: https://chromiumcodereview.appspot.com/9858016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoWhile building arm hardfp chrome browser, remove "-mfloat-abi=hard" from host compile...
jkummerow@chromium.org [Tue, 27 Mar 2012 11:28:19 +0000 (11:28 +0000)]
While building arm hardfp chrome browser, remove "-mfloat-abi=hard" from host compiler cflags, which causes building chrome browser failure.

BUG=https://code.google.com/p/chrome-os-partner/issues/detail?id=8539
TEST=manually build chrome browser use "hard"

Review URL: https://chromiumcodereview.appspot.com/9810036
Patch from Han Shen <shenhan@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPort count-based profiler to x64
jkummerow@chromium.org [Tue, 27 Mar 2012 11:21:27 +0000 (11:21 +0000)]
Port count-based profiler to x64

Review URL: https://chromiumcodereview.appspot.com/9845019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRevert "This value is required for showing the heap snapshot delta in Summary view...
loislo@chromium.org [Tue, 27 Mar 2012 11:12:31 +0000 (11:12 +0000)]
Revert "This value is required for showing the heap snapshot delta in Summary view of DevTools.Profiler."

This reverts commit 634864d65ebe820a967f6162d8e226cf4a73e51a.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9861018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix undeclared variable in d8 debugger.
fschneider@chromium.org [Tue, 27 Mar 2012 10:55:34 +0000 (10:55 +0000)]
Fix undeclared variable in d8 debugger.

BUG=v8:2033
TEST='list' command works in d8 debugger.
Review URL: https://chromiumcodereview.appspot.com/9861017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoValgrind cleanliness, part 3: Delete elements accessors on exit.
svenpanne@chromium.org [Tue, 27 Mar 2012 10:51:13 +0000 (10:51 +0000)]
Valgrind cleanliness, part 3: Delete elements accessors on exit.

This fixes 15 leaks, returning 132 bytes of lost memory.

As an additional bonus, elements accessors initialization has bee simplified a bit.

Review URL: https://chromiumcodereview.appspot.com/9836109

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11154 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix polymorphic load on named fields.
mstarzinger@chromium.org [Tue, 27 Mar 2012 10:42:38 +0000 (10:42 +0000)]
Fix polymorphic load on named fields.

This fixes polymorphic loads to correctly compare in-object offsets
instead of indices, because indices might coincide even though the
actual slot is different because of different instance sizes.

R=danno@chromium.org
BUG=v8:2030
TEST=mjsunit/regress/regress-2030,mjsunit/mirror-array

Review URL: https://chromiumcodereview.appspot.com/9864028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoValgrind cleanliness, part 4: Delete CounterMap on exit.
svenpanne@chromium.org [Tue, 27 Mar 2012 09:50:48 +0000 (09:50 +0000)]
Valgrind cleanliness, part 4: Delete CounterMap on exit.

This fixes 2 leaks, returning 112 bytes of lost memory.

As an additional bonus, a useless check has been removed (no need to check for
NULL before a delete).

Review URL: https://chromiumcodereview.appspot.com/9864029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix broken test.
erik.corry@gmail.com [Tue, 27 Mar 2012 09:10:58 +0000 (09:10 +0000)]
Fix broken test.
Review URL: https://chromiumcodereview.appspot.com/9865019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoThis value is required for showing the heap snapshot delta in Summary view of DevTool...
loislo@chromium.org [Tue, 27 Mar 2012 08:52:00 +0000 (08:52 +0000)]
This value is required for showing the heap snapshot delta in Summary view of DevTools.Profiler.
At the moment it is evaluating on the front-end side and this is cost us 2 * (load time + parse time + traverse via snapshot) because I need this value for two previous snapshots.

BUG=none
TEST=test-heap-profiler

Review URL: https://chromiumcodereview.appspot.com/9858016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemove dependency on _mkgmtime to determine local timezone offset
ulan@chromium.org [Tue, 27 Mar 2012 08:46:32 +0000 (08:46 +0000)]
Remove dependency on _mkgmtime to determine local timezone offset

BUGS=v8:1386
TEST=

Review URL: https://chromiumcodereview.appspot.com/9600018
Patch from Jonathan Liu <net147@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix edge case for case independent regexp character classes.
erik.corry@gmail.com [Tue, 27 Mar 2012 08:42:37 +0000 (08:42 +0000)]
Fix edge case for case independent regexp character classes.
http://code.google.com/p/v8/issues/detail?id=2032
Review URL: https://chromiumcodereview.appspot.com/9860029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoValgrind cleanliness, part 1: Delete current isolate on exit.
svenpanne@chromium.org [Tue, 27 Mar 2012 07:37:06 +0000 (07:37 +0000)]
Valgrind cleanliness, part 1: Delete current isolate on exit.

Currently we leak 140kB from 80 allocation sites when we evaluate a simple
"print(1+2)" in d8 and exit. This might not be a real problem in Chrome because
most of the time the whole process containing v8 vanishes, but it can hide real
leaks in a sea of false positives. Therefore, this CL and a few subsequent ones
clean this up a bit.

This simple CL alone fixes 45 leaks, leaving only 35 with a net loss of 2192
bytes (on ia32).

Review URL: https://chromiumcodereview.appspot.com/9791016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoComplete switch to SnapshotObjectId.
loislo@chromium.org [Mon, 26 Mar 2012 13:47:37 +0000 (13:47 +0000)]
Complete switch to SnapshotObjectId.

BUG=none
TEST=test-heap-profiler

Review URL: https://chromiumcodereview.appspot.com/9858010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoProperly AdjustAmountOfExternalAllocatedMemory() in d8
jkummerow@chromium.org [Mon, 26 Mar 2012 13:24:20 +0000 (13:24 +0000)]
Properly AdjustAmountOfExternalAllocatedMemory() in d8

This is related to v8 issue 2022 but doesn't fix it as this patch only affects d8, while there is a related bug in the WebKit V8 bindings too.

Review URL: https://chromiumcodereview.appspot.com/9835055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReset function info counters after context disposal.
ulan@chromium.org [Mon, 26 Mar 2012 13:08:08 +0000 (13:08 +0000)]
Reset function info counters after context disposal.

R=jkummerow@chromium.org
BUG=117767,V8:1902

Review URL: https://chromiumcodereview.appspot.com/9836091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11143 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSupport reverse patching in merge-to-branch.sh
danno@chromium.org [Mon, 26 Mar 2012 11:35:17 +0000 (11:35 +0000)]
Support reverse patching in merge-to-branch.sh

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9839056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Port count-based profiler
jkummerow@chromium.org [Mon, 26 Mar 2012 11:29:44 +0000 (11:29 +0000)]
MIPS: Port count-based profiler

Port r11120 (548ba49bd).

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9835083
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix the return type of the date set methods.
ulan@chromium.org [Mon, 26 Mar 2012 10:13:03 +0000 (10:13 +0000)]
Fix the return type of the date set methods.

Date set methods (setMinutes, setHours, etc.) should return the time value as a number instead of JSDate.

R=jkummerow@chromium.org
TEST=test/mjsunit/regress/regress-2027.js

Review URL: https://chromiumcodereview.appspot.com/9809010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Improve polymorphic loads on single slots.
mstarzinger@chromium.org [Mon, 26 Mar 2012 09:41:53 +0000 (09:41 +0000)]
MIPS: Improve polymorphic loads on single slots.

Port r11132 (91bdad6108).

Original commit message:

If all property lookups for a polymorphic load actually result in the
same field index under all maps, we can actually emit a monomorphic load
that is guarded by a map check that verifies that the actual map is in
the set of handled maps. This also allows GVN to get rid of redundant
such map checks.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9852007
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix missing write barrier in CopyObjectToObjectElements.
jkummerow@chromium.org [Sun, 25 Mar 2012 15:16:06 +0000 (15:16 +0000)]
Fix missing write barrier in CopyObjectToObjectElements.

Passing the write barrier mode as a parameter does not make sense, as the elements kind specific copiers know best whether a write barrier is needed or not.

BUG=119926
TEST=mjsunit/regress/regress-crbug-119926
R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9808111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCheck double array bounds in HasElementImpl.
danno@chromium.org [Sun, 25 Mar 2012 14:21:51 +0000 (14:21 +0000)]
Check double array bounds in HasElementImpl.

R=jkummerow@chromium.org
BUG=chromium:119925
TEST=test/mjsunit/regress/regress-119925.js

Review URL: https://chromiumcodereview.appspot.com/9808110

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImprove polymorphic loads on single slots.
mstarzinger@chromium.org [Fri, 23 Mar 2012 16:37:54 +0000 (16:37 +0000)]
Improve polymorphic loads on single slots.

If all property lookups for a polymorphic load actually result in the
same field index under all maps, we can actually emit a monomorphic load
that is guarded by a map check that verifies that the actual map is in
the set of handled maps. This also allows GVN to get rid of redundant
such map checks.

R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9616014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRevert arguments access support for inlined functions (r11109,r11118).
vegorov@chromium.org [Fri, 23 Mar 2012 15:39:34 +0000 (15:39 +0000)]
Revert arguments access support for inlined functions (r11109,r11118).

We are inserting HPushArgument instructions after HEnterInlined based on the environment at the point of the first arguments access. Which might create use before def if there are redundant phis in the environment.
Review URL: https://chromiumcodereview.appspot.com/9837041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix use of uninitialized values in the runtime profiler.
fschneider@chromium.org [Fri, 23 Mar 2012 15:26:04 +0000 (15:26 +0000)]
Fix use of uninitialized values in the runtime profiler.
Review URL: https://chromiumcodereview.appspot.com/9835054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.10.0.
danno@chromium.org [Fri, 23 Mar 2012 15:08:45 +0000 (15:08 +0000)]
Prepare push to trunk.  Now working on version 3.10.0.

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9845013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix compile error introduced by r11122.
ulan@chromium.org [Fri, 23 Mar 2012 13:52:15 +0000 (13:52 +0000)]
Fix compile error introduced by r11122.

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9838054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAge inline caches after context disposal.
ulan@chromium.org [Fri, 23 Mar 2012 13:33:11 +0000 (13:33 +0000)]
Age inline caches after context disposal.

Review URL: https://chromiumcodereview.appspot.com/9837005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix deopt condition in ForIn on x64
jkummerow@chromium.org [Fri, 23 Mar 2012 12:20:03 +0000 (12:20 +0000)]
Fix deopt condition in ForIn on x64

TEST=no more deopts in string-fasta

Review URL: https://chromiumcodereview.appspot.com/9836032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00