@@ -94,7 +94,7 @@ struct _asm_x64_t {
9494};
9595
9696// for allocating memory, see src/v8/src/platform-linux.cc
97- void * alloc_mem (uint req_size , uint * alloc_size , MP_BOOL is_exec ) {
97+ void * alloc_mem (uint req_size , uint * alloc_size , bool is_exec ) {
9898 req_size = (req_size + 0xfff ) & (~0xfff );
9999 int prot = PROT_READ | PROT_WRITE | (is_exec ? PROT_EXEC : 0 );
100100 void * ptr = mmap (NULL , req_size , prot , MAP_PRIVATE | MAP_ANONYMOUS , -1 , 0 );
@@ -119,7 +119,7 @@ asm_x64_t* asm_x64_new(uint max_num_labels) {
119119 return as ;
120120}
121121
122- void asm_x64_free (asm_x64_t * as , MP_BOOL free_code ) {
122+ void asm_x64_free (asm_x64_t * as , bool free_code ) {
123123 if (free_code ) {
124124 // need to un-mmap
125125 //m_free(as->code_base);
@@ -131,9 +131,9 @@ void asm_x64_free(asm_x64_t* as, MP_BOOL free_code) {
131131 {
132132 Label* lab = &g_array_index(as->label, Label, i);
133133 if (lab->unresolved != NULL)
134- g_array_free(lab->unresolved, MP_TRUE );
134+ g_array_free(lab->unresolved, true );
135135 }
136- g_array_free(as->label, MP_TRUE );
136+ g_array_free(as->label, true );
137137 }
138138 */
139139 m_del_obj (asm_x64_t , as );
@@ -154,7 +154,7 @@ void asm_x64_end_pass(asm_x64_t *as) {
154154 as -> code_size = as -> code_offset ;
155155 //as->code_base = m_new(byte, as->code_size); need to allocale executable memory
156156 uint actual_alloc ;
157- as -> code_base = alloc_mem (as -> code_size , & actual_alloc , MP_TRUE );
157+ as -> code_base = alloc_mem (as -> code_size , & actual_alloc , true );
158158 printf ("code_size: %u\n" , as -> code_size );
159159 }
160160
@@ -165,7 +165,7 @@ void asm_x64_end_pass(asm_x64_t *as) {
165165 int i;
166166 for (i = 0; i < as->label->len; ++i)
167167 if (g_array_index(as->label, Label, i).unresolved != NULL)
168- return MP_FALSE ;
168+ return false ;
169169 }
170170 */
171171}
0 commit comments