%CheckIsBootstrapping();
%SetCode($Boolean, BooleanConstructor);
- %FunctionSetPrototype($Boolean, new $Boolean(false));
+ %FunctionSetPrototype($Boolean, new $Object());
%AddNamedProperty($Boolean.prototype, "constructor", $Boolean, DONT_ENUM);
InstallFunctions($Boolean.prototype, DONT_ENUM, $Array(
%CheckIsBootstrapping();
%SetCode($Number, NumberConstructor);
- %FunctionSetPrototype($Number, new $Number(0));
+ %FunctionSetPrototype($Number, new $Object());
%OptimizeObjectForAddingMultipleProperties($Number.prototype, 8);
// Set up the constructor property on the Number prototype object.
--- /dev/null
+// Copyright 2015 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 funcs = [
+
+ // https://code.google.com/p/v8/issues/detail?id=4002
+ // Error,
+ // EvalError,
+ // RangeError,
+ // ReferenceError,
+ // SyntaxError,
+ // TypeError,
+ // URIError,
+
+ // https://code.google.com/p/v8/issues/detail?id=4003
+ // RegExp,
+
+ // https://code.google.com/p/v8/issues/detail?id=4004
+ // Date,
+
+ // https://code.google.com/p/v8/issues/detail?id=4006
+ // String,
+
+ ArrayBuffer,
+ Boolean,
+ DataView,
+ Float32Array,
+ Float64Array,
+ Int16Array,
+ Int32Array,
+ Int8Array,
+ Map,
+ Number,
+ Object,
+ Promise,
+ // Proxy,
+ Set,
+ Symbol,
+ Uint16Array,
+ Uint32Array,
+ Uint8Array,
+ Uint8ClampedArray,
+ WeakMap,
+ WeakSet,
+];
+
+for (var fun of funcs) {
+ var p = fun.prototype;
+ assertEquals('[object Object]', Object.prototype.toString.call(p));
+}
+
+
+// These still have special prototypes for legacy reason.
+var funcs = [
+ Array,
+ Function,
+];
+
+for (var fun of funcs) {
+ var p = fun.prototype;
+ assertEquals('[object ' + fun.name + ']', Object.prototype.toString.call(p));
+}
'ecma/String/15.5.4.8-1': [FAIL],
'ecma/String/15.5.4.9-1': [FAIL],
+ # Boolean.prototype and Number.prototype are ordinary objects in ES6
+ 'ecma/Boolean/15.6.3.1': [FAIL],
+ 'ecma/Boolean/15.6.4': [FAIL],
+ 'ecma/Boolean/15.6.4-1': [FAIL],
+ 'ecma/Number/15.7.4-1': [FAIL],
+ 'ecma/Number/15.7.4.2-1': [FAIL],
+ 'ecma/Number/15.7.4.3-1': [FAIL],
+ 'ecma/extensions/15.7.4': [FAIL],
+ 'ecma_2/FunctionObjects/call-1': [FAIL],
##################### SKIPPED TESTS #####################
'language/computed-property-names/to-name-side-effects/class': [FAIL],
'language/computed-property-names/to-name-side-effects/numbers-class': [FAIL],
- # Number.prototype is a plain object in ES6
- 'built-ins/Number/15.7.4-1': [FAIL],
- 'built-ins/Number/prototype/S15.7.3.1_A2_T1': [FAIL],
- 'built-ins/Number/prototype/S15.7.3.1_A2_T2': [FAIL],
- 'built-ins/Number/prototype/S15.7.3.1_A3': [FAIL],
- 'built-ins/Number/prototype/S15.7.4_A1': [FAIL],
- 'built-ins/Number/prototype/toFixed/S15.7.4.5_A1.1_T01': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A1_T01': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A1_T02': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A1_T03': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T01': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T02': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T03': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T04': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T05': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T06': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T07': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T08': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T09': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T10': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T11': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T12': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T13': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T14': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T15': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T16': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T17': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T18': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T19': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T20': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T21': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T22': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T23': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T24': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T25': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T26': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T27': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T28': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T29': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T30': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T31': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T32': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T33': [FAIL],
- 'built-ins/Number/prototype/toString/S15.7.4.2_A2_T34': [FAIL],
- 'built-ins/Number/prototype/valueOf/S15.7.4.4_A1_T01': [FAIL],
- 'built-ins/Number/prototype/valueOf/S15.7.4.4_A1_T02': [FAIL],
-
######################## OBSOLETED BY ES6 ###########################
# ES6 allows duplicate properties
'built-ins/Array/prototype/splice/S15.4.4.12_A3_T1': [FAIL],
'built-ins/Array/prototype/splice/S15.4.4.12_A3_T3': [FAIL],
'built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2': [FAIL],
- 'built-ins/Boolean/prototype/S15.6.3.1_A1': [FAIL],
- 'built-ins/Boolean/prototype/S15.6.4_A1': [FAIL],
- 'built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T1': [FAIL],
- 'built-ins/Boolean/prototype/toString/S15.6.4.2_A1_T2': [FAIL],
- 'built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T1': [FAIL],
- 'built-ins/Boolean/prototype/valueOf/S15.6.4.3_A1_T2': [FAIL],
'built-ins/Date/15.9.1.15-1': [FAIL],
'built-ins/Date/prototype/setFullYear/15.9.5.40_1': [FAIL],
'built-ins/Error/prototype/S15.11.4_A2': [FAIL],
'15.2.3.3-1-3': [FAIL],
'15.2.3.3-1-4': [FAIL],
+ # Boolean.prototype is a plain object in ES6.
+ 'S15.6.3.1_A1': [FAIL],
+ 'S15.6.4.2_A1_T1': [FAIL],
+ 'S15.6.4.2_A1_T2': [FAIL],
+ 'S15.6.4.3_A1_T1': [FAIL],
+ 'S15.6.4.3_A1_T2': [FAIL],
+ 'S15.6.4_A1': [FAIL],
+
+ # Number.prototype is a plain object in ES6.
+ '15.7.4-1': [FAIL],
+ 'S15.7.3.1_A2_T1': [FAIL],
+ 'S15.7.3.1_A2_T2': [FAIL],
+ 'S15.7.3.1_A3': [FAIL],
+ 'S15.7.4.2_A1_T01': [FAIL],
+ 'S15.7.4.2_A1_T02': [FAIL],
+ 'S15.7.4.2_A1_T03': [FAIL],
+ 'S15.7.4.2_A2_T01': [FAIL],
+ 'S15.7.4.2_A2_T02': [FAIL],
+ 'S15.7.4.2_A2_T03': [FAIL],
+ 'S15.7.4.2_A2_T04': [FAIL],
+ 'S15.7.4.2_A2_T05': [FAIL],
+ 'S15.7.4.2_A2_T06': [FAIL],
+ 'S15.7.4.2_A2_T07': [FAIL],
+ 'S15.7.4.2_A2_T08': [FAIL],
+ 'S15.7.4.2_A2_T09': [FAIL],
+ 'S15.7.4.2_A2_T10': [FAIL],
+ 'S15.7.4.2_A2_T11': [FAIL],
+ 'S15.7.4.2_A2_T12': [FAIL],
+ 'S15.7.4.2_A2_T13': [FAIL],
+ 'S15.7.4.2_A2_T14': [FAIL],
+ 'S15.7.4.2_A2_T15': [FAIL],
+ 'S15.7.4.2_A2_T16': [FAIL],
+ 'S15.7.4.2_A2_T17': [FAIL],
+ 'S15.7.4.2_A2_T18': [FAIL],
+ 'S15.7.4.2_A2_T19': [FAIL],
+ 'S15.7.4.2_A2_T20': [FAIL],
+ 'S15.7.4.2_A2_T21': [FAIL],
+ 'S15.7.4.2_A2_T22': [FAIL],
+ 'S15.7.4.2_A2_T23': [FAIL],
+ 'S15.7.4.2_A2_T24': [FAIL],
+ 'S15.7.4.2_A2_T25': [FAIL],
+ 'S15.7.4.2_A2_T26': [FAIL],
+ 'S15.7.4.2_A2_T27': [FAIL],
+ 'S15.7.4.2_A2_T28': [FAIL],
+ 'S15.7.4.2_A2_T29': [FAIL],
+ 'S15.7.4.2_A2_T30': [FAIL],
+ 'S15.7.4.2_A2_T31': [FAIL],
+ 'S15.7.4.2_A2_T32': [FAIL],
+ 'S15.7.4.2_A2_T33': [FAIL],
+ 'S15.7.4.2_A2_T34': [FAIL],
+ 'S15.7.4.4_A1_T01': [FAIL],
+ 'S15.7.4.4_A1_T02': [FAIL],
+ 'S15.7.4.5_A1.1_T01': [FAIL],
+ 'S15.7.4_A1': [FAIL],
+
######################## NEEDS INVESTIGATION ###########################
# These test failures are specific to the intl402 suite and need investigation