Name Description Size
Array-inl.h 1127
Array.cpp 135026
Array.h JS Array interface. 10379
Array.js ES5 34752
AsyncFunction.js 623
AsyncIteration.js 916
AtomicsObject.cpp JS Atomics pseudo-module. See "Spec: JavaScript Shared Memory, Atomics, and Locks" for the full specification. In addition to what is specified there, we throw an Error object if the futex API hooks have not been installed on the runtime. Essentially that is an implementation error at a higher level. Note on the current implementation of atomic operations. The Mozilla atomics are not sufficient to implement these APIs because we need to support 8-bit, 16-bit, and 32-bit data: the Mozilla atomics only support 32-bit data. At the moment we include mozilla/Atomics.h, which will define MOZ_HAVE_CXX11_ATOMICS and include <atomic> if we have C++11 atomics. If MOZ_HAVE_CXX11_ATOMICS is set we'll use C++11 atomics. Otherwise, if the compiler has them we'll fall back on gcc/Clang intrinsics. Otherwise, if we're on VC++2012, we'll use C++11 atomics even if MOZ_HAVE_CXX11_ATOMICS is not defined. The compiler has the atomics but they are disabled in Mozilla due to a performance bug. That performance bug does not affect the Atomics code. See mozilla/Atomics.h for further comments on that bug. Otherwise, if we're on VC++2010 or VC++2008, we'll emulate the gcc/Clang intrinsics with simple code below using the VC++ intrinsics, like the VC++2012 solution this is a stopgap since we're about to start using VC++2013 anyway. If none of those options are available then the build must disable shared memory, or compilation will fail with a predictable error. 32644
AtomicsObject.h 6435
BigInt.cpp 6429
BigInt.h 1710
Boolean-inl.h namespace js 1011
Boolean.cpp JS boolean implementation. 4956
Boolean.h JS boolean interface. 703
Classes.js 756
DataViewObject.cpp bytesPerElement = 32211
DataViewObject.h 6490
Date.js global intl_DateTimeFormat: false, 6404 \ /* 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 */ 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 6797
Error.js ES6 20140718 draft 853
Eval.cpp static 20213
Eval.h builtin_Eval_h 1615
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 2834
intl 29
Iterator.js 255
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). 31414
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. 1374
Map.js 3849
MapObject.cpp HashableValue ********************************************************* 54677
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. 14716
Module.js 21851
ModuleObject.cpp static 58702
ModuleObject.h namespace frontend 15011
Number.js global intl_NumberFormat: false, 3305
Object.cpp Make an object whether this was called with 'new' or not. 63274
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. 2477
Object.js ES6 draft rev 32 (2015 Feb 2) 9415
Profilers.cpp Profiling-related API 15487
Profilers.h Functions for controlling profilers from within JS: Valgrind, Perf, etc 2747
Promise.cpp 188907
Promise.h 24027
Promise.js 2377
Reflect.cpp Reflect methods ******************************************************* 6812
Reflect.h builtin_Reflect_h 1003
Reflect.js , newTarget 5603
ReflectParse.cpp JS reflection package. 117775
RegExp.cpp ES 2017 draft rev 6a13789aa9e7c6de4e96b7d3e24d9e6eba6584ad steps 3, 16-25. 55928
RegExp.h The following builtin natives are extern'd for pointer comparison in other parts of the engine. 6205
RegExp.js 37243
RegExpGlobalReplaceOpt.h.js 4230
RegExpLocalReplaceOpt.h.js 3842
SelfHostingDefines.h 5383
Set.js 3325
Sorting.js eslint-disable comma-spacing 14989
Stream.cpp Returns the stream associated with the given reader. 176122
Stream.h Memory layout of Stream instances. See for details on the stored state. [[state]] and [[disturbed]] are stored in StreamSlot_State as ReadableStream::State enum values. Of the stored values, Reader and StoredError might be cross-compartment wrappers. This can happen if the Reader was created by applying a different compartment's ReadableStream.prototype.getReader method. A stream's associated controller is always created from under the stream's constructor and thus cannot be in a different compartment. 16763
String.cpp Forward declarations for URI encode/decode and helper routines 125181
String.h Initialize the String class, returning its prototype object. 5499
String.js global intl_Collator: false, 32940
Symbol.cpp 7947
Symbol.h Stores this Symbol object's [[PrimitiveValue]]. 2651
TestingFunctions.cpp 192781
TestingFunctions.h namespace js 1324
TypedArray.js Steps 3-5 (non-wrapped typed arrays). 55223
TypedObject-inl.h static 741
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(); = {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`. 98003
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 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 js::Class 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. 39004
TypedObject.js 31025
TypedObjectConstants.h 4077
Utilities.js jshint bitwise: true, camelcase: false, curly: false, eqeqeq: true, es5: true, forin: true, immed: true, indent: 4, latedef: false, newcap: false, noarg: true, noempty: true, nonew: true, plusplus: false, quotmark: false, regexp: true, undef: true, unused: false, strict: false, trailing: true, 8333
WeakMap.js 806
WeakMapObject-inl.h builtin_WeakMapObject_inl_h 2057
WeakMapObject.cpp static 9433
WeakMapObject.h builtin_WeakMapObject_h 2229
WeakSet.js 638
WeakSetObject.cpp static 7321
WeakSetObject.h builtin_WeakSetObject_h 1851
.eslintrc.js 683