MCPcopy Create free account
hub / github.com/bhideki/darksword / argumentAlignment

Method argumentAlignment

payloads/rce_worker.js:44–65  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

42 return this;
43 }
44 static argumentAlignment(arg) {
45 switch (arg.type) {
46 case 'uint64_t':
47 case 'int64_t':
48 return 8;
49 case 'uint32_t':
50 case 'int32_t':
51 case 'float':
52 return 4;
53 case 'uint16_t':
54 case 'int16_t':
55 return 2;
56 case 'uint8_t':
57 case 'int8_t':
58 case 'bool':
59 return 1;
60 case 'bytes':
61 return 0;
62 default:
63 ASSERT_NOT_REACHED(`Encoder.argumentAlignment(): unexpected type name: ${arg.type}`);
64 }
65 }
66 static argumentSize(arg) {
67 switch (arg.type) {
68 case 'uint64_t':

Callers 1

bufferMethod · 0.45

Calls 1

ASSERT_NOT_REACHEDFunction · 0.85

Tested by

no test coverage detected