summaryrefslogtreecommitdiffstats
path: root/js/src/jit
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-12-01 13:34:22 -0500
committerGaming4JC <g4jc@hyperbola.info>2019-12-17 06:25:23 -0500
commit9163aaebb670bd87e6ef71beaf24999c926217eb (patch)
tree48bc403ef6b3349b749b0c38c1e94818b0734274 /js/src/jit
parent1fd726c6b04faacbb49c525ec733d9419ab65a84 (diff)
downloadUXP-9163aaebb670bd87e6ef71beaf24999c926217eb.tar
UXP-9163aaebb670bd87e6ef71beaf24999c926217eb.tar.gz
UXP-9163aaebb670bd87e6ef71beaf24999c926217eb.tar.lz
UXP-9163aaebb670bd87e6ef71beaf24999c926217eb.tar.xz
UXP-9163aaebb670bd87e6ef71beaf24999c926217eb.zip
Bug 1343481 - Part 1: Remove {JSFunction,JSScript,LazyScript}.isGenerator() method.
Tag #1287
Diffstat (limited to 'js/src/jit')
-rw-r--r--js/src/jit/Ion.cpp11
-rw-r--r--js/src/jit/IonAnalysis.cpp8
2 files changed, 16 insertions, 3 deletions
diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp
index b8a2d2fba..9337f6150 100644
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -2320,7 +2320,9 @@ IonCompile(JSContext* cx, JSScript* script,
static bool
CheckFrame(JSContext* cx, BaselineFrame* frame)
{
- MOZ_ASSERT(!frame->script()->isGenerator());
+ MOZ_ASSERT(!frame->script()->isStarGenerator());
+ MOZ_ASSERT(!frame->script()->isLegacyGenerator());
+ MOZ_ASSERT(!frame->script()->isAsync());
MOZ_ASSERT(!frame->isDebuggerEvalFrame());
MOZ_ASSERT(!frame->isEvalFrame());
@@ -2351,11 +2353,16 @@ CheckScript(JSContext* cx, JSScript* script, bool osr)
return false;
}
- if (script->isGenerator()) {
+ if (script->isStarGenerator() || script->isLegacyGenerator()) {
TrackAndSpewIonAbort(cx, script, "generator script");
return false;
}
+ if (script->isAsync()) {
+ TrackAndSpewIonAbort(cx, script, "async script");
+ return false;
+ }
+
if (script->hasNonSyntacticScope() && !script->functionNonDelazifying()) {
// Support functions with a non-syntactic global scope but not other
// scripts. For global scripts, IonBuilder currently uses the global
diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp
index ace6cd81e..a4724bca4 100644
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -4402,8 +4402,14 @@ jit::AnalyzeArgumentsUsage(JSContext* cx, JSScript* scriptArg)
// direct eval is present.
//
// FIXME: Don't build arguments for ES6 generator expressions.
- if (scriptArg->isDebuggee() || script->isGenerator() || script->bindingsAccessedDynamically())
+ if (scriptArg->isDebuggee() ||
+ script->isStarGenerator() ||
+ script->isLegacyGenerator() ||
+ script->isAsync() ||
+ script->bindingsAccessedDynamically())
+ {
return true;
+ }
if (!jit::IsIonEnabled(cx))
return true;