mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-06 18:20:17 +00:00
some move
This commit is contained in:
parent
eb61c0802b
commit
c274b812b2
@ -5,7 +5,7 @@ pipeline = [
|
|||||||
["common.h", "memory.h", "str.h", "tuplelist.h", "namedict.h", "builtins.h", "error.h"],
|
["common.h", "memory.h", "str.h", "tuplelist.h", "namedict.h", "builtins.h", "error.h"],
|
||||||
["obj.h", "parser.h", "ref.h", "codeobject.h", "frame.h"],
|
["obj.h", "parser.h", "ref.h", "codeobject.h", "frame.h"],
|
||||||
["vm.h", "ceval.h", "compiler.h", "repl.h"],
|
["vm.h", "ceval.h", "compiler.h", "repl.h"],
|
||||||
["iter.h", "pocketpy.h"]
|
["iter.h", "cffi.h", "pocketpy.h"]
|
||||||
]
|
]
|
||||||
|
|
||||||
copied = set()
|
copied = set()
|
||||||
|
|||||||
14
src/common.h
14
src/common.h
@ -29,12 +29,6 @@
|
|||||||
// #include <filesystem>
|
// #include <filesystem>
|
||||||
// namespace fs = std::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"
|
#define PK_VERSION "0.9.1"
|
||||||
|
|
||||||
#if defined(__EMSCRIPTEN__) || defined(__arm__) || defined(__i386__)
|
#if defined(__EMSCRIPTEN__) || defined(__arm__) || defined(__i386__)
|
||||||
@ -69,6 +63,14 @@ struct Type {
|
|||||||
|
|
||||||
//#define THREAD_LOCAL thread_local
|
//#define THREAD_LOCAL thread_local
|
||||||
#define 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>>
|
#define RAW(T) std::remove_const_t<std::remove_reference_t<T>>
|
||||||
|
|
||||||
|
|||||||
@ -5,9 +5,6 @@
|
|||||||
#include "repl.h"
|
#include "repl.h"
|
||||||
#include "iter.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) {
|
CodeObject_ VM::compile(Str source, Str filename, CompileMode mode) {
|
||||||
Compiler compiler(this, source.c_str(), filename, mode);
|
Compiler compiler(this, source.c_str(), filename, mode);
|
||||||
try{
|
try{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user