Allow microtasks to throw exceptions and handle them gracefully

If the embedder calls V8::TerminateExecution while we're running microtasks, bail out
and clear any pending microtasks.

All other exceptions are simply swallowed. No current Blink or V8 microtasks throw, this
just ensures something sane happens if another embedder decides to pass a throwing
microtask (or if ours unexpectedly throw due to, e.g., stack exhaustion).

BUG=371566
LOG=Y
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Simplify, speed-up correct-context ObjectObserve calls

The original patch which ensured that Object.observe did allocations in the correct context regressed performance about 12%. This patch gets back most of that (about 11%) by simply returning the correct function which is then directly callable from JS, rather than by making the call from the runtime function. A side-effect is that their implementation is shorter.

LOG=Y
BUG=NONE
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Refactor HType to get rid of various hacks.

- Move HType to it's own file.
- Add HType::HeapObject and some other useful types.
- Get rid of the broken and useless HType::NonPrimitive.
- Introduce HType::FromType() to convert from HeapType to HType.
- Also add unit tests for HType.
- Fix types in Crankshaft.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21578 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
X87: Refactor HType to get rid of various hacks.

port r21578 (dcf13aa)

Original commit message:
- Move HType to it's own file.
- Add HType::HeapObject and some other useful types.
- Get rid of the broken and useless HType::NonPrimitive.
- Introduce HType::FromType() to convert from HeapType to HType.
- Also add unit tests for HType.
- Fix types in Crankshaft.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
MIPS: Refactor HType to get rid of various hacks.

Port r21578 (dcf13aa)

Original commit message:
- Move HType to it's own file.
- Add HType::HeapObject and some other useful types.
- Get rid of the broken and useless HType::NonPrimitive.
- Introduce HType::FromType() to convert from HeapType to HType.
- Also add unit tests for HType.
- Fix types in Crankshaft.

BUG=
R=bmeurer@chromium.org

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix typo in test/fuzz-natives/testcfg.py

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21581 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Don't push eax/rax before calling Runtime_Abort
Additionally delete the unused Throw(BailoutReason)

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
HRor and HSar can deoptimize.

BUG=v8:3359
LOG=y
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Harden Runtime_FunctionSetPrototype, Isolate::PrintStack

BUG=chromium:377209
LOG=n
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Inlined optimized runtime functions: expose Runtime versions for direct testing, skip Hydrogen versions

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
BuildNumberToString: Check for undefined keys in the cache

BUG=chromium:368114
LOG=y
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Simplify known successor block lowering.

R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Remove unused debug API.

R=yurys@chromium.org

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

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

Use the zone that is passed to New() and fix implementation of
HPushArguments::AddInput() to match HPhi::AddInput().

R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Inline Array.shift() fast path instead of using a code stub.

TEST=mjsunit/array-shift,mjsunit/array-shift2,mjsunit/array-shift3
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21592 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Handle HCheckInstanceType and HIsStringAndBranch in check elimination.

R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Revert "Handle HCheckInstanceType and HIsStringAndBranch in check elimination."

This reverts commit r21593 for breaking the Webkit tests.

TBR=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Clean up (Get|Set)Property(Attributes)WithFailedAccessChecks

BUG=
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Remove PROHIBITS_OVERWRITING as it is subsumed by non-configurable properties.

v8::DontDelete is set for Unforgeable properties, so just not setting PROHIBITS_OVERWRITING should be enough.

The secondary "feature" of not allowing accessors to be installed in extending objects is incorrect and confusing, given that it only applies to accessors but not to regular properties:
Object.defineProperty({__proto__:window}, "location", { value: 10 })
works where
Object.defineProperty({__proto__:window}, "location", { get: function() {} })
doesn't work.

LOG=y
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Update gn config after r21578

TBR=bmeurer@chromium.org
LOG=n
BUG=none

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

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