Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rebootstrap ops

  • Loading branch information...
commit feabd7766d8fec6da1d68a78de2135aa2ef965bd 1 parent 2c6ed8c
@cotto cotto authored
Showing with 28 additions and 28 deletions.
  1. +28 −28 src/ops/core_ops.c
View
56 src/ops/core_ops.c
@@ -13303,8 +13303,8 @@ opcode_t *
Parrot_get_results_pc(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t * const raw_params = CUR_OPCODE;
PMC * const signature = PCONST(1);
- PMC * ctx = CURRENT_CONTEXT(interp);
- PMC * call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
+ PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
INTVAL argc;
Parrot_pcc_fill_params_from_op(interp, call_object, signature, raw_params, PARROT_ERRORS_RESULT_COUNT_FLAG);
@@ -14049,7 +14049,7 @@ Parrot_loadlib_p_sc_pc(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_dlfunc_p_p_s_s(opcode_t *cur_opcode, PARROT_INTERP) {
void * dl_handle = NULL;
- void * ptr = NULL;
+ void * ptr;
funcptr_t p;
if ((((!PMC_IS_NULL(PREG(2))) && (PREG(2)->vtable->base_type == enum_class_ParrotLibrary)) && VTABLE_defined(interp, PREG(2)))) {
@@ -14059,7 +14059,7 @@ Parrot_dlfunc_p_p_s_s(opcode_t *cur_opcode, PARROT_INTERP) {
ptr = Parrot_dyn_dlsym_str(interp, dl_handle, SREG(3));
p = D2FPTR(ptr);
if ((p == NULLfunc)) {
- const char * err = Parrot_dlerror();
+ const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "Symbol '%Ss' not found: %s\n", SREG(3), err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
@@ -14076,7 +14076,7 @@ Parrot_dlfunc_p_p_s_s(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_dlfunc_p_p_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
void * dl_handle = NULL;
- void * ptr = NULL;
+ void * ptr;
funcptr_t p;
if ((((!PMC_IS_NULL(PREG(2))) && (PREG(2)->vtable->base_type == enum_class_ParrotLibrary)) && VTABLE_defined(interp, PREG(2)))) {
@@ -14086,7 +14086,7 @@ Parrot_dlfunc_p_p_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
ptr = Parrot_dyn_dlsym_str(interp, dl_handle, SCONST(3));
p = D2FPTR(ptr);
if ((p == NULLfunc)) {
- const char * err = Parrot_dlerror();
+ const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "Symbol '%Ss' not found: %s\n", SCONST(3), err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
@@ -14103,7 +14103,7 @@ Parrot_dlfunc_p_p_sc_s(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_dlfunc_p_p_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
void * dl_handle = NULL;
- void * ptr = NULL;
+ void * ptr;
funcptr_t p;
if ((((!PMC_IS_NULL(PREG(2))) && (PREG(2)->vtable->base_type == enum_class_ParrotLibrary)) && VTABLE_defined(interp, PREG(2)))) {
@@ -14113,7 +14113,7 @@ Parrot_dlfunc_p_p_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
ptr = Parrot_dyn_dlsym_str(interp, dl_handle, SREG(3));
p = D2FPTR(ptr);
if ((p == NULLfunc)) {
- const char * err = Parrot_dlerror();
+ const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "Symbol '%Ss' not found: %s\n", SREG(3), err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
@@ -14130,7 +14130,7 @@ Parrot_dlfunc_p_p_s_sc(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_dlfunc_p_p_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
void * dl_handle = NULL;
- void * ptr = NULL;
+ void * ptr;
funcptr_t p;
if ((((!PMC_IS_NULL(PREG(2))) && (PREG(2)->vtable->base_type == enum_class_ParrotLibrary)) && VTABLE_defined(interp, PREG(2)))) {
@@ -14140,7 +14140,7 @@ Parrot_dlfunc_p_p_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
ptr = Parrot_dyn_dlsym_str(interp, dl_handle, SCONST(3));
p = D2FPTR(ptr);
if ((p == NULLfunc)) {
- const char * err = Parrot_dlerror();
+ const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "Symbol '%Ss' not found: %s\n", SCONST(3), err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
@@ -14157,7 +14157,7 @@ Parrot_dlfunc_p_p_sc_sc(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_dlfunc_p_p_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
void * dl_handle = NULL;
- void * ptr = NULL;
+ void * ptr;
funcptr_t p;
if ((((!PMC_IS_NULL(PREG(2))) && (PREG(2)->vtable->base_type == enum_class_ParrotLibrary)) && VTABLE_defined(interp, PREG(2)))) {
@@ -14167,7 +14167,7 @@ Parrot_dlfunc_p_p_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
ptr = Parrot_dyn_dlsym_str(interp, dl_handle, SREG(3));
p = D2FPTR(ptr);
if ((p == NULLfunc)) {
- const char * err = Parrot_dlerror();
+ const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "Symbol '%Ss' not found: %s\n", SREG(3), err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
@@ -14184,7 +14184,7 @@ Parrot_dlfunc_p_p_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_dlfunc_p_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
void * dl_handle = NULL;
- void * ptr = NULL;
+ void * ptr;
funcptr_t p;
if ((((!PMC_IS_NULL(PREG(2))) && (PREG(2)->vtable->base_type == enum_class_ParrotLibrary)) && VTABLE_defined(interp, PREG(2)))) {
@@ -14194,7 +14194,7 @@ Parrot_dlfunc_p_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
ptr = Parrot_dyn_dlsym_str(interp, dl_handle, SCONST(3));
p = D2FPTR(ptr);
if ((p == NULLfunc)) {
- const char * err = Parrot_dlerror();
+ const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "Symbol '%Ss' not found: %s\n", SCONST(3), err ? err : "unknown reason");
PREG(1) = Parrot_pmc_new(interp, enum_class_Undef);
@@ -14211,7 +14211,7 @@ Parrot_dlfunc_p_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_dlvar_p_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
void * dl_handle = NULL;
- void * p = NULL;
+ void * p;
if ((((!PMC_IS_NULL(PREG(2))) && (PREG(2)->vtable->base_type == enum_class_ParrotLibrary)) && VTABLE_defined(interp, PREG(2)))) {
dl_handle = ((Parrot_ParrotLibrary_attributes*)PMC_data(PREG(2)))->dl_handle;
@@ -14236,7 +14236,7 @@ Parrot_dlvar_p_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_dlvar_p_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
void * dl_handle = NULL;
- void * p = NULL;
+ void * p;
if ((((!PMC_IS_NULL(PREG(2))) && (PREG(2)->vtable->base_type == enum_class_ParrotLibrary)) && VTABLE_defined(interp, PREG(2)))) {
dl_handle = ((Parrot_ParrotLibrary_attributes*)PMC_data(PREG(2)))->dl_handle;
@@ -16974,7 +16974,7 @@ Parrot_fdiv_i_i_ic(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_fdiv_n_n_n(opcode_t *cur_opcode, PARROT_INTERP) {
- FLOATVAL den = NREG(3);
+ const FLOATVAL den = NREG(3);
if (FLOAT_IS_ZERO(den)) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4, EXCEPTION_DIV_BY_ZERO, "Divide by zero");
@@ -16988,7 +16988,7 @@ Parrot_fdiv_n_n_n(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_fdiv_n_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
- FLOATVAL den = NREG(3);
+ const FLOATVAL den = NREG(3);
if (FLOAT_IS_ZERO(den)) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4, EXCEPTION_DIV_BY_ZERO, "Divide by zero");
@@ -17002,7 +17002,7 @@ Parrot_fdiv_n_nc_n(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_fdiv_n_n_nc(opcode_t *cur_opcode, PARROT_INTERP) {
- FLOATVAL den = NCONST(3);
+ const FLOATVAL den = NCONST(3);
if (FLOAT_IS_ZERO(den)) {
opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, cur_opcode + 4, EXCEPTION_DIV_BY_ZERO, "Divide by zero");
@@ -17595,7 +17595,7 @@ Parrot_callmethod_p_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
STRING * const meth = SREG(2);
opcode_t * const next = cur_opcode + 4;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
- opcode_t * dest = NULL;
+ opcode_t * dest;
PMC * signature = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), next);
@@ -17620,7 +17620,7 @@ Parrot_callmethod_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
STRING * const meth = SCONST(2);
opcode_t * const next = cur_opcode + 4;
PMC * const method_pmc = VTABLE_find_method(interp, object, meth);
- opcode_t * dest = NULL;
+ opcode_t * dest;
PMC * signature = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), next);
@@ -19963,7 +19963,7 @@ Parrot_copy_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
else {
PMC * const clone = VTABLE_clone(interp, PREG(2));
PMC * const meta = VTABLE_getprops(interp, PREG(1));
- Parrot_UInt gc_flags = (PREG(1)->flags & PObj_GC_all_FLAGS);
+ const Parrot_UInt gc_flags = (PREG(1)->flags & PObj_GC_all_FLAGS);
Parrot_pmc_destroy(interp, PREG(1));
memmove(PREG(1), clone, sizeof(PMC));
@@ -22151,7 +22151,7 @@ Parrot_set_root_global_pc_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_find_name_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
if ((!SREG(2))) {
- opcode_t * handler = Parrot_ex_throw_from_op_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "Tried to find null name");
+ opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "Tried to find null name");
PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp));
return (opcode_t *)handler;
@@ -22165,7 +22165,7 @@ Parrot_find_name_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_find_name_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
if ((!SCONST(2))) {
- opcode_t * handler = Parrot_ex_throw_from_op_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "Tried to find null name");
+ opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "Tried to find null name");
PARROT_GC_WRITE_BARRIER(interp, CURRENT_CONTEXT(interp));
return (opcode_t *)handler;
@@ -22178,8 +22178,8 @@ Parrot_find_name_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_find_sub_not_null_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
- opcode_t * dest = cur_opcode + 3;
- PMC * sub = Parrot_ns_find_named_item(interp, SREG(2), dest);
+ opcode_t * const dest = cur_opcode + 3;
+ PMC * const sub = Parrot_ns_find_named_item(interp, SREG(2), dest);
if (PMC_IS_NULL(sub)) {
opcode_t * handler;
@@ -22200,8 +22200,8 @@ Parrot_find_sub_not_null_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
opcode_t *
Parrot_find_sub_not_null_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
- opcode_t * dest = cur_opcode + 3;
- PMC * sub = Parrot_ns_find_named_item(interp, SCONST(2), dest);
+ opcode_t * const dest = cur_opcode + 3;
+ PMC * const sub = Parrot_ns_find_named_item(interp, SCONST(2), dest);
if (PMC_IS_NULL(sub)) {
opcode_t * handler;
Please sign in to comment.
Something went wrong with that request. Please try again.