Skip to content

Commit 30b6caf

Browse files
committed
New Standalone compiler.
1 parent d698624 commit 30b6caf

File tree

29 files changed

+1279
-71
lines changed

29 files changed

+1279
-71
lines changed

jphp-core/api-docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Compiler and Launcher for JPHP.
99

1010
### Install
1111
```
12-
12+
1313
```
1414

1515
### API

jphp-core/api-docs/README.ru.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Compiler and Launcher for JPHP.
99

1010
### Установка
1111
```
12-
12+
1313
```
1414

1515
### АПИ

jphp-core/package.php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
name: jphp-core
3-
version: 1.2.4
3+
version: 1.2.5
44
description: Compiler and Launcher for JPHP.
55

66
deps:
7-
jphp-runtime: '~1.2.4'
7+
jphp-runtime: '~1.2.5'
88

99

1010
plugins: [Doc, Hub]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.develnext.jphp.ext.compress.CompressExtension
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.develnext.jphp.core.ext;
2+
3+
import php.runtime.env.CompileScope;
4+
import php.runtime.ext.support.Extension;
5+
6+
public class CompilerExtension extends Extension {
7+
@Override
8+
public Status getStatus() {
9+
return Status.EXPERIMENTAL;
10+
}
11+
12+
@Override
13+
public void onRegister(CompileScope scope) {
14+
15+
}
16+
}

jphp-core/src/org/develnext/jphp/core/syntax/generators/FunctionGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public FunctionStmtToken getToken(Token current, ListIterator<Token> iterator, b
365365
analyzer.pushClosure(result);
366366

367367
analyzer.addScope(true);
368-
processArguments(result, iterator, false);
368+
processArguments(result, iterator, true);
369369
processUses(result, iterator);
370370
processBody(result, iterator);
371371
//boolean thisExists = result.isThisExists();

jphp-native/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
plugins {
2+
id "com.palantir.graal" version "0.6.0-110-gd6e368f"
3+
}
4+
5+
dependencies {
6+
compile project(":jphp-runtime")
7+
compile project(":jphp-core")
8+
}

jphp-runtime/api-docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Runtime for JPHP + Standard library.
99

1010
### Install
1111
```
12-
12+
1313
```
1414

1515
### API
@@ -29,6 +29,7 @@ jppm add [email protected]
2929

3030
#### `php\io`
3131

32+
- [`DataStream`](https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/DataStream.md)- _Class DataStream_
3233
- [`File`](https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/File.md)- _Class File_
3334
- [`FileStream`](https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/FileStream.md)- _Class FileStream_
3435
- [`IOException`](https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/IOException.md)- _Class IOException_

jphp-runtime/api-docs/README.ru.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Runtime for JPHP + Standard library.
99

1010
### Установка
1111
```
12-
12+
1313
```
1414

1515
### АПИ
@@ -29,6 +29,7 @@ jppm add [email protected]
2929

3030
#### `php\io`
3131

32+
- [`DataStream`](https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/DataStream.ru.md)- _Class DataStream_
3233
- [`File`](https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/File.ru.md)- _Class File_
3334
- [`FileStream`](https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/FileStream.ru.md)- _Class FileStream_
3435
- [`IOException`](https://github.com/jphp-compiler/jphp/blob/master/jphp-runtime/api-docs/classes/php/io/IOException.ru.md)- _Class IOException_
Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
# DataStream
2+
3+
- **class** `DataStream` (`php\io\DataStream`)
4+
- **source** `php/io/DataStream.php`
5+
6+
**Description**
7+
8+
Class DataStream
9+
10+
---
11+
12+
#### Methods
13+
14+
- `->`[`__construct()`](#method-__construct) - _DataStream constructor._
15+
- `->`[`read()`](#method-read)
16+
- `->`[`write()`](#method-write)
17+
- `->`[`readBool()`](#method-readbool)
18+
- `->`[`readByte()`](#method-readbyte)
19+
- `->`[`readUnsignedByte()`](#method-readunsignedbyte)
20+
- `->`[`readShort()`](#method-readshort)
21+
- `->`[`readUnsignedShort()`](#method-readunsignedshort)
22+
- `->`[`readInt()`](#method-readint)
23+
- `->`[`readLong()`](#method-readlong)
24+
- `->`[`readFloat()`](#method-readfloat)
25+
- `->`[`readDouble()`](#method-readdouble)
26+
- `->`[`readUTF()`](#method-readutf)
27+
- `->`[`readChar()`](#method-readchar)
28+
- `->`[`writeByte()`](#method-writebyte)
29+
- `->`[`writeShort()`](#method-writeshort)
30+
- `->`[`writeInt()`](#method-writeint)
31+
- `->`[`writeLong()`](#method-writelong)
32+
- `->`[`writeFloat()`](#method-writefloat)
33+
- `->`[`writeDouble()`](#method-writedouble)
34+
- `->`[`writeChar()`](#method-writechar)
35+
- `->`[`writeChars()`](#method-writechars)
36+
- `->`[`writeUTF()`](#method-writeutf)
37+
- `->`[`writeBinary()`](#method-writebinary)
38+
- `->`[`writeBool()`](#method-writebool)
39+
40+
---
41+
# Methods
42+
43+
<a name="method-__construct"></a>
44+
45+
### __construct()
46+
```php
47+
__construct(php\io\Stream $stream): void
48+
```
49+
DataStream constructor.
50+
51+
---
52+
53+
<a name="method-read"></a>
54+
55+
### read()
56+
```php
57+
read(): int
58+
```
59+
60+
---
61+
62+
<a name="method-write"></a>
63+
64+
### write()
65+
```php
66+
write(int $value): void
67+
```
68+
69+
---
70+
71+
<a name="method-readbool"></a>
72+
73+
### readBool()
74+
```php
75+
readBool(): boolean
76+
```
77+
78+
---
79+
80+
<a name="method-readbyte"></a>
81+
82+
### readByte()
83+
```php
84+
readByte(): int
85+
```
86+
87+
---
88+
89+
<a name="method-readunsignedbyte"></a>
90+
91+
### readUnsignedByte()
92+
```php
93+
readUnsignedByte(): int
94+
```
95+
96+
---
97+
98+
<a name="method-readshort"></a>
99+
100+
### readShort()
101+
```php
102+
readShort(): int
103+
```
104+
105+
---
106+
107+
<a name="method-readunsignedshort"></a>
108+
109+
### readUnsignedShort()
110+
```php
111+
readUnsignedShort(): int
112+
```
113+
114+
---
115+
116+
<a name="method-readint"></a>
117+
118+
### readInt()
119+
```php
120+
readInt(): int
121+
```
122+
123+
---
124+
125+
<a name="method-readlong"></a>
126+
127+
### readLong()
128+
```php
129+
readLong(): int
130+
```
131+
132+
---
133+
134+
<a name="method-readfloat"></a>
135+
136+
### readFloat()
137+
```php
138+
readFloat(): double
139+
```
140+
141+
---
142+
143+
<a name="method-readdouble"></a>
144+
145+
### readDouble()
146+
```php
147+
readDouble(): double
148+
```
149+
150+
---
151+
152+
<a name="method-readutf"></a>
153+
154+
### readUTF()
155+
```php
156+
readUTF(): string
157+
```
158+
159+
---
160+
161+
<a name="method-readchar"></a>
162+
163+
### readChar()
164+
```php
165+
readChar(): string
166+
```
167+
168+
---
169+
170+
<a name="method-writebyte"></a>
171+
172+
### writeByte()
173+
```php
174+
writeByte(int $value): void
175+
```
176+
177+
---
178+
179+
<a name="method-writeshort"></a>
180+
181+
### writeShort()
182+
```php
183+
writeShort(int $value): void
184+
```
185+
186+
---
187+
188+
<a name="method-writeint"></a>
189+
190+
### writeInt()
191+
```php
192+
writeInt(int $value): void
193+
```
194+
195+
---
196+
197+
<a name="method-writelong"></a>
198+
199+
### writeLong()
200+
```php
201+
writeLong(int $value): void
202+
```
203+
204+
---
205+
206+
<a name="method-writefloat"></a>
207+
208+
### writeFloat()
209+
```php
210+
writeFloat(double $value): void
211+
```
212+
213+
---
214+
215+
<a name="method-writedouble"></a>
216+
217+
### writeDouble()
218+
```php
219+
writeDouble(double $value): void
220+
```
221+
222+
---
223+
224+
<a name="method-writechar"></a>
225+
226+
### writeChar()
227+
```php
228+
writeChar(string $value): void
229+
```
230+
231+
---
232+
233+
<a name="method-writechars"></a>
234+
235+
### writeChars()
236+
```php
237+
writeChars(string $value): void
238+
```
239+
240+
---
241+
242+
<a name="method-writeutf"></a>
243+
244+
### writeUTF()
245+
```php
246+
writeUTF(string $value): void
247+
```
248+
249+
---
250+
251+
<a name="method-writebinary"></a>
252+
253+
### writeBinary()
254+
```php
255+
writeBinary(string $value): void
256+
```
257+
258+
---
259+
260+
<a name="method-writebool"></a>
261+
262+
### writeBool()
263+
```php
264+
writeBool(boolean $value): void
265+
```

0 commit comments

Comments
 (0)