Skip to content

Commit

Permalink
Fixed typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickyc975 committed May 21, 2020
1 parent 2880f91 commit d37e2f3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SRCS=error.cpp VSCellObject.cpp VSBoolObject.cpp VSCharObject.cpp VSFloatObject.
VSDictObject.cpp VSNoneObject.cpp VSObject.cpp VSStringObject.cpp VSFunctionObject.cpp \
VSTupleObject.cpp VSListObject.cpp VSSetObject.cpp VSBaseObject.cpp VSCodeObject.cpp \
VSFrameObject.cpp VSFileObject.cpp builtins.cpp Symtable.cpp VSTokenizer.cpp VSParser.cpp \
VSCompiler.cpp VSInterpretor.cpp printers.cpp vs.cpp
VSCompiler.cpp VSInterpreter.cpp printers.cpp vs.cpp

OBJECTS=$(SRCS:.cpp=.o)

Expand Down
12 changes: 6 additions & 6 deletions inc/runtime/VSInterpretor.hpp → inc/runtime/VSInterpreter.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef VS_INTERPRETOR_H
#define VS_INTERPRETOR_H
#ifndef VS_INTERPRETER_H
#define VS_INTERPRETER_H

#include <stack>

Expand All @@ -9,10 +9,10 @@

typedef std::stack<VSObject *> cpt_stack_t;

class VSInterpretor {
class VSInterpreter {
public:
VSInterpretor();
~VSInterpretor();
VSInterpreter();
~VSInterpreter();

void exec(
cpt_stack_t &stack,
Expand All @@ -27,6 +27,6 @@ class VSInterpretor {
void eval(cpt_stack_t &stack, VSFrameObject *frame) const;
};

extern const VSInterpretor INTERPRETOR;
extern const VSInterpreter INTERPRETER;

#endif
4 changes: 2 additions & 2 deletions src/objects/VSFunctionObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "objects/VSFrameObject.hpp"
#include "objects/VSStringObject.hpp"

#include "runtime/VSInterpretor.hpp"
#include "runtime/VSInterpreter.hpp"

NEW_IDENTIFIER(__hash__);
NEW_IDENTIFIER(__eq__);
Expand Down Expand Up @@ -207,7 +207,7 @@ VSObject *VSDynamicFunctionObject::call(VSTupleObject *args) {
DECREF_EX(args);

INCREF(frame);
INTERPRETOR.eval(stack, frame);
INTERPRETER.eval(stack, frame);
DECREF(frame);

if (stack.empty()) {
Expand Down
12 changes: 6 additions & 6 deletions src/runtime/VSInterpretor.cpp → src/runtime/VSInterpreter.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "runtime/VSInterpretor.hpp"
#include "runtime/VSInterpreter.hpp"

#include <cassert>

Expand Down Expand Up @@ -35,10 +35,10 @@ NEW_IDENTIFIER(__float__);
NEW_IDENTIFIER(get);
NEW_IDENTIFIER(set);

VSInterpretor::VSInterpretor() {
VSInterpreter::VSInterpreter() {
}

VSInterpretor::~VSInterpretor() {
VSInterpreter::~VSInterpreter() {
}

inline VSObject *_stack_pop(cpt_stack_t &stack) {
Expand Down Expand Up @@ -71,7 +71,7 @@ inline void _stack_push(cpt_stack_t &stack, VSObject *value) {
INCREF(__value); \
} while (0);

void VSInterpretor::exec(
void VSInterpreter::exec(
cpt_stack_t &stack, vs_addr_t &pc, VSCodeObject *code, VSTupleObject *locals,
VSTupleObject *freevars, VSTupleObject *cellvars, VSTupleObject *globals) const {

Expand Down Expand Up @@ -526,8 +526,8 @@ void VSInterpretor::exec(
}
}

void VSInterpretor::eval(cpt_stack_t &stack, VSFrameObject *frame) const {
void VSInterpreter::eval(cpt_stack_t &stack, VSFrameObject *frame) const {
this->exec(stack, frame->pc, frame->code, frame->locals, frame->freevars, frame->cellvars, NULL);
}

const VSInterpretor INTERPRETOR = VSInterpretor();
const VSInterpreter INTERPRETER = VSInterpreter();
4 changes: 2 additions & 2 deletions src/vs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "objects/VSTupleObject.hpp"
#include "printers.hpp"
#include "runtime/builtins.hpp"
#include "runtime/VSInterpretor.hpp"
#include "runtime/VSInterpreter.hpp"

int main(int argc, char **argv) {
int show_lex = 0, show_parse = 0, show_gen = 0;
Expand Down Expand Up @@ -56,6 +56,6 @@ int main(int argc, char **argv) {
}
VSFrameObject *frame = new VSFrameObject(program, NULL, new VSTupleObject(program->ncellvars), NULL, NULL);
auto stack = std::stack<VSObject *>();
INTERPRETOR.eval(stack, frame);
INTERPRETER.eval(stack, frame);
return 0;
}

0 comments on commit d37e2f3

Please sign in to comment.