-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: allow easier checking of permanent deoptimizations #12456
Changes from all commits
91ccea6
7a5bac5
e283319
e9c02c6
e8a4290
033ea99
a641b7c
8491c70
d5925af
3c098ee
4484e8f
b45abfd
b6da225
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,8 +82,8 @@ function getOptions(options, defaultOptions) { | |
} | ||
|
||
function copyObject(source) { | ||
const target = {}; | ||
for (const key in source) | ||
var target = {}; | ||
for (var key in source) | ||
target[key] = source[key]; | ||
return target; | ||
} | ||
|
@@ -320,7 +320,7 @@ fs.existsSync = function(path) { | |
}; | ||
|
||
fs.readFile = function(path, options, callback) { | ||
callback = maybeCallback(arguments[arguments.length - 1]); | ||
callback = maybeCallback(callback || options); | ||
options = getOptions(options, { flag: 'r' }); | ||
|
||
if (handleError((path = getPathFromURL(path)), callback)) | ||
|
@@ -1216,9 +1216,7 @@ fs.futimesSync = function(fd, atime, mtime) { | |
binding.futimes(fd, atime, mtime); | ||
}; | ||
|
||
function writeAll(fd, isUserFd, buffer, offset, length, position, callback_) { | ||
var callback = maybeCallback(arguments[arguments.length - 1]); | ||
|
||
function writeAll(fd, isUserFd, buffer, offset, length, position, callback) { | ||
// write(fd, buffer, offset, length, position, callback) | ||
fs.write(fd, buffer, offset, length, position, function(writeErr, written) { | ||
if (writeErr) { | ||
|
@@ -1249,7 +1247,7 @@ function writeAll(fd, isUserFd, buffer, offset, length, position, callback_) { | |
} | ||
|
||
fs.writeFile = function(path, data, options, callback) { | ||
callback = maybeCallback(arguments[arguments.length - 1]); | ||
callback = maybeCallback(callback || options); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto for comment above. |
||
options = getOptions(options, { encoding: 'utf8', mode: 0o666, flag: 'w' }); | ||
const flag = options.flag || 'w'; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ function shared(message, handle, indexesKey, cb) { | |
delete handles[key]; | ||
delete indexes[indexesKey]; | ||
return close.apply(this, arguments); | ||
}; | ||
}.bind(handle); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mind explaining this one? Typically There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bad value context for arguments value See: https://gist.github.com/Hypercubed/89808f3051101a1a97f3 |
||
assert(handles[key] === undefined); | ||
handles[key] = handle; | ||
cb(message.errno, handle); | ||
|
@@ -192,7 +192,7 @@ function _disconnect(masterInitiated) { | |
} | ||
} | ||
|
||
for (const key in handles) { | ||
for (var key in handles) { | ||
const handle = handles[key]; | ||
delete handles[key]; | ||
waitingCount++; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see why this might indeed be "semver-major-y" but it looks fine to me. The only difference is in the case callback is passed but not as a function at which point
options
would be passed and would be rethrown if real options passed.I think a CITGM run would be sufficient here and if that passes I don't think we need to change it or semver-major it.
Also I'm very surprised arguments use only indexed access and length check is performed deopts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's also because
arguments
was being used in a function where the named arguments were being overwritten. This could be a Crankshaft-specific limitation though, I'm not sure.