Skip to content

Commit

Permalink
Bug 1858679 part 2 - Remove dead code from CloneFunctionReuseScript. …
Browse files Browse the repository at this point in the history
…r=iain

Searchfox suggested the code to handle self-hosted lazy functions is dead and
this is indeed no longer used to clone lazy self-hosted functions.

Depends on D190821

Differential Revision: https://phabricator.services.mozilla.com/D190823

UltraBlame original commit: 810153993fc0b06ce0eabae2602fc7f74ed9be18
  • Loading branch information
marco-c committed Oct 13, 2023
1 parent 18f5c4e commit 5797cca
Showing 1 changed file with 13 additions and 55 deletions.
68 changes: 13 additions & 55 deletions js/src/vm/JSFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11224,6 +11224,16 @@ isInterpreted
;
MOZ_ASSERT
(
fun
-
>
hasBaseScript
(
)
)
;
MOZ_ASSERT
(
CanReuseScriptForClone
(
cx
Expand All @@ -11237,17 +11247,16 @@ enclosingEnv
)
)
;
RootedFunction
JSFunction
*
clone
(
cx
=
NewFunctionClone
(
cx
fun
proto
)
)
;
if
(
Expand All @@ -11259,16 +11268,6 @@ return
nullptr
;
}
if
(
fun
-
>
hasBaseScript
(
)
)
{
BaseScript
*
base
Expand Down Expand Up @@ -11296,47 +11295,6 @@ initEnvironment
enclosingEnv
)
;
}
else
{
MOZ_ASSERT
(
fun
-
>
hasSelfHostedLazyScript
(
)
)
;
SelfHostedLazyScript
*
lazy
=
fun
-
>
selfHostedLazyScript
(
)
;
clone
-
>
initSelfHostedLazyScript
(
lazy
)
;
clone
-
>
initEnvironment
(
enclosingEnv
)
;
}
#
ifdef
DEBUG
Expand Down

0 comments on commit 5797cca

Please sign in to comment.