Skip to content

Commit a851b86

Browse files
committed
lib: remove sources of permanent deopts
PR-URL: #10789 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 1c3df96 commit a851b86

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/fs.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,7 @@ fs.realpathSync = function realpathSync(p, options) {
15721572
}
15731573

15741574
var resolvedLink;
1575-
const maybeCachedResolved = cache && cache.get(base);
1575+
var maybeCachedResolved = cache && cache.get(base);
15761576
if (maybeCachedResolved) {
15771577
resolvedLink = maybeCachedResolved;
15781578
} else {
@@ -1585,8 +1585,8 @@ fs.realpathSync = function realpathSync(p, options) {
15851585

15861586
// read the link if it wasn't read before
15871587
// dev/ino always return 0 on windows, so skip the check.
1588-
let linkTarget = null;
1589-
let id;
1588+
var linkTarget = null;
1589+
var id;
15901590
if (!isWindows) {
15911591
id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`;
15921592
if (seenLinks.hasOwnProperty(id)) {

lib/module.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ Module._findPath = function(request, paths, isMain) {
179179
}
180180

181181
var exts;
182-
const trailingSlash = request.length > 0 &&
183-
request.charCodeAt(request.length - 1) === 47/*/*/;
182+
var trailingSlash = request.length > 0 &&
183+
request.charCodeAt(request.length - 1) === 47/*/*/;
184184

185185
// For each path
186186
for (var i = 0; i < paths.length; i++) {
@@ -190,7 +190,7 @@ Module._findPath = function(request, paths, isMain) {
190190
var basePath = path.resolve(curPath, request);
191191
var filename;
192192

193-
const rc = stat(basePath);
193+
var rc = stat(basePath);
194194
if (!trailingSlash) {
195195
if (rc === 0) { // File.
196196
if (preserveSymlinks && !isMain) {

0 commit comments

Comments
 (0)