Bug 175697

Summary: Add a Unicode test to RexBench that matches non-BMP characters
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, jfbastien, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch jfbastien: review+

Description Michael Saboff 2017-08-17 16:29:48 PDT
Currently all the Unicode sub tests of RexBench only process BMP characters.  We should add a test that goes beyond BMP characters.
Comment 1 Radar WebKit Bug Importer 2017-08-17 16:30:43 PDT
<rdar://problem/33952865>
Comment 2 Michael Saboff 2017-08-17 16:43:49 PDT
Created attachment 318441 [details]
Patch
Comment 3 JF Bastien 2017-08-17 17:16:27 PDT
Comment on attachment 318441 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=318441&action=review

I didn't check the poker logic. I saw you play, looked about right.

r=me

> PerformanceTests/RexBench/unicode_poker_benchmark.js:51
> +    runUnicodePokerBenchmark = makeBenchmarkRunner(sources, "UnicodePokerBenchmark", 20);

What's the 20 here? numIterations?

> PerformanceTests/RexBench/unicode_poker_benchmark.js:55
> +    name: "Unicode Poker",

UniPoker or Po🂾er

;-)

> PerformanceTests/RexBench/UnicodePoker/benchmark.js:36
> +        Math.random = (function() {

Ha nice :)

> PerformanceTests/RexBench/UnicodePoker/benchmark.js:54
> +        this._players.push(new Player("Player 4"));

Better player names! You could immortalized 4 people in benchmark fame!

> PerformanceTests/RexBench/UnicodePoker/poker.js:71
> +        return cardRank

ASI on purpose here?

> PerformanceTests/RexBench/UnicodePoker/poker.js:128
> +        });

Arrow function here!
Comment 4 Michael Saboff 2017-08-17 17:57:01 PDT
Committed r220893: <http://trac.webkit.org/changeset/220893>
Comment 5 Michael Saboff 2017-08-17 17:58:16 PDT
(In reply to JF Bastien from comment #3)
> Comment on attachment 318441 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=318441&action=review
> 
> I didn't check the poker logic. I saw you play, looked about right.
> 
> r=me
> 
> > PerformanceTests/RexBench/unicode_poker_benchmark.js:51
> > +    runUnicodePokerBenchmark = makeBenchmarkRunner(sources, "UnicodePokerBenchmark", 20);
> 
> What's the 20 here? numIterations?

Yes.

> > PerformanceTests/RexBench/unicode_poker_benchmark.js:55
> > +    name: "Unicode Poker",
> 
> UniPoker or Po🂾er
> 
> ;-)

I changed it to UniPoker.

> > PerformanceTests/RexBench/UnicodePoker/benchmark.js:36
> > +        Math.random = (function() {
> 
> Ha nice :)
> 
> > PerformanceTests/RexBench/UnicodePoker/benchmark.js:54
> > +        this._players.push(new Player("Player 4"));
> 
> Better player names! You could immortalized 4 people in benchmark fame!
> 
> > PerformanceTests/RexBench/UnicodePoker/poker.js:71
> > +        return cardRank
> 
> ASI on purpose here?

I added the missing semicolon.

> > PerformanceTests/RexBench/UnicodePoker/poker.js:128
> > +        });
> 
> Arrow function here!

Done.