Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: src/compiler/linkage.cc

Issue 2331543002: [turbofan] Switch from a whitelist to a blacklist for NeedsFrameStateInput (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-644631.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/linkage.cc
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
index cb84516ea28a665d9de9122ee0f58c0992c7e972..523ce47b0f9cbb85f5c040c387477d1fbd5c253e 100644
--- a/src/compiler/linkage.cc
+++ b/src/compiler/linkage.cc
@@ -124,10 +124,11 @@ CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) {
// static
bool Linkage::NeedsFrameStateInput(Runtime::FunctionId function) {
- // Most runtime functions need a FrameState. A few chosen ones that we know
- // not to call into arbitrary JavaScript, not to throw, and not to deoptimize
- // are blacklisted here and can be called without a FrameState.
switch (function) {
+ // Most runtime functions need a FrameState. A few chosen ones that we know
+ // not to call into arbitrary JavaScript, not to throw, and not to
+ // deoptimize
+ // are whitelisted here and can be called without a FrameState.
case Runtime::kAbort:
case Runtime::kAllocateInTargetSpace:
case Runtime::kCreateIterResultObject:
@@ -153,29 +154,29 @@ bool Linkage::NeedsFrameStateInput(Runtime::FunctionId function) {
case Runtime::kTraceEnter:
case Runtime::kTraceExit:
return false;
- case Runtime::kInlineCall:
- case Runtime::kInlineDeoptimizeNow:
- case Runtime::kInlineGetPrototype:
- case Runtime::kInlineNewObject:
- case Runtime::kInlineRegExpConstructResult:
- case Runtime::kInlineRegExpExec:
- case Runtime::kInlineSubString:
- case Runtime::kInlineThrowNotDateError:
- case Runtime::kInlineToInteger:
- case Runtime::kInlineToLength:
- case Runtime::kInlineToNumber:
- case Runtime::kInlineToObject:
- case Runtime::kInlineToString:
- return true;
+
+ // Some inline intrinsics are also safe to call without a FrameState.
+ case Runtime::kInlineCreateIterResultObject:
+ case Runtime::kInlineFixedArrayGet:
+ case Runtime::kInlineFixedArraySet:
+ case Runtime::kInlineGeneratorClose:
+ case Runtime::kInlineGeneratorGetInputOrDebugPos:
+ case Runtime::kInlineGeneratorGetResumeMode:
+ case Runtime::kInlineGetSuperConstructor:
+ case Runtime::kInlineIsArray:
+ case Runtime::kInlineIsJSReceiver:
+ case Runtime::kInlineIsRegExp:
+ case Runtime::kInlineIsSmi:
+ case Runtime::kInlineIsTypedArray:
+ case Runtime::kInlineRegExpFlags:
+ case Runtime::kInlineRegExpSource:
+ return false;
+
default:
break;
}
- // Most inlined runtime functions (except the ones listed above) can be called
- // without a FrameState or will be lowered by JSIntrinsicLowering internally.
- const Runtime::Function* const f = Runtime::FunctionForId(function);
- if (f->intrinsic_type == Runtime::IntrinsicType::INLINE) return false;
-
+ // For safety, default to needing a FrameState unless whitelisted.
return true;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-644631.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698