platform/upstream/v8.git
11 years agoGeneralize utilities to allow code templatization
danno@chromium.org [Thu, 27 Jun 2013 13:36:15 +0000 (13:36 +0000)]
Generalize utilities to allow code templatization

R=mvstanton@chromium.org

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

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

11 years agoRefactor Hydrogen environment liveness analysis into an HPhase.
bmeurer@chromium.org [Thu, 27 Jun 2013 13:15:10 +0000 (13:15 +0000)]
Refactor Hydrogen environment liveness analysis into an HPhase.

Rename EnvironmentSlotLivenessAnalyzer to HEnvironmentLivenessAnalysisPhase,
following naming scheme suggested by danno@chromium.org in
https://codereview.chromium.org/17458002

The environment slot liveness analysis now uses the phase zone for
all its allocations.

Depends on https://codereview.chromium.org/18034003

R=danno@chromium.org
BUG=

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

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

11 years agoAdd templatized Run() method for Hydrogen phases.
bmeurer@chromium.org [Thu, 27 Jun 2013 13:13:18 +0000 (13:13 +0000)]
Add templatized Run() method for Hydrogen phases.

Depends upon https://codereview.chromium.org/17657004

R=danno@chromium.org
BUG=

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

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

11 years agoTurn zone_excess_limit_ into a constant.
bmeurer@chromium.org [Thu, 27 Jun 2013 13:10:43 +0000 (13:10 +0000)]
Turn zone_excess_limit_ into a constant.

The zone_excess_limit_ is not changed at runtime, and there seems to
be no obvious reason to do so in the future.

R=danno@chromium.org
BUG=

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

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

11 years agoRefactor Hydrogen GVN into an HPhase and use the phase zone.
bmeurer@chromium.org [Thu, 27 Jun 2013 13:09:08 +0000 (13:09 +0000)]
Refactor Hydrogen GVN into an HPhase and use the phase zone.

The HGlobalValueNumberer class is renamed to HGlobalValueNumberingPhase,
following the naming scheme suggested by danno@chromium.org in
https://codereview.chromium.org/17458002

The GVN phase now uses the phase zone for all its allocations.

Depends upon https://codereview.chromium.org/18022002

R=danno@chromium.org
BUG=

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

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

11 years agoMove phase_zone from CompilationInfo to CompilationPhase.
bmeurer@chromium.org [Thu, 27 Jun 2013 13:03:01 +0000 (13:03 +0000)]
Move phase_zone from CompilationInfo to CompilationPhase.

Each CompilationPhase has its own zone, used for phase local
allocations. The zone of CompilationInfo should only be used
for non phase local allocations.

R=danno@chromium.org
BUG=

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

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

11 years agoFix the compilation of gdbjit
bmeurer@chromium.org [Thu, 27 Jun 2013 11:38:37 +0000 (11:38 +0000)]
Fix the compilation of gdbjit

R=bmeurer@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

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

11 years agoAdd myself to OWNERS.
bmeurer@chromium.org [Thu, 27 Jun 2013 11:37:47 +0000 (11:37 +0000)]
Add myself to OWNERS.

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

11 years agoExtract StackFrameIteratorBase
yurys@chromium.org [Thu, 27 Jun 2013 09:34:31 +0000 (09:34 +0000)]
Extract StackFrameIteratorBase

This change introduces StackFrameIteratorBase which owns singleton frame instances and encapsulates some basic iterator functionality. It has two actual implementations: StackFrameIterator and SafeStackFrameIterator.

All logic specific to frame iteration at a random point (basically checks that fp and sp extracted from stack frames are within current stack boundaries) used only by CPU profiler is now concentrated in SafeStackFrameIterator.

Generic stack iteration used in all other places is put into StackFrameIterator. Also this iterator unlike SafeStackFrameIterator iterates through stack handlers.

StackAddressValidator and ExitFrameValidator classes were removed in favor of inline checks and simple methods.

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

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

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

11 years agoDo not iterate stack handlers in SafeStackFrameIterator
yurys@chromium.org [Thu, 27 Jun 2013 09:28:11 +0000 (09:28 +0000)]
Do not iterate stack handlers in SafeStackFrameIterator

CPU profiler doesn't use stack handlers so there is no need to iterate through them while traversing stack. This change SafeStackFrameIterator always iterate only frames and removes checks corresponding to the handlers iteration.

The problem described in the bug occurred because of a false assumption in SafeStackFrameIterator that if Isolate::c_entry_fp is not NULL then the top frame on the stack is always a C++ frame. It is false because we may have entered JS code again, in which case JS_ENTRY code stub generated by JSEntryStub::GenerateBody() will save current c_entry_fp value but not reset it to NULL and after that it will create ENTRY stack frame and JS_ENTRY handler on the stack and put the latter into Isolate::handler(top). This means that if we start iterating from c_entry_fp frame and try to compare the frame's sp with Isolate::handler()->address() it will turn out that frame->sp() > handler->address() and the condition in SafeStackFrameIterator::CanIterateHandles is not held.

BUG=252097
R=loislo@chromium.org, svenpanne@chromium.org

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

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

11 years agoFix elements-kind test to disable optimization of important functions under test...
titzer@chromium.org [Thu, 27 Jun 2013 08:46:46 +0000 (08:46 +0000)]
Fix elements-kind test to disable optimization of important functions under test; add simpler versions of elements kind test.

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

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

11 years agoDo not allow invocation of ArrayBuffer and array buffer views' constructors as functions.
dslomov@chromium.org [Thu, 27 Jun 2013 07:42:08 +0000 (07:42 +0000)]
Do not allow invocation of ArrayBuffer and array buffer views' constructors as functions.

ES6 bug 695 (https://bugs.ecmascript.org/show_bug.cgi?id=695).
This never worked in WebKit, so no compatibility issues.

R=rossberg@chromium.org

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

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

11 years agoMIPS: Avoid Unnecessary Smi Checks.
palfia@homejinni.com [Wed, 26 Jun 2013 20:22:41 +0000 (20:22 +0000)]
MIPS: Avoid Unnecessary Smi Checks.

Port r15344 (9fd1942)

BUG=

Review URL: https://codereview.chromium.org/17887007
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

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

11 years agoAvoid Unnecessary Smi Checks
olivf@chromium.org [Wed, 26 Jun 2013 17:37:55 +0000 (17:37 +0000)]
Avoid Unnecessary Smi Checks

BUG=
R=ulan@chromium.org

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

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

11 years agoRemove obsolete free-space checks from MarkCompactCollector.
mstarzinger@chromium.org [Wed, 26 Jun 2013 16:37:15 +0000 (16:37 +0000)]
Remove obsolete free-space checks from MarkCompactCollector.

R=danno@chromium.org

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

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

11 years agoFix misleading names and comments in mute local variables debugger helper
peter.rybin@gmail.com [Wed, 26 Jun 2013 16:18:00 +0000 (16:18 +0000)]
Fix misleading names and comments in mute local variables debugger helper

R=yangguo@chromium.org

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

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

11 years agoAdd DependentCode to PropertyCells
danno@chromium.org [Wed, 26 Jun 2013 16:17:12 +0000 (16:17 +0000)]
Add DependentCode to PropertyCells

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

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

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

11 years agoCPUProfiler: Simplify CodeEntry constructor calls.
loislo@chromium.org [Wed, 26 Jun 2013 16:04:25 +0000 (16:04 +0000)]
CPUProfiler: Simplify CodeEntry constructor calls.

In almost all the places where we create CodeEntry we use default values.
Lets move them into arguments default values.

BUG=none
TEST=no logic changes.
R=yangguo@chromium.org, yurys@chromium.org

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

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

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

11 years agoMigrate blink tests that are not relevant to blink into a new V8 test suite called...
machenbach@chromium.org [Wed, 26 Jun 2013 14:23:30 +0000 (14:23 +0000)]
Migrate blink tests that are not relevant to blink into a new V8 test suite called 'blink'.

This initial CL contains the new test suite code and two tests for demonstration.

Other tests will follow in a separate CL.

R=jkummerow@chromium.org

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

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

11 years agoRemove obsolete unchecked accessors in JSFunction.
mstarzinger@chromium.org [Wed, 26 Jun 2013 14:04:25 +0000 (14:04 +0000)]
Remove obsolete unchecked accessors in JSFunction.

R=hpayer@chromium.org
BUG=v8:1490

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

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

11 years agoGet rid of ZoneScope completely.
bmeurer@chromium.org [Wed, 26 Jun 2013 13:36:16 +0000 (13:36 +0000)]
Get rid of ZoneScope completely.

There's no need to differentiate between an actual Zone and its
scope. Instead we bind the lifetime of the Zone memory to the
lifetime of the Zone itself, which is way easier to understand
than having to dig through the code looking for zone scopes.

Depends on https://codereview.chromium.org/17826004/

R=danno@chromium.org
BUG=

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

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

11 years agoGet rid of the ZoneScopeMode.
bmeurer@chromium.org [Wed, 26 Jun 2013 12:54:12 +0000 (12:54 +0000)]
Get rid of the ZoneScopeMode.

No one is using the DONT_DELETE_ON_EXIT mode for ZoneScopes anymore, so
we can safely assume that all ZoneScopes are DELETE_ON_EXIT now.

R=danno@chromium.org
BUG=

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

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

11 years agoRevert "CPUProfiler: Simplify CodeEntry constructor calls."
loislo@chromium.org [Wed, 26 Jun 2013 12:38:10 +0000 (12:38 +0000)]
Revert "CPUProfiler: Simplify CodeEntry constructor calls."

This reverts commit a6cc1e3b563c0d0689da35dbf8163545c8146ddd.

One test starts failing on Windows.

BUG=none
TBR= yurys@chromium.org

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

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

11 years agoia32: Restore missing temp register for LNumberTagU
jkummerow@chromium.org [Wed, 26 Jun 2013 12:03:22 +0000 (12:03 +0000)]
ia32: Restore missing temp register for LNumberTagU

BUG=v8:2692
R=svenpanne@chromium.org

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

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

11 years agoCPUProfiler: Simplify CodeEntry constructor calls.
loislo@chromium.org [Wed, 26 Jun 2013 09:55:33 +0000 (09:55 +0000)]
CPUProfiler: Simplify CodeEntry constructor calls.

In almost all the places where we create CodeEntry we use default values.
Lets move them into arguments default values.

BUG=none
TEST=no logic changes.
R=yangguo@chromium.org, yurys@chromium.org

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

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

11 years agoIntroduce Unsigned32 and RegExp types
rossberg@chromium.org [Wed, 26 Jun 2013 09:51:57 +0000 (09:51 +0000)]
Introduce Unsigned32 and RegExp types

Also, renamed Integer31 back to Smi, and Integer32 to Signed32.

R=jkummerow@chromium.org
BUG=

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

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

11 years agoChange PC for OSR entries to point to something more sensible (i.e. the first Unknown...
titzer@chromium.org [Wed, 26 Jun 2013 08:43:27 +0000 (08:43 +0000)]
Change PC for OSR entries to point to something more sensible (i.e. the first UnknownOsrValue), removing the need to record spilled OSR values and the need for duplicate deopt entries.

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

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

11 years agoRemove useless ZoneScopes from Parser.
bmeurer@chromium.org [Wed, 26 Jun 2013 08:05:41 +0000 (08:05 +0000)]
Remove useless ZoneScopes from Parser.

R=danno@chromium.org
BUG=

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

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

11 years agoAllow users of the V8 API to distinguish between unset and undefined HiddenValues
svenpanne@chromium.org [Wed, 26 Jun 2013 08:00:05 +0000 (08:00 +0000)]
Allow users of the V8 API to distinguish between unset and undefined HiddenValues

BUG=v8:2746
R=svenpanne@chromium.org

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

Patch from Adam Klein <adamk@chromium.org>.

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

11 years agoRemoved flag optimize-constructed-arrays.
mvstanton@chromium.org [Tue, 25 Jun 2013 16:31:07 +0000 (16:31 +0000)]
Removed flag optimize-constructed-arrays.

This eliminates a large amount of hand-written assembly in the platforms.

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

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

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

11 years agoCPUProfiler: It is not clear why we are using Handle<Object> for scriptId. Lets flip...
loislo@chromium.org [Tue, 25 Jun 2013 14:57:47 +0000 (14:57 +0000)]
CPUProfiler: It is not clear why we are using Handle<Object> for scriptId. Lets flip it into Smi/int.

By the nature it is integer. So we can work with it as with Smi internaly and use int in the external API.

BUG=none
TEST=existing tests
R=jkummerow@chromium.org

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

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

11 years agoMove C++ specific flags from C flags to C++ flags
jkummerow@chromium.org [Tue, 25 Jun 2013 14:39:27 +0000 (14:39 +0000)]
Move C++ specific flags from C flags to C++ flags

This allows to compile non-C++ files in the v8 standalone build, e.g.
assembly files found in ICU.

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

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

Patch from Jochen Eisinger <jochen@chromium.org>.

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

11 years agoAllow debugger evaluate expressions to mute local variables
peter.rybin@gmail.com [Tue, 25 Jun 2013 13:48:43 +0000 (13:48 +0000)]
Allow debugger evaluate expressions to mute local variables

R=yangguo@chromium.org

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

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

11 years agoProvide list of step-in source positions in JS Debug API
prybin@chromium.org [Tue, 25 Jun 2013 13:42:44 +0000 (13:42 +0000)]
Provide list of step-in source positions in JS Debug API

R=yangguo@chromium.org

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

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

11 years agoSplit HPhase for Lithium and Hydrogen using common CompilationPhase base.
bmeurer@chromium.org [Tue, 25 Jun 2013 12:22:26 +0000 (12:22 +0000)]
Split HPhase for Lithium and Hydrogen using common CompilationPhase base.

Add new base class CompilationPhase, which is the base for both HPhase, LPhase and LAllocatorPhase. HPhase is now for Hydrogen passes only, LPhase is for Lithium passes and LAllocatorPhase is for LAllocator phases.

R=svenpanne@chromium.org
BUG=

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

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

11 years agoHandle AccessorPair struct in heap snapshot.
alph@chromium.org [Tue, 25 Jun 2013 11:55:33 +0000 (11:55 +0000)]
Handle AccessorPair struct in heap snapshot.

R=svenpanne@chromium.org, yurys@chromium.org

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

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

11 years agoFix to_boolean type feedback for unary and binary ops
olivf@chromium.org [Tue, 25 Jun 2013 11:49:46 +0000 (11:49 +0000)]
Fix to_boolean type feedback for unary and binary ops

BUG=
R=jkummerow@chromium.org, rossberg@chromium.org

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

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

11 years agoFixed more gc stress builder tests.
hpayer@chromium.org [Tue, 25 Jun 2013 11:16:13 +0000 (11:16 +0000)]
Fixed more gc stress builder tests.

BUG=
R=mstarzinger@chromium.org

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

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

11 years agoGet rid of Isolate::safe_stack_iterator_counter
yurys@chromium.org [Tue, 25 Jun 2013 10:09:19 +0000 (10:09 +0000)]
Get rid of Isolate::safe_stack_iterator_counter

This change removes per-isolate counter of active SafeStackFrameIterators. The counter is used by stack frames implementations to avoid accessing pointers to heap objects when traversing stack for CPU profiler (so called "safe" mode). Each StackFrame instance is owned by single iterator and has a pointer to it so we can simply mark the iterator as "safe" or not and read the field in the stack frames instead of going into the isolate.

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

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

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

11 years agoFix GCC error about comma at end of enumerator list.
bmeurer@chromium.org [Tue, 25 Jun 2013 09:34:22 +0000 (09:34 +0000)]
Fix GCC error about comma at end of enumerator list.

TBR=svenpanne@chromium.org
BUG=

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

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

11 years agoFix compilation error introduced with r15287.
bmeurer@chromium.org [Tue, 25 Jun 2013 09:09:25 +0000 (09:09 +0000)]
Fix compilation error introduced with r15287.

REGEXP was added to Code::Kind after TO_BOOLEAN_IC, but NUMBER_OF_KINDS,
which is used as array size for table[] in ReportCodeKindStatistics, was
still TO_BOOLEAN_IC + 1 (indirectly via LAST_IC_KIND).

BUG=
R=svenpanne@chromium.org

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

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

11 years agoCleanup Code::Kind2String().
bmeurer@chromium.org [Tue, 25 Jun 2013 08:51:49 +0000 (08:51 +0000)]
Cleanup Code::Kind2String().

Use CODE_KIND_LIST() to automatically generate the case statements for
Code::Kind2String().

BUG=
R=svenpanne@chromium.org

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

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

11 years agoReland "Remove IsInitialized checks from inlined API functions."
mstarzinger@chromium.org [Tue, 25 Jun 2013 08:11:50 +0000 (08:11 +0000)]
Reland "Remove IsInitialized checks from inlined API functions."

The initialization sequence in Blink has been adapted to use explicit
isolate initialization instead of through calling v8::Null() as the
first API call.

R=svenpanne@chromium.org

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

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

11 years agoAdded pretenuring support for fast literal allocation in old data space.
hpayer@chromium.org [Tue, 25 Jun 2013 07:47:53 +0000 (07:47 +0000)]
Added pretenuring support for fast literal allocation in old data space.

BUG=
R=mstarzinger@chromium.org

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

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

11 years agoMerge SafeStackTraceFrameIterator into SafeStackFrameIterator
yurys@chromium.org [Tue, 25 Jun 2013 07:14:06 +0000 (07:14 +0000)]
Merge SafeStackTraceFrameIterator into SafeStackFrameIterator

SafeStackFrameIterator was used solely to implement SafeStackTraceFrameIterator. This CL simply merges them and updates usage of SafeStackTraceFrameIterator to use SafeStackFrameIterator (a bit shorter name).

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

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

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

11 years agoMIPS: Fix mjsunit/regress/regress-2653.
palfia@homejinni.com [Tue, 25 Jun 2013 00:09:32 +0000 (00:09 +0000)]
MIPS: Fix mjsunit/regress/regress-2653.

Insert proper padding after lazy deoptimization points. This change
makes sure, that patching does not overwrite the code after the
lazy deoptimization point.

TEST=mjsunit/regress/regress-2653

BUG=

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

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

11 years agoMIPS: Fix Kraken gaussian blur test regression.
palfia@homejinni.com [Mon, 24 Jun 2013 18:33:42 +0000 (18:33 +0000)]
MIPS: Fix Kraken gaussian blur test regression.

The regression was introduced in r13848 by accidental removal of one
additional line.

TEST=
BUG=

Review URL: https://codereview.chromium.org/17570007
Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

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

11 years agoMIPS: Rename Literal::handle to Literal::value
palfia@homejinni.com [Mon, 24 Jun 2013 18:28:06 +0000 (18:28 +0000)]
MIPS: Rename Literal::handle to Literal::value

Port r15280 (1a287b2)

Original commit message:
Just a completely mechanical change...

BUG=

Review URL: https://codereview.chromium.org/17583011
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

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

11 years agoFix ugly typo in HValue::UpdateRepresentation.
mstarzinger@chromium.org [Mon, 24 Jun 2013 14:34:07 +0000 (14:34 +0000)]
Fix ugly typo in HValue::UpdateRepresentation.

R=jkummerow@chromium.org
TEST=mjsunit/math-min-max --extra-flags="--gc-interval=500"

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

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

11 years agoRemoved some useless/dead code regarding CompileTimeValues.
svenpanne@chromium.org [Mon, 24 Jun 2013 14:26:32 +0000 (14:26 +0000)]
Removed some useless/dead code regarding CompileTimeValues.

R=mstarzinger@chromium.org

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

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

11 years agoIn revision 15142, the V8_USE_UNSAFE_HANDLES define is removed.
danno@chromium.org [Mon, 24 Jun 2013 14:21:14 +0000 (14:21 +0000)]
In revision 15142, the V8_USE_UNSAFE_HANDLES define is removed.

So in the vtune support code ( in vtune-jit.cc file)v8::Handle<T* value> consturctor cannot be invoked directly.
We use "->ToString()" to create the Handle<String> object  to fix the compilation error.

R=danno@chromium.org

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

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

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

11 years agoUpdate typed arrays behavior to match ES6 rev 15. Remove TO_POSITIVE_INTEGER and...
dslomov@chromium.org [Mon, 24 Jun 2013 13:58:52 +0000 (13:58 +0000)]
Update typed arrays behavior to match ES6 rev 15. Remove TO_POSITIVE_INTEGER and throw on negative length arguments.

R=rossberg@chromium.org

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

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

11 years agoCorrecting mime type of tools/profviz/profviz.css.
yangguo@chromium.org [Mon, 24 Jun 2013 13:55:36 +0000 (13:55 +0000)]
Correcting mime type of tools/profviz/profviz.css.

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

11 years agoChanging mime type of tools/profviz/profviz.css.
yangguo@chromium.org [Mon, 24 Jun 2013 13:53:17 +0000 (13:53 +0000)]
Changing mime type of tools/profviz/profviz.css.

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

11 years agoChanging mime type of tools/profviz/profviz.html.
yangguo@chromium.org [Mon, 24 Jun 2013 13:52:09 +0000 (13:52 +0000)]
Changing mime type of tools/profviz/profviz.html.

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

11 years agoAdd phase zone to CompilationInfo and use it in GVN pass.
bmeurer@chromium.org [Mon, 24 Jun 2013 13:37:46 +0000 (13:37 +0000)]
Add phase zone to CompilationInfo and use it in GVN pass.

The phase_zone of CompilationInfo is intended for local allocations that
are freed at the end of the phase.

R=danno@chromium.org
BUG=

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

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

11 years agoMove ExitFrame::ComputeStackPointer from frames-<arch>.cc to frames.cc
yurys@chromium.org [Mon, 24 Jun 2013 13:27:48 +0000 (13:27 +0000)]
Move ExitFrame::ComputeStackPointer from frames-<arch>.cc to frames.cc

The method has identical implementation for all architectures. Moved it into frames.cc

Drive-by: deleted SafeStackFrameIterator::is_working_iterator_, SafeStackFrameIterator::iteration_done_ is used instead.
BUG=None
R=loislo@chromium.org, svenpanne@chromium.org

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

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

11 years agoAdd v8.log visualizer page.
yangguo@chromium.org [Mon, 24 Jun 2013 13:25:58 +0000 (13:25 +0000)]
Add v8.log visualizer page.

R=jkummerow@chromium.org
BUG=

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

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

11 years agoDrop (mis)use of HPhase in full code gen.
bmeurer@chromium.org [Mon, 24 Jun 2013 13:25:44 +0000 (13:25 +0000)]
Drop (mis)use of HPhase in full code gen.

The full code generator is not a proper Hydrogen phase. The full code
gen ticks are tracked in a special member of HStatistics, so HPhase is
most probably misused at this point.

R=danno@chromium.org
BUG=

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

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

11 years agoDo not use deprecated MakeWeak in d8.
yangguo@chromium.org [Mon, 24 Jun 2013 13:15:07 +0000 (13:15 +0000)]
Do not use deprecated MakeWeak in d8.

R=svenpanne@chromium.org
BUG=

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

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

11 years agoFix HStatistics::Print() output to fit into 80 columns.
bmeurer@chromium.org [Mon, 24 Jun 2013 13:07:20 +0000 (13:07 +0000)]
Fix HStatistics::Print() output to fit into 80 columns.

BUG=
R=danno@chromium.org

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

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

11 years agoCPUProfiler: fix for test.
loislo@chromium.org [Mon, 24 Jun 2013 13:03:19 +0000 (13:03 +0000)]
CPUProfiler: fix for test.

TBR= yangguo@chromium.org

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

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

11 years agoCPUProfiler: Simplify logging part of CreateCodeEvent functions.
loislo@chromium.org [Mon, 24 Jun 2013 12:55:19 +0000 (12:55 +0000)]
CPUProfiler: Simplify logging part of CreateCodeEvent functions.

We have 5 overloaded functions with name CreateCodeEvent.
All these functions have many common parts. I'd like to eliminate the difference between them.

TEST=existing tests
R=yangguo@chromium.org, yurys@chromium.org

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

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

11 years agoDeprecate one virtual marking visitor for mark-compact GC.
mstarzinger@chromium.org [Mon, 24 Jun 2013 12:39:02 +0000 (12:39 +0000)]
Deprecate one virtual marking visitor for mark-compact GC.

R=hpayer@google.com

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

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

11 years agoAPI for DataView.
dslomov@chromium.org [Mon, 24 Jun 2013 11:23:50 +0000 (11:23 +0000)]
API for DataView.

R=svenpanne@chromium.org

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

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

11 years agoRevert "Remove IsInitialized checks from inlined API functions."
mstarzinger@chromium.org [Mon, 24 Jun 2013 11:10:40 +0000 (11:10 +0000)]
Revert "Remove IsInitialized checks from inlined API functions."

This reverts r15277 due to failures in layout tests. Apparently Blink
still initializes the Isolate by calling v8::Null() as the first API
function on some paths.

TBR=svenpanne@chromium.org
TEST=webkit:crypto/worker-random-values-concurrent.html

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

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

11 years agoRename Literal::handle to Literal::value
rossberg@chromium.org [Mon, 24 Jun 2013 10:37:59 +0000 (10:37 +0000)]
Rename Literal::handle to Literal::value

Just a completely mechanical change...

R=svenpanne@chromium.org
BUG=

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

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

11 years agoUpdate the TSan-specific atomics implementation to match the current API.
yurys@chromium.org [Mon, 24 Jun 2013 09:35:30 +0000 (09:35 +0000)]
Update the TSan-specific atomics implementation to match the current API.

BUG=128314

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

Patch from Alexander Potapenko <glider@chromium.org>.

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

11 years agoMake a Persistent ctor take const Persistent& instead of Persistent&.
mstarzinger@chromium.org [Mon, 24 Jun 2013 09:34:56 +0000 (09:34 +0000)]
Make a Persistent ctor take const Persistent& instead of Persistent&.

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

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

Patch from Marja Hölttä <marja@chromium.org>.

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

11 years agoRemove IsInitialized checks from inlined API functions.
mstarzinger@chromium.org [Mon, 24 Jun 2013 08:58:01 +0000 (08:58 +0000)]
Remove IsInitialized checks from inlined API functions.

R=marja@chromium.org, svenpanne@chromium.org
TEST=cctest/test-api

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

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

11 years agoCPUProfiler: remove copy&paste from CodeCreateEvent.
loislo@chromium.org [Mon, 24 Jun 2013 08:40:38 +0000 (08:40 +0000)]
CPUProfiler: remove copy&paste from CodeCreateEvent.

This is the next patch on the way of simplifying profiler API.
It is extracting the common parts of the serialization process.

TEST=current test set
R=svenpanne@chromium.org

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

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

11 years agoSimplify stack iterators implementation
yurys@chromium.org [Mon, 24 Jun 2013 08:38:37 +0000 (08:38 +0000)]
Simplify stack iterators implementation

In order to fix https://code.google.com/p/chromium/issues/detail?id=252097 I
need to change SafeStackTraceFrameIterator. Stack iterators hierarchy looks
excessively complicated and I'd like to flatten it a bit by removing some
intermediate classes. In particular there are two hierarchies sharing
JavaScriptFrameIteratorTemp<T> template for no good reason.

This change extracts some of JavaScriptFrameIteratorTemp functionality directly
into SafeStackTraceFrameIterator. This made it obvious that a few checks were
performed twice.

The rest of JavaScriptFrameIteratorTemp<T> is merged with
JavaScriptFrameIterator. Now that the class is not a template some of its
implementation is moved from frames-inl.h into frames.cc

So in this change I removed JavaScriptFrameIterator and
SafeJavaScriptFrameIterator. As the next step I'm going to merge
SafeStackFrameIterator into SafeStackTraceFrameIterator.

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

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

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

11 years agoUpdate boot-up memory use limit after adding DataView.
dslomov@chromium.org [Mon, 24 Jun 2013 07:02:53 +0000 (07:02 +0000)]
Update boot-up memory use limit after adding DataView.

R=danno@chromium.org

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

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

11 years agoMIPS: Use AST's type field and merge types for unary, binary & compare ICs.
palfia@homejinni.com [Fri, 21 Jun 2013 20:31:06 +0000 (20:31 +0000)]
MIPS: Use AST's type field and merge types for unary, binary & compare ICs.

Port r15264 (d4c3767)

Missing fixed_right_arg().has_value cases added also.

BUG=

Review URL: https://codereview.chromium.org/17552008
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

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

11 years agoUse kPointerSize to compute the size of StubCache::Entry for X64
jkummerow@chromium.org [Fri, 21 Jun 2013 16:19:51 +0000 (16:19 +0000)]
Use kPointerSize to compute the size of StubCache::Entry for X64

R=jkummerow@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

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

11 years agoDataView implementation.
dslomov@chromium.org [Fri, 21 Jun 2013 13:02:38 +0000 (13:02 +0000)]
DataView implementation.

R=rossberg@chromium.org

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

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

11 years agoDistinguish times_8 and times_pointer_size for X64
jkummerow@chromium.org [Fri, 21 Jun 2013 12:57:19 +0000 (12:57 +0000)]
Distinguish times_8 and times_pointer_size for X64

R=jkummerow@chromium.org

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

Patch from Haitao Feng <haitao.feng@intel.com>.

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

11 years agoHBoundsCheck shouldn't ignore Tagged input representations unconditionally
jkummerow@chromium.org [Fri, 21 Jun 2013 12:50:02 +0000 (12:50 +0000)]
HBoundsCheck shouldn't ignore Tagged input representations unconditionally

BUG=v8:2740
R=yangguo@chromium.org

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

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

11 years agoV8 API: Add a missing NULL check into Isolate::GetCurrentContext().
yurys@chromium.org [Fri, 21 Jun 2013 12:34:47 +0000 (12:34 +0000)]
V8 API: Add a missing NULL check into Isolate::GetCurrentContext().

There is a missing NULL check for: "internal_isolate->context() != NULL".
Right now before calling this method one should call v8::Context::InContext()
first to perform this check, otherwise we may crash. But this static method
will do this check on the current isolate, which may not be the same as a given one.

BUG=249655
R=yurys@chromium.org,mvstanton@chromium.org

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

Patch from Andrey Adaykin <aandrey@chromium.org>.

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

11 years agoRemove BinaryOp::result_type
rossberg@chromium.org [Fri, 21 Jun 2013 12:16:14 +0000 (12:16 +0000)]
Remove BinaryOp::result_type

R=jkummerow@chromium.org
BUG=

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

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

11 years agoUse AST's type field and merge types for unary, binary & compare ICs
rossberg@chromium.org [Fri, 21 Jun 2013 11:10:06 +0000 (11:10 +0000)]
Use AST's type field and merge types for unary, binary & compare ICs

R=jkummerow@chromium.org
BUG=

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

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

11 years agoShort-circuit embedded cons strings.
yangguo@chromium.org [Fri, 21 Jun 2013 09:24:30 +0000 (09:24 +0000)]
Short-circuit embedded cons strings.

R=mstarzinger@chromium.org
BUG=

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

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

11 years agoUse mutex instead of busy wait when installing optimized function.
yangguo@chromium.org [Fri, 21 Jun 2013 08:38:12 +0000 (08:38 +0000)]
Use mutex instead of busy wait when installing optimized function.

R=jkummerow@chromium.org
BUG=

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

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

11 years agoClean up queued compilation tasks when quitting.
yangguo@chromium.org [Fri, 21 Jun 2013 08:37:05 +0000 (08:37 +0000)]
Clean up queued compilation tasks when quitting.

R=jkummerow@chromium.org
BUG=

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

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

11 years agoDelete deprecated methods from v8-profiler.h
yurys@chromium.org [Fri, 21 Jun 2013 07:56:22 +0000 (07:56 +0000)]
Delete deprecated methods from v8-profiler.h

All these methods were already marked as V8_DEPRECATED in V8 Version 3.18.0 (see https://code.google.com/p/v8/source/browse/trunk/include/v8-profiler.h?r=14304) so it is time to delete them.

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

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

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

11 years agoMIPS: Let NaN flow as double into HBranch + some minor improvements
plind44@gmail.com [Fri, 21 Jun 2013 02:43:13 +0000 (02:43 +0000)]
MIPS: Let NaN flow as double into HBranch + some minor improvements

Port r15246 (cb18dce2)

BUG=
R=plind44@gmail.com

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

Patch from Akos Palfi <palfia@homejinni.com>.

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

11 years agoMIPS: Generators: Avoid calling into runtime if operand stack is empty
palfia@homejinni.com [Thu, 20 Jun 2013 23:43:10 +0000 (23:43 +0000)]
MIPS: Generators: Avoid calling into runtime if operand stack is empty

Port r15240 (909f716e)

Original commit message:
This patch makes yield sites save the resume continuation and context
inline.  If the operand stack is empty, we can avoid a call into the
runtime.  This also makes the SuspendJSGeneratorObject runtime function
less magical: it just has to save the operand stack and stack handlers.

This speeds up the following case by a factor of 3 or so:

  function* until(n) {
    for (var i = 0; i < n; i++)
      yield i;
  }

  function sum(iter) {
    var sum = 0;
    for (var x of iter) sum += x;
    return sum;
  }

  for (var i = 0; i < 10000; i++) sum(until(1000))

Also, there is no more sentinel value as the generators will resume in
the right place already, allowing me to remove the hack added to the
--debug-code check in r14437.

BUG=

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

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

11 years agoMIPS: Lithium codegen should not pass around block_ids.
palfia@homejinni.com [Thu, 20 Jun 2013 20:18:58 +0000 (20:18 +0000)]
MIPS: Lithium codegen should not pass around block_ids.

Port r15235 (95a844b)

Original commit message:
Rather encapsulate the basic block to assembly label mapping in the LInstruction.

BUG=

Review URL: https://codereview.chromium.org/17504002
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

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

11 years agoHandle MONOMORPIC loads where type feedback is code stub
danno@chromium.org [Thu, 20 Jun 2013 16:54:09 +0000 (16:54 +0000)]
Handle MONOMORPIC loads where type feedback is code stub

R=jkummerow@chromium.org

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

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

11 years agoAdd counters for requested/inserted/executed soft deopts
jkummerow@chromium.org [Thu, 20 Jun 2013 16:53:22 +0000 (16:53 +0000)]
Add counters for requested/inserted/executed soft deopts

R=rossberg@chromium.org

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

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

11 years agoMIPS: Fix stack frame reconstruction for generators with formal arguments.
palfia@homejinni.com [Thu, 20 Jun 2013 15:29:22 +0000 (15:29 +0000)]
MIPS: Fix stack frame reconstruction for generators with formal arguments.

Port r15230 (e2bbe01)

Original commit message:
The formal parameter count was always being treated as an untagged
integer, but it is actually a Smi on ia32 and arm.

BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/17261028
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

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

11 years agoMake sure ExternalCallbackScope is always created when VM state changes to EXTERNAL
yurys@chromium.org [Thu, 20 Jun 2013 14:47:35 +0000 (14:47 +0000)]
Make sure ExternalCallbackScope is always created when VM state changes to EXTERNAL

ExternalCallbackScope is used to let CPU profiler know which API callback is being executed. Whenever such callback is called we should create VMState<ETERNAL> and ExternalCallbackScope. This patch fixes several places where VMState<ETERNAL> went without ExternalCallbackScope.

BUG=244580
R=dcarney@chromium.org, svenpanne@chromium.org

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

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

11 years agoAlso apply InferControlFlowRange to smi-based tests.
verwaest@chromium.org [Thu, 20 Jun 2013 14:20:15 +0000 (14:20 +0000)]
Also apply InferControlFlowRange to smi-based tests.

R=jkummerow@chromium.org

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

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

11 years agoImprove range analysis for smi phi
verwaest@chromium.org [Thu, 20 Jun 2013 14:11:52 +0000 (14:11 +0000)]
Improve range analysis for smi phi

R=jkummerow@chromium.org

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

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

11 years agoLet NaN flow as double into HBranch + some minor improvements
olivf@chromium.org [Thu, 20 Jun 2013 13:51:03 +0000 (13:51 +0000)]
Let NaN flow as double into HBranch + some minor improvements

BUG=
R=verwaest@chromium.org

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

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

11 years agoProperly assign heapobject to constant functions.
verwaest@chromium.org [Thu, 20 Jun 2013 13:46:29 +0000 (13:46 +0000)]
Properly assign heapobject to constant functions.

R=jkummerow@chromium.org

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

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

11 years agoFlexible representation for BuildIncrement, but CannotBeTagged.
verwaest@chromium.org [Thu, 20 Jun 2013 13:22:46 +0000 (13:22 +0000)]
Flexible representation for BuildIncrement, but CannotBeTagged.

R=jkummerow@chromium.org

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

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

11 years agoAdd soft-deopt for uninitialized assignment
verwaest@chromium.org [Thu, 20 Jun 2013 13:09:43 +0000 (13:09 +0000)]
Add soft-deopt for uninitialized assignment

R=hpayer@google.com

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

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

11 years agoGenerators: Avoid calling into runtime if operand stack is empty
wingo@igalia.com [Thu, 20 Jun 2013 12:59:45 +0000 (12:59 +0000)]
Generators: Avoid calling into runtime if operand stack is empty

This patch makes yield sites save the resume continuation and context
inline.  If the operand stack is empty, we can avoid a call into the
runtime.  This also makes the SuspendJSGeneratorObject runtime function
less magical: it just has to save the operand stack and stack handlers.

This speeds up the following case by a factor of 3 or so:

  function* until(n) {
    for (var i = 0; i < n; i++)
      yield i;
  }

  function sum(iter) {
    var sum = 0;
    for (var x of iter) sum += x;
    return sum;
  }

  for (var i = 0; i < 10000; i++) sum(until(1000))

Also, there is no more sentinel value as the generators will resume in
the right place already, allowing me to remove the hack added to the
--debug-code check in r14437.

R=mstarzinger@chromium.org
BUG=

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

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

11 years agodeprecate old style callbacks
dcarney@chromium.org [Thu, 20 Jun 2013 12:53:19 +0000 (12:53 +0000)]
deprecate old style callbacks

R=svenpanne@chromium.org
BUG=

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

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