public function endVisitSet(SetCommand $x, Context $ctx)
 {
     try {
         $f = $x->getFieldDeclClass()->getField($x->getField());
         //$count = count($this->values);
         $value = array_pop($this->values);
         $instance = array_peek($this->values);
         //echo 'value = ' . var_export($value, true) . ' &instance = ' . var_export($instance, true) . '<br />';
         // TODO CommandSerializationUtil.getAccessor
         //assert($value != null);
         //echo 'end value (count=' . $count .')<br />';
         //Accessors::get($f->getType())->set($instance, $f, $value);
         $f->setValue($instance, $value);
         return;
     } catch (Exception $e) {
         throw new SerializationException('Unable to set field value ' . $e);
     }
 }
 public function visitSet(SetCommand $x, Context $ctx)
 {
     /*
      * In Development Mode, the field's declaring class is written to the
      * stream to handle field shadowing. In Production Mode, this isn't
      * necessary because all field names are allocated in the same "object"
      * scope.
      *
      * DeclaringClassName~FieldName~...value...
      */
     // Only in byteCode here, no script mode
     $this->accept(new StringValueCommand($x->getFieldDeclClass()->getFullName()));
     $this->accept(new StringValueCommand($x->getField()));
     return true;
 }
 public function visitSet(SetCommand $x, Context $ctx)
 {
     $fieldName = $this->clientOracle->getFieldId($x->getFieldDeclClass(), $x->getField());
     if (is_null($fieldName)) {
         throw new IncompatibleRemoteServiceException('The client does not have field ' . $x->getField() . ' in type ' . $x->getFieldDeclClass() . getFullName());
     }
     // i[3].foo = bar
     $this->push($this->parent->makeBackRef(array_peek($this->stack)));
     $this->dot();
     $this->push($fieldName);
     $this->eq();
     $this->accept($x->getValue());
     return false;
 }