Skip to content

Commit

Permalink
ELENAVM : display if VM is 32 or 64 bit on Windows? #680
Browse files Browse the repository at this point in the history
fixed string type
  • Loading branch information
YairBybabayov committed Aug 11, 2024
1 parent 50dbb12 commit dc917a4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions elenasrc3/elenavm/elenavmmachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ ELENAVMMachine :: ELENAVMMachine(path_t configPath, PresenterBase* presenter, Pl
_jitLinker = nullptr;
}

std::string ELENAVMMachine::getArchitecture() {
ustr_t ELENAVMMachine::getArchitecture() {
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
return "(64-bit)";
#else
Expand All @@ -122,7 +122,7 @@ std::string ELENAVMMachine::getArchitecture() {
void ELENAVMMachine :: init(SystemEnv* exeEnv)
{
assert(_initialized == false);
std::string architecture = getArchitecture();
ustr_t architecture = getArchitecture();
_presenter->printLine(ELENAVM_GREETING, ENGINE_MAJOR_VERSION, ENGINE_MINOR_VERSION, ELENAVM_REVISION_NUMBER, architecture);
_presenter->printLine(ELENAVM_INITIALIZING);

Expand Down
3 changes: 1 addition & 2 deletions elenasrc3/elenavm/elenavmmachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "codescope.h"
#include "projectbase.h"
#include "xmlprojectbase.h"
#include<string>

namespace elena_lang
{
Expand Down Expand Up @@ -83,7 +82,7 @@ namespace elena_lang

virtual void resumeVM(SystemEnv* env, void* criricalHandler);

std::string getArchitecture();
ustr_t getArchitecture();
void init(SystemEnv* env);

AddressMap::Iterator externals() override;
Expand Down
3 changes: 1 addition & 2 deletions elenasrc3/engine/elena.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "common.h"
#include "elenaconst.h"
#include "section.h"
#include<string>

namespace elena_lang
{
Expand Down Expand Up @@ -657,7 +656,7 @@ namespace elena_lang
virtual void printLine(ustr_t msg, int arg1) = 0;
virtual void printLine(ustr_t msg, int arg1, int arg2) = 0;
virtual void printLine(ustr_t msg, int arg1, int arg2, int arg3) = 0;
virtual void printLine(ustr_t msg, int arg1, int arg2, int arg3, std::string arg4) = 0; //version support print
virtual void printLine(ustr_t msg, int arg1, int arg2, int arg3, ustr_t arg4) = 0; //version support print
virtual void printLine(ustr_t msg, ustr_t arg1, int arg2, int arg3, ustr_t arg4) = 0;
virtual void printPathLine(ustr_t msg, path_t arg) = 0;
virtual void printPathLine(ustr_t msg, path_t arg1, int arg2, int arg3, ustr_t arg4) = 0;
Expand Down
4 changes: 2 additions & 2 deletions elenasrc3/engine/windows/presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ void WinConsolePresenter :: printLine(ustr_t msg, int arg1, int arg2, int arg3)
::printLine(wstr.str(), arg1, arg2, arg3);
}

void WinConsolePresenter::printLine(ustr_t msg, int arg1, int arg2, int arg3,std::string arg4) //version support print
void WinConsolePresenter::printLine(ustr_t msg, int arg1, int arg2, int arg3, ustr_t arg4) //version support print
{
WideMessage wstr(msg);

::printLine(wstr.str(), arg1, arg2, arg3, arg4.c_str());
::printLine(wstr.str(), arg1, arg2, arg3, arg4.str());
}

void WinConsolePresenter :: printPathLine(ustr_t msg, path_t arg1, int arg2, int arg3, ustr_t arg4)
Expand Down
2 changes: 1 addition & 1 deletion elenasrc3/engine/windows/presenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace elena_lang
void printLine(ustr_t msg, ustr_t arg1, ustr_t arg2) override;
void printLine(ustr_t msg, ustr_t arg1, ustr_t arg2, ustr_t arg3) override;
void printLine(ustr_t msg, int arg1, int arg2, int arg3) override;
void printLine(ustr_t msg, int arg1, int arg2, int arg3, std::string arg4) override; //version support print
void printLine(ustr_t msg, int arg1, int arg2, int arg3, ustr_t arg4) override; //version support print

void printPathLine(ustr_t msg, path_t arg1, int arg2, int arg3, ustr_t arg4) override;
void printLine(ustr_t msg, int arg1) override;
Expand Down

0 comments on commit dc917a4

Please sign in to comment.