3170b9903d
This is a reland of c7c5b49298
Changes since revert:
- Save position instead of using PushBack
- Allow private-name-surrogate-pair to fail on no_i18n builds
Original change's description:
> [scanner] Combine surrogate pairs at start when scanning private names
>
> Bug: v8:12523
> Change-Id: Ic3779fe6f20965d177d99d0a570a735df72e4fde
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3366994
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78493}
Bug: v8:12523
Change-Id: I8a92953549f5b38bfa004488db42bf9d835e1222
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3368361
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78513}
18 lines
360 B
JavaScript
18 lines
360 B
JavaScript
// Copyright 2022 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
class C1 {
|
|
#𖥸 = 42;
|
|
m() { return this.#𖥸; }
|
|
}
|
|
|
|
assertEquals((new C1).m(), 42);
|
|
|
|
class C2 {
|
|
#𖥸() { return 42; }
|
|
m() { return this.#𖥸(); }
|
|
}
|
|
|
|
assertEquals((new C2).m(), 42);
|