Properly seed the RNG for cctest/test-types.

This was broken since r21879, as the RandomNumberGenerator constructor
does no longer look at FLAG_random_seed implicitly.

TEST=cctest/test-types
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Remove a bunch of Isolate::UncheckedCurrent calls

The callbacks are per isolate, so we shouldn't get the isolate implicitly
from TLS. Also, we shouldn't allow calls to these methods prior to
initializing the respective isolate (and silently ignore them).

Esp. add a per-isolate API to set the stats counter callbacks and
make it possible to set the stats counter callback after the isolate
was touched.

Embedders should use e.g. isolate->SetCounterFunction(callback) instead
of v8::V8::SetCounterFunction(callback).

BUG=none
R=svenpanne@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Availability of sprintf_s is a C standard library thing, not a compiler thing.

Our clang/win build currently uses MSVS's C library, so it doesn't have
snprintf but it does have sprintf_s.

BUG=chromium:82385
LOG=n
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Wrap captureStackTrace in a try-catch when constructing an error.

TBR=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Add missing include to timers

Library function close() needs unistd.h header included.

BUG=
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Parser cleanup: Cached data cannot contain errors (removed dead code)

We no longer store the errors in cached data (see Parser::ParseProgram()) and
storing them is an unnecessary optimization. In addition, the code which
extracts errors from cached data is wrong, since it stores the result of
BuildArgs (in ReportMessageAt) and then deletes it.

R=rossberg@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
ARM64: optimize fullcodegen pushes

R=bmeurer@chromium.org, ulan@chromium.org

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Avoid brittle use of .bind in Promise.all

R=yangguo@chromium.org
BUG=v8:3420
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
More OStreamsUse OStreams more often.

This is a mostly mechanical CL (more than 90% Emacs macros and
query-replace-regexp) moving FILE*/StringStream*-based APIs to
OStream-based APIs. There are a few places where this had to stop,
otherwise the CL would be even bigger, but this can easily and
incrementally cleaned up later.

R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix compilation with clang after r22208

R=verwaest@chromium.org
LOG=n
BUG=none

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Make MSVC happy again.

TBR=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Merge commit '4288e408be44d79a04b7cb02bc3a23b26619eced' into mips64-gbl
MIPS64: More OStreamsUse OStreams more often.

This is a mostly mechanical CL (more than 90% Emacs macros and
query-replace-regexp) moving FILE*/StringStream*-based APIs to
OStream-based APIs. There are a few places where this had to stop,
otherwise the CL would be even bigger, but this can easily and
incrementally cleaned up later.

Port r22232 (f837b91)