Website Summary Files Commits Branches @commit @diff @stats
path: root / JSImpl / src / ByteCodeGenerator.cpp
diff options
context:
space:
mode:
Commit1d7dc2c166de587581766f701ad071e5da7c3eec (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2020-10-06 11:39:58 +0300
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2020-10-06 11:39:58 +0300
Files3b022445897fc6278e0e011dbc18b9b04020103c /JSImpl/src/ByteCodeGenerator.cpp
IPL-1d7dc2c166de587581766f701ad071e5da7c3eec.tar
IPL-1d7dc2c166de587581766f701ad071e5da7c3eec.tar.gz
IPL-1d7dc2c166de587581766f701ad071e5da7c3eec.zip
Parentd4758752cb0b76c1a4e87d7e2a211bc5ad53bd0d (diff)
Parent6f5cc33f6de1e2bf7dbee5e205ff5c53b47eea0e (diff)
Merge branch 'feature/32bit' into master
1 files changed, 4 insertions, 4 deletions
-rw-r--r--JSImpl/src/ByteCodeGenerator.cpp8
diff --git a/JSImpl/src/ByteCodeGenerator.cpp b/JSImpl/src/ByteCodeGenerator.cpp
index fd85326..49e734b 100644
--- a/JSImpl/src/ByteCodeGenerator.cpp
+++ b/JSImpl/src/ByteCodeGenerator.cpp
@@ -97,7 +97,7 @@ private:
void PushConst(double c);
IPLString CreateRegister();
- bool CheckOpCode(Instruction::Type opcode) { return opcode >= Instruction::Type::FIRST && opcode <= Instruction::Type::LAST; }
+ bool CheckOpCode(int opcode) { return opcode >= Instruction::Type::FIRST && opcode <= Instruction::Type::LAST; }
private:
IPLVector<IPLString> m_RegisterTable;
IPLVector<Instruction> m_Code;
@@ -646,8 +646,8 @@ IPLString ByteCodeGenerator::GetCode()
break;
case ByteCodeGenerator::Instruction::DEBUG:
{
- auto line = i.Values.Int[0];
- auto column = i.Values.Int[1];
+ auto line = int(i.Values.Int[0]);
+ auto column = int(i.Values.Int[1]);
result += "D: " + m_Source[line].substr(0, column) + "@@=>" + m_Source[line].substr(column, m_Source[line].size()) + '\n';
}
break;
@@ -678,4 +678,4 @@ IPLString GenerateByteCode(ExpressionPtr program, const IPLString& source, const
program->Accept(generator);
return generator.GetCode();
-} \ No newline at end of file
+}