GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pythonvm/code/codeObject.cpp at master · koshox/pythonvm

Expand file tree

/

codeObject.cpp

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
68 lines (58 loc) · 2 KB
/

codeObject.cpp

Copy path

File metadata and controls

68 lines (58 loc) · 2 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// Created by Kosho on 2020/8/14.
//
#include "code/codeObject.hpp"
#include "object/hiString.hpp"
#include "memory/heap.hpp"
#include "memory/oopClosure.hpp"
CodeKlass *CodeKlass::instance = NULL;
CodeKlass *CodeKlass::get_instance() {
if (instance == NULL) {
instance = new CodeKlass();
}
return instance;
}
CodeKlass::CodeKlass() {
set_name(new HiString("code"));
add_super(ObjectKlass::get_instance());
HiTypeObject *dict_type_obj = new HiTypeObject();
set_type_object(dict_type_obj);
}
void CodeKlass::oops_do(OopClosure *f, HiObject *obj) {
CodeObject *co = (CodeObject *) obj;
assert(co && co->klass() == (Klass *) this);
f->do_oop((HiObject **) &co->_bytecodes);
f->do_array_list(&co->_names);
f->do_array_list(&co->_consts);
f->do_array_list(&co->_var_names);
f->do_array_list(&co->_free_vars);
f->do_array_list(&co->_cell_vars);
f->do_oop((HiObject **) &co->_co_name);
f->do_oop((HiObject **) &co->_file_name);
f->do_oop((HiObject **) &co->_notable);
f->do_oop((HiObject **) &co->_file_path);
}
size_t CodeKlass::size() {
return sizeof(CodeObject);
}
CodeObject::CodeObject(int argcount, int nlocals, int stacksize, int flag, HiString *bytecodes,
ArrayList<HiObject *> *consts, ArrayList<HiObject *> *names, ArrayList<HiObject *> *varnames,
ArrayList<HiObject *> *freevars, ArrayList<HiObject *> *cellvars,
HiString *file_name, HiString *co_name, int lineno, HiString *notable, HiString *file_path) :
_argcount(argcount),
_nlocals(nlocals),
_stack_size(stacksize),
_flag(flag),
_bytecodes(bytecodes),
_names(names),
_consts(consts),
_var_names(varnames),
_free_vars(freevars),
_cell_vars(cellvars),
_co_name(co_name),
_file_name(file_name),
_lineno(lineno),
_notable(notable),
_file_path(file_path){
set_klass(CodeKlass::get_instance());
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.