Skip to content

Commit e0143a6

Browse files
committed
Remove old promise API from ExecutableCode
1 parent 4dfbc52 commit e0143a6

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

include/scratchcpp/dev/executablecode.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ class LIBSCRATCHCPP_EXPORT ExecutableCode
3030
/*! Returns true if the code is stopped or finished. */
3131
virtual bool isFinished(ExecutionContext *context) const = 0;
3232

33-
/*! Pauses the script (when it's executed using run() again) until resolvePromise() is called. */
34-
virtual void promise() = 0;
35-
36-
/*! Resolves the promise and resumes the script. */
37-
virtual void resolvePromise() = 0;
38-
3933
/*! Creates an execution context for the given Target. */
4034
virtual std::shared_ptr<ExecutionContext> createExecutionContext(Target *target) const = 0;
4135
};

src/dev/engine/internal/llvm/llvmexecutablecode.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,6 @@ bool LLVMExecutableCode::isFinished(ExecutionContext *context) const
8383
return getContext(context)->finished();
8484
}
8585

86-
void LLVMExecutableCode::promise()
87-
{
88-
}
89-
90-
void LLVMExecutableCode::resolvePromise()
91-
{
92-
}
93-
9486
std::shared_ptr<ExecutionContext> LLVMExecutableCode::createExecutionContext(Target *target) const
9587
{
9688
return std::make_shared<LLVMExecutionContext>(target);

src/dev/engine/internal/llvm/llvmexecutablecode.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ class LLVMExecutableCode : public ExecutableCode
2525

2626
bool isFinished(ExecutionContext *context) const override;
2727

28-
void promise() override;
29-
void resolvePromise() override;
30-
3128
std::shared_ptr<ExecutionContext> createExecutionContext(Target *target) const override;
3229

3330
private:

test/mocks/executablecodemock.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,5 @@ class ExecutableCodeMock : public ExecutableCode
1414

1515
MOCK_METHOD(bool, isFinished, (ExecutionContext *), (const, override));
1616

17-
MOCK_METHOD(void, promise, (), (override));
18-
MOCK_METHOD(void, resolvePromise, (), (override));
19-
2017
MOCK_METHOD(std::shared_ptr<ExecutionContext>, createExecutionContext, (Target *), (const, override));
2118
};

0 commit comments

Comments
 (0)