Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit ab67c3f

Browse files
committed
Bug 1471272 - Add [SMDOC] tags for in-source documentation. r=jandem,nbp
MozReview-Commit-ID: I038aYgvwe4
1 parent 746c499 commit ab67c3f

48 files changed

Lines changed: 103 additions & 18 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

js/public/CallArgs.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
66

77
/*
8+
* [SMDOC] JS::CallArgs API
9+
*
810
* Helper classes encapsulating access to the callee, |this| value, arguments,
911
* and argument count for a call/construct operation.
1012
*
@@ -46,10 +48,7 @@
4648
*
4749
* It's possible (albeit deprecated) to manually index into |vp| to access the
4850
* callee, |this|, and arguments of a function, and to set its return value.
49-
* It's also possible to use the supported API of JS_CALLEE, JS_THIS, JS_ARGV,
50-
* JS_RVAL, and JS_SET_RVAL to the same ends.
51-
*
52-
* But neither API has the error-handling or moving-GC correctness of CallArgs.
51+
* This does not have the error-handling or moving-GC correctness of CallArgs.
5352
* New code should use CallArgs instead whenever possible.
5453
*
5554
* The eventual plan is to change JSNative to take |const CallArgs&| directly,

js/public/Debug.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class Debugger;
2727
namespace JS {
2828
namespace dbg {
2929

30+
// [SMDOC] Debugger builder API
31+
//
3032
// Helping embedding code build objects for Debugger
3133
// -------------------------------------------------
3234
//

js/public/Proxy.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class RegExpShared;
3737
class JS_FRIEND_API(Wrapper);
3838

3939
/*
40+
* [SMDOC] Proxy Objects
41+
*
4042
* A proxy is a JSObject with highly customizable behavior. ES6 specifies a
4143
* single kind of proxy, but the customization mechanisms we use to implement
4244
* ES6 Proxy objects are also useful wherever an object with weird behavior is

js/public/Result.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
66

77
/*
8+
* [SMDOC] JS::Result
9+
*
810
* `Result` is used as the return type of many SpiderMonkey functions that
911
* can either succeed or fail. See "/mfbt/Result.h".
1012
*

js/public/RootingAPI.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include "js/Utility.h"
2929

3030
/*
31+
* [SMDOC] Stack Rooting
32+
*
3133
* Moving GC Stack Rooting
3234
*
3335
* A moving GC may change the physical location of GC allocated things, even

js/public/UbiNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "js/Value.h"
3030
#include "js/Vector.h"
3131

32-
// JS::ubi::Node
32+
// [SMDOC] ubi::Node (Heap Analysis framework)
3333
//
3434
// JS::ubi::Node is a pointer-like type designed for internal use by heap
3535
// analysis tools. A ubi::Node can refer to:

js/public/Value.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ CanonicalizeNaN(double d)
268268
}
269269

270270
/**
271+
* [SMDOC] JS::Value type
272+
*
271273
* JS::Value is the interface for a single JavaScript Engine value. A few
272274
* general notes on JS::Value:
273275
*

js/src/builtin/TypedObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/*
2020
* -------------
21-
* Typed Objects
21+
* [SMDOC] Typed Objects
2222
* -------------
2323
*
2424
* Typed objects are a special kind of JS object where the data is

js/src/frontend/Parser.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#define frontend_Parser_h
1111

1212
/*
13+
* [SMDOC] JS Parser
14+
*
1315
* JS parsers capable of generating ASTs from source text.
1416
*
1517
* A parser embeds token stream information, then gets and matches tokens to

js/src/frontend/TokenStream.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#define frontend_TokenStream_h
1717

1818
/*
19+
* [SMDOC] Parser Token Stream
20+
*
1921
* A token stream exposes the raw tokens -- operators, names, numbers,
2022
* keywords, and so on -- of JavaScript source code.
2123
*

0 commit comments

Comments
 (0)