Den 23. apr. 2010 13.12 skrev <[email protected]>: > Complaining after the fact is still fun. >
Yes. You should also complain to Bill who showed the way with the Intel version. http://codereview.chromium.org/1689007/diff/5001/6001 > File src/arm/codegen-arm.cc (right): > > http://codereview.chromium.org/1689007/diff/5001/6001#newcode4244 > src/arm/codegen-arm.cc:4244: __ CallRuntime(Runtime::kNumberUnaryMinus, > 1); > It seems fragile to use a function meant for something else to create a > HeapNumber. > E.g., it would make perfect sense for someone to special-case negation > of zero in Runtime_NumberUnaryMinus (since we have a -0 constant > already) - and there is nothing there that suggests that it would break > this code. > Actually, special casing that would break a lot of stuff. There's an assumption that the binary and unary ops always return fresh heap numbers. If you violate that then the whole system of overwriting heap numbers in the binary and unary ops falls apart. > In fact it would probably even be a good idea: The function is only > called for the smis 0 and Smi::kMinValue, or if we can't allocate a heap > number in NewSpace. > > We should create an "AllocateHeapNumber" runtime function instead, if > that is what we need. > > > http://codereview.chromium.org/1689007/show > > -- > v8-dev mailing list > [email protected] > http://groups.google.com/group/v8-dev > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
