forked from qtwebkit/qtwebkit
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'upstream' into merge-upstream-2023-12-18
- Loading branch information
Showing
17,038 changed files
with
858,677 additions
and
346,975 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
JSTests/microbenchmarks/define-properties-all-of-keys.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
const properties = { | ||
closed: { | ||
get() { | ||
return this._writableState ? this._writableState.closed : false; | ||
}, | ||
}, | ||
destroyed: { | ||
get() { | ||
return this._writableState ? this._writableState.destroyed : false; | ||
}, | ||
set(value) { | ||
if (this._writableState) { | ||
this._writableState.destroyed = value; | ||
} | ||
}, | ||
}, | ||
writable: { | ||
get() { | ||
const w = this._writableState; | ||
return ( | ||
!!w && | ||
w.writable !== false && | ||
!w.destroyed && | ||
!w.errored && | ||
!w.ending && | ||
!w.ended | ||
); | ||
}, | ||
set(val) { | ||
if (this._writableState) { | ||
this._writableState.writable = !!val; | ||
} | ||
}, | ||
}, | ||
writableFinished: { | ||
get() { | ||
return this._writableState ? this._writableState.finished : false; | ||
}, | ||
}, | ||
writableObjectMode: { | ||
get() { | ||
return this._writableState ? this._writableState.objectMode : false; | ||
}, | ||
}, | ||
writableBuffer: { | ||
get() { | ||
return this._writableState && this._writableState.getBuffer(); | ||
}, | ||
}, | ||
writableEnded: { | ||
get() { | ||
return this._writableState ? this._writableState.ending : false; | ||
}, | ||
}, | ||
writableNeedDrain: { | ||
get() { | ||
const wState = this._writableState; | ||
if (!wState) return false; | ||
return !wState.destroyed && !wState.ending && wState.needDrain; | ||
}, | ||
}, | ||
writableHighWaterMark: { | ||
get() { | ||
return this._writableState && this._writableState.highWaterMark; | ||
}, | ||
}, | ||
writableCorked: { | ||
get() { | ||
return this._writableState ? this._writableState.corked : 0; | ||
}, | ||
}, | ||
writableLength: { | ||
get() { | ||
return this._writableState && this._writableState.length; | ||
}, | ||
}, | ||
errored: { | ||
enumerable: false, | ||
get() { | ||
return this._writableState ? this._writableState.errored : null; | ||
}, | ||
}, | ||
writableAborted: { | ||
enumerable: false, | ||
get: function () { | ||
return !!( | ||
this._writableState.writable !== false && | ||
(this._writableState.destroyed || this._writableState.errored) && | ||
!this._writableState.finished | ||
); | ||
}, | ||
}, | ||
}; | ||
|
||
var count = 10_000; | ||
|
||
function test() { | ||
var first; | ||
{ | ||
function Hey() { | ||
return this; | ||
} | ||
Object.defineProperties(Hey.prototype, properties); | ||
first = Object.getOwnPropertyDescriptors(Hey.prototype); | ||
} | ||
|
||
for (let i = 0; i < count; i++) { | ||
function Hey() { | ||
return this; | ||
} | ||
Object.defineProperties(Hey.prototype, first); | ||
} | ||
} | ||
|
||
test(); |
Oops, something went wrong.