Commit Graph

8950 Commits

Author SHA1 Message Date
Nikita Popov
c4460dd162 Restore old evaluation order
${a()}[b()][c()] = d() will now evaluate in order a, b, c, d.
2014-08-15 17:10:06 +02:00
Nikita Popov
6cf89612db Support doc comments for propreties 2014-07-30 19:12:48 +02:00
Nikita Popov
8e9a840a53 Mark some small functions as inline 2014-07-30 18:27:41 +02:00
Nikita Popov
ad5677e4cd Use ZVAL_COPY until proven wrong 2014-07-30 17:46:00 +02:00
Nikita Popov
0cd9cffb51 Rename _tmp_compile_const_expr
Also remove recursive immutization of arrays there, because this
is already handled when the array is created.
2014-07-30 17:44:43 +02:00
Nikita Popov
044e48d0b1 Weaker recursion during pre-evaluation 2014-07-30 17:29:59 +02:00
Nikita Popov
3630f03f8f Immutable arrays for the recursive case as well 2014-07-30 13:43:04 +02:00
Nikita Popov
8cab06f09b Immutablize constant leaf arrays
Still haven't entirely figured out how to elegantly handle the
recursive variant.
2014-07-29 23:31:49 +02:00
Nikita Popov
6a13a22f9d Fix segfault when class name evaluates to IS_CONST 2014-07-29 23:17:54 +02:00
Nikita Popov
763eb13d6e Formatting 2014-07-29 21:00:19 +02:00
Nikita Popov
438b1e3d42 build_runtime_definition_key returns zend_string* 2014-07-29 20:01:11 +02:00
Nikita Popov
18f0680779 Change current_namespace to a zend_string* 2014-07-28 22:38:26 +02:00
Nikita Popov
047a994830 For filenames a pointer comparison is sufficient 2014-07-28 22:30:24 +02:00
Nikita Popov
e9fb72c8ea Rename to zend_str_equals_literal and turn into a macro
So we can make of sizeof rather than strlen
2014-07-28 22:20:43 +02:00
Nikita Popov
c8d3b5909e zend_str_equals_str(_ci) 2014-07-28 22:16:24 +02:00
Nikita Popov
8c724c205d Use zend_str_equals more often 2014-07-28 22:07:11 +02:00
Nikita Popov
7889050685 Add zend_ prefix for emit_op(_tmp) 2014-07-28 22:03:16 +02:00
Nikita Popov
cf7f0c412d zend_ast_create determined child count automatically 2014-07-28 18:18:47 +02:00
Nikita Popov
39d480e471 Remove zend_ast_create_unary etc 2014-07-28 17:59:12 +02:00
Nikita Popov
e403b27a40 Remove old macro/function 2014-07-28 15:55:30 +02:00
Nikita Popov
4c05bec536 Remove some unused compiler globals 2014-07-28 15:52:18 +02:00
Nikita Popov
31a886c346 More dead code 2014-07-28 15:43:39 +02:00
Nikita Popov
55f53e29a0 zend_get_class_fetch_type works on zend_string 2014-07-28 15:39:43 +02:00
Nikita Popov
50aefcf075 Remove duplicate code 2014-07-28 15:29:56 +02:00
Nikita Popov
2306655214 We don't pay per newline... 2014-07-28 15:26:30 +02:00
Nikita Popov
38c4125c2e Cleanup dead/duplicate code 2014-07-28 15:23:00 +02:00
Nikita Popov
a2925df653 Use zend_ast_get_str where possible 2014-07-28 15:16:35 +02:00
Nikita Popov
1d79fb308b Add zend_ast_list* variant to parser stack element 2014-07-28 15:10:58 +02:00
Nikita Popov
f29b84ab46 Minor cleanups in AST code 2014-07-28 14:51:08 +02:00
Nikita Popov
187ff135f2 zend_do_op_data -> zend_emit_op_data 2014-07-28 12:55:37 +02:00
Nikita Popov
d3cb239305 Use separate node type for lists
This saves storing the children count for normal ast nodes.
2014-07-28 12:06:57 +02:00
Nikita Popov
21eb6807c9 Store lineno for zval ast nodes more efficiently 2014-07-27 13:25:32 +02:00
Nikita Popov
d0943edf49 Remove last EA usages
Still retaining the EA field in znode as it is used by opcache
2014-07-27 12:49:26 +02:00
Nikita Popov
bea85f58bb Use more specific parser stack nodes 2014-07-27 12:46:54 +02:00
Nikita Popov
a74515e240 Separate class type and start lineno 2014-07-27 12:37:28 +02:00
Nikita Popov
0b86b1c8e5 Store doc comments in separate stack entry from start lineno 2014-07-27 12:31:17 +02:00
Nikita Popov
1ea9a2d934 Cleanup member modifier code 2014-07-27 12:19:01 +02:00
Nikita Popov
df42793cd2 Create namespace_name via AST 2014-07-26 21:53:50 +02:00
Nikita Popov
c07907121e zend_do_return -> zend_emit_final_return 2014-07-26 21:32:48 +02:00
Nikita Popov
4ca4b423be Make lexer return AST nodes 2014-07-26 21:22:54 +02:00
Nikita Popov
8c8839c2a1 Remove DUMMY_STRINGL
What is that for?
2014-07-26 19:03:36 +02:00
Nikita Popov
a51e00a8cd Add functions for create str/long ast directly 2014-07-26 19:01:14 +02:00
Nikita Popov
9344a95ac9 Remove dead code 2014-07-26 18:51:28 +02:00
Nikita Popov
17234d7895 Replicate old linenos for class binding 2014-07-26 18:36:57 +02:00
Nikita Popov
1bdc433259 Fix bugs 2014-07-26 18:23:46 +02:00
Nikita Popov
edd9fcab1e Fix leaks
Must find a good way to handle constant expressions...
2014-07-26 18:08:31 +02:00
Nikita Popov
d46f67a3a7 Use arena allocator (currently leaky!) 2014-07-26 17:45:45 +02:00
Nikita Popov
1644bf01da Resolve futher interning issues
Not sure if this is the right way to do it ...
2014-07-24 21:35:57 +02:00
Nikita Popov
c777427c08 Fix interning bug 2014-07-24 21:07:37 +02:00
Nikita Popov
689891c2b2 Expose ast via CG(ast) 2014-07-24 20:51:01 +02:00