Skip to content

Commit 99d66cc

Browse files
committed
deps: use multiline comments in v8-sandbox.h
1 parent a1c9178 commit 99d66cc

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

deps/v8/include/v8-sandbox.h

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,29 @@ enum class CppHeapPointerTag : uint16_t {
3030
kFirstTag = 0,
3131
kNullTag = 0,
3232

33-
// The lower type ids are reserved for the embedder to assign. For that, the
34-
// main requirement is that all (transitive) child classes of a given parent
35-
// class have type ids in the same range, and that there are no unrelated
36-
// types in that range. For example, given the following type hierarchy:
37-
//
38-
// A F
39-
// / \
40-
// B E
41-
// / \
42-
// C D
43-
//
44-
// a potential type id assignment that satistifes these requirements is
45-
// {C: 0, D: 1, B: 2, A: 3, E: 4, F: 5}. With that, the type check for type A
46-
// would check for the range [0, 4], while the check for B would check range
47-
// [0, 2], and for F it would simply check [5, 5].
48-
//
49-
// In addition, there is an option for performance tweaks: if the size of the
50-
// type range corresponding to a supertype is a power of two and starts at a
51-
// power of two (e.g. [0x100, 0x13f]), then the compiler can often optimize
52-
// the type check to use even fewer instructions (essentially replace a AND +
53-
// SUB with a single AND).
33+
/**
34+
* The lower type ids are reserved for the embedder to assign. For that, the
35+
* main requirement is that all (transitive) child classes of a given parent
36+
* class have type ids in the same range, and that there are no unrelated
37+
* types in that range. For example, given the following type hierarchy:
38+
*
39+
* A F
40+
* / \
41+
* B E
42+
* / \
43+
* C D
44+
*
45+
* a potential type id assignment that satistifes these requirements is
46+
* {C: 0, D: 1, B: 2, A: 3, E: 4, F: 5}. With that, the type check for type A
47+
* would check for the range [0, 4], while the check for B would check range
48+
* [0, 2], and for F it would simply check [5, 5].
49+
*
50+
* In addition, there is an option for performance tweaks: if the size of the
51+
* type range corresponding to a supertype is a power of two and starts at a
52+
* power of two (e.g. [0x100, 0x13f]), then the compiler can often optimize
53+
* the type check to use even fewer instructions (essentially replace a AND +
54+
* SUB with a single AND)
55+
*/
5456

5557
kDefaultTag = 0x7000,
5658

0 commit comments

Comments
 (0)