PN_NUM 64 core/ast.c return PN_NUM(potion_ast_sizes[t->part]); PN_NUM 87 core/ast.c return PN_NUM(t->loc.lineno); PN_NUM 181 core/compile.c f->stack = PN_NUM(reg + 1) PN_NUM 444 core/compile.c PN_PUT(f->paths, PN_NUM(num)); PN_NUM 827 core/compile.c PN_PUT(f->paths, PN_NUM(num)); PN_NUM 965 core/compile.c sig = PN_PUSH(sig, PN_NUM('|')); PN_NUM 979 core/compile.c sig = PN_PUSH(sig, PN_NUM('|')); PN_NUM 988 core/compile.c PN v = PN_NUM(PN_STR_PTR(PN_S(rhs,0))[0]); // = type. TODO: one-char => VTABLE PN_NUM 996 core/compile.c PN v = PN_NUM(PN_STR_PTR((PN)SRC_TUPLE_AT(lhs,0)->a[0])[0]); // = type. TODO: one-char => VTABLE PN_NUM 1000 core/compile.c sig = PN_PUSH(sig, PN_NUM('|')); PN_NUM 1005 core/compile.c v = PN_NUM(PN_STR_PTR(v)[0]); // = type. TODO: one-char => VTABLE PN_NUM 1012 core/compile.c sig = PN_PUSH(PN_PUSH(sig, PN_NUM(':')), v); PN_NUM 1043 core/compile.c f->stack = PN_NUM(1); PN_NUM 130 core/file.c long tmp = PN_NUM(obj); len = sizeof(tmp); ptr = (char *)&tmp; PN_NUM 152 core/file.c return PN_NUM(r); PN_NUM 687 core/gc.c return PN_NUM(total); PN_NUM 695 core/gc.c return PN_NUM(total); PN_NUM 705 core/gc.c return PN_NUM(total); PN_NUM 231 core/internal.c e->line = PN_NUM(lineno); PN_NUM 232 core/internal.c e->chr = PN_NUM(charno); PN_NUM 166 core/mt19937ar.c return PN_NUM(potion_rand_int()); PN_NUM 175 core/mt19937ar.c return PN_NUM(potion_rand_double()); PN_NUM 34 core/number.c return PN_NUM((int)z); PN_NUM 46 core/number.c return PN_NUM(PN_INT(self) int_math PN_INT(num)); \ PN_NUM 87 core/number.c return PN_NUM(PN_INT(self) % PN_INT(num)); PN_NUM 98 core/number.c return PN_NUM(~PN_INT(self)); PN_NUM 108 core/number.c return PN_NUM(PN_INT(self) << PN_INT(num)); PN_NUM 118 core/number.c return PN_NUM(PN_INT(self) >> PN_INT(num)); PN_NUM 165 core/number.c PN_CLOSURE(block)->method(P, block, P->lobby, PN_NUM(i)); PN_NUM 166 core/number.c return PN_NUM(i); PN_NUM 181 core/number.c PN_CLOSURE(block)->method(P, block, P->lobby, PN_NUM(i)); PN_NUM 182 core/number.c return PN_NUM(abs(i - j)); PN_NUM 194 core/number.c PN_CLOSURE(block)->method(P, block, P->lobby, PN_NUM(i)); PN_NUM 196 core/number.c return PN_NUM(abs(i - j) / k); PN_NUM 225 core/number.c return PN_NUM(floor(((struct PNDecimal *)self)->value)); PN_NUM 238 core/number.c return PN_NUM(labs(PN_INT(self))); PN_NUM 252 core/number.c return d1 < d2 ? PN_NUM(-1) : d1 == d2 ? PN_ZERO : PN_NUM(1); PN_NUM 257 core/number.c return n1 < n2 ? PN_NUM(-1) : n1 == n2 ? PN_ZERO : PN_NUM(1); PN_NUM 71 core/objmodel.c return PN_NUM(PN_CLOSURE(self)->arity); PN_NUM 78 core/objmodel.c return PN_NUM(PN_CLOSURE(self)->minargs); PN_NUM 98 core/objmodel.c if (PN_IS_NUM(v) && v == PN_NUM(':') && PN_IS_STR((PN)t->set[i+1])) count--; PN_NUM 121 core/objmodel.c if (PN_IS_NUM(v) && v == PN_NUM('|')) break; PN_NUM 122 core/objmodel.c if (PN_IS_NUM(v) && v == PN_NUM(':')) { count--; break; } PN_NUM 146 core/objmodel.c if (PN_IS_NUM(v) && v == PN_NUM(':') && PN_IS_STR((PN)t->set[i+1])) count--; PN_NUM 152 core/objmodel.c if (i+2 < t->len && typ == PN_NUM(':')) PN_NUM 179 core/objmodel.c if (PN_IS_NUM(v) && v == PN_NUM(':') && PN_IS_STR((PN)t->set[i+1])) count--; PN_NUM 206 core/potion.h #define PN_RAND() PN_NUM(potion_rand_int()) PN_NUM 57 core/primitive.c return PN_NUM(-1); PN_NUM 67 core/primitive.c return potion_send(PN_NUM(PN_TEST1(self)), PN_cmp, value); PN_NUM 79 core/primitive.c return PN_NUM(PN_TEST1(self)); PN_NUM 100 core/string.c return PN_NUM(potion_cp_strlen_utf8(PN_STR_PTR(self))); PN_NUM 124 core/string.c return PN_NUM(sign * PN_ATOI(str, i, 10)); PN_NUM 213 core/string.c return PN_NUM(corrected); PN_NUM 260 core/string.c return potion_str_slice(P, cl, self, index, PN_NUM(PN_INT(index) + 1)); PN_NUM 273 core/string.c return PN_NUM(s[PN_INT(index)]); PN_NUM 276 core/string.c return PN_NUM(potion_utf8char_decode PN_NUM 353 core/string.c return PN_NUM(PN_STR_LEN(str)); PN_NUM 48 core/table.c k = kh_put(PN, t, PN_NUM(i), &ret); PN_NUM 132 core/table.c return PN_NUM(kh_size(t)); PN_NUM 245 core/table.c PN_CLOSURE(block)->method(P, block, P->lobby, v, PN_NUM(i)); PN_NUM 390 core/table.c return PN_NUM(PN_TUPLE_LEN(self)); PN_NUM 483 core/table.c return PN_NUM(m); PN_NUM 489 core/table.c return PN_NUM(-1); PN_NUM 258 core/vm.c if (PN_IS_STR(v) && !(i>0 && PN_IS_NUM(t->set[i-1]) && t->set[i-1] == PN_NUM(':'))) { PN_NUM 350 core/vm.c reg[op.a] = PN_NUM(PN_INT(reg[op.a]) oper PN_INT(reg[op.b])); \ PN_NUM 392 core/vm.c if (!debug) return PN_NUM(0); PN_NUM 409 core/vm.c if (code >= PN_NUM(5)) { // :q, :exit PN_NUM 411 core/vm.c if (code == PN_NUM(6)) // :exit PN_NUM 497 core/vm.c return PN_NUM(0); PN_NUM 647 core/vm.c CASE(POW, reg[op.a] = PN_NUM((int)pow((double)PN_INT(reg[op.a]), PN_NUM 654 core/vm.c CASE(CMP, reg[op.a] = PN_NUM(PN_INT(reg[op.b]) - PN_INT(reg[op.a]))) PN_NUM 674 core/vm.c reg[op.a] = PN_IS_NUM(reg[op.b]) ? PN_NUM(~PN_INT(reg[op.b])) : potion_obj_bitn(P, reg[op.b])) PN_NUM 746 core/vm.c f->stack = PN_NUM(PN_INT(f->stack)+1); PN_NUM 347 front/p2.c potion_define_global(P, potion_str(P, "$P2::mode"), PN_NUM((P->flags & 0xff))); // first flags word: p5,p2,p6 PN_NUM 348 front/p2.c potion_define_global(P, potion_str(P, "$P2::execmode"), PN_NUM(exec)); // exec_jit, exec_vm PN_NUM 349 front/p2.c potion_define_global(P, potion_str(P, "$P2::verbose"), PN_NUM((P->flags & ~0xff) >> 8)); // second flags word PN_NUM 369 front/p2.c potion_define_global(P, potion_str(P, "$P2::interactive"), PN_NUM(1)); PN_NUM 103 lib/aio.c PN_NUM(events), PN_NUM(status)); PN_NUM 202 lib/aio.c if (cb) cb->method(P, (PN)cb, data, PN_NUM(status)) PN_NUM 213 lib/aio.c if (cb) cb->method(P, (PN)cb, (PN)data, PN_NUM(status), potion_ref(wrap->P, (PN)res)); PN_NUM 531 lib/aio.c int r = uv_tty_init(l, handle, PN_NUM(PN_DATA(file)), PN_NUM(readable)); PN_NUM 543 lib/aio.c int r = uv_pipe_init(l, handle, PN_NUM(ipc)); PN_NUM 559 lib/aio.c if (uv_barrier_init(handle, PN_NUM(count))) PN_NUM 569 lib/aio.c if (uv_sem_init(handle, PN_NUM(value))) PN_NUM 586 lib/aio.c r = uv_fs_event_init(l, handle, PN_STR_PTR(filename), fs_event_cb, PN_NUM(flags)); PN_NUM 641 lib/aio.c if (cb) cb->method(P, (PN)cb, data, PN_NUM(status)); PN_NUM 687 lib/aio.c if (cb) cb->method(P, (PN)cb, (PN)data, PN_NUM(status), PN_NUM 699 lib/aio.c cb->method(P, (PN)cb, (PN)data, PN_NUM(nread), PN_NUM 710 lib/aio.c cb->method(P, (PN)cb, (PN)data, PN_NUM(nread), PN_NUM 711 lib/aio.c potion_byte_str2(wrap->P, buf->base, buf->len), PN_NUM(pending)); PN_NUM 747 lib/aio.c return PN_NUM(uv_version()); PN_NUM 967 lib/aio.c (uv_membership)PN_NUM(membership)); PN_NUM 977 lib/aio.c int r = uv_udp_set_multicast_loop(&handle->r, PN_NUM(on)); PN_NUM 986 lib/aio.c int r = uv_udp_set_multicast_ttl(&handle->r, PN_NUM(ttl)); PN_NUM 996 lib/aio.c int r = uv_udp_set_broadcast(&handle->r, PN_NUM(on)); PN_NUM 1005 lib/aio.c int r = uv_udp_set_ttl(&handle->r, PN_NUM(ttl)); PN_NUM 1084 lib/aio.c cb->method(wrap->P, (PN)cb, (PN)data, PN_NUM(nread), PN_NUM 1087 lib/aio.c PN_NUM(port), PN_NUM(flags)); PN_NUM 1174 lib/aio.c PN_PUSH(PN_PUSH(PN_TUP0(), PN_NUM(width)), PN_NUM(height)); PN_NUM 1181 lib/aio.c return PN_NUM(r); PN_NUM 1361 lib/aio.c return PN_NUM(uv_async_send(&handle->r)); PN_NUM 1396 lib/aio.c return PN_NUM(uv_timer_get_repeat(&handle->r)); PN_NUM 1419 lib/aio.c return PN_NUM(uv_handle_size(handle->h.type)); PN_NUM 1427 lib/aio.c return PN_NUM(uv_req_size(req->r.type)); PN_NUM 1557 lib/aio.c return PN_NUM(uv_kill(PN_INT(pid), PN_INT(signum))); PN_NUM 1771 lib/aio.c potion_define_global(P, PN_STR("AIO_"_XSTR(name)), PN_NUM(UV_##name)) PN_NUM 121 lib/buffile.c return PN_NUM(fclose(self->file)); PN_NUM 127 lib/buffile.c return PN_NUM(fgetc(self->file)); PN_NUM 149 lib/buffile.c return PN_NUM(r); PN_NUM 160 lib/buffile.c nitems = PN_NUM(1); PN_NUM 171 lib/buffile.c return PN_NUM(r); PN_NUM 178 lib/buffile.c return PN_NUM(fputc(PN_INT(byte), self->file)); PN_NUM 188 lib/buffile.c return PN_NUM(r); PN_NUM 216 lib/buffile.c return PN_NUM(r); PN_NUM 228 lib/buffile.c return PN_NUM(fileno(self->file)); PN_NUM 250 lib/buffile.c return PN_NUM(ftrylockfile(self->file)); PN_NUM 173 syn/syntax-p5.y s1 = PN_PUSH(s1, PN_AST2(ASSIGN, v, potion_tuple_at(P,0,PN_S(r,0),PN_NUM(i)))); PN_NUM 177 syn/syntax-p5.y s1 = PN_PUSH(s1, PN_AST2(ASSIGN, v, potion_tuple_at(P,0,PN_S(r,0),PN_NUM(i)))); PN_NUM 266 syn/syntax-p5.y | mminus e:mvalue { $$ = PN_OP(AST_INC, e, PN_NUM(-1) ^ 1) } PN_NUM 267 syn/syntax-p5.y | pplus e:mvalue { $$ = PN_OP(AST_INC, e, PN_NUM(1) ^ 1) } PN_NUM 268 syn/syntax-p5.y | e:mvalue (pplus { $$ = PN_OP(AST_INC, e, PN_NUM(1)) } PN_NUM 269 syn/syntax-p5.y | mminus { $$ = PN_OP(AST_INC, e, PN_NUM(-1)) }) {} PN_NUM 347 syn/syntax-p5.y | hex { $$ = PN_NUM(PN_ATOI(yytext, yyleng, 16)) } PN_NUM 348 syn/syntax-p5.y | dec { $$ = ($$ == YY_TNUM) ? PN_NUM(PN_ATOI(yytext, yyleng, 10)) PN_NUM 422 syn/syntax-p5.y { $$ = ($$ == YY_TNUM) ? PN_NUM(PN_ATOI(yytext, yyleng, 10)) PN_NUM 519 syn/syntax-p5.y arg-modifier = < ('-' | '\\' | '*' ) > { $$ = PN_NUM(yytext[0]); } PN_NUM 521 syn/syntax-p5.y arg-type = < [NS&oTaubnBsFPlkftxrcdm] > - { $$ = PN_NUM(yytext[0]) } PN_NUM 529 syn/syntax-p5.y { SRC_TPL3(n, PN_NUM(':'), PN_S(d,0)) } PN_NUM 533 syn/syntax-p5.y optional = '|' - { SRC_TPL1(PN_NUM('|')) } PN_NUM 534 syn/syntax-p5.y arg-sep = '.' - { SRC_TPL1(PN_NUM('.')) } #x,y... ignore rest PN_NUM 540 syn/syntax-p5.y arg2-yada = YADA - { SRC_TPL1(PN_NUM('.')) } PN_NUM 552 syn/syntax-p5.y | n:arg2-name - assign d:value { SRC_TPL3(n,PN_NUM(':'), PN_S(d,0)) } PN_NUM 657 syn/syntax-p5.y if (v == PN_NUM(idx) || v == name) PN_NUM 137 syn/syntax.y | mminus a:atom { a = PN_OP(AST_INC, a, PN_NUM(-1) ^ 1) } PN_NUM 138 syn/syntax.y | pplus a:atom { a = PN_OP(AST_INC, a, PN_NUM(1) ^ 1) } PN_NUM 139 syn/syntax.y | a:atom (pplus { a = PN_OP(AST_INC, a, PN_NUM(1)) } PN_NUM 140 syn/syntax.y | mminus { a = PN_OP(AST_INC, a, PN_NUM(-1)) })?) { a = PN_TUP(a) } PN_NUM 188 syn/syntax.y | hex { $$ = PN_NUM(PN_ATOI(yytext, yyleng, 16)) } PN_NUM 190 syn/syntax.y $$ = PN_NUM(PN_ATOI(yytext, yyleng, 10)); PN_NUM 346 syn/syntax.y arg-modifier = < ('-' | '\\' | '*' ) > { $$ = PN_NUM(yytext[0]); } PN_NUM 348 syn/syntax.y arg-type = < [NS&oTaubnBsFPlkftxrcdm] > - { $$ = PN_NUM(yytext[0]) } PN_NUM 356 syn/syntax.y { SRC_TPL3(n, PN_NUM(':'), PN_S(d,0)) } PN_NUM 360 syn/syntax.y optional = '|' - { SRC_TPL1(PN_NUM('|')) } PN_NUM 361 syn/syntax.y arg-sep = '.' - { SRC_TPL1(PN_NUM('.')) } #x,y... ignore rest PN_NUM 465 syn/syntax.y if (PN_IS_STR(v) && !(PN_IS_NUM(prev) && prev == PN_NUM(':'))) PN_NUM 116 test/api/gc-bench.c PN_TUPLE_AT(ary, i) = PN_NUM(1.0 / i); PN_NUM 142 test/api/gc-bench.c if (long_lived == 0 || PN_TUPLE_AT(ary, 1000) != PN_NUM(1.0 / 1000)) PN_NUM 17 test/api/p2-test.c PN num = PN_NUM(490); PN_NUM 43 test/api/p2-test.c PN pos = PN_NUM(10891); PN_NUM 52 test/api/p2-test.c PN neg = PN_NUM(-4343); PN_NUM 102 test/api/p2-test.c PN num = addfn(P, add, 0, PN_NUM(3), PN_NUM(5)); PN_NUM 15 test/api/potion-test.c PN num = PN_NUM(490); PN_NUM 42 test/api/potion-test.c PN pos = PN_NUM(10891); PN_NUM 51 test/api/potion-test.c PN neg = PN_NUM(-4343); PN_NUM 170 test/api/potion-test.c num = addfn(P, add, 0, PN_NUM(3), PN_NUM(5)); PN_NUM 175 test/api/potion-test.c num = addfn(P, add, 0, PN_NUM(3), PN_NUM(5)); PN_NUM 177 test/api/potion-test.c num = addfn(P, add, 1, PN_NUM(3)); PN_NUM 182 test/api/potion-test.c num = addfn(P, add, 2, PN_NUM(3), PN_NUM(5)); PN_NUM 184 test/api/potion-test.c num = addfn(P, add, 1, PN_NUM(3)); PN_NUM 192 test/api/potion-test.c num = addfn(P, add, 0, PN_NUM(3), PN_NUM(5)); PN_NUM 200 test/api/potion-test.c num = addfn(P, add, 0, PN_NUM(3), PN_NUM(5)); PN_NUM 208 test/api/potion-test.c num = addfn(P, add, 0, PN_NUM(3), PN_NUM(5));