diff --git a/implementation-contributed/v8/intl/date-format/resolved-options-unwrap.js b/implementation-contributed/v8/intl/date-format/resolved-options-unwrap.js new file mode 100644 index 0000000000..2aa4064802 --- /dev/null +++ b/implementation-contributed/v8/intl/date-format/resolved-options-unwrap.js @@ -0,0 +1,11 @@ +// Copyright 2018 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. + +// Test the Intl.DateTimeFormat.prototype.resolvedOptions will properly handle +// 3. Let dtf be ? UnwrapDateTimeFormat(dtf). +var x = Object.create(Intl.DateTimeFormat.prototype); +x = Intl.DateTimeFormat.call(x, 'en'); + +var resolvedOptions = Intl.DateTimeFormat.prototype.resolvedOptions.call(x); +assertEquals(resolvedOptions.locale, 'en') diff --git a/implementation-contributed/v8/intl/regress-888299.js b/implementation-contributed/v8/intl/regress-888299.js new file mode 100644 index 0000000000..abe9d1da34 --- /dev/null +++ b/implementation-contributed/v8/intl/regress-888299.js @@ -0,0 +1,7 @@ +// Copyright 2016 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. + +var i = 0; +new Intl.DateTimeFormat( + undefined, { get hour() { if (i == 0) { i = 1; return 'numeric'} } }); diff --git a/implementation-contributed/v8/mjsunit/compiler/regress-888923.js b/implementation-contributed/v8/mjsunit/compiler/regress-888923.js new file mode 100644 index 0000000000..e352673b7d --- /dev/null +++ b/implementation-contributed/v8/mjsunit/compiler/regress-888923.js @@ -0,0 +1,31 @@ +// Copyright 2018 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. + +// Flags: --allow-natives-syntax + +(function() { + function f(o) { + o.x; + Object.create(o); + return o.y.a; + } + + f({ x : 0, y : { a : 1 } }); + f({ x : 0, y : { a : 2 } }); + %OptimizeFunctionOnNextCall(f); + assertEquals(3, f({ x : 0, y : { a : 3 } })); +})(); + +(function() { + function f(o) { + let a = o.y; + Object.create(o); + return o.x + a; + } + + f({ x : 42, y : 21 }); + f({ x : 42, y : 21 }); + %OptimizeFunctionOnNextCall(f); + assertEquals(63, f({ x : 42, y : 21 })); +})(); diff --git a/implementation-contributed/v8/test262/test262.status b/implementation-contributed/v8/test262/test262.status index a2cc51b1ea..c6f0e34e6d 100644 --- a/implementation-contributed/v8/test262/test262.status +++ b/implementation-contributed/v8/test262/test262.status @@ -502,17 +502,8 @@ 'built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-sab': ['--harmony-sharedarraybuffer'], # https://bugs.chromium.org/p/v8/issues/detail?id=8100 - 'built-ins/Atomics/add/bigint/*': [SKIP], - 'built-ins/Atomics/and/bigint/*': [SKIP], - 'built-ins/Atomics/compareExchange/bigint/*': [SKIP], - 'built-ins/Atomics/exchange/bigint/*': [SKIP], - 'built-ins/Atomics/load/bigint/*': [SKIP], 'built-ins/Atomics/notify/bigint/*': [SKIP], - 'built-ins/Atomics/or/bigint/*': [SKIP], - 'built-ins/Atomics/store/bigint/*': [SKIP], - 'built-ins/Atomics/sub/bigint/*': [SKIP], 'built-ins/Atomics/wait/bigint/*': [SKIP], - 'built-ins/Atomics/xor/bigint/*': [SKIP], # https://bugs.chromium.org/p/v8/issues/detail?id=6049 'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller': [FAIL_SLOPPY],