2014-09-24 07:08:27 +00:00
|
|
|
// Copyright 2014 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef V8_BAILOUT_REASON_H_
|
|
|
|
#define V8_BAILOUT_REASON_H_
|
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
|
2015-01-16 07:42:00 +00:00
|
|
|
// TODO(svenpanne) introduce an AbortReason and partition this list
|
2014-09-24 07:08:27 +00:00
|
|
|
#define ERROR_MESSAGES_LIST(V) \
|
|
|
|
V(kNoReason, "no reason") \
|
|
|
|
\
|
|
|
|
V(k32BitValueInRegisterIsNotZeroExtended, \
|
|
|
|
"32 bit value in register is not zero-extended") \
|
2016-07-05 15:49:52 +00:00
|
|
|
V(kAllocatingNonEmptyPackedArray, "Allocating non-empty packed array") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kAllocationIsNotDoubleAligned, "Allocation is not double aligned") \
|
|
|
|
V(kAPICallReturnedInvalidObject, "API call returned invalid object") \
|
|
|
|
V(kArgumentsObjectValueInATestContext, \
|
|
|
|
"Arguments object value in a test context") \
|
|
|
|
V(kArrayIndexConstantValueTooBig, "Array index constant value too big") \
|
2017-01-18 19:27:41 +00:00
|
|
|
V(kAssignmentToLetVariableBeforeInitialization, \
|
|
|
|
"Assignment to let variable before initialization") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kAssignmentToLOOKUPVariable, "Assignment to LOOKUP variable") \
|
|
|
|
V(kAssignmentToParameterFunctionUsesArgumentsObject, \
|
|
|
|
"Assignment to parameter, function uses arguments object") \
|
|
|
|
V(kAssignmentToParameterInArgumentsObject, \
|
|
|
|
"Assignment to parameter in arguments object") \
|
|
|
|
V(kBadValueContextForArgumentsObjectValue, \
|
|
|
|
"Bad value context for arguments object value") \
|
|
|
|
V(kBadValueContextForArgumentsValue, \
|
|
|
|
"Bad value context for arguments value") \
|
|
|
|
V(kBailedOutDueToDependencyChange, "Bailed out due to dependency change") \
|
|
|
|
V(kBailoutWasNotPrepared, "Bailout was not prepared") \
|
|
|
|
V(kBothRegistersWereSmisInSelectNonSmi, \
|
|
|
|
"Both registers were smis in SelectNonSmi") \
|
2016-10-17 08:58:16 +00:00
|
|
|
V(kClassConstructorFunction, "Class constructor function") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kClassLiteral, "Class literal") \
|
|
|
|
V(kCodeGenerationFailed, "Code generation failed") \
|
|
|
|
V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \
|
|
|
|
V(kCompoundAssignmentToLookupSlot, "Compound assignment to lookup slot") \
|
2015-01-15 20:02:20 +00:00
|
|
|
V(kComputedPropertyName, "Computed property name") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kContextAllocatedArguments, "Context-allocated arguments") \
|
|
|
|
V(kCopyBuffersOverlap, "Copy buffers overlap") \
|
|
|
|
V(kCouldNotGenerateZero, "Could not generate +0.0") \
|
|
|
|
V(kCouldNotGenerateNegativeZero, "Could not generate -0.0") \
|
|
|
|
V(kDebuggerStatement, "DebuggerStatement") \
|
|
|
|
V(kDeclarationInCatchContext, "Declaration in catch context") \
|
|
|
|
V(kDeclarationInWithContext, "Declaration in with context") \
|
|
|
|
V(kDefaultNaNModeNotSet, "Default NaN mode not set") \
|
|
|
|
V(kDeleteWithGlobalVariable, "Delete with global variable") \
|
|
|
|
V(kDeleteWithNonGlobalVariable, "Delete with non-global variable") \
|
|
|
|
V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \
|
|
|
|
V(kDontDeleteCellsCannotContainTheHole, \
|
|
|
|
"DontDelete cells can't contain the hole") \
|
2016-03-04 11:50:24 +00:00
|
|
|
V(kDoExpressionUnmodelable, \
|
|
|
|
"Encountered a do-expression with unmodelable control statements") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kDoPushArgumentNotImplementedForDoubleType, \
|
|
|
|
"DoPushArgument not implemented for double type") \
|
|
|
|
V(kEliminatedBoundsCheckFailed, "Eliminated bounds check failed") \
|
|
|
|
V(kEmitLoadRegisterUnsupportedDoubleImmediate, \
|
|
|
|
"EmitLoadRegister: Unsupported double immediate") \
|
2016-11-15 14:04:52 +00:00
|
|
|
V(kCyclicObjectStateDetectedInEscapeAnalysis, \
|
|
|
|
"Cyclic object state detected by escape analysis") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kEval, "eval") \
|
|
|
|
V(kExpectedAllocationSite, "Expected allocation site") \
|
2016-05-17 20:39:45 +00:00
|
|
|
V(kExpectedBooleanValue, "Expected boolean value") \
|
2016-09-20 12:35:34 +00:00
|
|
|
V(kExpectedFixedDoubleArrayMap, \
|
|
|
|
"Expected a fixed double array map in fast shallow clone array literal") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kExpectedFunctionObject, "Expected function object in register") \
|
|
|
|
V(kExpectedHeapNumber, "Expected HeapNumber") \
|
2016-08-05 17:33:46 +00:00
|
|
|
V(kExpectedJSReceiver, "Expected object to have receiver type") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kExpectedNativeContext, "Expected native context") \
|
|
|
|
V(kExpectedNonIdenticalObjects, "Expected non-identical objects") \
|
|
|
|
V(kExpectedNonNullContext, "Expected non-null context") \
|
|
|
|
V(kExpectedPositiveZero, "Expected +0.0") \
|
|
|
|
V(kExpectedNewSpaceObject, "Expected new space object") \
|
|
|
|
V(kExpectedUndefinedOrCell, "Expected undefined or cell in register") \
|
|
|
|
V(kExternalStringExpectedButNotFound, \
|
|
|
|
"External string expected, but not found") \
|
|
|
|
V(kForInStatementWithNonLocalEachVariable, \
|
|
|
|
"ForInStatement with non-local each variable") \
|
|
|
|
V(kForOfStatement, "ForOfStatement") \
|
2015-07-20 14:53:28 +00:00
|
|
|
V(kFunctionBeingDebugged, "Function is being debugged") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kFunctionCallsEval, "Function calls eval") \
|
2015-07-30 11:36:26 +00:00
|
|
|
V(kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, \
|
|
|
|
"The function_data field should be a BytecodeArray on interpreter entry") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kGeneratedCodeIsTooLarge, "Generated code is too large") \
|
|
|
|
V(kGenerator, "Generator") \
|
[ignition] desugar GetIterator() via bytecode rather than via AST
Introduces:
- a new AST node representing the GetIterator() algorithm in the specification, to be used by ForOfStatement, YieldExpression (in the case of delegating yield*), and the future `for-await-of` loop proposed in http://tc39.github.io/proposal-async-iteration/#sec-async-iterator-value-unwrap-functions.
- a new opcode (JumpIfJSReceiver), which is useful for `if Type(object) is not Object` checks which are common throughout the specification. This node is easily eliminated by TurboFan.
The AST node is desugared specially in bytecode, rather than manually when building the AST. The benefit of this is that desugaring in the BytecodeGenerator is much simpler and easier to understand than desugaring the AST.
This also reduces parse time very slightly, and allows us to use LoadIC rather than KeyedLoadIC, which seems to have better baseline performance. This results in a ~20% improvement in test/js-perf-test/Iterators micro-benchmarks, which I believe owes to the use of the slightly faster LoadIC as opposed to the KeyedLoadIC in the baseline case. Both produce identical optimized code via TurboFan when the type check can be eliminated, and the load can be replaced with a constant value.
BUG=v8:4280
R=bmeurer@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, neis@chromium.org, jarin@chromium.org
TBR=rossberg@chromium.org
Review-Url: https://codereview.chromium.org/2557593004
Cr-Commit-Position: refs/heads/master@{#41555}
2016-12-07 15:19:52 +00:00
|
|
|
V(kGetIterator, "GetIterator") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kGlobalFunctionsMustHaveInitialMap, \
|
|
|
|
"Global functions must have initial map") \
|
2016-04-11 10:01:09 +00:00
|
|
|
V(kGraphBuildingFailed, "Optimized graph construction failed") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \
|
|
|
|
V(kHydrogenFilter, "Optimization disabled by filter") \
|
|
|
|
V(kIndexIsNegative, "Index is negative") \
|
|
|
|
V(kIndexIsTooLarge, "Index is too large") \
|
|
|
|
V(kInliningBailedOut, "Inlining bailed out") \
|
|
|
|
V(kInputGPRIsExpectedToHaveUpper32Cleared, \
|
|
|
|
"Input GPR is expected to have upper32 cleared") \
|
|
|
|
V(kInputStringTooLong, "Input string too long") \
|
|
|
|
V(kInteger32ToSmiFieldWritingToNonSmiLocation, \
|
|
|
|
"Integer32ToSmiField writing to non-smi location") \
|
2016-03-21 17:08:21 +00:00
|
|
|
V(kInvalidBytecode, "Invalid bytecode") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \
|
|
|
|
"Invalid ElementsKind for InternalArray or InternalPackedArray") \
|
2016-05-11 15:06:40 +00:00
|
|
|
V(kInvalidFrameForFastNewRestArgumentsStub, \
|
|
|
|
"Invalid frame for FastNewRestArgumentsStub") \
|
|
|
|
V(kInvalidFrameForFastNewSloppyArgumentsStub, \
|
|
|
|
"Invalid frame for FastNewSloppyArgumentsStub") \
|
|
|
|
V(kInvalidFrameForFastNewStrictArgumentsStub, \
|
|
|
|
"Invalid frame for FastNewStrictArgumentsStub") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kInvalidFullCodegenState, "invalid full-codegen state") \
|
|
|
|
V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \
|
2016-05-13 16:01:15 +00:00
|
|
|
V(kInvalidJumpTableIndex, "Invalid jump table index") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \
|
|
|
|
V(kInvalidLhsInCompoundAssignment, "Invalid lhs in compound assignment") \
|
|
|
|
V(kInvalidLhsInCountOperation, "Invalid lhs in count operation") \
|
|
|
|
V(kInvalidMinLength, "Invalid min_length") \
|
2016-04-28 14:54:39 +00:00
|
|
|
V(kInvalidRegisterFileInGenerator, "invalid register file in generator") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kJSObjectWithFastElementsMapHasSlowElements, \
|
|
|
|
"JSObject with fast elements map has slow elements") \
|
|
|
|
V(kLetBindingReInitialization, "Let binding re-initialization") \
|
|
|
|
V(kLiveEdit, "LiveEdit") \
|
|
|
|
V(kLookupVariableInCountOperation, "Lookup variable in count operation") \
|
|
|
|
V(kMapBecameDeprecated, "Map became deprecated") \
|
|
|
|
V(kMapBecameUnstable, "Map became unstable") \
|
2016-11-21 12:25:11 +00:00
|
|
|
V(kMissingBytecodeArray, "Missing bytecode array from function") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kNativeFunctionLiteral, "Native function literal") \
|
|
|
|
V(kNeedSmiLiteral, "Need a Smi literal here") \
|
|
|
|
V(kNoCasesLeft, "No cases left") \
|
|
|
|
V(kNonInitializerAssignmentToConst, "Non-initializer assignment to const") \
|
|
|
|
V(kNonSmiIndex, "Non-smi index") \
|
|
|
|
V(kNonSmiKeyInArrayLiteral, "Non-smi key in array literal") \
|
|
|
|
V(kNonSmiValue, "Non-smi value") \
|
|
|
|
V(kNonObject, "Non-object value") \
|
|
|
|
V(kNotEnoughVirtualRegistersForValues, \
|
|
|
|
"Not enough virtual registers for values") \
|
|
|
|
V(kNotEnoughSpillSlotsForOsr, "Not enough spill slots for OSR") \
|
|
|
|
V(kNotEnoughVirtualRegistersRegalloc, \
|
|
|
|
"Not enough virtual registers (regalloc)") \
|
|
|
|
V(kObjectLiteralWithComplexProperty, "Object literal with complex property") \
|
|
|
|
V(kOffsetOutOfRange, "Offset out of range") \
|
2016-03-21 09:05:21 +00:00
|
|
|
V(kOperandIsANumber, "Operand is a number") \
|
2015-12-27 06:30:53 +00:00
|
|
|
V(kOperandIsASmiAndNotABoundFunction, \
|
|
|
|
"Operand is a smi and not a bound function") \
|
[builtins] Unify the various versions of [[Call]] with a Call builtin.
The new Call and CallFunction builtins supersede the current
CallFunctionStub (and CallIC magic) and will be the single bottleneck
for all calling, including the currently special Function.prototype.call
and Function.prototype.apply builtins, which had handwritten (and
not fully compliant) versions of CallFunctionStub, and also the
CallIC(s), which where also slightly different.
This also reduces the overhead for API function calls, which is still
unnecessary high, but let's do that step-by-step.
This also fixes a bunch of cases where the implicit ToObject for
sloppy receivers was done in the wrong context (in the caller
context instead of the callee context), which basically meant
that we allowed cross context access to %ObjectPrototype%.
MIPS and MIPS64 ports contributed by akos.palfi@imgtec.com.
R=mstarzinger@chromium.org, jarin@chromium.org, mvstanton@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
BUG=v8:4413
LOG=n
Committed: https://crrev.com/ef268a83be4dead004047c25b702319ea4be7277
Cr-Commit-Position: refs/heads/master@{#30627}
Review URL: https://codereview.chromium.org/1311013008
Cr-Commit-Position: refs/heads/master@{#30629}
2015-09-08 07:50:22 +00:00
|
|
|
V(kOperandIsASmiAndNotAFunction, "Operand is a smi and not a function") \
|
2016-04-06 08:37:09 +00:00
|
|
|
V(kOperandIsASmiAndNotAGeneratorObject, \
|
|
|
|
"Operand is a smi and not a generator object") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \
|
2016-02-19 07:12:18 +00:00
|
|
|
V(kOperandIsASmiAndNotAReceiver, "Operand is a smi and not a receiver") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \
|
|
|
|
V(kOperandIsASmi, "Operand is a smi") \
|
2015-12-27 06:30:53 +00:00
|
|
|
V(kOperandIsNotABoundFunction, "Operand is not a bound function") \
|
[builtins] Unify the various versions of [[Call]] with a Call builtin.
The new Call and CallFunction builtins supersede the current
CallFunctionStub (and CallIC magic) and will be the single bottleneck
for all calling, including the currently special Function.prototype.call
and Function.prototype.apply builtins, which had handwritten (and
not fully compliant) versions of CallFunctionStub, and also the
CallIC(s), which where also slightly different.
This also reduces the overhead for API function calls, which is still
unnecessary high, but let's do that step-by-step.
This also fixes a bunch of cases where the implicit ToObject for
sloppy receivers was done in the wrong context (in the caller
context instead of the callee context), which basically meant
that we allowed cross context access to %ObjectPrototype%.
MIPS and MIPS64 ports contributed by akos.palfi@imgtec.com.
R=mstarzinger@chromium.org, jarin@chromium.org, mvstanton@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
BUG=v8:4413
LOG=n
Committed: https://crrev.com/ef268a83be4dead004047c25b702319ea4be7277
Cr-Commit-Position: refs/heads/master@{#30627}
Review URL: https://codereview.chromium.org/1311013008
Cr-Commit-Position: refs/heads/master@{#30629}
2015-09-08 07:50:22 +00:00
|
|
|
V(kOperandIsNotAFunction, "Operand is not a function") \
|
2016-04-06 08:37:09 +00:00
|
|
|
V(kOperandIsNotAGeneratorObject, "Operand is not a generator object") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kOperandIsNotAName, "Operand is not a name") \
|
|
|
|
V(kOperandIsNotANumber, "Operand is not a number") \
|
2016-02-19 07:12:18 +00:00
|
|
|
V(kOperandIsNotAReceiver, "Operand is not a receiver") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kOperandIsNotASmi, "Operand is not a smi") \
|
|
|
|
V(kOperandIsNotAString, "Operand is not a string") \
|
|
|
|
V(kOperandIsNotSmi, "Operand is not smi") \
|
|
|
|
V(kOperandNotANumber, "Operand not a number") \
|
|
|
|
V(kObjectTagged, "The object is tagged") \
|
|
|
|
V(kObjectNotTagged, "The object is not tagged") \
|
2016-05-16 15:37:45 +00:00
|
|
|
V(kOptimizationDisabled, "Optimization disabled") \
|
|
|
|
V(kOptimizationDisabledForTest, "Optimization disabled for test") \
|
2016-11-29 17:18:12 +00:00
|
|
|
V(kDeoptimizedTooManyTimes, "Deoptimized too many times") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \
|
|
|
|
"Out of virtual registers while trying to allocate temp register") \
|
|
|
|
V(kParseScopeError, "Parse/scope error") \
|
|
|
|
V(kPossibleDirectCallToEval, "Possible direct call to eval") \
|
|
|
|
V(kReceivedInvalidReturnAddress, "Received invalid return address") \
|
|
|
|
V(kReferenceToAVariableWhichRequiresDynamicLookup, \
|
|
|
|
"Reference to a variable which requires dynamic lookup") \
|
|
|
|
V(kReferenceToGlobalLexicalVariable, "Reference to global lexical variable") \
|
2016-11-08 11:45:04 +00:00
|
|
|
V(kReferenceToModuleVariable, "Reference to module-allocated variable") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \
|
|
|
|
V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \
|
|
|
|
V(kRegisterWasClobbered, "Register was clobbered") \
|
|
|
|
V(kRememberedSetPointerInNewSpace, "Remembered set pointer is in new space") \
|
2015-12-23 12:07:02 +00:00
|
|
|
V(kRestParameter, "Rest parameters") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kReturnAddressNotFoundInFrame, "Return address not found in frame") \
|
2015-11-05 13:23:13 +00:00
|
|
|
V(kSloppyFunctionExpectsJSReceiverReceiver, \
|
|
|
|
"Sloppy function expects JSReceiver as receiver.") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kSmiAdditionOverflow, "Smi addition overflow") \
|
|
|
|
V(kSmiSubtractionOverflow, "Smi subtraction overflow") \
|
2017-01-23 09:03:35 +00:00
|
|
|
V(kSpreadCall, "Call with spread argument") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kStackAccessBelowStackPointer, "Stack access below stack pointer") \
|
|
|
|
V(kStackFrameTypesMustMatch, "Stack frame types must match") \
|
2015-04-07 15:44:16 +00:00
|
|
|
V(kSuperReference, "Super reference") \
|
2016-02-11 09:58:38 +00:00
|
|
|
V(kTailCall, "Tail call") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kTheCurrentStackPointerIsBelowCsp, \
|
|
|
|
"The current stack pointer is below csp") \
|
|
|
|
V(kTheStackWasCorruptedByMacroAssemblerCall, \
|
|
|
|
"The stack was corrupted by MacroAssembler::Call()") \
|
|
|
|
V(kTooManyParametersLocals, "Too many parameters/locals") \
|
|
|
|
V(kTooManyParameters, "Too many parameters") \
|
|
|
|
V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \
|
|
|
|
V(kToOperand32UnsupportedImmediate, "ToOperand32 unsupported immediate.") \
|
|
|
|
V(kToOperandIsDoubleRegisterUnimplemented, \
|
|
|
|
"ToOperand IsDoubleRegister unimplemented") \
|
|
|
|
V(kToOperandUnsupportedDoubleImmediate, \
|
|
|
|
"ToOperand Unsupported double immediate") \
|
|
|
|
V(kTryCatchStatement, "TryCatchStatement") \
|
|
|
|
V(kTryFinallyStatement, "TryFinallyStatement") \
|
|
|
|
V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \
|
|
|
|
V(kUnalignedCellInWriteBarrier, "Unaligned cell in write barrier") \
|
|
|
|
V(kUnexpectedAllocationTop, "Unexpected allocation top") \
|
|
|
|
V(kUnexpectedColorFound, "Unexpected color bit pattern found") \
|
|
|
|
V(kUnexpectedElementsKindInArrayConstructor, \
|
|
|
|
"Unexpected ElementsKind in array constructor") \
|
|
|
|
V(kUnexpectedFallthroughFromCharCodeAtSlowCase, \
|
|
|
|
"Unexpected fallthrough from CharCodeAt slow case") \
|
|
|
|
V(kUnexpectedFallthroughFromCharFromCodeSlowCase, \
|
|
|
|
"Unexpected fallthrough from CharFromCode slow case") \
|
|
|
|
V(kUnexpectedFallThroughFromStringComparison, \
|
|
|
|
"Unexpected fall-through from string comparison") \
|
|
|
|
V(kUnexpectedFallthroughToCharCodeAtSlowCase, \
|
|
|
|
"Unexpected fallthrough to CharCodeAt slow case") \
|
|
|
|
V(kUnexpectedFallthroughToCharFromCodeSlowCase, \
|
|
|
|
"Unexpected fallthrough to CharFromCode slow case") \
|
|
|
|
V(kUnexpectedFPUStackDepthAfterInstruction, \
|
|
|
|
"Unexpected FPU stack depth after instruction") \
|
|
|
|
V(kUnexpectedInitialMapForArrayFunction1, \
|
|
|
|
"Unexpected initial map for Array function (1)") \
|
|
|
|
V(kUnexpectedInitialMapForArrayFunction2, \
|
|
|
|
"Unexpected initial map for Array function (2)") \
|
|
|
|
V(kUnexpectedInitialMapForArrayFunction, \
|
|
|
|
"Unexpected initial map for Array function") \
|
|
|
|
V(kUnexpectedInitialMapForInternalArrayFunction, \
|
|
|
|
"Unexpected initial map for InternalArray function") \
|
|
|
|
V(kUnexpectedLevelAfterReturnFromApiCall, \
|
|
|
|
"Unexpected level after return from api call") \
|
|
|
|
V(kUnexpectedNegativeValue, "Unexpected negative value") \
|
2016-03-22 11:35:09 +00:00
|
|
|
V(kUnexpectedFunctionIDForInvokeIntrinsic, \
|
|
|
|
"Unexpected runtime function id for the InvokeIntrinsic bytecode") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kUnexpectedFPCRMode, "Unexpected FPCR mode.") \
|
|
|
|
V(kUnexpectedSmi, "Unexpected smi value") \
|
2016-02-23 13:40:38 +00:00
|
|
|
V(kUnexpectedStackDepth, "Unexpected operand stack depth in full-codegen") \
|
2015-10-02 18:13:41 +00:00
|
|
|
V(kUnexpectedStackPointer, "The stack pointer is not the expected value") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kUnexpectedStringType, "Unexpected string type") \
|
|
|
|
V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \
|
|
|
|
"Unexpected type for RegExp data, FixedArray expected") \
|
|
|
|
V(kUnexpectedValue, "Unexpected value") \
|
|
|
|
V(kUnsupportedDoubleImmediate, "Unsupported double immediate") \
|
2017-01-18 19:27:41 +00:00
|
|
|
V(kUnsupportedLetCompoundAssignment, "Unsupported let compound assignment") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kUnsupportedLookupSlotInDeclaration, \
|
|
|
|
"Unsupported lookup slot in declaration") \
|
2016-11-08 11:01:03 +00:00
|
|
|
V(kUnsupportedModuleOperation, "Unsupported module operation") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kUnsupportedNonPrimitiveCompare, "Unsupported non-primitive compare") \
|
|
|
|
V(kUnsupportedPhiUseOfArguments, "Unsupported phi use of arguments") \
|
|
|
|
V(kUnsupportedPhiUseOfConstVariable, \
|
2016-03-01 15:12:56 +00:00
|
|
|
"Unsupported phi use of const or let variable") \
|
2015-10-19 10:59:00 +00:00
|
|
|
V(kUnexpectedReturnFromThrow, "Unexpectedly returned from a throw") \
|
2015-12-01 12:16:53 +00:00
|
|
|
V(kUnsupportedSwitchStatement, "Unsupported switch statement") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kUnsupportedTaggedImmediate, "Unsupported tagged immediate") \
|
2016-10-26 13:43:45 +00:00
|
|
|
V(kUnstableConstantTypeHeapObject, "Unstable constant-type heap object") \
|
2014-09-24 07:08:27 +00:00
|
|
|
V(kVariableResolvedToWithContext, "Variable resolved to with context") \
|
|
|
|
V(kWithStatement, "WithStatement") \
|
|
|
|
V(kWrongFunctionContext, "Wrong context passed to function") \
|
|
|
|
V(kWrongAddressOrValuePassedToRecordWrite, \
|
|
|
|
"Wrong address or value passed to RecordWrite") \
|
2016-03-22 11:35:09 +00:00
|
|
|
V(kWrongArgumentCountForInvokeIntrinsic, \
|
|
|
|
"Wrong number of arguments for intrinsic") \
|
2015-01-12 11:39:48 +00:00
|
|
|
V(kShouldNotDirectlyEnterOsrFunction, \
|
[wasm] TrapIf and TrapUnless TurboFan operators implemented on arm.
Original commit message:
[wasm] Introduce the TrapIf and TrapUnless operators to generate trap code.
Some instructions in WebAssembly trap for some inputs, which means that the
execution is terminated and (at least at the moment) a JavaScript exception is
thrown. Examples for traps are out-of-bounds memory accesses, or integer
divisions by zero.
Without the TrapIf and TrapUnless operators trap check in WebAssembly introduces 5
TurboFan nodes (branch, if_true, if_false, trap-reason constant, trap-position
constant), in addition to the trap condition itself. Additionally, each
WebAssembly function has four TurboFan nodes (merge, effect_phi, 2 phis) whose
number of inputs is linear to the number of trap checks in the function.
Especially for functions with high numbers of trap checks we observe a
significant slowdown in compilation time, down to 0.22 MiB/s in the sqlite
benchmark instead of the average of 3 MiB/s in other benchmarks. By introducing
a TrapIf common operator only a single node is necessary per trap check, in
addition to the trap condition. Also the nodes which are shared between trap
checks (merge, effect_phi, 2 phis) would disappear. First measurements suggest a
speedup of 30-50% on average.
This CL only implements TrapIf and TrapUnless on x64. The implementation is also
hidden behind the --wasm-trap-if flag.
Please take a special look at how the source position is transfered from the
instruction selector to the code generator, and at the context that is used for
the runtime call.
R=titzer@chromium.org, v8-arm-ports@googlegroups.com
Review-Url: https://codereview.chromium.org/2584603002
Cr-Commit-Position: refs/heads/master@{#41774}
2016-12-16 17:16:44 +00:00
|
|
|
"Should not directly enter OSR-compiled function") \
|
|
|
|
V(kUnexpectedReturnFromWasmTrap, \
|
|
|
|
"Should not return after throwing a wasm trap")
|
2014-09-24 07:08:27 +00:00
|
|
|
|
|
|
|
#define ERROR_MESSAGES_CONSTANTS(C, T) C,
|
|
|
|
enum BailoutReason {
|
|
|
|
ERROR_MESSAGES_LIST(ERROR_MESSAGES_CONSTANTS) kLastErrorMessage
|
|
|
|
};
|
|
|
|
#undef ERROR_MESSAGES_CONSTANTS
|
|
|
|
|
|
|
|
|
|
|
|
const char* GetBailoutReason(BailoutReason reason);
|
2015-02-27 08:03:57 +00:00
|
|
|
|
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|
2014-09-24 07:08:27 +00:00
|
|
|
|
|
|
|
#endif // V8_BAILOUT_REASON_H_
|