<commit_before>! Copyright (C) 2009, 2010 <NAME>, <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: classes.struct alien.c-types alien.syntax ;
IN: vm

TYPEDEF: uintptr_t cell

STRUCT: context
{ callstack-top void* }
{ callstack-bottom void* }
{ datastack cell }
{ retainstack cell }
{ callstack-save cell }
{ datastack-region void* }
{ retainstack-region void* }
{ callstack-region void* }
{ context-objects cell[10] } ;

: context-field-offset ( field -- offset ) context offset-of ; inline

STRUCT: zone
{ start cell }
{ here cell }
{ size cell }
{ end cell } ;

STRUCT: vm
{ ctx context* }
{ spare-ctx context* }
{ nursery zone }
{ cards-offset cell }
{ decks-offset cell }
{ special-objects cell[70] } ;

: vm-field-offset ( field -- offset ) vm offset-of ; inline

CONSTANT: collect-nursery-op 0
CONSTANT: collect-aging-op 1
CONSTANT: collect-to-tenured-op 2
CONSTANT: collect-full-op 3
CONSTANT: collect-compact-op 4
CONSTANT: collect-growing-heap-op 5

STRUCT: copying-sizes
{ size cell }
{ occupied cell }
{ free cell } ;

STRUCT: mark-sweep-sizes
{ size cell }
{ occupied cell }<commit_msg>vm: fix field order in zone struct<commit_after>! Copyright (C) 2009, 2010 <NAME>, <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: classes.struct alien.c-types alien.syntax ;
IN: vm

TYPEDEF: uintptr_t cell

STRUCT: context
{ callstack-top void* }
{ callstack-bottom void* }
{ datastack cell }
{ retainstack cell }
{ callstack-save cell }
{ datastack-region void* }
{ retainstack-region void* }
{ callstack-region void* }
{ context-objects cell[10] } ;

: context-field-offset ( field -- offset ) context offset-of ; inline

STRUCT: zone
{ here cell }
{ start cell }
{ end cell }
{ size cell } ;

STRUCT: vm
{ ctx context* }
{ spare-ctx context* }
{ nursery zone }
{ cards-offset cell }
{ decks-offset cell }
{ special-objects cell[70] } ;

: vm-field-offset ( field -- offset ) vm offset-of ; inline

CONSTANT: collect-nursery-op 0
CONSTANT: collect-aging-op 1
CONSTANT: collect-to-tenured-op 2
CONSTANT: collect-full-op 3
CONSTANT: collect-compact-op 4
CONSTANT: collect-growing-heap-op 5

STRUCT: copying-sizes
{ size cell }
{ occupied cell }
{ free cell } ;

STRUCT: mark-sweep-sizes
{ size cell }
{ occupied cell }
{'fraction_non_alphanumeric': 0.13200883002207506, 'fraction_numerical': 0.015894039735099338, 'mean_word_length': 3.852248394004283, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5787002', 'n_tokens_mistral': 814, 'n_tokens_neox': 775, 'n_words': 224}