-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/630/
-----------------------------------------------------------

Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and Nathan 
Binkert.


Summary
-------

Ruby: Simplify SLICC and Entry/TBE handling.
Before this changeset, all local variables of type Entry and TBE were considered
to be pointers, but an immediate use of said variables would not be 
automatically
deferenced in SLICC-generated code.  Instead, deferences occurred when such
variables were passed to functions, and were automatically dereferenced in
the bodies of the functions (e.g. the implicitly passed cache_entry).

This is a more general way to do it, which leaves in place the
assumption that parameters to functions and local variables of type 
AbstractCacheEntry
and TBE are always pointers, but instead of dereferencing to access member 
variables
on a contextual basis, the dereferencing automatically occurs on a type basis 
at the
moment a member is being accessed.  So, now, things you can do that you 
couldn't before
include:

Entry foo := getCacheEntry(address);
cache_entry.DataBlk := foo.DataBlk;

or

cache_entry.DataBlk := getCacheEntry(address).DataBlk;

or even

cache_entry.DataBlk := static_cast(Entry, pointer, 
cache.lookup(address)).DataBlk;


Diffs
-----

  src/mem/slicc/ast/ActionDeclAST.py d8587c913ccf 
  src/mem/slicc/ast/FormalParamAST.py d8587c913ccf 
  src/mem/slicc/ast/FuncCallExprAST.py d8587c913ccf 
  src/mem/slicc/ast/IsValidPtrExprAST.py d8587c913ccf 
  src/mem/slicc/ast/MemberExprAST.py d8587c913ccf 

Diff: http://reviews.m5sim.org/r/630/diff


Testing
-------


Thanks,

Lisa

_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to