gccjit-ravi534
Dibyendu Majumdar 8 years ago
parent 58a47746fb
commit 9fa823aa5a

@ -884,12 +884,19 @@ class RaviCodeGenerator {
llvm::Value *emit_table_get_keytype(RaviFunctionDef *def, llvm::Value *node,
llvm::Value *index);
// 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 *emit_table_get_strkey(RaviFunctionDef *def, llvm::Value *node,
llvm::Value *index);
// 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 *emit_table_get_value(RaviFunctionDef *def, llvm::Value *node,
llvm::Value *index);
// Gets the size of the table's array part
llvm::Value *emit_table_get_arraysize(RaviFunctionDef *def,
llvm::Value *table);

@ -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

Loading…
Cancel
Save