Skip to content

Commit 660ff46

Browse files
committed
Merge branch 'master' of github.com:ircmaxell/php-compiler
2 parents 019e30b + 69ce45f commit 660ff46

File tree

19 files changed

+16295
-4855
lines changed

19 files changed

+16295
-4855
lines changed

.phan/config.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
'PhanTypeMismatchDimFetchNullable',
1919
'PhanUndeclaredMethod',
2020
'PhanTypeMismatchArgument',
21-
'PhanUndeclaredFunction',
2221
'PhanUndeclaredStaticMethod',
2322
'PhanUndeclaredConstant',
2423
'PhanTypeExpectedObjectPropAccess',

ext/types/strlen.php

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
# This file is generated, changes you make will be lost.
4-
# Make your changes in /compiler/ext/types/strlen.pre instead.
4+
# Make your changes in /home/driusan/Code/php-compiler/ext/types/strlen.pre instead.
55

66
/*
77
* This file is part of PHP-Compiler, a PHP CFG Compiler for PHP code
@@ -43,10 +43,82 @@ public function call(Context $context, Variable ... $args): Value {
4343
$argValue = $context->helper->loadValue($args[0]);
4444
switch ($args[0]->type) {
4545
case Variable::TYPE_STRING:
46+
47+
48+
49+
50+
51+
52+
53+
54+
55+
56+
57+
58+
59+
60+
4661
$offset = $this->context->structFieldMap[$argValue->typeOf()->getElementType()->getName()]['length'];
4762
$result = $this->context->builder->load(
4863
$this->context->builder->structGep($argValue, $offset)
4964
);
65+
66+
67+
68+
69+
70+
71+
72+
73+
74+
75+
76+
77+
78+
79+
80+
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
95+
96+
97+
98+
99+
100+
101+
102+
103+
104+
105+
106+
107+
108+
109+
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
50122

51123
return $result;
52124
}

0 commit comments

Comments
 (0)