GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: V8: backport 7857eb34db42 · nodejs/node@2d982d3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • deps/v8
    • src
      • builtins
        • base.tq
        • promise-misc.tq
      • compiler
        • js-call-reducer.cc
        • js-call-reducer.h
        • opcodes.h
        • simplified-lowering.cc
        • simplified-operator.cc
        • simplified-operator.h
        • turboshaft
          • assembler.h
          • graph-builder.cc
          • machine-lowering-reducer-inl.h
          • maglev-graph-building-phase.cc
          • operations.h
        • typer.cc
        • verifier.cc
      • d8
        • d8.cc
        • d8.h
      • debug
        • debug-evaluate.cc
      • init
        • bootstrapper.cc
      • maglev
        • maglev-graph-builder.cc
        • maglev-graph-builder.h
        • maglev-ir.cc
        • maglev-ir.h
      • torque
        • torque-parser.cc
    • test/mjsunit
      • extras-cped.js
      • maglev
        • extras-cped.js
      • mjsunit.status
      • turboshaft
        • extras-cped.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/v8/src/builtins/base.tq‎

Copy file name to clipboardExpand all lines: deps/v8/src/builtins/base.tq
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,6 @@ extern macro ChangeUint32ToWord(uint32): uintptr; // Doesn't sign-extend.
13131313
extern macro ChangeInt32ToInt64(int32): int64; // Sign-extends.
13141314
extern macro ChangeUint32ToUint64(uint32): uint64; // Doesn't sign-extend.
13151315
extern macro LoadNativeContext(Context): NativeContext;
1316-
extern macro GetContinuationPreservedEmbedderData(): Object;
13171316
extern macro TruncateFloat64ToFloat16(float64): float16;
13181317
extern macro TruncateFloat32ToFloat16(float32): float16;
13191318
extern macro TruncateFloat64ToFloat32(float64): float32;
Collapse file

‎deps/v8/src/builtins/promise-misc.tq‎

Copy file name to clipboardExpand all lines: deps/v8/src/builtins/promise-misc.tq
+23-4Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ extern macro PromiseBuiltinsAssembler::IsIsolatePromiseHookEnabled(uint32):
3030

3131
extern macro PromiseBuiltinsAssembler::PromiseHookFlags(): uint32;
3232

33+
namespace macros {
34+
extern macro GetContinuationPreservedEmbedderData(): Object;
35+
extern macro SetContinuationPreservedEmbedderData(Object): void;
36+
}
37+
3338
namespace promise {
3439
extern macro IsFunctionWithPrototypeSlotMap(Map): bool;
3540

@@ -80,7 +85,7 @@ macro NewPromiseFulfillReactionJobTask(
8085
return new PromiseFulfillReactionJobTask{
8186
map: PromiseFulfillReactionJobTaskMapConstant(),
8287
continuation_preserved_embedder_data:
83-
GetContinuationPreservedEmbedderData(),
88+
macros::GetContinuationPreservedEmbedderData(),
8489
argument,
8590
context: handlerContext,
8691
handler,
@@ -108,7 +113,7 @@ macro NewPromiseRejectReactionJobTask(
108113
return new PromiseRejectReactionJobTask{
109114
map: PromiseRejectReactionJobTaskMapConstant(),
110115
continuation_preserved_embedder_data:
111-
GetContinuationPreservedEmbedderData(),
116+
macros::GetContinuationPreservedEmbedderData(),
112117
argument,
113118
context: handlerContext,
114119
handler,
@@ -303,7 +308,7 @@ macro NewPromiseReaction(
303308
return new PromiseReaction{
304309
map: PromiseReactionMapConstant(),
305310
continuation_preserved_embedder_data:
306-
GetContinuationPreservedEmbedderData(),
311+
macros::GetContinuationPreservedEmbedderData(),
307312
next: next,
308313
reject_handler: rejectHandler,
309314
fulfill_handler: fulfillHandler,
@@ -347,7 +352,7 @@ macro NewPromiseResolveThenableJobTask(
347352
return new PromiseResolveThenableJobTask{
348353
map: PromiseResolveThenableJobTaskMapConstant(),
349354
continuation_preserved_embedder_data:
350-
GetContinuationPreservedEmbedderData(),
355+
macros::GetContinuationPreservedEmbedderData(),
351356
context: nativeContext,
352357
promise_to_resolve: promiseToResolve,
353358
thenable,
@@ -452,4 +457,18 @@ transitioning macro BranchIfAccessCheckFailed(
452457
}
453458
} label HasAccess {}
454459
}
460+
461+
@if(V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA)
462+
transitioning javascript builtin GetContinuationPreservedEmbedderData(
463+
js-implicit context: Context, receiver: JSAny)(): JSAny {
464+
return UnsafeCast<JSAny>(macros::GetContinuationPreservedEmbedderData());
465+
}
466+
467+
@if(V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA)
468+
transitioning javascript builtin SetContinuationPreservedEmbedderData(
469+
js-implicit context: Context, receiver: JSAny)(data: Object): Undefined {
470+
macros::SetContinuationPreservedEmbedderData(data);
471+
return Undefined;
472+
}
473+
455474
}
Collapse file

‎deps/v8/src/compiler/js-call-reducer.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/js-call-reducer.cc
+39Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5108,6 +5108,12 @@ Reduction JSCallReducer::ReduceJSCall(Node* node,
51085108
case Builtin::kBigIntAsIntN:
51095109
case Builtin::kBigIntAsUintN:
51105110
return ReduceBigIntAsN(node, builtin);
5111+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
5112+
case Builtin::kGetContinuationPreservedEmbedderData:
5113+
return ReduceGetContinuationPreservedEmbedderData(node);
5114+
case Builtin::kSetContinuationPreservedEmbedderData:
5115+
return ReduceSetContinuationPreservedEmbedderData(node);
5116+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
51115117
default:
51125118
break;
51135119
}
@@ -8780,6 +8786,39 @@ Reduction JSCallReducer::ReduceJSCallMathMinMaxWithArrayLike(Node* node,
87808786
return ReplaceWithSubgraph(&a, subgraph);
87818787
}
87828788

8789+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
8790+
Reduction JSCallReducer::ReduceGetContinuationPreservedEmbedderData(
8791+
Node* node) {
8792+
JSCallNode n(node);
8793+
Effect effect = n.effect();
8794+
Control control = n.control();
8795+
8796+
Node* value = effect = graph()->NewNode(
8797+
simplified()->GetContinuationPreservedEmbedderData(), effect);
8798+
8799+
ReplaceWithValue(node, value, effect, control);
8800+
return Replace(node);
8801+
}
8802+
8803+
Reduction JSCallReducer::ReduceSetContinuationPreservedEmbedderData(
8804+
Node* node) {
8805+
JSCallNode n(node);
8806+
Effect effect = n.effect();
8807+
Control control = n.control();
8808+
8809+
if (n.ArgumentCount() == 0) return NoChange();
8810+
8811+
effect =
8812+
graph()->NewNode(simplified()->SetContinuationPreservedEmbedderData(),
8813+
n.Argument(0), effect);
8814+
8815+
Node* value = jsgraph()->UndefinedConstant();
8816+
8817+
ReplaceWithValue(node, value, effect, control);
8818+
return Replace(node);
8819+
}
8820+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
8821+
87838822
CompilationDependencies* JSCallReducer::dependencies() const {
87848823
return broker()->dependencies();
87858824
}
Collapse file

‎deps/v8/src/compiler/js-call-reducer.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/js-call-reducer.h
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,11 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer {
239239
base::Optional<Reduction> TryReduceJSCallMathMinMaxWithArrayLike(Node* node);
240240
Reduction ReduceJSCallMathMinMaxWithArrayLike(Node* node, Builtin builtin);
241241

242+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
243+
Reduction ReduceGetContinuationPreservedEmbedderData(Node* node);
244+
Reduction ReduceSetContinuationPreservedEmbedderData(Node* node);
245+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
246+
242247
// The pendant to ReplaceWithValue when using GraphAssembler-based reductions.
243248
Reduction ReplaceWithSubgraph(JSCallReducerAssembler* gasm, Node* subgraph);
244249
std::pair<Node*, Node*> ReleaseEffectAndControlFromAssembler(
Collapse file

‎deps/v8/src/compiler/opcodes.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/opcodes.h
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,14 @@
429429

430430
#define SIMPLIFIED_SPECULATIVE_NUMBER_UNOP_LIST(V) V(SpeculativeToNumber)
431431

432+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
433+
#define SIMPLIFIED_CPED_OP_LIST(V) \
434+
V(GetContinuationPreservedEmbedderData) \
435+
V(SetContinuationPreservedEmbedderData)
436+
#else
437+
#define SIMPLIFIED_CPED_OP_LIST(V)
438+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
439+
432440
#define SIMPLIFIED_OTHER_OP_LIST(V) \
433441
V(Allocate) \
434442
V(AllocateRaw) \
@@ -534,7 +542,8 @@
534542
V(TransitionElementsKind) \
535543
V(TypeOf) \
536544
V(Unsigned32Divide) \
537-
V(VerifyType)
545+
V(VerifyType) \
546+
SIMPLIFIED_CPED_OP_LIST(V)
538547

539548
#define SIMPLIFIED_SPECULATIVE_BIGINT_BINOP_LIST(V) \
540549
V(SpeculativeBigIntAdd) \
Collapse file

‎deps/v8/src/compiler/simplified-lowering.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/simplified-lowering.cc
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4635,6 +4635,17 @@ class RepresentationSelector {
46354635
SetOutput<T>(node, LoadRepresentationOf(node->op()).representation());
46364636
return;
46374637

4638+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
4639+
case IrOpcode::kGetContinuationPreservedEmbedderData:
4640+
SetOutput<T>(node, MachineRepresentation::kTagged);
4641+
return;
4642+
4643+
case IrOpcode::kSetContinuationPreservedEmbedderData:
4644+
ProcessInput<T>(node, 0, UseInfo::AnyTagged());
4645+
SetOutput<T>(node, MachineRepresentation::kNone);
4646+
return;
4647+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
4648+
46384649
default:
46394650
FATAL(
46404651
"Representation inference: unsupported opcode %i (%s), node #%i\n.",
Collapse file

‎deps/v8/src/compiler/simplified-operator.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/simplified-operator.cc
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,26 @@ struct SimplifiedOperatorGlobalCache final {
13391339
kSpeculativeToBigIntBigInt64Operator;
13401340
SpeculativeToBigIntOperator<BigIntOperationHint::kBigInt>
13411341
kSpeculativeToBigIntBigIntOperator;
1342+
1343+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
1344+
struct GetContinuationPreservedEmbedderDataOperator : public Operator {
1345+
GetContinuationPreservedEmbedderDataOperator()
1346+
: Operator(IrOpcode::kGetContinuationPreservedEmbedderData,
1347+
Operator::kNoThrow | Operator::kNoDeopt | Operator::kNoWrite,
1348+
"GetContinuationPreservedEmbedderData", 0, 1, 0, 1, 1, 0) {}
1349+
};
1350+
GetContinuationPreservedEmbedderDataOperator
1351+
kGetContinuationPreservedEmbedderData;
1352+
1353+
struct SetContinuationPreservedEmbedderDataOperator : public Operator {
1354+
SetContinuationPreservedEmbedderDataOperator()
1355+
: Operator(IrOpcode::kSetContinuationPreservedEmbedderData,
1356+
Operator::kNoThrow | Operator::kNoDeopt | Operator::kNoRead,
1357+
"SetContinuationPreservedEmbedderData", 1, 1, 0, 0, 1, 0) {}
1358+
};
1359+
SetContinuationPreservedEmbedderDataOperator
1360+
kSetContinuationPreservedEmbedderData;
1361+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
13421362
};
13431363

13441364
namespace {
@@ -2198,6 +2218,18 @@ const Operator* SimplifiedOperatorBuilder::StoreField(
21982218
2, 1, 1, 0, 1, 0, store_access);
21992219
}
22002220

2221+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
2222+
const Operator*
2223+
SimplifiedOperatorBuilder::GetContinuationPreservedEmbedderData() {
2224+
return &cache_.kGetContinuationPreservedEmbedderData;
2225+
}
2226+
2227+
const Operator*
2228+
SimplifiedOperatorBuilder::SetContinuationPreservedEmbedderData() {
2229+
return &cache_.kSetContinuationPreservedEmbedderData;
2230+
}
2231+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
2232+
22012233
const Operator* SimplifiedOperatorBuilder::LoadMessage() {
22022234
return zone()->New<Operator>(IrOpcode::kLoadMessage, Operator::kEliminatable,
22032235
"LoadMessage", 1, 1, 1, 1, 1, 0);
Collapse file

‎deps/v8/src/compiler/simplified-operator.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/simplified-operator.h
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,11 @@ class V8_EXPORT_PRIVATE SimplifiedOperatorBuilder final
12181218
const FastApiCallFunctionVector& c_candidate_functions,
12191219
FeedbackSource const& feedback, CallDescriptor* descriptor);
12201220

1221+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
1222+
const Operator* GetContinuationPreservedEmbedderData();
1223+
const Operator* SetContinuationPreservedEmbedderData();
1224+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
1225+
12211226
private:
12221227
Zone* zone() const { return zone_; }
12231228

Collapse file

‎deps/v8/src/compiler/turboshaft/assembler.h‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/turboshaft/assembler.h
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3855,6 +3855,16 @@ class TurboshaftAssemblerOpInterface
38553855
}
38563856
#endif // V8_ENABLE_WEBASSEMBLY
38573857

3858+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
3859+
V<Object> GetContinuationPreservedEmbedderData() {
3860+
return ReduceIfReachableGetContinuationPreservedEmbedderData();
3861+
}
3862+
3863+
void SetContinuationPreservedEmbedderData(V<Object> data) {
3864+
ReduceIfReachableSetContinuationPreservedEmbedderData(data);
3865+
}
3866+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
3867+
38583868
template <typename Rep>
38593869
V<Rep> resolve(const V<Rep>& v) {
38603870
return v;
Collapse file

‎deps/v8/src/compiler/turboshaft/graph-builder.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/compiler/turboshaft/graph-builder.cc
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,14 @@ OpIndex GraphBuilder::Process(
22632263
return OpIndex::Invalid();
22642264
}
22652265

2266+
#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
2267+
case IrOpcode::kGetContinuationPreservedEmbedderData:
2268+
return __ GetContinuationPreservedEmbedderData();
2269+
case IrOpcode::kSetContinuationPreservedEmbedderData:
2270+
__ SetContinuationPreservedEmbedderData(Map(node->InputAt(0)));
2271+
return OpIndex::Invalid();
2272+
#endif // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
2273+
22662274
default:
22672275
std::cerr << "unsupported node type: " << *node->op() << "\n";
22682276
node->Print(std::cerr);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.