From b4638faaa19d163eb3c10ad0213feb213dd6c3ee Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 13 Jan 2017 05:11:11 -0500 Subject: [PATCH] lib: remove sources of permanent deopts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: /~https://github.com/nodejs/node/pull/10789 Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso Reviewed-By: Michael Dawson Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum --- lib/fs.js | 6 +++--- lib/module.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 7cf96d88f18d98..d8ae0b09ba414e 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1572,7 +1572,7 @@ fs.realpathSync = function realpathSync(p, options) { } var resolvedLink; - const maybeCachedResolved = cache && cache.get(base); + var maybeCachedResolved = cache && cache.get(base); if (maybeCachedResolved) { resolvedLink = maybeCachedResolved; } else { @@ -1585,8 +1585,8 @@ fs.realpathSync = function realpathSync(p, options) { // read the link if it wasn't read before // dev/ino always return 0 on windows, so skip the check. - let linkTarget = null; - let id; + var linkTarget = null; + var id; if (!isWindows) { id = `${stat.dev.toString(32)}:${stat.ino.toString(32)}`; if (seenLinks.hasOwnProperty(id)) { diff --git a/lib/module.js b/lib/module.js index 2b1450aa26550e..f40a9aebb1592e 100644 --- a/lib/module.js +++ b/lib/module.js @@ -179,8 +179,8 @@ Module._findPath = function(request, paths, isMain) { } var exts; - const trailingSlash = request.length > 0 && - request.charCodeAt(request.length - 1) === 47/*/*/; + var trailingSlash = request.length > 0 && + request.charCodeAt(request.length - 1) === 47/*/*/; // For each path for (var i = 0; i < paths.length; i++) { @@ -190,7 +190,7 @@ Module._findPath = function(request, paths, isMain) { var basePath = path.resolve(curPath, request); var filename; - const rc = stat(basePath); + var rc = stat(basePath); if (!trailingSlash) { if (rc === 0) { // File. if (preserveSymlinks && !isMain) {