| OLD | NEW |
| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/factory.h" | 10 #include "src/factory.h" |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 const char* name) const { | 803 const char* name) const { |
| 804 os << name << "_" << ElementsKindToString(elements_kind()); | 804 os << name << "_" << ElementsKindToString(elements_kind()); |
| 805 if (override_mode() == DISABLE_ALLOCATION_SITES) { | 805 if (override_mode() == DISABLE_ALLOCATION_SITES) { |
| 806 os << "_DISABLE_ALLOCATION_SITES"; | 806 os << "_DISABLE_ALLOCATION_SITES"; |
| 807 } | 807 } |
| 808 return os; | 808 return os; |
| 809 } | 809 } |
| 810 | 810 |
| 811 | 811 |
| 812 bool ToBooleanStub::UpdateStatus(Handle<Object> object) { | 812 bool ToBooleanStub::UpdateStatus(Handle<Object> object) { |
| 813 Types old_types(types_); | 813 Types new_types = types(); |
| 814 bool to_boolean_value = types_.UpdateStatus(object); | 814 Types old_types = new_types; |
| 815 TraceTransition(old_types, types_); | 815 bool to_boolean_value = new_types.UpdateStatus(object); |
| 816 TraceTransition(old_types, new_types); |
| 817 set_sub_minor_key(TypesBits::update(sub_minor_key(), new_types.ToByte())); |
| 816 return to_boolean_value; | 818 return to_boolean_value; |
| 817 } | 819 } |
| 818 | 820 |
| 819 | 821 |
| 820 void ToBooleanStub::PrintState(OStream& os) const { // NOLINT | 822 void ToBooleanStub::PrintState(OStream& os) const { // NOLINT |
| 821 os << types_; | 823 os << types(); |
| 822 } | 824 } |
| 823 | 825 |
| 824 | 826 |
| 825 OStream& operator<<(OStream& os, const ToBooleanStub::Types& s) { | 827 OStream& operator<<(OStream& os, const ToBooleanStub::Types& s) { |
| 826 os << "("; | 828 os << "("; |
| 827 SimpleListPrinter p(os); | 829 SimpleListPrinter p(os); |
| 828 if (s.IsEmpty()) p.Add("None"); | 830 if (s.IsEmpty()) p.Add("None"); |
| 829 if (s.Contains(ToBooleanStub::UNDEFINED)) p.Add("Undefined"); | 831 if (s.Contains(ToBooleanStub::UNDEFINED)) p.Add("Undefined"); |
| 830 if (s.Contains(ToBooleanStub::BOOLEAN)) p.Add("Bool"); | 832 if (s.Contains(ToBooleanStub::BOOLEAN)) p.Add("Bool"); |
| 831 if (s.Contains(ToBooleanStub::NULL_TYPE)) p.Add("Null"); | 833 if (s.Contains(ToBooleanStub::NULL_TYPE)) p.Add("Null"); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 InstallDescriptor(isolate, &stub3); | 1035 InstallDescriptor(isolate, &stub3); |
| 1034 } | 1036 } |
| 1035 | 1037 |
| 1036 InternalArrayConstructorStub::InternalArrayConstructorStub( | 1038 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 1037 Isolate* isolate) : PlatformCodeStub(isolate) { | 1039 Isolate* isolate) : PlatformCodeStub(isolate) { |
| 1038 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 1040 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 1039 } | 1041 } |
| 1040 | 1042 |
| 1041 | 1043 |
| 1042 } } // namespace v8::internal | 1044 } } // namespace v8::internal |
| OLD | NEW |