While I agree that this is a nicer interface, I think full-codegen is the
wrong
place. Can't you put the iterator interface into hashmap itself, so that
other
uses can benefit from it in the future? You could also put the a generic
version
of the value_type thingy there (although ultimately, we should simply
templatise
TemplateHashMap properly).
https://chromiumcodereview.appspot.com/9691040/diff/2001/src/full-codegen.h
File src/full-codegen.h (right):
https://chromiumcodereview.appspot.com/9691040/diff/2001/src/full-codegen.h#newcode816
src/full-codegen.h:816: class Accessors: public ZoneObject {
This is just a simple pair, not abstracting anything, so a plain struct
seems more appropriate.
https://chromiumcodereview.appspot.com/9691040/diff/2001/src/full-codegen.h#newcode833
src/full-codegen.h:833: Literal* first() const { return
reinterpret_cast<Literal*>(key); }
These can be static_cast's.
https://chromiumcodereview.appspot.com/9691040/diff/2001/src/full-codegen.h#newcode853
src/full-codegen.h:853: return map_ != other.map_ || entry_ !=
other.entry_;
Is the first condition necessary? I believe iterator comparison is
undefined anyway if pointing into different containers.
https://chromiumcodereview.appspot.com/9691040/diff/2001/src/ia32/full-codegen-ia32.cc
File src/ia32/full-codegen-ia32.cc (right):
https://chromiumcodereview.appspot.com/9691040/diff/2001/src/ia32/full-codegen-ia32.cc#newcode1416
src/ia32/full-codegen-ia32.cc:1416: __
push(Immediate(isolate()->factory()->null_value()));
Not this change, but 'undefined' rather than 'null' is what is typically
used in circumstances like this.
https://chromiumcodereview.appspot.com/9691040/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev