@@ -73,7 +73,7 @@ $cache_data = null;
73
73
$ source = new \V8 \ScriptCompiler \Source ($ source_string );
74
74
$ helper ->assert ('Source cache data is not set ' , $ source ->getCachedData () === null );
75
75
try {
76
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_PARSER_CACHE );
76
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_PARSER_CACHE );
77
77
} catch (\V8 \Exceptions \Exception $ e ) {
78
78
$ helper ->exception_export ($ e );
79
79
}
@@ -84,7 +84,7 @@ $cache_data = null;
84
84
$ source_string = new V8 \StringValue ($ isolate , '"test " + status ' );
85
85
$ source = new \V8 \ScriptCompiler \Source ($ source_string );
86
86
$ helper ->assert ('Source cache data is NULL ' , $ source ->getCachedData () === null );
87
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: PRODUCE_CODE_CACHE );
87
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_PRODUCE_CODE_CACHE );
88
88
$ helper ->assert ('Source cache data is update ' , $ source ->getCachedData () != null );
89
89
$ helper ->assert ('Source cache data is not rejected ' , $ source ->getCachedData ()->isRejected () === false );
90
90
@@ -97,7 +97,7 @@ $cache_data = null;
97
97
98
98
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
99
99
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
100
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_CODE_CACHE );
100
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_CODE_CACHE );
101
101
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
102
102
$ helper ->assert ('Source cache data is not rejected ' , $ source ->getCachedData ()->isRejected () === false );
103
103
@@ -109,7 +109,7 @@ $cache_data = null;
109
109
$ source_string = new V8 \StringValue ($ isolate , '"other " + status ' );
110
110
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
111
111
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
112
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_CODE_CACHE );
112
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_CODE_CACHE );
113
113
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
114
114
$ helper ->assert ('Source cache data is rejected ' , $ source ->getCachedData ()->isRejected () === true );
115
115
@@ -121,7 +121,7 @@ $cache_data = null;
121
121
$ source_string = new V8 \StringValue ($ isolate , ' "test " + status ' );
122
122
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
123
123
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
124
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_CODE_CACHE );
124
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_CODE_CACHE );
125
125
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
126
126
$ helper ->assert ('Source cache data is not rejected ' , $ source ->getCachedData ()->isRejected () !== false );
127
127
@@ -133,7 +133,7 @@ $cache_data = null;
133
133
$ source_string = new V8 \StringValue ($ isolate , '"test " + status ' );
134
134
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
135
135
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
136
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: PRODUCE_CODE_CACHE );
136
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_PRODUCE_CODE_CACHE );
137
137
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
138
138
$ helper ->assert ('Source cache data is rejected ' , $ source ->getCachedData ()->isRejected () === true );
139
139
@@ -146,7 +146,7 @@ $cache_data = null;
146
146
$ source_string = new V8 \StringValue ($ isolate , '"test " + status ' );
147
147
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
148
148
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
149
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_PARSER_CACHE );
149
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_PARSER_CACHE );
150
150
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
151
151
$ helper ->assert ('Source cache data is not rejected ' , $ source ->getCachedData ()->isRejected () !== true );
152
152
@@ -159,7 +159,7 @@ $cache_data = null;
159
159
$ source_string = new V8 \StringValue ($ isolate , '"test " + status ' );
160
160
$ source = new \V8 \ScriptCompiler \Source ($ source_string );
161
161
$ helper ->assert ('Source cache data is NULL ' , $ source ->getCachedData () === null );
162
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: PRODUCE_PARSER_CACHE );
162
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_PRODUCE_PARSER_CACHE );
163
163
$ helper ->assert ('Source cache data is NOT updated ' , $ source ->getCachedData () === null );
164
164
165
165
$ helper ->line ();
@@ -179,7 +179,7 @@ $parser_cache_src= 'function test(arg1, args) {
179
179
$ source_string = new V8 \StringValue ($ isolate , $ parser_cache_src );
180
180
$ source = new \V8 \ScriptCompiler \Source ($ source_string );
181
181
$ helper ->assert ('Source cache data is NULL ' , $ source ->getCachedData () === null );
182
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: PRODUCE_PARSER_CACHE );
182
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_PRODUCE_PARSER_CACHE );
183
183
$ helper ->assert ('Source cache data is update ' , $ source ->getCachedData () != null );
184
184
$ helper ->assert ('Source cache data is not rejected ' , $ source ->getCachedData ()->isRejected () === false );
185
185
@@ -195,7 +195,7 @@ $parser_cache_src= 'function test(arg1, args) {
195
195
$ source_string = new V8 \StringValue ($ isolate , $ parser_cache_src );
196
196
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
197
197
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
198
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_PARSER_CACHE );
198
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_PARSER_CACHE );
199
199
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
200
200
$ helper ->assert ('Source cache data is not rejected ' , $ source ->getCachedData ()->isRejected () === false );
201
201
@@ -210,7 +210,7 @@ $parser_cache_src= 'function test(arg1, args) {
210
210
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
211
211
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
212
212
try {
213
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_PARSER_CACHE );
213
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_PARSER_CACHE );
214
214
} catch (\V8 \Exceptions \TryCatchException $ e ) {
215
215
$ helper ->exception_export ($ e );
216
216
}
@@ -225,7 +225,7 @@ $parser_cache_src= 'function test(arg1, args) {
225
225
$ source_string = new V8 \StringValue ($ isolate , 'function test2() { return 1+1;} ' );
226
226
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
227
227
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
228
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_PARSER_CACHE );
228
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_PARSER_CACHE );
229
229
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
230
230
$ helper ->assert ('Source cache data is rejected ' , $ source ->getCachedData ()->isRejected () === true );
231
231
$ helper ->assert ('Source cache data is not changed ' , $ source ->getCachedData ()->getData () === $ bin );
@@ -239,7 +239,7 @@ $parser_cache_src= 'function test(arg1, args) {
239
239
$ source_string = new V8 \StringValue ($ isolate , ' ' . $ parser_cache_src );
240
240
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
241
241
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
242
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_PARSER_CACHE );
242
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_PARSER_CACHE );
243
243
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
244
244
$ helper ->assert ('Source cache data is rejected ' , $ source ->getCachedData ()->isRejected () === true );
245
245
@@ -252,7 +252,7 @@ $parser_cache_src= 'function test(arg1, args) {
252
252
$ source_string = new V8 \StringValue ($ isolate , $ parser_cache_src );
253
253
$ source = new \V8 \ScriptCompiler \Source ($ source_string , null , $ cache_data );
254
254
$ helper ->assert ('Source cache data is set ' , $ source ->getCachedData () != null );
255
- $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler \CompileOptions:: CONSUME_CODE_CACHE );
255
+ $ script = V8 \ScriptCompiler::compile ($ context , $ source , V8 \ScriptCompiler:: OPTION_CONSUME_CODE_CACHE );
256
256
$ helper ->assert ('Source cache data is still set ' , $ source ->getCachedData () != null );
257
257
$ helper ->assert ('Source cache data is not rejected ' , $ source ->getCachedData ()->isRejected () === false );
258
258
0 commit comments