Commit e34c42db authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[torque] type context of JS builtins as NativeContext

That's possible because JS builtins are JSFunctions that embed a
NativeContext.

Bug: v8:7793
Change-Id: Id2bf7844fcfb53df733100f1e3e554f25a78482a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1926150Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65068}
parent ec46cef0
...@@ -9,7 +9,8 @@ namespace array { ...@@ -9,7 +9,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.copyWithin // https://tc39.github.io/ecma262/#sec-array.prototype.copyWithin
transitioning javascript builtin ArrayPrototypeCopyWithin( transitioning javascript builtin ArrayPrototypeCopyWithin(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// 1. Let O be ? ToObject(this value). // 1. Let O be ? ToObject(this value).
const object: JSReceiver = ToObject_Inline(context, receiver); const object: JSReceiver = ToObject_Inline(context, receiver);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayEveryLoopEagerDeoptContinuation( ArrayEveryLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny { callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny {
// All continuation points in the optimized every implementation are // All continuation points in the optimized every implementation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -26,7 +26,7 @@ namespace array { ...@@ -26,7 +26,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayEveryLoopLazyDeoptContinuation( ArrayEveryLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny, callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny,
result: JSAny): JSAny { result: JSAny): JSAny {
// All continuation points in the optimized every implementation are // All continuation points in the optimized every implementation are
...@@ -110,7 +110,7 @@ namespace array { ...@@ -110,7 +110,7 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.every // https://tc39.github.io/ecma262/#sec-array.prototype.every
transitioning javascript builtin transitioning javascript builtin
ArrayEvery(js-implicit context: Context, receiver: JSAny)(...arguments): ArrayEvery(js-implicit context: NativeContext, receiver: JSAny)(...arguments):
JSAny { JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.every'); RequireObjectCoercible(receiver, 'Array.prototype.every');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayFilterLoopEagerDeoptContinuation( ArrayFilterLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, array: JSAny, initialK: JSAny, callback: JSAny, thisArg: JSAny, array: JSAny, initialK: JSAny,
length: JSAny, initialTo: JSAny): JSAny { length: JSAny, initialTo: JSAny): JSAny {
// All continuation points in the optimized filter implementation are // All continuation points in the optimized filter implementation are
...@@ -29,7 +29,7 @@ namespace array { ...@@ -29,7 +29,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayFilterLoopLazyDeoptContinuation( ArrayFilterLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, array: JSAny, initialK: JSAny, callback: JSAny, thisArg: JSAny, array: JSAny, initialK: JSAny,
length: JSAny, valueK: JSAny, initialTo: JSAny, result: JSAny): JSAny { length: JSAny, valueK: JSAny, initialTo: JSAny, result: JSAny): JSAny {
// All continuation points in the optimized filter implementation are // All continuation points in the optimized filter implementation are
...@@ -146,8 +146,8 @@ namespace array { ...@@ -146,8 +146,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.filter // https://tc39.github.io/ecma262/#sec-array.prototype.filter
transitioning javascript builtin transitioning javascript builtin
ArrayFilter(js-implicit context: Context, receiver: JSAny)(...arguments): ArrayFilter(js-implicit context: NativeContext, receiver: JSAny)(
JSAny { ...arguments): JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.filter'); RequireObjectCoercible(receiver, 'Array.prototype.filter');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayFindLoopEagerDeoptContinuation( ArrayFindLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny { callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny {
// All continuation points in the optimized find implementation are // All continuation points in the optimized find implementation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -25,7 +25,7 @@ namespace array { ...@@ -25,7 +25,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayFindLoopLazyDeoptContinuation( ArrayFindLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
_callback: JSAny, _thisArg: JSAny, _initialK: JSAny, _length: JSAny, _callback: JSAny, _thisArg: JSAny, _initialK: JSAny, _length: JSAny,
_result: JSAny): JSAny { _result: JSAny): JSAny {
// This deopt continuation point is never actually called, it just // This deopt continuation point is never actually called, it just
...@@ -39,7 +39,7 @@ namespace array { ...@@ -39,7 +39,7 @@ namespace array {
// before iteration continues. // before iteration continues.
transitioning javascript builtin transitioning javascript builtin
ArrayFindLoopAfterCallbackLazyDeoptContinuation( ArrayFindLoopAfterCallbackLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny, callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny,
foundValue: JSAny, isFound: JSAny): JSAny { foundValue: JSAny, isFound: JSAny): JSAny {
// All continuation points in the optimized find implementation are // All continuation points in the optimized find implementation are
...@@ -117,7 +117,7 @@ namespace array { ...@@ -117,7 +117,7 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.find // https://tc39.github.io/ecma262/#sec-array.prototype.find
transitioning javascript builtin transitioning javascript builtin
ArrayPrototypeFind(js-implicit context: Context, receiver: JSAny)( ArrayPrototypeFind(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.find'); RequireObjectCoercible(receiver, 'Array.prototype.find');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayFindIndexLoopEagerDeoptContinuation( ArrayFindIndexLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny { callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny {
// All continuation points in the optimized findIndex implementation are // All continuation points in the optimized findIndex implementation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -25,7 +25,7 @@ namespace array { ...@@ -25,7 +25,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayFindIndexLoopLazyDeoptContinuation( ArrayFindIndexLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
_callback: JSAny, _thisArg: JSAny, _initialK: JSAny, _length: JSAny, _callback: JSAny, _thisArg: JSAny, _initialK: JSAny, _length: JSAny,
_result: JSAny): JSAny { _result: JSAny): JSAny {
// This deopt continuation point is never actually called, it just // This deopt continuation point is never actually called, it just
...@@ -39,7 +39,7 @@ namespace array { ...@@ -39,7 +39,7 @@ namespace array {
// before iteration continues. // before iteration continues.
transitioning javascript builtin transitioning javascript builtin
ArrayFindIndexLoopAfterCallbackLazyDeoptContinuation( ArrayFindIndexLoopAfterCallbackLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny, callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny,
foundValue: JSAny, isFound: JSAny): JSAny { foundValue: JSAny, isFound: JSAny): JSAny {
// All continuation points in the optimized findIndex implementation are // All continuation points in the optimized findIndex implementation are
...@@ -118,7 +118,7 @@ namespace array { ...@@ -118,7 +118,7 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
transitioning javascript builtin transitioning javascript builtin
ArrayPrototypeFindIndex(js-implicit context: Context, receiver: JSAny)( ArrayPrototypeFindIndex(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.findIndex'); RequireObjectCoercible(receiver, 'Array.prototype.findIndex');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayForEachLoopEagerDeoptContinuation( ArrayForEachLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny { callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny {
// All continuation points in the optimized forEach implemntation are // All continuation points in the optimized forEach implemntation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -22,7 +22,7 @@ namespace array { ...@@ -22,7 +22,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayForEachLoopLazyDeoptContinuation( ArrayForEachLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny, callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny,
_result: JSAny): JSAny { _result: JSAny): JSAny {
// All continuation points in the optimized forEach implemntation are // All continuation points in the optimized forEach implemntation are
...@@ -91,8 +91,8 @@ namespace array { ...@@ -91,8 +91,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
transitioning javascript builtin transitioning javascript builtin
ArrayForEach(js-implicit context: Context, receiver: JSAny)(...arguments): ArrayForEach(js-implicit context: NativeContext, receiver: JSAny)(
JSAny { ...arguments): JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.forEach'); RequireObjectCoercible(receiver, 'Array.prototype.forEach');
......
...@@ -8,8 +8,8 @@ namespace runtime { ...@@ -8,8 +8,8 @@ namespace runtime {
namespace array { namespace array {
// ES #sec-array.isarray // ES #sec-array.isarray
javascript builtin ArrayIsArray(js-implicit context: Context)(arg: JSAny): javascript builtin ArrayIsArray(js-implicit context:
JSAny { NativeContext)(arg: JSAny): JSAny {
// 1. Return ? IsArray(arg). // 1. Return ? IsArray(arg).
typeswitch (arg) { typeswitch (arg) {
case (JSArray): { case (JSArray): {
......
...@@ -549,7 +549,7 @@ namespace array { ...@@ -549,7 +549,7 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.join // https://tc39.github.io/ecma262/#sec-array.prototype.join
transitioning javascript builtin transitioning javascript builtin
ArrayPrototypeJoin(js-implicit context: Context, receiver: JSAny)( ArrayPrototypeJoin(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
const separator: JSAny = arguments[0]; const separator: JSAny = arguments[0];
...@@ -569,7 +569,8 @@ namespace array { ...@@ -569,7 +569,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.tolocalestring // https://tc39.github.io/ecma262/#sec-array.prototype.tolocalestring
transitioning javascript builtin ArrayPrototypeToLocaleString( transitioning javascript builtin ArrayPrototypeToLocaleString(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
const locales: JSAny = arguments[0]; const locales: JSAny = arguments[0];
const options: JSAny = arguments[1]; const options: JSAny = arguments[1];
...@@ -589,7 +590,8 @@ namespace array { ...@@ -589,7 +590,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.tostring // https://tc39.github.io/ecma262/#sec-array.prototype.tostring
transitioning javascript builtin ArrayPrototypeToString( transitioning javascript builtin ArrayPrototypeToString(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// 1. Let array be ? ToObject(this value). // 1. Let array be ? ToObject(this value).
const array: JSReceiver = ToObject_Inline(context, receiver); const array: JSReceiver = ToObject_Inline(context, receiver);
...@@ -610,7 +612,8 @@ namespace array { ...@@ -610,7 +612,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join
transitioning javascript builtin TypedArrayPrototypeJoin( transitioning javascript builtin TypedArrayPrototypeJoin(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
const separator: JSAny = arguments[0]; const separator: JSAny = arguments[0];
// Spec: ValidateTypedArray is applied to the this value prior to evaluating // Spec: ValidateTypedArray is applied to the this value prior to evaluating
...@@ -625,7 +628,8 @@ namespace array { ...@@ -625,7 +628,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring
transitioning javascript builtin TypedArrayPrototypeToLocaleString( transitioning javascript builtin TypedArrayPrototypeToLocaleString(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
const locales: JSAny = arguments[0]; const locales: JSAny = arguments[0];
const options: JSAny = arguments[1]; const options: JSAny = arguments[1];
......
...@@ -131,7 +131,8 @@ namespace array { ...@@ -131,7 +131,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.lastIndexOf // https://tc39.github.io/ecma262/#sec-array.prototype.lastIndexOf
transitioning javascript builtin ArrayPrototypeLastIndexOf( transitioning javascript builtin ArrayPrototypeLastIndexOf(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// 1. Let O be ? ToObject(this value). // 1. Let O be ? ToObject(this value).
const object: JSReceiver = ToObject_Inline(context, receiver); const object: JSReceiver = ToObject_Inline(context, receiver);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayMapLoopEagerDeoptContinuation( ArrayMapLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, array: JSAny, initialK: JSAny, callback: JSAny, thisArg: JSAny, array: JSAny, initialK: JSAny,
length: JSAny): JSAny { length: JSAny): JSAny {
// All continuation points in the optimized filter implementation are // All continuation points in the optimized filter implementation are
...@@ -28,7 +28,7 @@ namespace array { ...@@ -28,7 +28,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayMapLoopLazyDeoptContinuation( ArrayMapLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, array: JSAny, initialK: JSAny, callback: JSAny, thisArg: JSAny, array: JSAny, initialK: JSAny,
length: JSAny, result: JSAny): JSAny { length: JSAny, result: JSAny): JSAny {
// All continuation points in the optimized filter implementation are // All continuation points in the optimized filter implementation are
...@@ -224,7 +224,8 @@ namespace array { ...@@ -224,7 +224,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.map // https://tc39.github.io/ecma262/#sec-array.prototype.map
transitioning javascript builtin transitioning javascript builtin
ArrayMap(js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { ArrayMap(js-implicit context: NativeContext, receiver: JSAny)(...arguments):
JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.map'); RequireObjectCoercible(receiver, 'Array.prototype.map');
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
namespace array { namespace array {
// https://tc39.github.io/ecma262/#sec-array.of // https://tc39.github.io/ecma262/#sec-array.of
transitioning javascript builtin transitioning javascript builtin
ArrayOf(js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { ArrayOf(js-implicit context: NativeContext, receiver: JSAny)(...arguments):
JSAny {
// 1. Let len be the actual number of arguments passed to this function. // 1. Let len be the actual number of arguments passed to this function.
const len: Smi = Convert<Smi>(arguments.length); const len: Smi = Convert<Smi>(arguments.length);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayReduceRightPreLoopEagerDeoptContinuation( ArrayReduceRightPreLoopEagerDeoptContinuation(
js-implicit context: Context, js-implicit context: NativeContext,
receiver: JSAny)(callback: JSAny, length: JSAny): JSAny { receiver: JSAny)(callback: JSAny, length: JSAny): JSAny {
// All continuation points in the optimized every implementation are // All continuation points in the optimized every implementation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -27,7 +27,7 @@ namespace array { ...@@ -27,7 +27,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayReduceRightLoopEagerDeoptContinuation( ArrayReduceRightLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, initialK: JSAny, length: JSAny, callback: JSAny, initialK: JSAny, length: JSAny,
accumulator: JSAny): JSAny { accumulator: JSAny): JSAny {
// All continuation points in the optimized every implementation are // All continuation points in the optimized every implementation are
...@@ -48,7 +48,7 @@ namespace array { ...@@ -48,7 +48,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayReduceRightLoopLazyDeoptContinuation( ArrayReduceRightLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, initialK: JSAny, length: JSAny, result: JSAny): JSAny { callback: JSAny, initialK: JSAny, length: JSAny, result: JSAny): JSAny {
// All continuation points in the optimized every implementation are // All continuation points in the optimized every implementation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -157,8 +157,8 @@ namespace array { ...@@ -157,8 +157,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceRight // https://tc39.github.io/ecma262/#sec-array.prototype.reduceRight
transitioning javascript builtin transitioning javascript builtin
ArrayReduceRight(js-implicit context: Context, receiver: JSAny)(...arguments): ArrayReduceRight(js-implicit context: NativeContext, receiver: JSAny)(
JSAny { ...arguments): JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.reduceRight'); RequireObjectCoercible(receiver, 'Array.prototype.reduceRight');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayReducePreLoopEagerDeoptContinuation( ArrayReducePreLoopEagerDeoptContinuation(
js-implicit context: Context, js-implicit context: NativeContext,
receiver: JSAny)(callback: JSAny, length: JSAny): JSAny { receiver: JSAny)(callback: JSAny, length: JSAny): JSAny {
// All continuation points in the optimized every implementation are // All continuation points in the optimized every implementation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -27,7 +27,7 @@ namespace array { ...@@ -27,7 +27,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayReduceLoopEagerDeoptContinuation( ArrayReduceLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, initialK: JSAny, length: JSAny, callback: JSAny, initialK: JSAny, length: JSAny,
accumulator: JSAny): JSAny { accumulator: JSAny): JSAny {
// All continuation points in the optimized every implementation are // All continuation points in the optimized every implementation are
...@@ -48,7 +48,7 @@ namespace array { ...@@ -48,7 +48,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArrayReduceLoopLazyDeoptContinuation( ArrayReduceLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, initialK: JSAny, length: JSAny, result: JSAny): JSAny { callback: JSAny, initialK: JSAny, length: JSAny, result: JSAny): JSAny {
// All continuation points in the optimized every implementation are // All continuation points in the optimized every implementation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -157,8 +157,8 @@ namespace array { ...@@ -157,8 +157,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
transitioning javascript builtin transitioning javascript builtin
ArrayReduce(js-implicit context: Context, receiver: JSAny)(...arguments): ArrayReduce(js-implicit context: NativeContext, receiver: JSAny)(
JSAny { ...arguments): JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.reduce'); RequireObjectCoercible(receiver, 'Array.prototype.reduce');
......
...@@ -165,7 +165,8 @@ namespace array { ...@@ -165,7 +165,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse // https://tc39.github.io/ecma262/#sec-array.prototype.reverse
transitioning javascript builtin ArrayPrototypeReverse( transitioning javascript builtin ArrayPrototypeReverse(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
try { try {
TryFastPackedArrayReverse(receiver) otherwise Baseline; TryFastPackedArrayReverse(receiver) otherwise Baseline;
return receiver; return receiver;
......
...@@ -95,7 +95,8 @@ namespace array { ...@@ -95,7 +95,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.shift // https://tc39.github.io/ecma262/#sec-array.prototype.shift
transitioning javascript builtin ArrayPrototypeShift( transitioning javascript builtin ArrayPrototypeShift(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
try { try {
return TryFastArrayShift(receiver) otherwise Slow, Runtime; return TryFastArrayShift(receiver) otherwise Slow, Runtime;
} }
......
...@@ -122,7 +122,7 @@ namespace array { ...@@ -122,7 +122,7 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.slice // https://tc39.github.io/ecma262/#sec-array.prototype.slice
transitioning javascript builtin transitioning javascript builtin
ArrayPrototypeSlice(js-implicit context: Context, receiver: JSAny)( ArrayPrototypeSlice(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
// Handle array cloning case if the receiver is a fast array. // Handle array cloning case if the receiver is a fast array.
if (arguments.length == 0) { if (arguments.length == 0) {
...@@ -171,7 +171,7 @@ namespace array { ...@@ -171,7 +171,7 @@ namespace array {
assert(count <= len); assert(count <= len);
try { try {
return HandleFastSlice(UnsafeCast<NativeContext>(context), o, k, count) return HandleFastSlice(context, o, k, count)
otherwise Slow; otherwise Slow;
} }
label Slow {} label Slow {}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace array { namespace array {
transitioning javascript builtin transitioning javascript builtin
ArraySomeLoopEagerDeoptContinuation( ArraySomeLoopEagerDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny { callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny): JSAny {
// All continuation points in the optimized some implementation are // All continuation points in the optimized some implementation are
// after the ToObject(O) call that ensures we are dealing with a // after the ToObject(O) call that ensures we are dealing with a
...@@ -26,7 +26,7 @@ namespace array { ...@@ -26,7 +26,7 @@ namespace array {
transitioning javascript builtin transitioning javascript builtin
ArraySomeLoopLazyDeoptContinuation( ArraySomeLoopLazyDeoptContinuation(
js-implicit context: Context, receiver: JSAny)( js-implicit context: NativeContext, receiver: JSAny)(
callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny, callback: JSAny, thisArg: JSAny, initialK: JSAny, length: JSAny,
result: JSAny): JSAny { result: JSAny): JSAny {
// All continuation points in the optimized some implementation are // All continuation points in the optimized some implementation are
...@@ -110,7 +110,7 @@ namespace array { ...@@ -110,7 +110,7 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.some // https://tc39.github.io/ecma262/#sec-array.prototype.some
transitioning javascript builtin transitioning javascript builtin
ArraySome(js-implicit context: Context, receiver: JSAny)(...arguments): ArraySome(js-implicit context: NativeContext, receiver: JSAny)(...arguments):
JSAny { JSAny {
try { try {
RequireObjectCoercible(receiver, 'Array.prototype.some'); RequireObjectCoercible(receiver, 'Array.prototype.some');
......
...@@ -350,7 +350,7 @@ namespace array { ...@@ -350,7 +350,7 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.splice // https://tc39.github.io/ecma262/#sec-array.prototype.splice
transitioning javascript builtin transitioning javascript builtin
ArrayPrototypeSplice(js-implicit context: Context, receiver: JSAny)( ArrayPrototypeSplice(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
// 1. Let O be ? ToObject(this value). // 1. Let O be ? ToObject(this value).
const o: JSReceiver = ToObject(context, receiver); const o: JSReceiver = ToObject(context, receiver);
......
...@@ -78,7 +78,8 @@ namespace array { ...@@ -78,7 +78,8 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.unshift // https://tc39.github.io/ecma262/#sec-array.prototype.unshift
transitioning javascript builtin ArrayPrototypeUnshift( transitioning javascript builtin ArrayPrototypeUnshift(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
try { try {
const array: FastJSArray = Cast<FastJSArray>(receiver) otherwise Slow; const array: FastJSArray = Cast<FastJSArray>(receiver) otherwise Slow;
array::EnsureWriteableFastElements(array); array::EnsureWriteableFastElements(array);
......
// Copyright 2018 the V8 project authors. All rights reserved. // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be:
// found in the LICENSE file. // Context found in the LICENSE file.
#include 'src/builtins/builtins-regexp-gen.h' #include 'src/builtins/builtins-regexp-gen.h'
#include 'src/builtins/builtins-utils-gen.h' #include 'src/builtins/builtins-utils-gen.h'
......
...@@ -10,7 +10,7 @@ namespace boolean { ...@@ -10,7 +10,7 @@ namespace boolean {
javascript builtin javascript builtin
BooleanConstructor( BooleanConstructor(
js-implicit context: Context, receiver: JSAny, newTarget: JSAny, js-implicit context: NativeContext, receiver: JSAny, newTarget: JSAny,
target: JSFunction)(...arguments): JSAny { target: JSFunction)(...arguments): JSAny {
const value = SelectBooleanConstant(ToBoolean(arguments[0])); const value = SelectBooleanConstant(ToBoolean(arguments[0]));
...@@ -28,7 +28,7 @@ namespace boolean { ...@@ -28,7 +28,7 @@ namespace boolean {
// ES #sec-boolean.prototype.tostring // ES #sec-boolean.prototype.tostring
transitioning javascript builtin BooleanPrototypeToString( transitioning javascript builtin BooleanPrototypeToString(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
// 1. Let b be ? thisBooleanValue(this value). // 1. Let b be ? thisBooleanValue(this value).
const b = ThisBooleanValue(receiver, 'Boolean.prototype.toString'); const b = ThisBooleanValue(receiver, 'Boolean.prototype.toString');
// 2. If b is true, return "true"; else return "false". // 2. If b is true, return "true"; else return "false".
...@@ -37,7 +37,7 @@ namespace boolean { ...@@ -37,7 +37,7 @@ namespace boolean {
// ES #sec-boolean.prototype.valueof // ES #sec-boolean.prototype.valueof
transitioning javascript builtin BooleanPrototypeValueOf( transitioning javascript builtin BooleanPrototypeValueOf(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
// 1. Return ? thisBooleanValue(this value). // 1. Return ? thisBooleanValue(this value).
return ThisBooleanValue(receiver, 'Boolean.prototype.valueOf'); return ThisBooleanValue(receiver, 'Boolean.prototype.valueOf');
} }
......
...@@ -10,14 +10,14 @@ namespace string { ...@@ -10,14 +10,14 @@ namespace string {
// ES6 #sec-string.prototype.tostring // ES6 #sec-string.prototype.tostring
transitioning javascript builtin transitioning javascript builtin
StringPrototypeToString(js-implicit context: Context, receiver: JSAny)(): StringPrototypeToString(
JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return ToThisValue(receiver, kString, 'String.prototype.toString'); return ToThisValue(receiver, kString, 'String.prototype.toString');
} }
// ES6 #sec-string.prototype.valueof // ES6 #sec-string.prototype.valueof
transitioning javascript builtin transitioning javascript builtin
StringPrototypeValueOf(js-implicit context: Context, receiver: JSAny)(): StringPrototypeValueOf(js-implicit context: NativeContext, receiver: JSAny)():
JSAny { JSAny {
return ToThisValue(receiver, kString, 'String.prototype.valueOf'); return ToThisValue(receiver, kString, 'String.prototype.valueOf');
} }
...@@ -93,7 +93,8 @@ namespace string { ...@@ -93,7 +93,8 @@ namespace string {
// ES6 #sec-string.prototype.charat // ES6 #sec-string.prototype.charat
transitioning javascript builtin StringPrototypeCharAt( transitioning javascript builtin StringPrototypeCharAt(
js-implicit context: Context, receiver: JSAny)(position: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(position: JSAny): JSAny {
try { try {
GenerateStringAt(receiver, position, 'String.prototype.charAt') GenerateStringAt(receiver, position, 'String.prototype.charAt')
otherwise IfInBounds, IfOutOfBounds; otherwise IfInBounds, IfOutOfBounds;
...@@ -109,7 +110,8 @@ namespace string { ...@@ -109,7 +110,8 @@ namespace string {
// ES6 #sec-string.prototype.charcodeat // ES6 #sec-string.prototype.charcodeat
transitioning javascript builtin StringPrototypeCharCodeAt( transitioning javascript builtin StringPrototypeCharCodeAt(
js-implicit context: Context, receiver: JSAny)(position: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(position: JSAny): JSAny {
try { try {
GenerateStringAt(receiver, position, 'String.prototype.charCodeAt') GenerateStringAt(receiver, position, 'String.prototype.charCodeAt')
otherwise IfInBounds, IfOutOfBounds; otherwise IfInBounds, IfOutOfBounds;
...@@ -125,7 +127,8 @@ namespace string { ...@@ -125,7 +127,8 @@ namespace string {
// ES6 #sec-string.prototype.codepointat // ES6 #sec-string.prototype.codepointat
transitioning javascript builtin StringPrototypeCodePointAt( transitioning javascript builtin StringPrototypeCodePointAt(
js-implicit context: Context, receiver: JSAny)(position: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(position: JSAny): JSAny {
try { try {
GenerateStringAt(receiver, position, 'String.prototype.codePointAt') GenerateStringAt(receiver, position, 'String.prototype.codePointAt')
otherwise IfInBounds, IfOutOfBounds; otherwise IfInBounds, IfOutOfBounds;
...@@ -145,7 +148,8 @@ namespace string { ...@@ -145,7 +148,8 @@ namespace string {
// ES6 String.prototype.concat(...args) // ES6 String.prototype.concat(...args)
// ES6 #sec-string.prototype.concat // ES6 #sec-string.prototype.concat
transitioning javascript builtin StringPrototypeConcat( transitioning javascript builtin StringPrototypeConcat(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// Check that {receiver} is coercible to Object and convert it to a String. // Check that {receiver} is coercible to Object and convert it to a String.
let string: String = ToThisString(receiver, 'String.prototype.concat'); let string: String = ToThisString(receiver, 'String.prototype.concat');
...@@ -164,7 +168,7 @@ namespace string { ...@@ -164,7 +168,7 @@ namespace string {
// ES #sec-string-constructor // ES #sec-string-constructor
// https://tc39.github.io/ecma262/#sec-string-constructor // https://tc39.github.io/ecma262/#sec-string-constructor
transitioning javascript builtin StringConstructor( transitioning javascript builtin StringConstructor(
js-implicit context: Context, receiver: JSAny, newTarget: JSAny, js-implicit context: NativeContext, receiver: JSAny, newTarget: JSAny,
target: JSFunction)(...arguments): JSAny { target: JSFunction)(...arguments): JSAny {
const length: intptr = Convert<intptr>(arguments.length); const length: intptr = Convert<intptr>(arguments.length);
let s: String; let s: String;
......
...@@ -7,7 +7,7 @@ namespace console { ...@@ -7,7 +7,7 @@ namespace console {
Context)(JSFunction, JSAny, int32): JSAny; Context)(JSFunction, JSAny, int32): JSAny;
javascript builtin FastConsoleAssert( javascript builtin FastConsoleAssert(
js-implicit context: Context, receiver: JSAny, newTarget: JSAny, js-implicit context: NativeContext, receiver: JSAny, newTarget: JSAny,
target: JSFunction)(...arguments): JSAny { target: JSFunction)(...arguments): JSAny {
if (ToBoolean(arguments[0])) { if (ToBoolean(arguments[0])) {
return Undefined; return Undefined;
......
This diff is collapsed.
This diff is collapsed.
...@@ -26,7 +26,8 @@ namespace number { ...@@ -26,7 +26,8 @@ namespace number {
// https://tc39.github.io/ecma262/#sec-number.prototype.tostring // https://tc39.github.io/ecma262/#sec-number.prototype.tostring
transitioning javascript builtin NumberPrototypeToString( transitioning javascript builtin NumberPrototypeToString(
js-implicit context: Context, receiver: JSAny)(...arguments): String { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): String {
// 1. Let x be ? thisNumberValue(this value). // 1. Let x be ? thisNumberValue(this value).
const x = ThisNumberValue(receiver, 'Number.prototype.toString'); const x = ThisNumberValue(receiver, 'Number.prototype.toString');
......
...@@ -33,7 +33,7 @@ namespace object { ...@@ -33,7 +33,7 @@ namespace object {
} }
transitioning javascript builtin transitioning javascript builtin
ObjectFromEntries(js-implicit context: Context, receiver: JSAny)( ObjectFromEntries(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
const iterable: JSAny = arguments[0]; const iterable: JSAny = arguments[0];
try { try {
......
...@@ -138,25 +138,27 @@ namespace object { ...@@ -138,25 +138,27 @@ namespace object {
// ES6 section 19.1.2.11 Object.isExtensible ( O ) // ES6 section 19.1.2.11 Object.isExtensible ( O )
transitioning javascript builtin transitioning javascript builtin
ObjectIsExtensible(js-implicit context: Context)(object: JSAny): JSAny { ObjectIsExtensible(js-implicit context: NativeContext)(object: JSAny): JSAny {
return object::ObjectIsExtensibleImpl(object); return object::ObjectIsExtensibleImpl(object);
} }
// ES6 section 19.1.2.18 Object.preventExtensions ( O ) // ES6 section 19.1.2.18 Object.preventExtensions ( O )
transitioning javascript builtin transitioning javascript builtin
ObjectPreventExtensions(js-implicit context: Context)(object: JSAny): JSAny { ObjectPreventExtensions(js-implicit context: NativeContext)(object: JSAny):
JSAny {
return object::ObjectPreventExtensionsThrow(object); return object::ObjectPreventExtensionsThrow(object);
} }
// ES6 section 19.1.2.9 Object.getPrototypeOf ( O ) // ES6 section 19.1.2.9 Object.getPrototypeOf ( O )
transitioning javascript builtin transitioning javascript builtin
ObjectGetPrototypeOf(js-implicit context: Context)(object: JSAny): JSAny { ObjectGetPrototypeOf(js-implicit context: NativeContext)(object: JSAny):
JSAny {
return object::ObjectGetPrototypeOfImpl(object); return object::ObjectGetPrototypeOfImpl(object);
} }
// ES6 section 19.1.2.21 Object.setPrototypeOf ( O, proto ) // ES6 section 19.1.2.21 Object.setPrototypeOf ( O, proto )
transitioning javascript builtin ObjectSetPrototypeOf( transitioning javascript builtin ObjectSetPrototypeOf(
js-implicit context: Context)(object: JSAny, proto: JSAny): JSAny { js-implicit context: NativeContext)(object: JSAny, proto: JSAny): JSAny {
// 1. Set O to ? RequireObjectCoercible(O). // 1. Set O to ? RequireObjectCoercible(O).
RequireObjectCoercible(object, 'Object.setPrototypeOf'); RequireObjectCoercible(object, 'Object.setPrototypeOf');
......
...@@ -360,8 +360,9 @@ namespace promise { ...@@ -360,8 +360,9 @@ namespace promise {
// https://tc39.es/ecma262/#sec-promise-reject-functions // https://tc39.es/ecma262/#sec-promise-reject-functions
transitioning javascript builtin transitioning javascript builtin
PromiseCapabilityDefaultReject(js-implicit context: Context, receiver: JSAny)( PromiseCapabilityDefaultReject(
reason: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(reason: JSAny): JSAny {
// 2. Let promise be F.[[Promise]]. // 2. Let promise be F.[[Promise]].
const promise = UnsafeCast<JSPromise>(context[kPromiseBuiltinsPromiseSlot]); const promise = UnsafeCast<JSPromise>(context[kPromiseBuiltinsPromiseSlot]);
...@@ -386,7 +387,8 @@ namespace promise { ...@@ -386,7 +387,8 @@ namespace promise {
// https://tc39.es/ecma262/#sec-promise-resolve-functions // https://tc39.es/ecma262/#sec-promise-resolve-functions
transitioning javascript builtin transitioning javascript builtin
PromiseCapabilityDefaultResolve( PromiseCapabilityDefaultResolve(
js-implicit context: Context, receiver: JSAny)(resolution: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(resolution: JSAny): JSAny {
// 2. Let promise be F.[[Promise]]. // 2. Let promise be F.[[Promise]].
const promise = UnsafeCast<JSPromise>(context[kPromiseBuiltinsPromiseSlot]); const promise = UnsafeCast<JSPromise>(context[kPromiseBuiltinsPromiseSlot]);
......
...@@ -10,7 +10,7 @@ namespace proxy { ...@@ -10,7 +10,7 @@ namespace proxy {
// https://tc39.github.io/ecma262/#sec-proxy-constructor // https://tc39.github.io/ecma262/#sec-proxy-constructor
transitioning javascript builtin transitioning javascript builtin
ProxyConstructor( ProxyConstructor(
js-implicit context: Context, receiver: JSAny, js-implicit context: NativeContext, receiver: JSAny,
newTarget: JSAny)(target: JSAny, handler: JSAny): JSProxy { newTarget: JSAny)(target: JSAny, handler: JSAny): JSProxy {
try { try {
// 1. If NewTarget is undefined, throw a TypeError exception. // 1. If NewTarget is undefined, throw a TypeError exception.
......
...@@ -12,8 +12,8 @@ namespace proxy { ...@@ -12,8 +12,8 @@ namespace proxy {
// Proxy.revocable(target, handler) // Proxy.revocable(target, handler)
// https://tc39.github.io/ecma262/#sec-proxy.revocable // https://tc39.github.io/ecma262/#sec-proxy.revocable
transitioning javascript builtin transitioning javascript builtin
ProxyRevocable(js-implicit context: Context)(target: JSAny, handler: JSAny): ProxyRevocable(js-implicit context: NativeContext)(
JSProxyRevocableResult { target: JSAny, handler: JSAny): JSProxyRevocableResult {
try { try {
const targetJSReceiver = const targetJSReceiver =
Cast<JSReceiver>(target) otherwise ThrowProxyNonObject; Cast<JSReceiver>(target) otherwise ThrowProxyNonObject;
......
...@@ -9,7 +9,7 @@ namespace proxy { ...@@ -9,7 +9,7 @@ namespace proxy {
// Proxy Revocation Functions // Proxy Revocation Functions
// https://tc39.github.io/ecma262/#sec-proxy-revocation-functions // https://tc39.github.io/ecma262/#sec-proxy-revocation-functions
transitioning javascript builtin transitioning javascript builtin
ProxyRevoke(js-implicit context: Context)(): Undefined { ProxyRevoke(js-implicit context: NativeContext)(): Undefined {
// 1. Let p be F.[[RevocableProxy]]. // 1. Let p be F.[[RevocableProxy]].
const proxyObject: Object = context[PROXY_SLOT]; const proxyObject: Object = context[PROXY_SLOT];
......
...@@ -9,7 +9,8 @@ namespace reflect { ...@@ -9,7 +9,8 @@ namespace reflect {
// ES6 section 26.1.10 Reflect.isExtensible // ES6 section 26.1.10 Reflect.isExtensible
transitioning javascript builtin transitioning javascript builtin
ReflectIsExtensible(js-implicit context: Context)(object: JSAny): JSAny { ReflectIsExtensible(js-implicit context: NativeContext)(object: JSAny):
JSAny {
const objectJSReceiver = Cast<JSReceiver>(object) const objectJSReceiver = Cast<JSReceiver>(object)
otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.isExtensible'); otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.isExtensible');
return object::ObjectIsExtensibleImpl(objectJSReceiver); return object::ObjectIsExtensibleImpl(objectJSReceiver);
...@@ -17,7 +18,8 @@ namespace reflect { ...@@ -17,7 +18,8 @@ namespace reflect {
// ES6 section 26.1.12 Reflect.preventExtensions // ES6 section 26.1.12 Reflect.preventExtensions
transitioning javascript builtin transitioning javascript builtin
ReflectPreventExtensions(js-implicit context: Context)(object: JSAny): JSAny { ReflectPreventExtensions(js-implicit context: NativeContext)(object: JSAny):
JSAny {
const objectJSReceiver = Cast<JSReceiver>(object) const objectJSReceiver = Cast<JSReceiver>(object)
otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.preventExtensions'); otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.preventExtensions');
return object::ObjectPreventExtensionsDontThrow(objectJSReceiver); return object::ObjectPreventExtensionsDontThrow(objectJSReceiver);
...@@ -25,7 +27,8 @@ namespace reflect { ...@@ -25,7 +27,8 @@ namespace reflect {
// ES6 section 26.1.8 Reflect.getPrototypeOf // ES6 section 26.1.8 Reflect.getPrototypeOf
transitioning javascript builtin transitioning javascript builtin
ReflectGetPrototypeOf(js-implicit context: Context)(object: JSAny): JSAny { ReflectGetPrototypeOf(js-implicit context: NativeContext)(object: JSAny):
JSAny {
const objectJSReceiver = Cast<JSReceiver>(object) const objectJSReceiver = Cast<JSReceiver>(object)
otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.getPrototypeOf'); otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.getPrototypeOf');
return object::JSReceiverGetPrototypeOf(objectJSReceiver); return object::JSReceiverGetPrototypeOf(objectJSReceiver);
...@@ -33,7 +36,7 @@ namespace reflect { ...@@ -33,7 +36,7 @@ namespace reflect {
// ES6 section 26.1.14 Reflect.setPrototypeOf // ES6 section 26.1.14 Reflect.setPrototypeOf
transitioning javascript builtin ReflectSetPrototypeOf( transitioning javascript builtin ReflectSetPrototypeOf(
js-implicit context: Context)(object: JSAny, proto: JSAny): JSAny { js-implicit context: NativeContext)(object: JSAny, proto: JSAny): JSAny {
const objectJSReceiver = Cast<JSReceiver>(object) const objectJSReceiver = Cast<JSReceiver>(object)
otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.setPrototypeOf'); otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.setPrototypeOf');
typeswitch (proto) { typeswitch (proto) {
...@@ -57,7 +60,7 @@ namespace reflect { ...@@ -57,7 +60,7 @@ namespace reflect {
// ES6 section 26.1.6 Reflect.get // ES6 section 26.1.6 Reflect.get
transitioning javascript builtin transitioning javascript builtin
ReflectGet(js-implicit context: Context)(...arguments): JSAny { ReflectGet(js-implicit context: NativeContext)(...arguments): JSAny {
const length = arguments.length; const length = arguments.length;
const object: JSAny = length > 0 ? arguments[0] : Undefined; const object: JSAny = length > 0 ? arguments[0] : Undefined;
const objectJSReceiver = Cast<JSReceiver>(object) const objectJSReceiver = Cast<JSReceiver>(object)
...@@ -71,7 +74,7 @@ namespace reflect { ...@@ -71,7 +74,7 @@ namespace reflect {
// ES6 section 26.1.4 Reflect.deleteProperty // ES6 section 26.1.4 Reflect.deleteProperty
transitioning javascript builtin ReflectDeleteProperty( transitioning javascript builtin ReflectDeleteProperty(
js-implicit context: Context)(object: JSAny, key: JSAny): JSAny { js-implicit context: NativeContext)(object: JSAny, key: JSAny): JSAny {
const objectJSReceiver = Cast<JSReceiver>(object) const objectJSReceiver = Cast<JSReceiver>(object)
otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.deleteProperty'); otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.deleteProperty');
return DeleteProperty(objectJSReceiver, key, kSloppy); return DeleteProperty(objectJSReceiver, key, kSloppy);
...@@ -79,7 +82,8 @@ namespace reflect { ...@@ -79,7 +82,8 @@ namespace reflect {
// ES section #sec-reflect.has // ES section #sec-reflect.has
transitioning javascript builtin transitioning javascript builtin
ReflectHas(js-implicit context: Context)(object: JSAny, key: JSAny): JSAny { ReflectHas(js-implicit context: NativeContext)(object: JSAny, key: JSAny):
JSAny {
const objectJSReceiver = Cast<JSReceiver>(object) const objectJSReceiver = Cast<JSReceiver>(object)
otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.has'); otherwise ThrowTypeError(kCalledOnNonObject, 'Reflect.has');
return HasProperty(objectJSReceiver, key); return HasProperty(objectJSReceiver, key);
......
...@@ -30,7 +30,8 @@ namespace regexp { ...@@ -30,7 +30,8 @@ namespace regexp {
// ES#sec-regexp.prototype.exec // ES#sec-regexp.prototype.exec
// RegExp.prototype.exec ( string ) // RegExp.prototype.exec ( string )
transitioning javascript builtin RegExpPrototypeExec( transitioning javascript builtin RegExpPrototypeExec(
js-implicit context: Context, receiver: JSAny)(string: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(string: JSAny): JSAny {
// Ensure {receiver} is a JSRegExp. // Ensure {receiver} is a JSRegExp.
const receiver = Cast<JSRegExp>(receiver) otherwise ThrowTypeError( const receiver = Cast<JSRegExp>(receiver) otherwise ThrowTypeError(
kIncompatibleMethodReceiver, 'RegExp.prototype.exec', receiver); kIncompatibleMethodReceiver, 'RegExp.prototype.exec', receiver);
......
...@@ -99,9 +99,9 @@ namespace regexp { ...@@ -99,9 +99,9 @@ namespace regexp {
// https://tc39.github.io/proposal-string-matchall/ // https://tc39.github.io/proposal-string-matchall/
// RegExp.prototype [ @@matchAll ] ( string ) // RegExp.prototype [ @@matchAll ] ( string )
transitioning javascript builtin RegExpPrototypeMatchAll( transitioning javascript builtin RegExpPrototypeMatchAll(
js-implicit context: Context, receiver: JSAny)(string: JSAny): JSAny { js-implicit context: NativeContext,
const nativeContext: NativeContext = LoadNativeContext(context); receiver: JSAny)(string: JSAny): JSAny {
return RegExpPrototypeMatchAllImpl(nativeContext, receiver, string); return RegExpPrototypeMatchAllImpl(context, receiver, string);
} }
const kJSRegExpStringIteratorDone: const kJSRegExpStringIteratorDone:
...@@ -133,7 +133,7 @@ namespace regexp { ...@@ -133,7 +133,7 @@ namespace regexp {
// https://tc39.github.io/proposal-string-matchall/ // https://tc39.github.io/proposal-string-matchall/
// %RegExpStringIteratorPrototype%.next ( ) // %RegExpStringIteratorPrototype%.next ( )
transitioning javascript builtin RegExpStringIteratorPrototypeNext( transitioning javascript builtin RegExpStringIteratorPrototypeNext(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
// 1. Let O be the this value. // 1. Let O be the this value.
// 2. If Type(O) is not Object, throw a TypeError exception. // 2. If Type(O) is not Object, throw a TypeError exception.
// 3. If O does not have all of the internal slots of a RegExp String // 3. If O does not have all of the internal slots of a RegExp String
......
...@@ -138,7 +138,8 @@ namespace regexp { ...@@ -138,7 +138,8 @@ namespace regexp {
// ES#sec-regexp.prototype-@@match // ES#sec-regexp.prototype-@@match
// RegExp.prototype [ @@match ] ( string ) // RegExp.prototype [ @@match ] ( string )
transitioning javascript builtin RegExpPrototypeMatch( transitioning javascript builtin RegExpPrototypeMatch(
js-implicit context: Context, receiver: JSAny)(string: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(string: JSAny): JSAny {
ThrowIfNotJSReceiver( ThrowIfNotJSReceiver(
receiver, kIncompatibleMethodReceiver, 'RegExp.prototype.@@match'); receiver, kIncompatibleMethodReceiver, 'RegExp.prototype.@@match');
const receiver = UnsafeCast<JSReceiver>(receiver); const receiver = UnsafeCast<JSReceiver>(receiver);
......
...@@ -215,7 +215,8 @@ namespace regexp { ...@@ -215,7 +215,8 @@ namespace regexp {
generates 'v8::Isolate::kRegExpReplaceCalledOnSlowRegExp'; generates 'v8::Isolate::kRegExpReplaceCalledOnSlowRegExp';
transitioning javascript builtin RegExpPrototypeReplace( transitioning javascript builtin RegExpPrototypeReplace(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
const methodName: constexpr string = 'RegExp.prototype.@@replace'; const methodName: constexpr string = 'RegExp.prototype.@@replace';
// RegExpPrototypeReplace is a bit of a beast - a summary of dispatch logic: // RegExpPrototypeReplace is a bit of a beast - a summary of dispatch logic:
......
...@@ -89,7 +89,8 @@ namespace regexp { ...@@ -89,7 +89,8 @@ namespace regexp {
// ES#sec-regexp.prototype-@@search // ES#sec-regexp.prototype-@@search
// RegExp.prototype [ @@search ] ( string ) // RegExp.prototype [ @@search ] ( string )
transitioning javascript builtin RegExpPrototypeSearch( transitioning javascript builtin RegExpPrototypeSearch(
js-implicit context: Context, receiver: JSAny)(string: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(string: JSAny): JSAny {
ThrowIfNotJSReceiver( ThrowIfNotJSReceiver(
receiver, kIncompatibleMethodReceiver, 'RegExp.prototype.@@search'); receiver, kIncompatibleMethodReceiver, 'RegExp.prototype.@@search');
const receiver = UnsafeCast<JSReceiver>(receiver); const receiver = UnsafeCast<JSReceiver>(receiver);
......
...@@ -9,7 +9,7 @@ namespace regexp { ...@@ -9,7 +9,7 @@ namespace regexp {
// ES6 21.2.5.10. // ES6 21.2.5.10.
// ES #sec-get-regexp.prototype.source // ES #sec-get-regexp.prototype.source
transitioning javascript builtin RegExpPrototypeSourceGetter( transitioning javascript builtin RegExpPrototypeSourceGetter(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
typeswitch (receiver) { typeswitch (receiver) {
case (receiver: JSRegExp): { case (receiver: JSRegExp): {
return receiver.source; return receiver.source;
......
...@@ -54,7 +54,8 @@ namespace regexp { ...@@ -54,7 +54,8 @@ namespace regexp {
// ES#sec-regexp.prototype-@@split // ES#sec-regexp.prototype-@@split
// RegExp.prototype [ @@split ] ( string, limit ) // RegExp.prototype [ @@split ] ( string, limit )
transitioning javascript builtin RegExpPrototypeSplit( transitioning javascript builtin RegExpPrototypeSplit(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
ThrowIfNotJSReceiver( ThrowIfNotJSReceiver(
receiver, kIncompatibleMethodReceiver, 'RegExp.prototype.@@split'); receiver, kIncompatibleMethodReceiver, 'RegExp.prototype.@@split');
const receiver = UnsafeCast<JSReceiver>(receiver); const receiver = UnsafeCast<JSReceiver>(receiver);
......
...@@ -9,7 +9,8 @@ namespace regexp { ...@@ -9,7 +9,8 @@ namespace regexp {
// ES#sec-regexp.prototype.test // ES#sec-regexp.prototype.test
// RegExp.prototype.test ( S ) // RegExp.prototype.test ( S )
transitioning javascript builtin RegExpPrototypeTest( transitioning javascript builtin RegExpPrototypeTest(
js-implicit context: Context, receiver: JSAny)(string: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(string: JSAny): JSAny {
const methodName: constexpr string = 'RegExp.prototype.test'; const methodName: constexpr string = 'RegExp.prototype.test';
const receiver = Cast<JSReceiver>(receiver) const receiver = Cast<JSReceiver>(receiver)
otherwise ThrowTypeError(kIncompatibleMethodReceiver, methodName); otherwise ThrowTypeError(kIncompatibleMethodReceiver, methodName);
......
...@@ -212,7 +212,7 @@ namespace regexp { ...@@ -212,7 +212,7 @@ namespace regexp {
// ES6 21.2.5.4. // ES6 21.2.5.4.
// ES #sec-get-regexp.prototype.global // ES #sec-get-regexp.prototype.global
transitioning javascript builtin RegExpPrototypeGlobalGetter( transitioning javascript builtin RegExpPrototypeGlobalGetter(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter( return FlagGetter(
receiver, kGlobal, kRegExpPrototypeOldFlagGetter, receiver, kGlobal, kRegExpPrototypeOldFlagGetter,
'RegExp.prototype.global'); 'RegExp.prototype.global');
...@@ -221,7 +221,7 @@ namespace regexp { ...@@ -221,7 +221,7 @@ namespace regexp {
// ES6 21.2.5.5. // ES6 21.2.5.5.
// ES #sec-get-regexp.prototype.ignorecase // ES #sec-get-regexp.prototype.ignorecase
transitioning javascript builtin RegExpPrototypeIgnoreCaseGetter( transitioning javascript builtin RegExpPrototypeIgnoreCaseGetter(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter( return FlagGetter(
receiver, kIgnoreCase, kRegExpPrototypeOldFlagGetter, receiver, kIgnoreCase, kRegExpPrototypeOldFlagGetter,
'RegExp.prototype.ignoreCase'); 'RegExp.prototype.ignoreCase');
...@@ -230,7 +230,7 @@ namespace regexp { ...@@ -230,7 +230,7 @@ namespace regexp {
// ES6 21.2.5.7. // ES6 21.2.5.7.
// ES #sec-get-regexp.prototype.multiline // ES #sec-get-regexp.prototype.multiline
transitioning javascript builtin RegExpPrototypeMultilineGetter( transitioning javascript builtin RegExpPrototypeMultilineGetter(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter( return FlagGetter(
receiver, kMultiline, kRegExpPrototypeOldFlagGetter, receiver, kMultiline, kRegExpPrototypeOldFlagGetter,
'RegExp.prototype.multiline'); 'RegExp.prototype.multiline');
...@@ -238,7 +238,7 @@ namespace regexp { ...@@ -238,7 +238,7 @@ namespace regexp {
// ES #sec-get-regexp.prototype.dotAll // ES #sec-get-regexp.prototype.dotAll
transitioning javascript builtin RegExpPrototypeDotAllGetter( transitioning javascript builtin RegExpPrototypeDotAllGetter(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
const kNoCounter: constexpr int31 = -1; const kNoCounter: constexpr int31 = -1;
return FlagGetter(receiver, kDotAll, kNoCounter, 'RegExp.prototype.dotAll'); return FlagGetter(receiver, kDotAll, kNoCounter, 'RegExp.prototype.dotAll');
} }
...@@ -246,7 +246,7 @@ namespace regexp { ...@@ -246,7 +246,7 @@ namespace regexp {
// ES6 21.2.5.12. // ES6 21.2.5.12.
// ES #sec-get-regexp.prototype.sticky // ES #sec-get-regexp.prototype.sticky
transitioning javascript builtin RegExpPrototypeStickyGetter( transitioning javascript builtin RegExpPrototypeStickyGetter(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter( return FlagGetter(
receiver, kSticky, kRegExpPrototypeStickyGetter, receiver, kSticky, kRegExpPrototypeStickyGetter,
'RegExp.prototype.sticky'); 'RegExp.prototype.sticky');
...@@ -255,7 +255,7 @@ namespace regexp { ...@@ -255,7 +255,7 @@ namespace regexp {
// ES6 21.2.5.15. // ES6 21.2.5.15.
// ES #sec-get-regexp.prototype.unicode // ES #sec-get-regexp.prototype.unicode
transitioning javascript builtin RegExpPrototypeUnicodeGetter( transitioning javascript builtin RegExpPrototypeUnicodeGetter(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter( return FlagGetter(
receiver, kUnicode, kRegExpPrototypeUnicodeGetter, receiver, kUnicode, kRegExpPrototypeUnicodeGetter,
'RegExp.prototype.unicode'); 'RegExp.prototype.unicode');
...@@ -281,7 +281,7 @@ namespace regexp { ...@@ -281,7 +281,7 @@ namespace regexp {
// ES #sec-get-regexp.prototype.flags // ES #sec-get-regexp.prototype.flags
// TFJ(RegExpPrototypeFlagsGetter, 0, kReceiver) \ // TFJ(RegExpPrototypeFlagsGetter, 0, kReceiver) \
transitioning javascript builtin RegExpPrototypeFlagsGetter( transitioning javascript builtin RegExpPrototypeFlagsGetter(
js-implicit context: Context, receiver: JSAny)(): String { js-implicit context: NativeContext, receiver: JSAny)(): String {
ThrowIfNotJSReceiver(receiver, kRegExpNonObject, 'RegExp.prototype.flags'); ThrowIfNotJSReceiver(receiver, kRegExpNonObject, 'RegExp.prototype.flags');
// The check is strict because the following code relies on individual flag // The check is strict because the following code relies on individual flag
......
...@@ -26,7 +26,8 @@ namespace string { ...@@ -26,7 +26,8 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.endswith // https://tc39.github.io/ecma262/#sec-string.prototype.endswith
transitioning javascript builtin StringPrototypeEndsWith( transitioning javascript builtin StringPrototypeEndsWith(
js-implicit context: Context, receiver: JSAny)(...arguments): Boolean { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): Boolean {
const searchString: JSAny = arguments[0]; const searchString: JSAny = arguments[0];
const endPosition: JSAny = arguments[1]; const endPosition: JSAny = arguments[1];
const kBuiltinName: constexpr string = 'String.prototype.endsWith'; const kBuiltinName: constexpr string = 'String.prototype.endsWith';
......
...@@ -22,14 +22,15 @@ namespace string { ...@@ -22,14 +22,15 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.anchor // https://tc39.github.io/ecma262/#sec-string.prototype.anchor
transitioning javascript builtin StringPrototypeAnchor( transitioning javascript builtin StringPrototypeAnchor(
js-implicit context: Context, receiver: JSAny)(...arguments): String { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.anchor', 'a', 'name', arguments[0]); receiver, 'String.prototype.anchor', 'a', 'name', arguments[0]);
} }
// https://tc39.github.io/ecma262/#sec-string.prototype.big // https://tc39.github.io/ecma262/#sec-string.prototype.big
transitioning javascript builtin transitioning javascript builtin
StringPrototypeBig(js-implicit context: Context, receiver: JSAny)( StringPrototypeBig(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.big', 'big', kEmptyString, kEmptyString); receiver, 'String.prototype.big', 'big', kEmptyString, kEmptyString);
...@@ -37,7 +38,7 @@ namespace string { ...@@ -37,7 +38,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.blink // https://tc39.github.io/ecma262/#sec-string.prototype.blink
transitioning javascript builtin transitioning javascript builtin
StringPrototypeBlink(js-implicit context: Context, receiver: JSAny)( StringPrototypeBlink(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.blink', 'blink', kEmptyString, receiver, 'String.prototype.blink', 'blink', kEmptyString,
...@@ -46,7 +47,7 @@ namespace string { ...@@ -46,7 +47,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.bold // https://tc39.github.io/ecma262/#sec-string.prototype.bold
transitioning javascript builtin transitioning javascript builtin
StringPrototypeBold(js-implicit context: Context, receiver: JSAny)( StringPrototypeBold(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.bold', 'b', kEmptyString, kEmptyString); receiver, 'String.prototype.bold', 'b', kEmptyString, kEmptyString);
...@@ -54,7 +55,7 @@ namespace string { ...@@ -54,7 +55,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor // https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor
transitioning javascript builtin transitioning javascript builtin
StringPrototypeFontcolor(js-implicit context: Context, receiver: JSAny)( StringPrototypeFontcolor(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.fontcolor', 'font', 'color', arguments[0]); receiver, 'String.prototype.fontcolor', 'font', 'color', arguments[0]);
...@@ -62,7 +63,7 @@ namespace string { ...@@ -62,7 +63,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.fontsize // https://tc39.github.io/ecma262/#sec-string.prototype.fontsize
transitioning javascript builtin transitioning javascript builtin
StringPrototypeFontsize(js-implicit context: Context, receiver: JSAny)( StringPrototypeFontsize(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.fontsize', 'font', 'size', arguments[0]); receiver, 'String.prototype.fontsize', 'font', 'size', arguments[0]);
...@@ -70,7 +71,7 @@ namespace string { ...@@ -70,7 +71,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.fixed // https://tc39.github.io/ecma262/#sec-string.prototype.fixed
transitioning javascript builtin transitioning javascript builtin
StringPrototypeFixed(js-implicit context: Context, receiver: JSAny)( StringPrototypeFixed(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.fixed', 'tt', kEmptyString, kEmptyString); receiver, 'String.prototype.fixed', 'tt', kEmptyString, kEmptyString);
...@@ -78,7 +79,7 @@ namespace string { ...@@ -78,7 +79,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.italics // https://tc39.github.io/ecma262/#sec-string.prototype.italics
transitioning javascript builtin transitioning javascript builtin
StringPrototypeItalics(js-implicit context: Context, receiver: JSAny)( StringPrototypeItalics(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.italics', 'i', kEmptyString, kEmptyString); receiver, 'String.prototype.italics', 'i', kEmptyString, kEmptyString);
...@@ -86,7 +87,7 @@ namespace string { ...@@ -86,7 +87,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.link // https://tc39.github.io/ecma262/#sec-string.prototype.link
transitioning javascript builtin transitioning javascript builtin
StringPrototypeLink(js-implicit context: Context, receiver: JSAny)( StringPrototypeLink(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.link', 'a', 'href', arguments[0]); receiver, 'String.prototype.link', 'a', 'href', arguments[0]);
...@@ -94,7 +95,7 @@ namespace string { ...@@ -94,7 +95,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.small // https://tc39.github.io/ecma262/#sec-string.prototype.small
transitioning javascript builtin transitioning javascript builtin
StringPrototypeSmall(js-implicit context: Context, receiver: JSAny)( StringPrototypeSmall(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.small', 'small', kEmptyString, receiver, 'String.prototype.small', 'small', kEmptyString,
...@@ -103,7 +104,7 @@ namespace string { ...@@ -103,7 +104,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.strike // https://tc39.github.io/ecma262/#sec-string.prototype.strike
transitioning javascript builtin transitioning javascript builtin
StringPrototypeStrike(js-implicit context: Context, receiver: JSAny)( StringPrototypeStrike(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.strike', 'strike', kEmptyString, receiver, 'String.prototype.strike', 'strike', kEmptyString,
...@@ -112,7 +113,7 @@ namespace string { ...@@ -112,7 +113,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.sub // https://tc39.github.io/ecma262/#sec-string.prototype.sub
transitioning javascript builtin transitioning javascript builtin
StringPrototypeSub(js-implicit context: Context, receiver: JSAny)( StringPrototypeSub(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.sub', 'sub', kEmptyString, kEmptyString); receiver, 'String.prototype.sub', 'sub', kEmptyString, kEmptyString);
...@@ -120,7 +121,7 @@ namespace string { ...@@ -120,7 +121,7 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.sup // https://tc39.github.io/ecma262/#sec-string.prototype.sup
transitioning javascript builtin transitioning javascript builtin
StringPrototypeSup(js-implicit context: Context, receiver: JSAny)( StringPrototypeSup(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
return CreateHTML( return CreateHTML(
receiver, 'String.prototype.sup', 'sup', kEmptyString, kEmptyString); receiver, 'String.prototype.sup', 'sup', kEmptyString, kEmptyString);
......
...@@ -17,7 +17,7 @@ namespace string { ...@@ -17,7 +17,7 @@ namespace string {
// ES6 #sec-string.prototype-@@iterator // ES6 #sec-string.prototype-@@iterator
transitioning javascript builtin StringPrototypeIterator( transitioning javascript builtin StringPrototypeIterator(
js-implicit context: Context, receiver: JSAny)(): JSStringIterator { js-implicit context: NativeContext, receiver: JSAny)(): JSStringIterator {
const name: String = const name: String =
ToThisString(receiver, 'String.prototype[Symbol.iterator]'); ToThisString(receiver, 'String.prototype[Symbol.iterator]');
const index: Smi = 0; const index: Smi = 0;
...@@ -26,7 +26,7 @@ namespace string { ...@@ -26,7 +26,7 @@ namespace string {
// ES6 #sec-%stringiteratorprototype%.next // ES6 #sec-%stringiteratorprototype%.next
transitioning javascript builtin StringIteratorPrototypeNext( transitioning javascript builtin StringIteratorPrototypeNext(
js-implicit context: Context, receiver: JSAny)(): JSObject { js-implicit context: NativeContext, receiver: JSAny)(): JSObject {
const iterator = Cast<JSStringIterator>(receiver) otherwise ThrowTypeError( const iterator = Cast<JSStringIterator>(receiver) otherwise ThrowTypeError(
kIncompatibleMethodReceiver, 'String Iterator.prototype.next', kIncompatibleMethodReceiver, 'String Iterator.prototype.next',
receiver); receiver);
......
...@@ -95,7 +95,7 @@ namespace string { ...@@ -95,7 +95,7 @@ namespace string {
// ES6 #sec-string.prototype.padstart // ES6 #sec-string.prototype.padstart
transitioning javascript builtin transitioning javascript builtin
StringPrototypePadStart(js-implicit context: Context, receiver: JSAny)( StringPrototypePadStart(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
const methodName: constexpr string = 'String.prototype.padStart'; const methodName: constexpr string = 'String.prototype.padStart';
return StringPad(receiver, arguments, methodName, kStringPadStart); return StringPad(receiver, arguments, methodName, kStringPadStart);
...@@ -103,7 +103,7 @@ namespace string { ...@@ -103,7 +103,7 @@ namespace string {
// ES6 #sec-string.prototype.padend // ES6 #sec-string.prototype.padend
transitioning javascript builtin transitioning javascript builtin
StringPrototypePadEnd(js-implicit context: Context, receiver: JSAny)( StringPrototypePadEnd(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): String { ...arguments): String {
const methodName: constexpr string = 'String.prototype.padEnd'; const methodName: constexpr string = 'String.prototype.padEnd';
return StringPad(receiver, arguments, methodName, kStringPadEnd); return StringPad(receiver, arguments, methodName, kStringPadEnd);
......
...@@ -28,7 +28,8 @@ namespace string { ...@@ -28,7 +28,8 @@ namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.repeat // https://tc39.github.io/ecma262/#sec-string.prototype.repeat
transitioning javascript builtin StringPrototypeRepeat( transitioning javascript builtin StringPrototypeRepeat(
js-implicit context: Context, receiver: JSAny)(count: JSAny): String { js-implicit context: NativeContext,
receiver: JSAny)(count: JSAny): String {
// 1. Let O be ? RequireObjectCoercible(this value). // 1. Let O be ? RequireObjectCoercible(this value).
// 2. Let S be ? ToString(O). // 2. Let S be ? ToString(O).
const s: String = ToThisString(receiver, kBuiltinName); const s: String = ToThisString(receiver, kBuiltinName);
......
...@@ -87,7 +87,7 @@ namespace string { ...@@ -87,7 +87,7 @@ namespace string {
// https://tc39.es/ecma262/#sec-string.prototype.replaceall // https://tc39.es/ecma262/#sec-string.prototype.replaceall
transitioning javascript builtin StringPrototypeReplaceAll( transitioning javascript builtin StringPrototypeReplaceAll(
js-implicit context: Context, js-implicit context: NativeContext,
receiver: JSAny)(searchValue: JSAny, replaceValue: JSAny): JSAny { receiver: JSAny)(searchValue: JSAny, replaceValue: JSAny): JSAny {
// 1. Let O be ? RequireObjectCoercible(this value). // 1. Let O be ? RequireObjectCoercible(this value).
RequireObjectCoercible(receiver, 'String.prototype.replaceAll'); RequireObjectCoercible(receiver, 'String.prototype.replaceAll');
......
...@@ -6,7 +6,8 @@ namespace string { ...@@ -6,7 +6,8 @@ namespace string {
// ES6 #sec-string.prototype.slice ( start, end ) // ES6 #sec-string.prototype.slice ( start, end )
// https://tc39.github.io/ecma262/#sec-string.prototype.slice // https://tc39.github.io/ecma262/#sec-string.prototype.slice
transitioning javascript builtin StringPrototypeSlice( transitioning javascript builtin StringPrototypeSlice(
js-implicit context: Context, receiver: JSAny)(...arguments): String { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): String {
// 1. Let O be ? RequireObjectCoercible(this value). // 1. Let O be ? RequireObjectCoercible(this value).
// 2. Let S be ? ToString(O). // 2. Let S be ? ToString(O).
const string: String = ToThisString(receiver, 'String.prototype.slice'); const string: String = ToThisString(receiver, 'String.prototype.slice');
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
namespace string { namespace string {
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith // https://tc39.github.io/ecma262/#sec-string.prototype.startswith
transitioning javascript builtin StringPrototypeStartsWith( transitioning javascript builtin StringPrototypeStartsWith(
js-implicit context: Context, receiver: JSAny)(...arguments): Boolean { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): Boolean {
const searchString: JSAny = arguments[0]; const searchString: JSAny = arguments[0];
const position: JSAny = arguments[1]; const position: JSAny = arguments[1];
const kBuiltinName: constexpr string = 'String.prototype.startsWith'; const kBuiltinName: constexpr string = 'String.prototype.startsWith';
......
...@@ -7,7 +7,8 @@ namespace string { ...@@ -7,7 +7,8 @@ namespace string {
// String.prototype.substr ( start, length ) // String.prototype.substr ( start, length )
// ES6 #sec-string.prototype.substr // ES6 #sec-string.prototype.substr
transitioning javascript builtin StringPrototypeSubstr( transitioning javascript builtin StringPrototypeSubstr(
js-implicit context: Context, receiver: JSAny)(...arguments): String { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): String {
const methodName: constexpr string = 'String.prototype.substr'; const methodName: constexpr string = 'String.prototype.substr';
// 1. Let O be ? RequireObjectCoercible(this value). // 1. Let O be ? RequireObjectCoercible(this value).
// 2. Let S be ? ToString(O). // 2. Let S be ? ToString(O).
......
...@@ -6,7 +6,8 @@ namespace string { ...@@ -6,7 +6,8 @@ namespace string {
// ES6 #sec-string.prototype.substring // ES6 #sec-string.prototype.substring
transitioning javascript builtin StringPrototypeSubstring( transitioning javascript builtin StringPrototypeSubstring(
js-implicit context: Context, receiver: JSAny)(...arguments): String { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): String {
// Check that {receiver} is coercible to Object and convert it to a String. // Check that {receiver} is coercible to Object and convert it to a String.
const string: String = ToThisString(receiver, 'String.prototype.substring'); const string: String = ToThisString(receiver, 'String.prototype.substring');
const length: uintptr = string.length_uintptr; const length: uintptr = string.length_uintptr;
......
...@@ -13,7 +13,7 @@ namespace symbol { ...@@ -13,7 +13,7 @@ namespace symbol {
// ES #sec-symbol.prototype.description // ES #sec-symbol.prototype.description
transitioning javascript builtin SymbolPrototypeDescriptionGetter( transitioning javascript builtin SymbolPrototypeDescriptionGetter(
js-implicit context: Context, receiver: JSAny)(): String|Undefined { js-implicit context: NativeContext, receiver: JSAny)(): String|Undefined {
// 1. Let s be the this value. // 1. Let s be the this value.
// 2. Let sym be ? thisSymbolValue(s). // 2. Let sym be ? thisSymbolValue(s).
const sym: Symbol = const sym: Symbol =
...@@ -24,14 +24,15 @@ namespace symbol { ...@@ -24,14 +24,15 @@ namespace symbol {
// ES6 #sec-symbol.prototype-@@toprimitive // ES6 #sec-symbol.prototype-@@toprimitive
transitioning javascript builtin SymbolPrototypeToPrimitive( transitioning javascript builtin SymbolPrototypeToPrimitive(
js-implicit context: Context, receiver: JSAny)(_hint: JSAny): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(_hint: JSAny): JSAny {
// 1. Return ? thisSymbolValue(this value). // 1. Return ? thisSymbolValue(this value).
return ThisSymbolValue(receiver, 'Symbol.prototype [ @@toPrimitive ]'); return ThisSymbolValue(receiver, 'Symbol.prototype [ @@toPrimitive ]');
} }
// ES6 #sec-symbol.prototype.tostring // ES6 #sec-symbol.prototype.tostring
transitioning javascript builtin SymbolPrototypeToString( transitioning javascript builtin SymbolPrototypeToString(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
// 1. Let sym be ? thisSymbolValue(this value). // 1. Let sym be ? thisSymbolValue(this value).
const sym: Symbol = ThisSymbolValue(receiver, 'Symbol.prototype.toString'); const sym: Symbol = ThisSymbolValue(receiver, 'Symbol.prototype.toString');
// 2. Return SymbolDescriptiveString(sym). // 2. Return SymbolDescriptiveString(sym).
...@@ -40,7 +41,7 @@ namespace symbol { ...@@ -40,7 +41,7 @@ namespace symbol {
// ES6 #sec-symbol.prototype.valueof // ES6 #sec-symbol.prototype.valueof
transitioning javascript builtin SymbolPrototypeValueOf( transitioning javascript builtin SymbolPrototypeValueOf(
js-implicit context: Context, receiver: JSAny)(): JSAny { js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
// 1. Return ? thisSymbolValue(this value). // 1. Return ? thisSymbolValue(this value).
return ThisSymbolValue(receiver, 'Symbol.prototype.valueOf'); return ThisSymbolValue(receiver, 'Symbol.prototype.valueOf');
} }
......
...@@ -30,7 +30,7 @@ namespace typed_array { ...@@ -30,7 +30,7 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every
transitioning javascript builtin transitioning javascript builtin
TypedArrayPrototypeEvery(js-implicit context: Context, receiver: JSAny)( TypedArrayPrototypeEvery(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
// arguments[0] = callback // arguments[0] = callback
// arguments[1] = thisArg // arguments[1] = thisArg
......
...@@ -7,7 +7,8 @@ namespace typed_array { ...@@ -7,7 +7,8 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter
transitioning javascript builtin TypedArrayPrototypeFilter( transitioning javascript builtin TypedArrayPrototypeFilter(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// arguments[0] = callback // arguments[0] = callback
// arguments[1] = thisArg // arguments[1] = thisArg
try { try {
......
...@@ -30,7 +30,7 @@ namespace typed_array { ...@@ -30,7 +30,7 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find
transitioning javascript builtin transitioning javascript builtin
TypedArrayPrototypeFind(js-implicit context: Context, receiver: JSAny)( TypedArrayPrototypeFind(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
// arguments[0] = callback // arguments[0] = callback
// arguments[1] = thisArg // arguments[1] = thisArg
......
...@@ -32,8 +32,9 @@ namespace typed_array { ...@@ -32,8 +32,9 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findIndex // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findIndex
transitioning javascript builtin transitioning javascript builtin
TypedArrayPrototypeFindIndex(js-implicit context: Context, receiver: JSAny)( TypedArrayPrototypeFindIndex(
...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// arguments[0] = callback // arguments[0] = callback
// arguments[1] = thisArg. // arguments[1] = thisArg.
try { try {
......
...@@ -28,8 +28,9 @@ namespace typed_array { ...@@ -28,8 +28,9 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every
transitioning javascript builtin transitioning javascript builtin
TypedArrayPrototypeForEach(js-implicit context: Context, receiver: JSAny)( TypedArrayPrototypeForEach(
...arguments): Undefined { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): Undefined {
// arguments[0] = callback // arguments[0] = callback
// arguments[1] = this_arg. // arguments[1] = this_arg.
......
...@@ -17,8 +17,8 @@ namespace typed_array { ...@@ -17,8 +17,8 @@ namespace typed_array {
// %TypedArray%.from ( source [ , mapfn [ , thisArg ] ] ) // %TypedArray%.from ( source [ , mapfn [ , thisArg ] ] )
// https://tc39.github.io/ecma262/#sec-%typedarray%.from // https://tc39.github.io/ecma262/#sec-%typedarray%.from
transitioning javascript builtin transitioning javascript builtin
TypedArrayFrom(js-implicit context: Context, receiver: JSAny)(...arguments): TypedArrayFrom(js-implicit context: NativeContext, receiver: JSAny)(
JSTypedArray { ...arguments): JSTypedArray {
try { try {
const source: JSAny = arguments[0]; const source: JSAny = arguments[0];
......
...@@ -10,8 +10,8 @@ namespace typed_array { ...@@ -10,8 +10,8 @@ namespace typed_array {
// %TypedArray%.of ( ...items ) // %TypedArray%.of ( ...items )
// https://tc39.github.io/ecma262/#sec-%typedarray%.of // https://tc39.github.io/ecma262/#sec-%typedarray%.of
transitioning javascript builtin transitioning javascript builtin
TypedArrayOf(js-implicit context: Context, receiver: JSAny)(...arguments): TypedArrayOf(js-implicit context: NativeContext, receiver: JSAny)(
JSTypedArray { ...arguments): JSTypedArray {
try { try {
// 1. Let len be the actual number of arguments passed to this function. // 1. Let len be the actual number of arguments passed to this function.
const len: uintptr = Unsigned(arguments.length); const len: uintptr = Unsigned(arguments.length);
......
...@@ -42,8 +42,9 @@ namespace typed_array { ...@@ -42,8 +42,9 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce
transitioning javascript builtin transitioning javascript builtin
TypedArrayPrototypeReduce(js-implicit context: Context, receiver: JSAny)( TypedArrayPrototypeReduce(
...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// arguments[0] = callback // arguments[0] = callback
// arguments[1] = initialValue. // arguments[1] = initialValue.
try { try {
......
...@@ -43,8 +43,9 @@ namespace typed_array { ...@@ -43,8 +43,9 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright
transitioning javascript builtin transitioning javascript builtin
TypedArrayPrototypeReduceRight(js-implicit context: Context, receiver: JSAny)( TypedArrayPrototypeReduceRight(
...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// arguments[0] = callback // arguments[0] = callback
// arguments[1] = initialValue. // arguments[1] = initialValue.
try { try {
......
...@@ -30,7 +30,7 @@ namespace typed_array { ...@@ -30,7 +30,7 @@ namespace typed_array {
// %TypedArray%.prototype.set ( overloaded [ , offset ] ) // %TypedArray%.prototype.set ( overloaded [ , offset ] )
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set-overloaded-offset // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set-overloaded-offset
transitioning javascript builtin transitioning javascript builtin
TypedArrayPrototypeSet(js-implicit context: Context, receiver: JSAny)( TypedArrayPrototypeSet(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
// Steps 2-8 are the same for // Steps 2-8 are the same for
// %TypedArray%.prototype.set ( array [ , offset ] ) and // %TypedArray%.prototype.set ( array [ , offset ] ) and
......
...@@ -52,7 +52,8 @@ namespace typed_array { ...@@ -52,7 +52,8 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice
transitioning javascript builtin TypedArrayPrototypeSlice( transitioning javascript builtin TypedArrayPrototypeSlice(
js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSAny {
// arguments[0] = start // arguments[0] = start
// arguments[1] = end // arguments[1] = end
......
...@@ -30,7 +30,7 @@ namespace typed_array { ...@@ -30,7 +30,7 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some
transitioning javascript builtin transitioning javascript builtin
TypedArrayPrototypeSome(js-implicit context: Context, receiver: JSAny)( TypedArrayPrototypeSome(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
// arguments[0] = callback // arguments[0] = callback
// arguments[1] = thisArg. // arguments[1] = thisArg.
......
...@@ -87,7 +87,7 @@ namespace typed_array { ...@@ -87,7 +87,7 @@ namespace typed_array {
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort // https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort
transitioning javascript builtin TypedArrayPrototypeSort( transitioning javascript builtin TypedArrayPrototypeSort(
js-implicit context: Context, js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSTypedArray { receiver: JSAny)(...arguments): JSTypedArray {
// 1. If comparefn is not undefined and IsCallable(comparefn) is false, // 1. If comparefn is not undefined and IsCallable(comparefn) is false,
// throw a TypeError exception. // throw a TypeError exception.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
namespace typed_array { namespace typed_array {
// ES %TypedArray%.prototype.subarray // ES %TypedArray%.prototype.subarray
transitioning javascript builtin TypedArrayPrototypeSubArray( transitioning javascript builtin TypedArrayPrototypeSubArray(
js-implicit context: Context, js-implicit context: NativeContext,
receiver: JSAny)(...arguments): JSTypedArray { receiver: JSAny)(...arguments): JSTypedArray {
const methodName: constexpr string = '%TypedArray%.prototype.subarray'; const methodName: constexpr string = '%TypedArray%.prototype.subarray';
......
...@@ -24,6 +24,7 @@ static const char* const BOOL_TYPE_STRING = "bool"; ...@@ -24,6 +24,7 @@ static const char* const BOOL_TYPE_STRING = "bool";
static const char* const VOID_TYPE_STRING = "void"; static const char* const VOID_TYPE_STRING = "void";
static const char* const ARGUMENTS_TYPE_STRING = "Arguments"; static const char* const ARGUMENTS_TYPE_STRING = "Arguments";
static const char* const CONTEXT_TYPE_STRING = "Context"; static const char* const CONTEXT_TYPE_STRING = "Context";
static const char* const NATIVE_CONTEXT_TYPE_STRING = "NativeContext";
static const char* const JS_FUNCTION_TYPE_STRING = "JSFunction"; static const char* const JS_FUNCTION_TYPE_STRING = "JSFunction";
static const char* const MAP_TYPE_STRING = "Map"; static const char* const MAP_TYPE_STRING = "Map";
static const char* const OBJECT_TYPE_STRING = "Object"; static const char* const OBJECT_TYPE_STRING = "Object";
......
...@@ -455,11 +455,11 @@ void ImplementationVisitor::Visit(Builtin* builtin) { ...@@ -455,11 +455,11 @@ void ImplementationVisitor::Visit(Builtin* builtin) {
const Type* actual_type = signature.parameter_types.types[i]; const Type* actual_type = signature.parameter_types.types[i];
const Type* expected_type; const Type* expected_type;
if (param_name == "context") { if (param_name == "context") {
source_out() << " TNode<Context> " << generated_name source_out() << " TNode<NativeContext> " << generated_name
<< " = UncheckedCast<Context>(Parameter(" << " = UncheckedCast<NativeContext>(Parameter("
<< "Descriptor::kContext));\n"; << "Descriptor::kContext));\n";
source_out() << " USE(" << generated_name << ");\n"; source_out() << " USE(" << generated_name << ");\n";
expected_type = TypeOracle::GetContextType(); expected_type = TypeOracle::GetNativeContextType();
} else if (param_name == "receiver") { } else if (param_name == "receiver") {
source_out() source_out()
<< " TNode<Object> " << generated_name << " = " << " TNode<Object> " << generated_name << " = "
......
...@@ -253,6 +253,10 @@ class TypeOracle : public ContextualClass<TypeOracle> { ...@@ -253,6 +253,10 @@ class TypeOracle : public ContextualClass<TypeOracle> {
return Get().GetBuiltinType(CONTEXT_TYPE_STRING); return Get().GetBuiltinType(CONTEXT_TYPE_STRING);
} }
static const Type* GetNativeContextType() {
return Get().GetBuiltinType(NATIVE_CONTEXT_TYPE_STRING);
}
static const Type* GetJSFunctionType() { static const Type* GetJSFunctionType() {
return Get().GetBuiltinType(JS_FUNCTION_TYPE_STRING); return Get().GetBuiltinType(JS_FUNCTION_TYPE_STRING);
} }
......
...@@ -1388,7 +1388,7 @@ namespace array { ...@@ -1388,7 +1388,7 @@ namespace array {
// https://tc39.github.io/ecma262/#sec-array.prototype.sort // https://tc39.github.io/ecma262/#sec-array.prototype.sort
transitioning javascript builtin transitioning javascript builtin
ArrayPrototypeSort(js-implicit context: Context, receiver: JSAny)( ArrayPrototypeSort(js-implicit context: NativeContext, receiver: JSAny)(
...arguments): JSAny { ...arguments): JSAny {
// 1. If comparefn is not undefined and IsCallable(comparefn) is false, // 1. If comparefn is not undefined and IsCallable(comparefn) is false,
// throw a TypeError exception. // throw a TypeError exception.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment