From 1de435ed04c8e74775804da944d176baf0ce56e2 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Tue, 4 Sep 2018 11:41:11 +0900 Subject: [PATCH] bf uses Label class --- sample/bf.cpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/sample/bf.cpp b/sample/bf.cpp index ce5c12e..6968920 100644 --- a/sample/bf.cpp +++ b/sample/bf.cpp @@ -10,12 +10,6 @@ #endif class Brainfuck : public Xbyak::CodeGenerator { -private: - enum Direction { B, F }; - std::string toStr(int labelNo, Direction dir) - { - return Xbyak::Label::toStr(labelNo) + (dir == B ? 'B' : 'F'); - } public: int getContinuousChar(std::istream& is, char c) { @@ -67,8 +61,7 @@ public: mov(pGetchar, rsi); // getchar mov(stack, rdx); // stack #endif - int labelNo = 0; - std::stack keepLabelNo; + std::stack