Skip to content

Commit 6b78c7f

Browse files
authored
Implement polymorphic inline caches (#120)
1 parent 5c3077e commit 6b78c7f

File tree

3 files changed

+482
-16
lines changed

3 files changed

+482
-16
lines changed

cutils.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
#endif
4848
#ifndef countof
4949
#define countof(x) (sizeof(x) / sizeof((x)[0]))
50+
#ifndef endof
51+
#define endof(x) ((x) + countof(x))
52+
#endif
5053
#endif
5154

5255
typedef int BOOL;

quickjs-opcode.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,10 @@ DEF( is_null, 1, 1, 1, none)
357357
DEF(typeof_is_undefined, 1, 1, 1, none)
358358
DEF( typeof_is_function, 1, 1, 1, none)
359359

360+
DEF( get_field_ic, 5, 1, 1, none)
361+
DEF( get_field2_ic, 5, 1, 2, none)
362+
DEF( put_field_ic, 5, 2, 0, none)
363+
360364
#undef DEF
361365
#undef def
362366
#endif /* DEF */

0 commit comments

Comments
 (0)