Lines Matching defs:this
4 // you may not use this file except in compliance with the License.
17 this.instructions_ = [];
18 this.next_id_ = 1;
26 this.types_ = {};
32 this.assigned_ids_ = {};
35 instructions() { return this.instructions_; }
37 instruction(val) { return this.instructions_[val]; }
40 this.instructions_.push(inst);
46 this.types_[inst.operand(0).name()] = {
56 this.next_id_ = Math.max(this.next_id_, op.rawValue() + 1);
61 getType(name) { return this.types_[name]; }
64 if (this.assigned_ids_[name] !== undefined) {
65 return this.assigned_ids_[name];
68 let next = this.next_id_;
69 this.assigned_ids_[name] = next;
71 this.next_id_ += 1;
75 getIdBounds() { return this.next_id_; }
80 this.name_ = name;
81 this.opcode_ = opcode;
82 this.operands_ = operands;
85 name() { return this.name_; }
87 opcode() { return this.opcode_; }
89 operands() { return this.operands_; }
91 operand(val) { return this.operands_[val]; }
96 this.module_ = mod;
97 this.name_ = name;
98 this.type_ = type;
99 this.value_ = value;
100 this.params_ = params;
103 name() { return this.name_; }
107 this.value();
109 if (this.type_ === "string") {
110 return Math.ceil((this.value_.length + 1) / 4);
114 for (const param of this.params_) {
120 type() { return this.type_; }
122 rawValue() { return this.value_; }
128 if (this.value_ === undefined) {
129 this.value_ = this.module_.getId(this.name_);
131 return this.value_;
134 params() { return this.params_; }