Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 55 lines (42 sloc) 1.166 kb
e29c2ec now interpreting potential cold paths (work in progress)
Laurent Sansonetti authored
1 /*
2 * MacRuby Interpreter.
3 *
4 * This file is covered by the Ruby license. See COPYING for more details.
7d7d3e8 @ferrous26 Change ownership to The MacRuby Team and update copyrights
ferrous26 authored
5 *
6 * Copyright (C) 2012, The MacRuby Team. All rights reserved.
9595725 update copyrights to 2011
Laurent Sansonetti authored
7 * Copyright (C) 2008-2011, Apple Inc. All rights reserved.
e29c2ec now interpreting potential cold paths (work in progress)
Laurent Sansonetti authored
8 */
9
10 #ifndef __INTERPRETER_H_
11 #define __INTERPRETER_H_
12
13 #if defined(__cplusplus)
14
a6a5d3e started to trim out the static library
Laurent Sansonetti authored
15 #if !defined(MACRUBY_STATIC)
16
e29c2ec now interpreting potential cold paths (work in progress)
Laurent Sansonetti authored
17 class RoxorInterpreter {
18 public:
19 static RoxorInterpreter *shared;
20
21 RoxorInterpreter(void);
22 ~RoxorInterpreter(void);
23
24 VALUE interpret(Function *func, VALUE self, SEL sel);
25
3cabadf add backtracing support for interpreted dispatch calls + cleanup useless...
Laurent Sansonetti authored
26 bool frame_at_index(unsigned int idx, void *addr, std::string *name,
27 std::string *path, unsigned int *line);
28
e29c2ec now interpreting potential cold paths (work in progress)
Laurent Sansonetti authored
29 private:
30 VALUE self_arg;
31 SEL sel_arg;
32 VALUE *stack;
33 unsigned int stack_p;
34 #define INTERPRETER_STACK_SIZE 1000
35 std::map<Instruction *, VALUE> insns;
3cabadf add backtracing support for interpreted dispatch calls + cleanup useless...
Laurent Sansonetti authored
36 class Frame {
37 public:
38 std::string name;
39 std::string path;
40 unsigned int line;
41 };
42 std::vector<Frame> frames;
e29c2ec now interpreting potential cold paths (work in progress)
Laurent Sansonetti authored
43
44 VALUE interpret_basicblock(BasicBlock *bb);
45 VALUE interpret_instruction(Instruction *insn);
46 VALUE interpret_value(Value *val);
47 VALUE interpret_call(CallInst *call);
48 };
49
a6a5d3e started to trim out the static library
Laurent Sansonetti authored
50 #endif // !MACRUBY_STATIC
51
e29c2ec now interpreting potential cold paths (work in progress)
Laurent Sansonetti authored
52 #endif // __cplusplus
53
54 #endif // __INTERPRETER_H_
Something went wrong with that request. Please try again.