Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: src/heap/heap-inl.h

Issue 1744163002: [stubs] Introduce a proper ToBooleanStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 key.source = source; 648 key.source = source;
649 key.name = name; 649 key.name = name;
650 results_[index] = result; 650 results_[index] = result;
651 } 651 }
652 652
653 653
654 void Heap::ClearInstanceofCache() { 654 void Heap::ClearInstanceofCache() {
655 set_instanceof_cache_function(Smi::FromInt(0)); 655 set_instanceof_cache_function(Smi::FromInt(0));
656 } 656 }
657 657
658 658 Oddball* Heap::ToBoolean(bool condition) {
659 Object* Heap::ToBoolean(bool condition) {
660 return condition ? true_value() : false_value(); 659 return condition ? true_value() : false_value();
661 } 660 }
662 661
663 662
664 void Heap::CompletelyClearInstanceofCache() { 663 void Heap::CompletelyClearInstanceofCache() {
665 set_instanceof_cache_map(Smi::FromInt(0)); 664 set_instanceof_cache_map(Smi::FromInt(0));
666 set_instanceof_cache_function(Smi::FromInt(0)); 665 set_instanceof_cache_function(Smi::FromInt(0));
667 } 666 }
668 667
669 668
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 733
735 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 734 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
736 for (Object** current = start; current < end; current++) { 735 for (Object** current = start; current < end; current++) {
737 CHECK((*current)->IsSmi()); 736 CHECK((*current)->IsSmi());
738 } 737 }
739 } 738 }
740 } // namespace internal 739 } // namespace internal
741 } // namespace v8 740 } // namespace v8
742 741
743 #endif // V8_HEAP_HEAP_INL_H_ 742 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698