Revamp v8_optimized_debug options

This patch changes the definition of v8_optimized_debug==1 to match the release-mode compiler optimization settings (generally, going from -O1 to -O3 on Linux, similar switches for Mac/Win). This produces a minor speed up on Linux, but significant speedups on Mac and Win. This may make it much harder to debug, though.

It also adds a v8_optimized_debug==2 that, in addition to the compiler optimizations, undef's DEBUG and defines DEBUG. This leaves V8_ENABLE_CHECKS alone (so that the assertions are still enabled), but otherwise basically matches a release mode build.

Builds with v8_optimized_debug==2 roughly match a Release mode build for speed; the V8_ENABLE_CHECKS checks appear to have minimal performance impact (maybe 5-10%, unlike what was previously thought). In addition, switching from the previous optimization settings makes a significant improvement on Mac and Win (50% or more), and switching from DEBUG to NDEBUG makes a significant improvement (another 50% or more).

Note that using v8_optimized_debug==2 may also cause some v8 tests to fail. This is currently is believed to be acceptable.

R=machenbach@chromium.org
BUG=254188

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

Patch from Dirk Pranke <dpranke@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Smi-support for HSar.

BUG=
R=mvstanton@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Revert "Smi-support for HSar."
Reverting https://chromiumcodereview.appspot.com/21049003

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Compilation type and state allocate an unnecessary Smi on v8::Script.

This patch combines them into a single field, and adjusts the accessors
and setters to take the enum type directly, rather than converting to and
from a Smi value.

R=mstarzinger@chromium.org

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

Patch from Mike West <mkwst@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Remove unused methods from RuntimeProfiler

Also removed Logger fields that used to be used for writing compressed logs.

BUG=None
R=bmeurer@chromium.org, loislo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This patch is to support Vtune on Android platform.

The Vtune API provides the support for Android platform. So we fix the
compilation issue and it works on Android platform.

R=danno@chromium.org

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

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Migrate more tests from blink repository.

All these tests had <script> tags with additional JS code. All embedded script code is (automatically) concatenated with existing .js files into one .js test file per test.

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Simplify sampling rate calculation

Sampling rate is now calculated as total number of samples divided by profiling time in ms. Before the patch the sampling rate was updated once per 100ms which doesn't have any obvious advantage over the simpler method.

Also we are going to get rid of the profile node self and total time calculation in the v8 CPU profiler and only expose profiling start/end time for CpuProfile and number of ticks on each ProfileNode and let clients do all the math should they need it.

BUG=None
R=bmeurer@chromium.org, loislo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Prepare some ValueOf renamings.

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Repair test expectations for webkit test.

When adding the new tests in https://codereview.chromium.org/21070002/ the tabs in .js files were automatically replaced with spaces (for presubmit to work).

This replaces the tabs also in a test expectation file for the output to match again.

R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15946 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Re-revert "Flush parallel recompilation queues on context dispose notification" (r15883).

R=danno@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Adapt test expectations for blink test.

Also after giving it more time, this test times out only on the V8 waterfall under windows. It has an existing expectation for Win Debug, which holds now for all Win.

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Run some skipped tests again after resolved issue.

BUG=2795
R=mvstanton@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
HasNonSmiUse should ignore tagged uses

R=verwaest@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix many tests that try to force an OSR by checking OptimizationStatus() to instead check OptimizationCount().

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Turn mark deoptimize on undefined into a proper HPhase.

This patch also removes the implicit recursion on phi operands,
using a loop and a worklist instead, to avoid potential stack
overflows.

R=dslomov@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Reland initial bits of "Implement correct OS and CC detection."

This adds the OS and CC detection and cleans up the globals.h to
some degree. It also places all of the C++11 feature detection into
globals.h.

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Prepare push to trunk.  Now working on version 3.20.12.

R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Revert 15940: "Compilation type and state allocate an unnecessary Smi on v8::Script."

Due to Mozilla test failures on Win32 debug

TBR=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Don't generate a shift left by one if can deoptimize on ia32 and arm and mips.

BUG=
R=verwaest@chromium.org

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

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