|
|
|
@ -378,6 +378,9 @@ llvm::Value *RaviCodeGenerator::emit_table_get_keytype(RaviFunctionDef *def,
|
|
|
|
|
return ktype;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Given a pointer to table's node array (node = t->node) and
|
|
|
|
|
// the location of the hashed key (index), this method retrieves the
|
|
|
|
|
// the string value stored at the node - return value is of type TString*
|
|
|
|
|
llvm::Value *RaviCodeGenerator::emit_table_get_strkey(RaviFunctionDef *def,
|
|
|
|
|
llvm::Value *node,
|
|
|
|
|
llvm::Value *index) {
|
|
|
|
@ -389,12 +392,16 @@ llvm::Value *RaviCodeGenerator::emit_table_get_strkey(RaviFunctionDef *def,
|
|
|
|
|
return keyvalue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Given a pointer to table's node array (node = t->node) and
|
|
|
|
|
// the location of the hashed key (index), this method retrieves the
|
|
|
|
|
// the pointer to value stored at the node - return value is of type TValue*
|
|
|
|
|
llvm::Value *RaviCodeGenerator::emit_table_get_value(RaviFunctionDef *def,
|
|
|
|
|
llvm::Value *node,
|
|
|
|
|
llvm::Value *index) {
|
|
|
|
|
return emit_gep(def, "nodeval", node, index, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Gets the size of the table's array part
|
|
|
|
|
llvm::Value *RaviCodeGenerator::emit_table_get_arraysize(RaviFunctionDef *def,
|
|
|
|
|
llvm::Value *table) {
|
|
|
|
|
// Obtain the lsizenode of the hash table
|
|
|
|
|