Name Description Size
Array-inl.h 1093
Array.cpp 135817
Array.h JS Array interface. 10090
Array.js , fromIndex 29675
AsyncFunction.js 623
AsyncIteration.js Iterator Helpers proposal 1.1.1 4874
AtomicsObject.cpp JS Atomics pseudo-module. See chapter 24.4 "The Atomics Object" and chapter 27 "Memory Model" in ECMAScript 2021 for the full specification. 33724
AtomicsObject.h 5135
BigInt.cpp !JS_HAS_INTL_API 6520
BigInt.h 1745
BigInt.js Format this BigInt object into a string, using the locale and formatting options provided. Spec PR: https://github.com/tc39/ecma402/pull/236 1417
Boolean-inl.h namespace js 1011
Boolean.cpp JS boolean implementation. 4992
Boolean.h JS boolean interface. 625
Classes.js 610
DataViewObject.cpp bytesPerElement = 31763
DataViewObject.h 6537
Date.js Get a cached DateTimeFormat formatter object, created like so: var opts = ToDateTimeOptions(undefined, required, defaults); return new Intl.DateTimeFormat(undefined, opts); |format| must be a key from the "formatters" Record described above. 6409
Error.js ES6 20140718 draft 19.5.3.4. 853
Eval.cpp static 21355
Eval.h builtin_Eval_h 1616
FinalizationRegistryObject.cpp static 27426
FinalizationRegistryObject.h FinalizationRegistry objects allow a program to register to receive a callback after a 'target' object dies. The callback is passed a 'held value' (that hopefully doesn't entrain the target). An 'unregister token' is an object which can be used to remove multiple previous registrations in one go. To arrange this, the following data structures are used: +-------------------------------------+---------------------------------+ | FinalizationRegistry compartment | Target zone / compartment | | | | | +----------------------+ | +------------------+ | | +---->+ FinalizationRegistry | | | Zone | | | | +---------+------------+ | +---------+--------+ | | | | | | | | | v | v | | | +------------+--------------+ | +------------+------------+ | | | | Registrations | | | FinalizationRecordMap | | | | | weak map | | | map | | | | +---------------------------+ | +-------------------------+ | | | | Unregister : Records | | | Target : Finalization-| | | | | token : object | | | object : RecordVector | | | | +--------------------+------+ | +----+-------------+------+ | | | | | | | | | | v | v | | | | +--------------------+------+ | +----+-----+ | | | | | Finalization- | | | Target | | | | | | RegistrationsObject | | | JSObject | | | | | +-------------+-------------+ | +----------+ | | | | | RecordVector | | | | | | +-------------+-------------+ | | | | | | | | | | | * v | | | | | +-------------+-------------+ * | | | | | | FinalizationRecordObject +<-------------------------+ | | | +---------------------------+ | | | +--+ Registry | | | | +---------------------------+ | | | | Held value | | | | +---------------------------+ | | | | | +-------------------------------------+---------------------------------+ Registering a target with a FinalizationRegistry creates a FinalizationRecord containing the registry and the heldValue. This is added to a vector of records associated with the target, implemented as a map on the target's Zone. All finalization records are treated as GC roots. When a target is registered an unregister token may be supplied. If so, this is also recorded by the registry and is stored in a weak map of registrations. The values of this map are FinalizationRegistrationsObject objects. It's necessary to have another JSObject here because our weak map implementation only supports JS types as values. After a target object has been registered with a finalization registry it is expected that its callback will be called for that object even if the finalization registry itself is no longer reachable from JS. Thus the values of each zone's finalization record map are treated as roots and marked at the start of GC. The finalization record maps are also swept during GC to check for any targets that are dying. For such targets the associated record list is processed and for each record the heldValue is queued on finalization registry. At a later time this causes the client's callback to be run. When targets are unregistered, the registration is looked up in the weakmap and the corresponding records are cleared. These are removed from the zone's record map when it is next swept. 10932
Function.js bind_bindFunction{0,1,2} are special cases of the generic bind_bindFunctionN below. They avoid the need to merge the lists of bound arguments and call arguments to the bound function into a new list which is then used in a destructuring call of the bound function. All three of these functions again have special-cases for call argument counts between 0 and 5. For calls with 6+ arguments, all - bound and call - arguments are copied into an array before invoking the generic call and construct helper functions. This avoids having to use rest parameters and destructuring in the fast path. Directly embedding the for-loop to combine bound and call arguments may inhibit inlining of the bound function, so we use a separate combiner function to perform this task. This combiner function is created lazily to ensure we only pay its construction cost when needed. All bind_bindFunction{X} functions have the same signature to enable simple reading out of closed-over state by debugging functions. 13396
Generator.js 2835
Iterator.js ECMA262 7.4.6 8097
JSON.cpp ES5 15.12.3 Quote. Requires that the destination has enough space allocated for src after escaping (that is, `2 + 6 * (srcEnd - srcBegin)` characters). 31437
JSON.h If maybeSafely is true, Stringify will attempt to assert the API requirements of JS::ToJSONMaybeSafely as it traverses the graph, and will not try to invoke .toJSON on things as it goes. 1267
Map.js 3859
MapObject.cpp HashableValue ********************************************************* 56420
MapObject.h Comparing two ropes for equality can fail. The js::HashTable template requires infallible hash() and match() operations. Therefore we require all values to be converted to hashable form before being used as a key in a Map or Set object. All values except ropes are hashable as-is. 15543
Module.js 23118
ModuleObject.cpp static 69784
ModuleObject.h 13361
Number.js Format this Number object into a string, using the locale and formatting options provided. Spec: ECMAScript Language Specification, 5.1 edition, 15.7.4.3. Spec: ECMAScript Internationalization API Specification, 13.2.1. 3336
Object.cpp Make an object whether this was called with 'new' or not. 60734
Object.h Like IdToValue, but convert int jsids to strings. This is used when exposing a jsid to script for Object.getOwnProperty{Names,Symbols} or scriptable proxy traps. 2421
Object.js ES6 draft rev 32 (2015 Feb 2) 19.1.2.9. 9925
Profilers.cpp Profiling-related API 15487
Profilers.h Functions for controlling profilers from within JS: Valgrind, Perf, etc 2747
Promise-inl.h Given a settled (i.e. fulfilled or rejected, not pending) promise, sets |promise.[[PromiseIsHandled]]| to true and removes it from the list of unhandled rejected promises. NOTE: If you need to set |promise.[[PromiseIsHandled]]| on a pending promise, use |PromiseObject::setHandled()| directly. 1297
Promise.cpp 206436
Promise.h Unforgeable version of the JS builtin Promise.all. Takes a HandleValueVector of Promise objects and returns a promise that's resolved with an array of resolution values when all those promises have been resolved, or rejected with the rejection value of the first rejected promise. Asserts that all objects in the `promises` vector are, maybe wrapped, instances of `Promise` or a subclass of `Promise`. 9036
Promise.js 2229
Reflect.cpp Reflect methods ******************************************************* 6722
Reflect.h builtin_Reflect_h 938
Reflect.js , newTarget 5588
ReflectParse.cpp JS reflection package. 120509
RegExp.cpp ES 2021 draft 21.2.5.2.2: Steps 16-28 https://tc39.es/ecma262/#sec-regexpbuiltinexec 64560
RegExp.h The following builtin natives are extern'd for pointer comparison in other parts of the engine. 6421
RegExp.js 38888
RegExpGlobalReplaceOpt.h.js 4685
RegExpLocalReplaceOpt.h.js 4269
SelfHostingDefines.h 4814
Set.js 3337
Sorting.js eslint-disable comma-spacing 15266
Stream.cpp 3.3. ReadableStreamAsyncIteratorPrototype ***************************** 29223
Stream.h builtin_Stream_h 1161
String.cpp Forward declarations for URI encode/decode and helper routines 131485
String.h Initialize the String class, returning its prototype object. 3623
String.js A helper function implementing the logic for both String.prototype.padStart and String.prototype.padEnd as described in ES7 Draft March 29, 2016 30994
Symbol.cpp 7439
Symbol.h Stores this Symbol object's [[PrimitiveValue]]. 2382
TestingFunctions.cpp 208821
TestingFunctions.h namespace js 1367
TypedArray.js Steps 3-5 (non-wrapped typed arrays). 52823
TypedObject-inl.h static 744
TypedObject.cpp Overwrites the contents of `typedObj` at offset `offset` with `val` converted to the type `typeObj`. This is done by delegating to self-hosted code. This is used for assignments and initializations. For example, consider the final assignment in this snippet: var Point = new StructType({x: float32, y: float32}); var Line = new StructType({from: Point, to: Point}); var line = new Line(); line.to = {x: 22, y: 44}; This would result in a call to `ConvertAndCopyTo` where: - typeObj = Point - typedObj = line - offset = sizeof(Point) == 8 - val = {x: 22, y: 44} This would result in loading the value of `x`, converting it to a float32, and hen storing it at the appropriate offset, and then doing the same for `y`. Note that the type of `typeObj` may not be the type of `typedObj` but rather some subcomponent of `typedObj`. 100964
TypedObject.h ------------- [SMDOC] Typed Objects ------------- Typed objects are a special kind of JS object where the data is given well-structured form. To use a typed object, users first create *type objects* (no relation to the type objects used in TI) that define the type layout. For example, a statement like: var PointType = new StructType({x: uint8, y: uint8}); would create a type object PointType that is a struct with two fields, each of uint8 type. This comment typically assumes familiary with the API. For more info on the API itself, see the Harmony wiki page at http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects or the ES6 spec (not finalized at the time of this writing). - Initialization: Currently, all "globals" related to typed objects are packaged within a single "module" object `TypedObject`. This module has its own JSClass and when that class is initialized, we also create and define all other values (in `js::InitTypedObjectModuleClass()`). - Type objects, meta type objects, and type representations: There are a number of pre-defined type objects, one for each scalar type (`uint8` etc). Each of these has its own class_, defined in `DefineNumericClass()`. There are also meta type objects (`ArrayType`, `StructType`). These constructors are not themselves type objects but rather the means for the *user* to construct new typed objects. Each type object is associated with a *type representation* (see TypeRepresentation.h). Type representations are canonical versions of type objects. We attach them to TI type objects and (eventually) use them for shape guards etc. They are purely internal to the engine and are not exposed to end users (though self-hosted code sometimes accesses them). - Typed objects: A typed object is an instance of a *type object* (note the past participle). Typed objects can be either transparent or opaque, depending on whether their underlying buffer can be accessed. Transparent and opaque typed objects have different classes, and can have different physical layouts. The following layouts are possible: InlineTypedObject: Typed objects whose data immediately follows the object's header are inline typed objects. The buffer for these objects is created lazily and stored via the compartment's LazyArrayBufferTable, and points back into the object's internal data. OutlineTypedObject: Typed objects whose data is owned by another object, which can be either an array buffer or an inline typed object. Outline typed objects may be attached or unattached. An unattached typed object has no data associated with it. When first created, objects are always attached, but they can become unattached if their buffer becomes detached. Note that whether a typed object is opaque is not directly connected to its type. That is, opaque types are *always* represented by opaque typed objects, but you may have opaque typed objects for transparent types too. This can occur for two reasons: (1) a transparent type may be embedded within an opaque type or (2) users can choose to convert transparent typed objects into opaque ones to avoid giving access to the buffer itself. Typed objects (no matter their class) are non-native objects that fully override the property accessors etc. The overridden accessor methods are the same in each and are defined in methods of TypedObject. 38707
TypedObject.js 31130
TypedObjectConstants.h 3909
Utilities.js List specification type ********* 7119
WeakMap.js 806
WeakMapObject-inl.h builtin_WeakMapObject_inl_h 1819
WeakMapObject.cpp static 9483
WeakMapObject.h builtin_WeakMapObject_h 2418
WeakRefObject.cpp static 9815
WeakRefObject.h builtin_WeakRefObject_h 1276
WeakSet.js 638
WeakSetObject.cpp static 7357
WeakSetObject.h builtin_WeakSetObject_h 1855
embedjs.py \ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ namespace js { namespace %(namespace)s { static const %(sources_type)s data[] = { %(sources_data)s }; static const %(sources_type)s * const %(sources_name)s = reinterpret_cast<const %(sources_type)s *>(data); uint32_t GetCompressedSize() { return %(compressed_total_length)i; } uint32_t GetRawScriptsSize() { return %(raw_total_length)i; } } // selfhosted } // js 7002
intl 42
streams 48
.eslintrc.js 792