[Interpreter] Add StackCheck node to BytecodeGraphBuilder graphs.
This fixes a number of crashes where other code was assuming there would be at least one deopt point in all optimized functions (i.e., the StackCheck) but we weren't producing any. BUG=v8:4280 LOG=N Review URL: https://codereview.chromium.org/1572333002 Cr-Commit-Position: refs/heads/master@{#33243}
This commit is contained in:
parent
243fa1933c
commit
9b52c52845
@ -508,6 +508,12 @@ bool BytecodeGraphBuilder::CreateGraph(bool stack_check) {
|
||||
void BytecodeGraphBuilder::CreateGraphBody(bool stack_check) {
|
||||
// TODO(oth): Review ast-graph-builder equivalent, i.e. arguments
|
||||
// object setup, this function variable if used, tracing hooks.
|
||||
|
||||
if (stack_check) {
|
||||
Node* node = NewNode(javascript()->StackCheck());
|
||||
PrepareEntryFrameState(node);
|
||||
}
|
||||
|
||||
VisitBytecodes();
|
||||
}
|
||||
|
||||
@ -1875,6 +1881,16 @@ Node** BytecodeGraphBuilder::EnsureInputBufferSize(int size) {
|
||||
}
|
||||
|
||||
|
||||
void BytecodeGraphBuilder::PrepareEntryFrameState(Node* node) {
|
||||
DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
|
||||
DCHECK_EQ(IrOpcode::kDead,
|
||||
NodeProperties::GetFrameStateInput(node, 0)->opcode());
|
||||
NodeProperties::ReplaceFrameStateInput(
|
||||
node, 0, environment()->Checkpoint(BailoutId(0),
|
||||
OutputFrameStateCombine::Ignore()));
|
||||
}
|
||||
|
||||
|
||||
Node* BytecodeGraphBuilder::MakeNode(const Operator* op, int value_input_count,
|
||||
Node** value_inputs, bool incomplete) {
|
||||
DCHECK_EQ(op->ValueInputCount(), value_input_count);
|
||||
|
@ -168,6 +168,9 @@ class BytecodeGraphBuilder {
|
||||
void MergeEnvironmentsOfForwardBranches(int source_offset);
|
||||
void BuildLoopHeaderForBackwardBranches(int source_offset);
|
||||
|
||||
// Attaches a frame state to |node| for the entry to the function.
|
||||
void PrepareEntryFrameState(Node* node);
|
||||
|
||||
// Growth increment for the temporary buffer used to construct input lists to
|
||||
// new nodes.
|
||||
static const int kInputBufferSizeIncrement = 64;
|
||||
|
@ -506,15 +506,11 @@
|
||||
'test-compiler/C2JSFrames': [SKIP],
|
||||
'test-compiler/FeedbackVectorPreservedAcrossRecompiles': [SKIP],
|
||||
'test-compiler/FeedbackVectorUnaffectedByScopeChanges': [SKIP],
|
||||
'test-compiler/OptimizedCodeSharing1': [SKIP],
|
||||
'test-compiler/OptimizedCodeSharing2': [SKIP],
|
||||
'test-compiler/OptimizedCodeSharing3': [SKIP],
|
||||
'test-compiler/Print': [SKIP],
|
||||
'test-compiler/UncaughtThrow': [SKIP],
|
||||
'test-decls/CrossScriptDynamicLookup': [SKIP],
|
||||
'test-decls/CrossScriptLoadICs': [SKIP],
|
||||
'test-decls/CrossScriptStoreICs': [SKIP],
|
||||
'test-decls/Regress3941': [SKIP],
|
||||
'test-decls/Regress425510': [SKIP],
|
||||
'test-feedback-vector/VectorCallICStates': [SKIP],
|
||||
'test-heap/AddInstructionChangesNewSpacePromotion': [SKIP],
|
||||
@ -526,29 +522,22 @@
|
||||
'test-heap/IncrementalMarkingClearsMonomorphicConstructor': [SKIP],
|
||||
'test-heap/IncrementalMarkingPreservesMonomorphicCallIC': [SKIP],
|
||||
'test-heap/IncrementalMarkingPreservesMonomorphicConstructor': [SKIP],
|
||||
'test-heap/LeakNativeContextViaMap': [SKIP],
|
||||
'test-heap/NextCodeLinkIsWeak': [SKIP],
|
||||
'test-heap/NoWeakHashTableLeakWithIncrementalMarking': [SKIP],
|
||||
'test-heap-profiler/HeapSnapshotCollection': [SKIP],
|
||||
'test-heap-profiler/HeapSnapshotSimd': [SKIP],
|
||||
'test-heap-profiler/HeapSnapshotWeakCollection': [SKIP],
|
||||
'test-heap/OptimizedAllocationAlwaysInNewSpace': [SKIP],
|
||||
'test-heap/PromotionQueue': [SKIP],
|
||||
'test-heap/Regress159140': [SKIP],
|
||||
'test-heap/Regress169209': [SKIP],
|
||||
'test-heap/Regress1878': [SKIP],
|
||||
'test-heap/Regress357137': [SKIP],
|
||||
'test-heap/Regress3631': [SKIP],
|
||||
'test-heap/Regress388880': [SKIP],
|
||||
'test-heap/Regress513507': [SKIP],
|
||||
'test-heap/Regress514122': [SKIP],
|
||||
'test-heap/TestCodeFlushingIncrementalAbort': [SKIP],
|
||||
'test-heap/TestCodeFlushingIncrementalScavenge': [SKIP],
|
||||
'test-heap/TestCodeFlushingIncremental': [SKIP],
|
||||
'test-heap/TestCodeFlushingPreAged': [SKIP],
|
||||
'test-heap/TestCodeFlushing': [SKIP],
|
||||
'test-heap/TestInternalWeakLists': [SKIP],
|
||||
'test-heap/TestInternalWeakListsTraverseWithGC': [SKIP],
|
||||
'test-heap/WeakFunctionInConstructor': [SKIP],
|
||||
'test-log-stack-tracer/CFromJSStackTrace': [SKIP],
|
||||
'test-log-stack-tracer/JsEntrySp': [SKIP],
|
||||
@ -571,7 +560,6 @@
|
||||
'test-run-jsops/ClassLiteral': [SKIP],
|
||||
'test-run-jsops/LookupLoad': [SKIP],
|
||||
'test-run-jsops/LookupStore': [SKIP],
|
||||
'test-run-stackcheck/TerminateAtMethodEntry': [SKIP],
|
||||
'test-run-variables/ContextInitializeVariables': [SKIP],
|
||||
'test-run-variables/ContextLoadVariables': [SKIP],
|
||||
'test-run-variables/ContextStoreVariables': [SKIP],
|
||||
|
@ -737,7 +737,6 @@
|
||||
}], # 'arch == ppc and simulator_run == True'
|
||||
|
||||
['ignition == True', {
|
||||
'asm/*': [SKIP],
|
||||
'const*': [SKIP],
|
||||
'debug-*': [SKIP],
|
||||
'es6/*': [SKIP],
|
||||
@ -756,68 +755,48 @@
|
||||
'arguments-load-across-eval': [SKIP],
|
||||
'arguments-read-and-assignment': [SKIP],
|
||||
'array-bounds-check-removal': [SKIP],
|
||||
'array-constructor': [SKIP],
|
||||
'array-elements-from-array-prototype-chain': [SKIP],
|
||||
'array-functions-prototype-misc': [SKIP],
|
||||
'array-join': [SKIP],
|
||||
'array-length-number-conversion': [SKIP],
|
||||
'array-literal-feedback': [SKIP],
|
||||
'array-literal-transitions': [SKIP],
|
||||
'array-reduce': [SKIP],
|
||||
'array-tostring': [SKIP],
|
||||
'big-array-literal': [SKIP],
|
||||
'break': [SKIP],
|
||||
'call-runtime-tail': [SKIP],
|
||||
'comparison-ops-and-undefined': [SKIP],
|
||||
'compiler/compare-map-elim2': [SKIP],
|
||||
'compiler/countoperation': [SKIP],
|
||||
'compiler/dead-loops-neg': [SKIP],
|
||||
'compiler/dead-loops': [SKIP],
|
||||
'compiler/dead-string-char-code-at2': [SKIP],
|
||||
'compiler/dead-string-char-code-at': [SKIP],
|
||||
'compiler/dead-string-char-from-code': [SKIP],
|
||||
'compiler/deopt-inlined-smi': [SKIP],
|
||||
'compiler/deopt-tonumber-compare': [SKIP],
|
||||
'compiler/escape-analysis-arguments': [SKIP],
|
||||
'compiler/escape-analysis': [SKIP],
|
||||
'compiler/eval-introduced-closure': [SKIP],
|
||||
'compiler/expression-trees': [SKIP],
|
||||
'compiler/global-delete': [SKIP],
|
||||
'compiler/global-var-delete': [SKIP],
|
||||
'compiler/inline-arguments': [SKIP],
|
||||
'compiler/inline-arity-mismatch': [SKIP],
|
||||
'compiler/inline-construct': [SKIP],
|
||||
'compiler/lazy-const-lookup': [SKIP],
|
||||
'compiler/lazy-deopt-in-literal': [SKIP],
|
||||
'compiler/manual-concurrent-recompile': [SKIP],
|
||||
'compiler/optimized-for-in': [SKIP],
|
||||
'compiler/optimized-function-calls': [SKIP],
|
||||
'compiler/optimize_max': [SKIP],
|
||||
'compiler/optimize_min': [SKIP],
|
||||
'compiler/opt-next-call': [SKIP],
|
||||
'compiler/opt-next-call-turbo': [SKIP],
|
||||
'compiler/osr-forof': [SKIP],
|
||||
'compiler/osr-manual2': [SKIP],
|
||||
'compiler/phi-representations': [SKIP],
|
||||
'compiler/property-refs': [SKIP],
|
||||
'compiler/receiver-conversion': [SKIP],
|
||||
'compiler/regress-1394': [SKIP],
|
||||
'compiler/regress-3786': [SKIP],
|
||||
'compiler/regress-4207': [SKIP],
|
||||
'compiler/regress-446647': [SKIP],
|
||||
'compiler/regress-447567': [SKIP],
|
||||
'compiler/regress-469089': [SKIP],
|
||||
'compiler/regress-96989': [SKIP],
|
||||
'compiler/regress-closures-with-eval': [SKIP],
|
||||
'compiler/regress-const': [SKIP],
|
||||
'compiler/regress-funarguments': [SKIP],
|
||||
'compiler/regress-stacktrace-methods': [SKIP],
|
||||
'compiler/rotate': [SKIP],
|
||||
'compiler/safepoint': [SKIP],
|
||||
'compiler/switch-bailout': [SKIP],
|
||||
'compiler/try-deopt': [SKIP],
|
||||
'compiler/try-osr': [SKIP],
|
||||
'compiler/type-feedback-after-throw': [SKIP],
|
||||
'compiler/uint32': [SKIP],
|
||||
'compiler/variables': [SKIP],
|
||||
'context-calls-maintained': [SKIP],
|
||||
@ -826,10 +805,7 @@
|
||||
'cyclic-array-to-string': [SKIP],
|
||||
'd8-worker-sharedarraybuffer': [SKIP],
|
||||
'delete-in-with': [SKIP],
|
||||
'deopt-global-accessor': [SKIP],
|
||||
'deopt-minus-zero': [SKIP],
|
||||
'deserialize-optimize-inner': [SKIP],
|
||||
'deserialize-script-id': [SKIP],
|
||||
'double-equals': [SKIP],
|
||||
'eval-enclosing-function-name': [SKIP],
|
||||
'eval-stack-trace': [SKIP],
|
||||
@ -842,13 +818,7 @@
|
||||
'get-prototype-of': [SKIP],
|
||||
'getter-in-prototype': [SKIP],
|
||||
'global-hash': [SKIP],
|
||||
'global-infinity': [SKIP],
|
||||
'global-infinity-strict': [SKIP],
|
||||
'global-load-from-eval-in-with': [SKIP],
|
||||
'global-nan': [SKIP],
|
||||
'global-nan-strict': [SKIP],
|
||||
'global-undefined': [SKIP],
|
||||
'global-undefined-strict': [SKIP],
|
||||
'global-vars-with': [SKIP],
|
||||
'instanceof-2': [SKIP],
|
||||
'json-replacer-number-wrapper-tostring': [SKIP],
|
||||
@ -859,22 +829,18 @@
|
||||
'math-min-max': [SKIP],
|
||||
'messages': [SKIP],
|
||||
'mirror-object': [SKIP],
|
||||
'never-optimize': [SKIP],
|
||||
'numops-fuzz-part1': [SKIP],
|
||||
'numops-fuzz-part2': [SKIP],
|
||||
'numops-fuzz-part3': [SKIP],
|
||||
'numops-fuzz-part4': [SKIP],
|
||||
'object-literal-gc': [SKIP],
|
||||
'omit-constant-mapcheck': [SKIP],
|
||||
'osr-elements-kind': [SKIP],
|
||||
'property-load-across-eval': [SKIP],
|
||||
'proto-accessor': [SKIP],
|
||||
'readonly': [SKIP],
|
||||
'receiver-in-with-calls': [SKIP],
|
||||
'recursive-store-opt': [SKIP],
|
||||
'regress-3225': [SKIP],
|
||||
'regress/clear-keyed-call': [SKIP],
|
||||
'regress/cross-script-vars': [SKIP],
|
||||
'regress/poly_count_operation': [SKIP],
|
||||
'regress/regress-102153': [SKIP],
|
||||
'regress/regress-1030466': [SKIP],
|
||||
@ -890,7 +856,6 @@
|
||||
'regress/regress-1209': [SKIP],
|
||||
'regress/regress-123919': [SKIP],
|
||||
'regress/regress-124594': [SKIP],
|
||||
'regress/regress-124': [SKIP],
|
||||
'regress/regress-125515': [SKIP],
|
||||
'regress/regress-128018': [SKIP],
|
||||
'regress/regress-131994': [SKIP],
|
||||
@ -899,8 +864,6 @@
|
||||
'regress/regress-1369': [SKIP],
|
||||
'regress/regress-1403': [SKIP],
|
||||
'regress/regress-1412': [SKIP],
|
||||
'regress/regress-1423': [SKIP],
|
||||
'regress/regress-1434': [SKIP],
|
||||
'regress/regress-1436': [SKIP],
|
||||
'regress/regress-1493017': [SKIP],
|
||||
'regress/regress-1523': [SKIP],
|
||||
@ -918,13 +881,11 @@
|
||||
'regress/regress-2071': [SKIP],
|
||||
'regress/regress-2163': [SKIP],
|
||||
'regress/regress-220': [SKIP],
|
||||
'regress/regress-2315': [SKIP],
|
||||
'regress/regress-2318': [SKIP],
|
||||
'regress/regress-2339': [SKIP],
|
||||
'regress/regress-2374': [SKIP],
|
||||
'regress/regress-2444': [SKIP],
|
||||
'regress/regress-2593': [SKIP],
|
||||
'regress/regress-2594': [SKIP],
|
||||
'regress/regress-2618': [SKIP],
|
||||
'regress/regress-263': [SKIP],
|
||||
'regress/regress-265': [SKIP],
|
||||
@ -941,7 +902,6 @@
|
||||
'regress/regress-331444': [SKIP],
|
||||
'regress/regress-343609': [SKIP],
|
||||
'regress/regress-347530': [SKIP],
|
||||
'regress/regress-347542': [SKIP],
|
||||
'regress/regress-347914': [SKIP],
|
||||
'regress/regress-351261': [SKIP],
|
||||
'regress/regress-352982': [SKIP],
|
||||
@ -988,11 +948,9 @@
|
||||
'regress/regress-457935': [SKIP],
|
||||
'regress/regress-470804': [SKIP],
|
||||
'regress/regress-476488': [SKIP],
|
||||
'regress/regress-491536': [SKIP],
|
||||
'regress/regress-503565': [SKIP],
|
||||
'regress/regress-514362': [SKIP],
|
||||
'regress/regress-520029': [SKIP],
|
||||
'regress/regress-542099': [SKIP],
|
||||
'regress/regress-542100': [SKIP],
|
||||
'regress/regress-544991': [SKIP],
|
||||
'regress/regress-568765': [SKIP],
|
||||
@ -1027,14 +985,11 @@
|
||||
'regress/regress-convert-enum': [SKIP],
|
||||
'regress/regress-crbug-109362': [SKIP],
|
||||
'regress/regress-crbug-119800': [SKIP],
|
||||
'regress/regress-crbug-135008': [SKIP],
|
||||
'regress/regress-crbug-163530': [SKIP],
|
||||
'regress/regress-crbug-229923': [SKIP],
|
||||
'regress/regress-crbug-242502': [SKIP],
|
||||
'regress/regress-crbug-242924': [SKIP],
|
||||
'regress/regress-crbug-245480': [SKIP],
|
||||
'regress/regress-crbug-329709': [SKIP],
|
||||
'regress/regress-crbug-336148': [SKIP],
|
||||
'regress/regress-crbug-350864': [SKIP],
|
||||
'regress/regress-crbug-351262': [SKIP],
|
||||
'regress/regress-crbug-352058': [SKIP],
|
||||
@ -1065,11 +1020,9 @@
|
||||
'regress/regress-crbug-489293': [SKIP],
|
||||
'regress/regress-crbug-489597': [SKIP],
|
||||
'regress/regress-crbug-498142': [SKIP],
|
||||
'regress/regress-crbug-500824': [SKIP],
|
||||
'regress/regress-crbug-501809': [SKIP],
|
||||
'regress/regress-crbug-506443': [SKIP],
|
||||
'regress/regress-crbug-507070': [SKIP],
|
||||
'regress/regress-crbug-510738': [SKIP],
|
||||
'regress/regress-crbug-517592': [SKIP],
|
||||
'regress/regress-crbug-522895': [SKIP],
|
||||
'regress/regress-crbug-527364': [SKIP],
|
||||
@ -1086,7 +1039,6 @@
|
||||
'regress/regress-embedded-cons-string': [SKIP],
|
||||
'regress/regress-existing-shared-function-info': [SKIP],
|
||||
'regress/regress-fast-literal-transition': [SKIP],
|
||||
'regress/regress-filter-contexts': [SKIP],
|
||||
'regress/regress-function-constructor-receiver': [SKIP],
|
||||
'regress/regress-handle-illegal-redeclaration': [SKIP],
|
||||
'regress/regress-inline-class-constructor': [SKIP],
|
||||
@ -1102,13 +1054,11 @@
|
||||
'regress/regress-store-heapobject': [SKIP],
|
||||
'regress/regress-transcendental': [SKIP],
|
||||
'regress/regress-typedarray-length': [SKIP],
|
||||
'regress/regress-undefined-nan': [SKIP],
|
||||
'regress/splice-missing-wb': [SKIP],
|
||||
'shift-for-integer-div': [SKIP],
|
||||
'simple-constructor': [SKIP],
|
||||
'sparse-array-reverse': [SKIP],
|
||||
'stack-traces': [SKIP],
|
||||
'strict-mode-implicit-receiver': [SKIP],
|
||||
'strict-mode': [SKIP],
|
||||
'string-case': [SKIP],
|
||||
'string-external-cached': [SKIP],
|
||||
@ -1117,8 +1067,6 @@
|
||||
'string-replace-with-empty': [SKIP],
|
||||
'string-slices': [SKIP],
|
||||
'switch-opt': [SKIP],
|
||||
'switch': [SKIP],
|
||||
'tail-call-intrinsic': [SKIP],
|
||||
'tools/profile': [SKIP],
|
||||
'tools/profviz': [SKIP],
|
||||
'try-finally-continue': [SKIP],
|
||||
|
Loading…
Reference in New Issue
Block a user