Permalink
Browse files

lib: remove sources of permanent deopts

PR-URL: #10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information...
mscdex committed Jan 13, 2017
1 parent 1c3df96 commit a851b868c0a475c29e5af4c0414f9b2d1fa8d26f
Showing with 6 additions and 6 deletions.
  1. +3 −3 lib/fs.js
  2. +3 −3 lib/module.js
View
@@ -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)) {
View
@@ -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) {

0 comments on commit a851b86

Please sign in to comment.