Changeset bf8bfc6ff3bcd1af04da77ec59b7bce4fa7fc494
- Timestamp:
- 05/18/10 18:29:13 (2 years ago)
- Author:
- redbrain <redbrain@…>
- Parents:
- f145c908c1c2779316e42e87de129c7aa21929b5
- Children:
- 7e64c6fe41df36edb22d2c3ddf7e1cbd7a4c767b
- git-committer:
- redbrain <redbrain@crules.org> / 2010-05-18T18:29:13Z+0100
- Message:
-
nearly working member access
- Location:
- src
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r602b778
|
rbf8bfc6
|
|
| 174 | 174 | if( functor ) |
| 175 | 175 | { |
| 176 | | crl_debug("trying to call <%s:%s>!\n", o->identifier, member->op_a.string ); |
| | 176 | crl_debug("trying to call <%s:%s( ... )>!\n", o->identifier, member->op_a.string ); |
| 177 | 177 | retval = crl_runtime_dispatch_function( member, functor, m_ctx, context ); |
| 178 | | crl_debug("finished call <%s:%s>!\n", o->identifier, member->op_a.string ); |
| | 178 | crl_debug("finished call <%s:%s( ... )>!\n", o->identifier, member->op_a.string ); |
| 179 | 179 | } |
| 180 | 180 | else |
| … |
… |
|
| 203 | 203 | return NULL; |
| 204 | 204 | } |
| 205 | | // Evaluation of dot accessor : x.y ( 1,2,3,4 ) |
| 206 | | // requires you to get the object state of x then lookup y from x |
| 207 | | // requires walking down the tree rather than the expression evals |
| 208 | | // of recursivly walking the tree |
| 209 | | // --------------------------------------------------------------- |
| 210 | | |
| 211 | | // the head accessor |
| | 205 | |
| 212 | 206 | crl_symbol_obj * t1 = crl_runtime_evaluate_expression( opa, context ); |
| 213 | 207 | crl_assert( t1->op_a_t == TYPE_OBJECT ); |
| 214 | 208 | |
| 215 | | /* |
| 216 | | crl_context_table * acc_ctx = (crl_context_table*) |
| 217 | | crl_malloc(sizeof( crl_context_table )); |
| 218 | | crl_rr_context_init_table( &acc_ctx ); |
| 219 | | crl_rr_context_push( t1->op_a.object_state->context, acc_ctx ); |
| 220 | | */ |
| 221 | | |
| 222 | | crl_symbol_obj *t2 = crl_runtime_obj_access( t1, opb->op_a.symbol_table, context); |
| | 209 | crl_symbol_obj *t2 = crl_runtime_obj_access( t1, opb, context); |
| 223 | 210 | |
| 224 | 211 | return retval; |
-
|
rf145c90
|
rbf8bfc6
|
|
| 215 | 215 | crl_symbol_init( t1 ); |
| 216 | 216 | |
| | 217 | t1->exp = OP_EXPRESS; |
| 217 | 218 | t1->type = OP_BIN_ACCESSOR; |
| 218 | 219 | t1->op_a_t = TYPE_SYMBOL; |