| Index: src/heap.h
|
| ===================================================================
|
| --- src/heap.h (revision 6110)
|
| +++ src/heap.h (working copy)
|
| @@ -1999,9 +1999,19 @@
|
| Element e = elements_[hash];
|
| if (e.in[0] == c.integers[0] &&
|
| e.in[1] == c.integers[1]) {
|
| - ASSERT(e.output != NULL);
|
| - Counters::transcendental_cache_hit.Increment();
|
| - return e.output;
|
| + if (e.output != NULL) {
|
| + Counters::transcendental_cache_hit.Increment();
|
| + return e.output;
|
| + } else {
|
| + Object* heap_number;
|
| + { MaybeObject* maybe_heap_number =
|
| + Heap::AllocateHeapNumber(e.untagged_output);
|
| + if (!maybe_heap_number->ToObject(&heap_number))
|
| + return maybe_heap_number;
|
| + }
|
| + elements_[hash].output = heap_number;
|
| + return heap_number;
|
| + }
|
| }
|
| double answer = Calculate(input);
|
| Counters::transcendental_cache_miss.Increment();
|
| @@ -2012,6 +2022,7 @@
|
| elements_[hash].in[0] = c.integers[0];
|
| elements_[hash].in[1] = c.integers[1];
|
| elements_[hash].output = heap_number;
|
| + elements_[hash].untagged_output = answer;
|
| return heap_number;
|
| }
|
|
|
| @@ -2041,7 +2052,9 @@
|
| struct Element {
|
| uint32_t in[2];
|
| Object* output;
|
| + double untagged_output;
|
| };
|
| + static const int kElementSize = sizeof(Element); // NOLINT
|
| union Converter {
|
| double dbl;
|
| uint32_t integers[2];
|
|
|