Commit Graph

144 Commits

Author SHA1 Message Date
yangguo@chromium.org
5afa1a0d3a Avoid bool to Oddball conversions by being lazy.
R=svenpanne@chromium.org
BUG=v8:2491

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-07 16:22:19 +00:00
mvstanton@chromium.org
a2bd4706c2 Make sure that on x86 we don't generate SSE2 code in the snapshot.
BUG=

Review URL: https://codereview.chromium.org/12391033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-06 16:15:01 +00:00
svenpanne@chromium.org
61a2c53d09 Track Hydrogen statistics on a per-Isolate basis
This is basically the same fix as the one for --trace-hydrogen, but now for
--hydrogen-stats. Removed a few train wrecks on the way.

Review URL: https://codereview.chromium.org/12481015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-06 10:49:34 +00:00
svenpanne@chromium.org
0e3ed17ea4 Separate output files for --trace-hydrogen.
The output filenames have now the form "hydrogen-<ProcessId>-<IsolateId>.cfg".
Minor cleanup on the way.

Note that we have a similar bug regarding statistics, but this will be handled
in a separate CL.

BUG=v8:2563

Review URL: https://codereview.chromium.org/12450003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-06 07:25:46 +00:00
yangguo@chromium.org
03375a68d7 Details wrt parallel recompilation.
This includes:
- actually release handles kept by compilation info when compilation completes.
- do not use parallel recompilation on single core CPUs.
- artificially delay parallel recompilation for debugging.
- fix outdated assertions wrt optimization status.
- add "parallel" option to %OptimizeFunctionOnNextCall.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13827 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-05 16:22:08 +00:00
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12210083

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
hpayer@chromium.org
a2b216c47f Turn off parallel and concurrent sweeping on system with just one processor/core.
BUG=

Review URL: https://codereview.chromium.org/12380020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 15:18:15 +00:00
svenpanne@chromium.org
bfaf38d2fd Miscellaneous profile-driven Isolate plumbing.
While doing this, it became clear that quite a few functions should not be
static and should better live in various classes as instance methods, but I'll
leave this for a later CL.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12314152

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:45:59 +00:00
svenpanne@chromium.org
c26d100b10 Avoid TLS accesses in Object::Lookup and Object::GetPrototype.
Both methods were among the top causes for TLS accesses.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12319144

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 13:22:29 +00:00
hpayer@chromium.org
ddeaa4a3f2 Added system thread manager class.
BUG=

Review URL: https://codereview.chromium.org/12207207

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 12:55:55 +00:00
svenpanne@chromium.org
6e829ed485 Added Isolate parameter to CodeStub::GetCode().
According to gprof, this was the #1 cause for TLS access during an Octane run.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12317141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 12:33:24 +00:00
svenpanne@chromium.org
fb6776e84a Made Isolate a mandatory parameter for everything Handle-related.
Unified parameter order of CreateHandle with the rest of v8 on the way. A few
Isolate::Current()s had to be introduced, which is not nice, and not every place
will win a beauty contest, but we can clean this up later easily in smaller steps.

Review URL: https://codereview.chromium.org/12300018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 14:46:09 +00:00
danno@chromium.org
cbe088fffc Fix bugs in generating and printing of Crankshaft stubs
Review URL: https://codereview.chromium.org/12317044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13716 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-25 14:03:09 +00:00
mstarzinger@chromium.org
fa94a23ea8 Cleanup code-stub interface descriptor initialization.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/12302017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-19 09:42:00 +00:00
svenpanne@chromium.org
71a26c928a Make the Isolate parameter mandatory for internal HandleScopes.
Improved Frames and their iterators on the way, too.

BUG=v8:2487

Review URL: https://codereview.chromium.org/12254007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-15 09:27:10 +00:00
svenpanne@chromium.org
9eec096914 Fixed a memory leak in v8 and another one in d8.
Cleaned up a few tests on the way. This CL brings us down to 5 leaks for d8.

Review URL: https://codereview.chromium.org/12223089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-12 11:57:51 +00:00
danno@chromium.org
4c052815df Support pass-through of stub caller arguments
Review URL: https://codereview.chromium.org/12093089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-05 08:09:32 +00:00
hpayer@chromium.org
7fe9f3b05c Added parallel marking threads.
BUG=

Review URL: https://codereview.chromium.org/12047044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-31 14:23:36 +00:00
hpayer@chromium.org
ba8a1dca66 Initialize sweeper thread array with NULL.
BUG=

Review URL: https://codereview.chromium.org/12079076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-30 15:50:09 +00:00
hpayer@chromium.org
44caabb1cd Parallel and concurrent sweeping.
Sweep old pointer space and old data space concurrently to the main mutator thread and in parallel.

BUG=

Review URL: https://codereview.chromium.org/11782028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-30 12:19:32 +00:00
danno@chromium.org
80157b61a8 Fix Mac problem with stubs initialization
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/12096040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-29 15:28:05 +00:00
svenpanne@chromium.org
3d3c2711eb Fixed non-snapshot builds.
TBR=danno@chromium.org

Review URL: https://codereview.chromium.org/12093041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-29 12:50:42 +00:00
danno@chromium.org
a6bc16b6f3 Add StubFailureTrampolineFrames
In preparation of supporting stubs that deopt and then need to push their
register-based parameters to an arguments area on the stack that gets properly
collected, add StubFailureTrampolineFrames to hold those parameters.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-29 09:12:20 +00:00
yangguo@chromium.org
3c22524119 Avoid handle dereference during graph optimization.
With parallel recompilation enabled, objects made accessible by handles may
have changed between graph construction and graph optimization. Therefore
we must not assume that information on those objects remain the same between
those two phases. To police this, we forbid handle dereferencing during
graph optimization.
Exceptions to this rule are:
 - Dereferencing the handle to obtain the raw location of the object. This
   is safe since parallel recompilation acquires RelocationLock
 - Some places that dereference the handle for a type check. These are checked
   to be safe on a case-by-case basis.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13475 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-23 13:52:00 +00:00
yangguo@chromium.org
284a28e797 Temporarily disable deferred stack trace formatting.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-18 13:05:03 +00:00
svenpanne@chromium.org
fab9a39d9d Make the Isolate parameter mandatory in Locker and Unlocker classes.
Note that leaving out the Isolate parameter previously had a very special
meaning, namely "use the *default* Isolate", i.e. the one magically created at
program initialization time. All other API entries use the meaning "current
Isolate", which is different in a multi-threaded setting and confusing.

Temporarily disabled deprecations until Chrome is ready.

BUG=v8:2487

Review URL: https://codereview.chromium.org/11970009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13419 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-18 07:20:17 +00:00
svenpanne@chromium.org
b5e4485a34 Add some runtime checks to MayNamedAccess
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11877027
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-16 08:54:04 +00:00
yangguo@chromium.org
eadcc1c10c Reland r13188, r13194, r13256 (Deferred formatting of error stack trace during GC).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-14 13:19:27 +00:00
svenpanne@chromium.org
1ea15e5ad2 Make v8 handle OOM during Heap construction more gracefully.
Review URL: https://codereview.chromium.org/11824064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-10 15:53:11 +00:00
yangguo@chromium.org
e41c17084f Continues Latin-1 support. All tests pass with ENABLE_LATIN_1 flag.
R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11818025
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-09 15:47:53 +00:00
jkummerow@chromium.org
aee9febccc Some more instrumentation to narrow down Failure leaks.
The basic idea is to tag OOM-Failure objects with an ID indicating where they were created. This requires changes to equality comparisons.

Note to MIPS folks: I'm planning to revert this CL in a couple of days, so feel free to skip porting the platform-specific changes.

BUG=chromium:156010

Review URL: https://codereview.chromium.org/11818023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-09 12:29:06 +00:00
yangguo@chromium.org
bccef0c712 Reland r13275 and 13276 (Remove most uses of StringInputBuffer).
R=dcarney@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11727003
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-31 11:13:50 +00:00
yangguo@chromium.org
2f821f1ed9 Revert r13188, r13194, r13256 (Deferred formatting of error stack trace during GC).
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-27 13:12:27 +00:00
yangguo@chromium.org
121f3f6020 Revert r13275 and 13276 (Remove most uses of StringInputBuffer).
This is due to test failures in test-mark-compact/BootUpMemoryUse.

R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-27 10:03:17 +00:00
yangguo@chromium.org
7f074acd8d Remove most uses of StringInputBuffer
R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11638037
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-24 08:29:48 +00:00
danno@chromium.org
1f4b4625ff Re-land Crankshaft-generated KeyedLoad stubs.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-18 16:25:45 +00:00
yangguo@chromium.org
19a6575ea3 Rename LookupSymbol calls to use Utf8 or OneByte in names.
R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11597007
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-17 15:56:16 +00:00
rossberg@chromium.org
9fc844b760 V8_Fatal now prints C++ stack trace in debug mode.
Currently only supported on Linux. When compiled with GCC, also demangles C++ identifier names.

Should make debugging those flaky crashes on buildbots easier... :)

R=mstarzinger@chromium.org,ulan@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11577019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-14 14:27:06 +00:00
yangguo@chromium.org
e24b98312b Revert r13218 due to windows test failures.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-13 17:21:15 +00:00
yangguo@chromium.org
4cd41edcd9 Add methods to allow resuming execution after calling TerminateExecution().
Two new methods are added to allow embedders to determine that execution
should be resumed at a particular point in the stack without being forced
to unwind all JS frames.

* V8::ResumeExecution() -- When execution is terminated via a call to
  V8::TerminateExecution(), this method can be called to clear the
  termination exception so that the engine can continue to be used.

* TryCatch::HasTerminated() -- When a TryCatch has caught a termination
  exception, HasTerminated() will return true to indicate it is valid to
  call V8::ResumeExecution() if desired.

A test case is added to cctest/test-thread-termination.cc.

BUG=v8:2361

Patch from Andrew Paprocki <andrew@ishiboo.com>.

Review URL: https://chromiumcodereview.appspot.com/11142013
Patch from Andrew Paprocki <andrew@ishiboo.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-13 16:38:49 +00:00
yangguo@chromium.org
72dfb27909 Fire 'stack' getter of error objects after GC.
BUG=v8:2340

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-11 10:14:01 +00:00
danno@chromium.org
64fc1f99cb Revert 13157, 13145 and 13140: Crankshaft code stubs.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11498006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-10 11:09:12 +00:00
danno@chromium.org
84f2454eac Fix isolate bug introduced by generated code stubs
Review URL: https://codereview.chromium.org/11441013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-05 16:16:32 +00:00
danno@chromium.org
f19959cd22 Enable stub generation using Hydrogen/Lithium (again)
This initial implementation generates only KeyedLoadICs using the new Hydrogen stub infrastructure.

Committed: https://code.google.com/p/v8/source/detail?r=13105

Committed: https://code.google.com/p/v8/source/detail?r=13117

Review URL: https://codereview.chromium.org/10701054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-05 11:04:10 +00:00
yangguo@chromium.org
e6d4b7709f Remove some dead code.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-04 15:30:22 +00:00
mstarzinger@chromium.org
b21cf0208f Fix external exceptions in external try-catch handlers.
This tries to propagate exceptions which are externally thrown into
external try-catch handlers before scheduling them. This also allows
embedders to nest external try-catch handlers.

This just relands r11834.

R=svenpanne@chromium.org
BUG=v8:2166
TEST=cctest/test-api/TryCatchNested

Review URL: https://codereview.chromium.org/11299329

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-04 10:45:59 +00:00
peter.rybin@gmail.com
be4418bae0 Issue 2429, core implementation and the protocol change
Review URL: https://codereview.chromium.org/11421100

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-03 21:47:39 +00:00
danno@chromium.org
66f6a8182c Revert 13117: "Enable stub generation using Hydrogen/Lithium (again)"
TBR=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11415261

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-03 17:16:51 +00:00
danno@chromium.org
78b09625d5 Enable stub generation using Hydrogen/Lithium (again)
This initial implementation generates only KeyedLoadICs using the new Hydrogen stub infrastructure.

Committed: https://code.google.com/p/v8/source/detail?r=13105

Review URL: https://codereview.chromium.org/10701054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-03 15:51:05 +00:00
danno@chromium.org
0a3bcc8c05 Revert 13105: "Enable stub generation using Hydrogen/Lithium."
TBR=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11414262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-30 17:45:45 +00:00