Skip to content

Commit

Permalink
Implement polymorphic inline caches (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy authored Nov 29, 2023
1 parent 5c3077e commit 6b78c7f
Show file tree
Hide file tree
Showing 3 changed files with 482 additions and 16 deletions.
3 changes: 3 additions & 0 deletions cutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
#endif
#ifndef countof
#define countof(x) (sizeof(x) / sizeof((x)[0]))
#ifndef endof
#define endof(x) ((x) + countof(x))
#endif
#endif

typedef int BOOL;
Expand Down
4 changes: 4 additions & 0 deletions quickjs-opcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ DEF( is_null, 1, 1, 1, none)
DEF(typeof_is_undefined, 1, 1, 1, none)
DEF( typeof_is_function, 1, 1, 1, none)

DEF( get_field_ic, 5, 1, 1, none)
DEF( get_field2_ic, 5, 1, 2, none)
DEF( put_field_ic, 5, 2, 0, none)

#undef DEF
#undef def
#endif /* DEF */
Loading

0 comments on commit 6b78c7f

Please sign in to comment.