Skip to content

Commit 9776569

Browse files
committed
Add empty LLVM instruction groups
1 parent d2256f8 commit 9776569

File tree

20 files changed

+292
-0
lines changed

20 files changed

+292
-0
lines changed

src/engine/internal/llvm/instructions/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,25 @@ target_sources(scratchcpp
66
instructiongroup.h
77
processresult.h
88
)
9+
10+
target_sources(scratchcpp
11+
PRIVATE
12+
functions.cpp
13+
functions.h
14+
math.cpp
15+
math.h
16+
comparison.cpp
17+
comparison.h
18+
string.cpp
19+
string.h
20+
logic.cpp
21+
logic.h
22+
control.cpp
23+
control.h
24+
variables.cpp
25+
variables.h
26+
lists.cpp
27+
lists.h
28+
procedures.cpp
29+
procedures.h
30+
)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#include "comparison.h"
4+
#include "../llvmbuildutils.h"
5+
6+
using namespace libscratchcpp::llvmins;
7+
8+
ProcessResult Comparison::process(LLVMInstruction *ins)
9+
{
10+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#pragma once
4+
5+
#include "instructiongroup.h"
6+
7+
namespace libscratchcpp::llvmins
8+
{
9+
10+
class Comparison : public InstructionGroup
11+
{
12+
public:
13+
using InstructionGroup::InstructionGroup;
14+
15+
ProcessResult process(LLVMInstruction *ins) override;
16+
};
17+
18+
} // namespace libscratchcpp::llvmins
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#include "control.h"
4+
#include "../llvmbuildutils.h"
5+
6+
using namespace libscratchcpp::llvmins;
7+
8+
ProcessResult Control::process(LLVMInstruction *ins)
9+
{
10+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#pragma once
4+
5+
#include "instructiongroup.h"
6+
7+
namespace libscratchcpp::llvmins
8+
{
9+
10+
class Control : public InstructionGroup
11+
{
12+
public:
13+
using InstructionGroup::InstructionGroup;
14+
15+
ProcessResult process(LLVMInstruction *ins) override;
16+
};
17+
18+
} // namespace libscratchcpp::llvmins
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#include "functions.h"
4+
#include "../llvmbuildutils.h"
5+
6+
using namespace libscratchcpp::llvmins;
7+
8+
ProcessResult Functions::process(LLVMInstruction *ins)
9+
{
10+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#pragma once
4+
5+
#include "instructiongroup.h"
6+
7+
namespace libscratchcpp::llvmins
8+
{
9+
10+
class Functions : public InstructionGroup
11+
{
12+
public:
13+
using InstructionGroup::InstructionGroup;
14+
15+
ProcessResult process(LLVMInstruction *ins) override;
16+
};
17+
18+
} // namespace libscratchcpp::llvmins

src/engine/internal/llvm/instructions/instructionbuilder.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
// SPDX-License-Identifier: Apache-2.0
22

33
#include "instructionbuilder.h"
4+
#include "functions.h"
5+
#include "math.h"
6+
#include "comparison.h"
7+
#include "string.h"
8+
#include "logic.h"
9+
#include "control.h"
10+
#include "variables.h"
11+
#include "lists.h"
12+
#include "procedures.h"
413

514
using namespace libscratchcpp;
615
using namespace libscratchcpp::llvmins;
716

817
InstructionBuilder::InstructionBuilder(LLVMBuildUtils &utils)
918
{
1019
// Create groups
20+
m_groups.push_back(std::make_shared<Functions>(utils));
21+
m_groups.push_back(std::make_shared<Math>(utils));
22+
m_groups.push_back(std::make_shared<Comparison>(utils));
23+
m_groups.push_back(std::make_shared<String>(utils));
24+
m_groups.push_back(std::make_shared<Logic>(utils));
25+
m_groups.push_back(std::make_shared<Control>(utils));
26+
m_groups.push_back(std::make_shared<Variables>(utils));
27+
m_groups.push_back(std::make_shared<Lists>(utils));
28+
m_groups.push_back(std::make_shared<Procedures>(utils));
1129
}
1230

1331
LLVMInstruction *InstructionBuilder::process(LLVMInstruction *ins)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#include "lists.h"
4+
#include "../llvmbuildutils.h"
5+
6+
using namespace libscratchcpp::llvmins;
7+
8+
ProcessResult Lists::process(LLVMInstruction *ins)
9+
{
10+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#pragma once
4+
5+
#include "instructiongroup.h"
6+
7+
namespace libscratchcpp::llvmins
8+
{
9+
10+
class Lists : public InstructionGroup
11+
{
12+
public:
13+
using InstructionGroup::InstructionGroup;
14+
15+
ProcessResult process(LLVMInstruction *ins) override;
16+
};
17+
18+
} // namespace libscratchcpp::llvmins

0 commit comments

Comments
 (0)