Skip to content

Commit c28d358

Browse files
committed
Rename code builder finalize method to build
1 parent 0659c6a commit c28d358

File tree

9 files changed

+64
-64
lines changed

9 files changed

+64
-64
lines changed

src/engine/compiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ std::shared_ptr<ExecutableCode> Compiler::compile(Block *startBlock, CodeType co
8383
}
8484

8585
impl->block = nullptr;
86-
return impl->builder->finalize();
86+
return impl->builder->build();
8787
}
8888

8989
while (impl->block) {
@@ -122,7 +122,7 @@ std::shared_ptr<ExecutableCode> Compiler::compile(Block *startBlock, CodeType co
122122
impl->substackEnd();
123123
}
124124

125-
return impl->builder->finalize();
125+
return impl->builder->build();
126126
}
127127

128128
/*!

src/engine/internal/icodebuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ICodeBuilder
1818
public:
1919
virtual ~ICodeBuilder() { }
2020

21-
virtual std::shared_ptr<ExecutableCode> finalize() = 0;
21+
virtual std::shared_ptr<ExecutableCode> build() = 0;
2222

2323
virtual CompilerValue *addFunctionCall(const std::string &functionName, Compiler::StaticType returnType, const Compiler::ArgTypes &argTypes, const Compiler::Args &args) = 0;
2424
virtual CompilerValue *addTargetFunctionCall(const std::string &functionName, Compiler::StaticType returnType, const Compiler::ArgTypes &argTypes, const Compiler::Args &args) = 0;

src/engine/internal/llvm/llvmcodebuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LLVMCodeBuilder::LLVMCodeBuilder(LLVMCompilerContext *ctx, BlockPrototype *proce
3737
initTypes();
3838
}
3939

40-
std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
40+
std::shared_ptr<ExecutableCode> LLVMCodeBuilder::build()
4141
{
4242
if (!m_warp) {
4343
// Do not create coroutine if there are no yield instructions nor non-warp procedure calls

src/engine/internal/llvm/llvmcodebuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LLVMCodeBuilder : public ICodeBuilder
3030
public:
3131
LLVMCodeBuilder(LLVMCompilerContext *ctx, BlockPrototype *procedurePrototype = nullptr, Compiler::CodeType codeType = Compiler::CodeType::Script);
3232

33-
std::shared_ptr<ExecutableCode> finalize() override;
33+
std::shared_ptr<ExecutableCode> build() override;
3434

3535
CompilerValue *addFunctionCall(const std::string &functionName, Compiler::StaticType returnType, const Compiler::ArgTypes &argTypes, const Compiler::Args &args) override;
3636
CompilerValue *addTargetFunctionCall(const std::string &functionName, Compiler::StaticType returnType, const Compiler::ArgTypes &argTypes, const Compiler::Args &args) override;

test/compiler/compiler_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CompilerTest : public testing::Test
5050
{
5151
ASSERT_EQ(compiler->block(), nullptr);
5252
EXPECT_CALL(m_builderFactory, create(m_ctx.get(), procedurePrototype, codeType)).WillOnce(Return(m_builder));
53-
EXPECT_CALL(*m_builder, finalize()).WillOnce(Return(m_code));
53+
EXPECT_CALL(*m_builder, build()).WillOnce(Return(m_code));
5454
ASSERT_EQ(compiler->compile(block, codeType), m_code);
5555
ASSERT_EQ(compiler->block(), nullptr);
5656
}

0 commit comments

Comments
 (0)