1234567891011121314151617181920212223242526272829303132 |
- import { StoreObject } from './storeObject';
- import { Location } from '../../memory/location';
- export class StoreObjectRef extends StoreObject {
- private refObj: StoreObject;
- /**
- *
- * @param {StoreObject} stoObj
- */
- constructor (stoObj: StoreObject) {
- super(stoObj.type, stoObj.locAddress, false);
- this.refObj = stoObj;
- }
- get isRef () {
- return true;
- }
- getRefObj () {
- return this.refObj;
- }
- updateRef (stoObj: StoreObject) {
- Location.updateAddress(this.locAddress, stoObj.value);
- }
- destroy () {
- return false;
- }
- }
|