| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 Verify(); | 499 Verify(); |
| 500 } | 500 } |
| 501 | 501 |
| 502 | 502 |
| 503 void Heap::ClearInstanceofCache() { | 503 void Heap::ClearInstanceofCache() { |
| 504 set_instanceof_cache_function(HEAP->the_hole_value()); | 504 set_instanceof_cache_function(HEAP->the_hole_value()); |
| 505 } | 505 } |
| 506 | 506 |
| 507 | 507 |
| 508 Object* Heap::ToBoolean(bool condition) { | 508 Object* Heap::ToBoolean(bool condition) { |
| 509 return condition ? HEAP->true_value() : HEAP->false_value(); | 509 return condition ? true_value() : false_value(); |
| 510 } | 510 } |
| 511 | 511 |
| 512 | 512 |
| 513 void Heap::CompletelyClearInstanceofCache() { | 513 void Heap::CompletelyClearInstanceofCache() { |
| 514 set_instanceof_cache_map(HEAP->the_hole_value()); | 514 set_instanceof_cache_map(the_hole_value()); |
| 515 set_instanceof_cache_function(HEAP->the_hole_value()); | 515 set_instanceof_cache_function(the_hole_value()); |
| 516 } | 516 } |
| 517 | 517 |
| 518 | 518 |
| 519 Object* TranscendentalCache::Get(Type type, double input) { | 519 Object* TranscendentalCache::Get(Type type, double input) { |
| 520 SubCache* cache = caches_[type]; | 520 SubCache* cache = caches_[type]; |
| 521 if (cache == NULL) { | 521 if (cache == NULL) { |
| 522 caches_[type] = cache = new SubCache(type); | 522 caches_[type] = cache = new SubCache(type); |
| 523 } | 523 } |
| 524 return cache->Get(input); | 524 return cache->Get(input); |
| 525 } | 525 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 #ifdef DEBUG | 563 #ifdef DEBUG |
| 564 UpdateLiveObjectCount(obj); | 564 UpdateLiveObjectCount(obj); |
| 565 #endif | 565 #endif |
| 566 obj->SetMark(); | 566 obj->SetMark(); |
| 567 } | 567 } |
| 568 | 568 |
| 569 | 569 |
| 570 } } // namespace v8::internal | 570 } } // namespace v8::internal |
| 571 | 571 |
| 572 #endif // V8_HEAP_INL_H_ | 572 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |