http://codereview.chromium.org/57052/diff/40/49 File src/register-allocator.h (right):
http://codereview.chromium.org/57052/diff/40/49#newcode56 Line 56: bool is_known() const { return static_type_ != UNKNOWN_TYPE; } No, we don't. It's a leftover from when I tried merging SmiAnalysis and StaticType. The only one that is actually use is is_string(). http://codereview.chromium.org/57052/diff/40/49#newcode58 Line 58: bool is_likely_smi() const { return static_type_ & LIKELY_SMI_TYPE != 0; } Yes, and it won't compile on Windows without the parentheses, so they will be added. http://codereview.chromium.org/57052/diff/40/49#newcode62 Line 62: return static_type_ & HEAP_OBJECT_TYPE != 0; Yes, too. http://codereview.chromium.org/57052/diff/40/49#newcode100 Line 100: STRING_TYPE = 12 The comments should be removed completely, they are no longer accurate. Alignment ... hmm, I'll try it out and see if it improves readability. http://codereview.chromium.org/57052/diff/40/49#newcode105 Line 105: byte static_type_; We know that the compiler will make a layout that has room for everything. I decided to trust it :) A byte should be sufficient here (and sizeof(StaticType) is actually 1), and should make it easier to add it to other structures without increasing their size. http://codereview.chromium.org/57052/diff/40/49#newcode196 Line 196: I *expect* static_type and type_ to be byte aligned, and the following union to be word aligned, i.e., there is two bytes of padding between them. Not reducing the size of type_ would make objects require three words (to be word aligned) with three bytes of padding. There is nothing in the C++ spec preventing the compiler from making objects take up six bytes and be byte aligned, if the platform supports it. With optimization enabled, I doubt it will happen, but we should check it. http://codereview.chromium.org/57052 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
