I would love the V8_64BIT flag. I just don't want to keep using_LP64__ || __LLP64__ everywhere. I don't care whether int64 is long or long long, and nowhere in our code should we care either, since we use int64_t, not long int or long long int. In fact, we are trying to make the code agnostic about the type of int, even, so the code for ILP, LP, and LLP should be exactly the same.
We had a discussion about values that we want to keep as ints (unspecified size, probably 32 bits) in C++ code, and store as smis in heap objects. We need a simple smi - to - int conversion, that may or may not check the smi value to ensure it is in the int range. Maybe only conversion of ints to smis should do the range check, so reads of ints from smis won't be slowed down. This assumes that smis holding ints in the heap are exclusively modified from C++ code. On Mon, May 4, 2009 at 7:00 PM, <[email protected]> wrote: > This is a general comment about using V8_ARCH_X64 as the 64-bit marker > while porting and not only a particular comment about Bill's change. > > Please clean this up now and stick to the clean definition before it > gets a lot harder to deal with. Some ideas: Use the automatic defines > __WORDSIZE or __LP64__ or something that is defined in one place inside > globals.h or v8.h based on the compiler automatic defines: > #if defined(__LP64__) || (__LLP64__) > #define V8_64BIT 1 > #endif > > Thanks! > -Ivan > > > > > http://codereview.chromium.org/100336/diff/11/1006 > File src/globals.h (right): > > http://codereview.chromium.org/100336/diff/11/1006#newcode87 > Line 87: #ifdef V8_ARCH_X64 > There are potentially other 64-bit architectures outside x64. Please do > not "improve" the code for 64-bit cleanliness while making it harder to > port to other architectures. This will serve as a disservice in the long > time. Thanks! > > http://codereview.chromium.org/100336/diff/11/1006#newcode124 > Line 124: #ifdef V8_ARCH_X64 > ditto! > > > http://codereview.chromium.org/100336 > -- We can IMAGINE what is not --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
