some move

This commit is contained in:
blueloveTH 2023-02-26 17:13:37 +08:00
parent eb61c0802b
commit c274b812b2
3 changed files with 9 additions and 10 deletions

View File

@ -5,7 +5,7 @@ pipeline = [
["common.h", "memory.h", "str.h", "tuplelist.h", "namedict.h", "builtins.h", "error.h"],
["obj.h", "parser.h", "ref.h", "codeobject.h", "frame.h"],
["vm.h", "ceval.h", "compiler.h", "repl.h"],
["iter.h", "pocketpy.h"]
["iter.h", "cffi.h", "pocketpy.h"]
]
copied = set()

View File

@ -29,12 +29,6 @@
// #include <filesystem>
// namespace fs = std::filesystem;
#ifdef POCKETPY_H
#define UNREACHABLE() throw std::runtime_error( "L" + std::to_string(__LINE__) + " UNREACHABLE()!");
#else
#define UNREACHABLE() throw std::runtime_error( __FILE__ + std::string(":") + std::to_string(__LINE__) + " UNREACHABLE()!");
#endif
#define PK_VERSION "0.9.1"
#if defined(__EMSCRIPTEN__) || defined(__arm__) || defined(__i386__)
@ -69,6 +63,14 @@ struct Type {
//#define THREAD_LOCAL thread_local
#define THREAD_LOCAL
#define CPP_LAMBDA(x) ([](VM* vm, pkpy::Args& args) { return x; })
#define CPP_NOT_IMPLEMENTED() ([](VM* vm, pkpy::Args& args) { vm->NotImplementedError(); return vm->None; })
#ifdef POCKETPY_H
#define UNREACHABLE() throw std::runtime_error( "L" + std::to_string(__LINE__) + " UNREACHABLE()!");
#else
#define UNREACHABLE() throw std::runtime_error( __FILE__ + std::string(":") + std::to_string(__LINE__) + " UNREACHABLE()!");
#endif
#define RAW(T) std::remove_const_t<std::remove_reference_t<T>>

View File

@ -5,9 +5,6 @@
#include "repl.h"
#include "iter.h"
#define CPP_LAMBDA(x) ([](VM* vm, pkpy::Args& args) { return x; })
#define CPP_NOT_IMPLEMENTED() ([](VM* vm, pkpy::Args& args) { vm->NotImplementedError(); return vm->None; })
CodeObject_ VM::compile(Str source, Str filename, CompileMode mode) {
Compiler compiler(this, source.c_str(), filename, mode);
try{