store_value_ref.ts 431 B

1234567891011121314151617181920212223
  1. import { IStoreValue } from "./istore_value";
  2. import { Type } from "../../typeSystem/type";
  3. export class StoreValueRef implements IStoreValue {
  4. public isConst = false;
  5. constructor(public type: Type, public value: any, private loc_address: number, public id:String) {
  6. }
  7. get () {
  8. return this.value;
  9. }
  10. getRefAddress () : number {
  11. return this.loc_address;
  12. }
  13. inStore () {
  14. return this.id != null;
  15. }
  16. }