v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
builtins-number-tsa.cc
Go to the documentation of this file.
1// Copyright 2024 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
8
9namespace v8::internal {
10
12
13using namespace compiler::turboshaft; // NOLINT(build/namespaces)
14
16 : public TurboshaftBuiltinsAssembler<NumberBuiltinsReducer,
17 FeedbackCollectorReducer> {
18 public:
20
21 using Base::Asm;
22 using Base::Base;
23};
24
25#ifdef V8_ENABLE_EXPERIMENTAL_TSA_BUILTINS
26
27TS_BUILTIN(BitwiseNot_WithFeedback, NumberBuiltinsAssemblerTS) {
28 // TODO(nicohartmann): It would be great to deduce the parameter type from the
29 // Descriptor directly.
30 V<Object> value = Parameter<Object>(Descriptor::kValue);
31 V<Context> context = Parameter<Context>(Descriptor::kContext);
32 V<FeedbackVector> feedback_vector =
33 Parameter<FeedbackVector>(Descriptor::kFeedbackVector);
34 V<WordPtr> slot = Parameter<WordPtr>(Descriptor::kSlot);
35
36 SetFeedbackSlot(slot);
37 SetFeedbackVector(feedback_vector);
38
39 V<Object> result = BitwiseNot(context, value);
40 Return(result);
41}
42
43#endif // V8_ENABLE_EXPERIMENTAL_TSA_BUILTINS
44
46
47} // namespace v8::internal
#define TS_BUILTIN(Name, BaseAssembler)
TurboshaftBuiltinsAssembler(compiler::turboshaft::PipelineData *data, compiler::turboshaft::Graph &graph, Zone *phase_zone)
ZoneVector< RpoNumber > & result