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

Side by Side Diff: src/code-stubs.cc

Issue 1202973003: Expand ToBoolean stub so it can handle more types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/code-stubs.h ('k') | no next file » | 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 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 } 917 }
918 return os; 918 return os;
919 } 919 }
920 920
921 921
922 bool ToBooleanStub::UpdateStatus(Handle<Object> object) { 922 bool ToBooleanStub::UpdateStatus(Handle<Object> object) {
923 Types new_types = types(); 923 Types new_types = types();
924 Types old_types = new_types; 924 Types old_types = new_types;
925 bool to_boolean_value = new_types.UpdateStatus(object); 925 bool to_boolean_value = new_types.UpdateStatus(object);
926 TraceTransition(old_types, new_types); 926 TraceTransition(old_types, new_types);
927 set_sub_minor_key(TypesBits::update(sub_minor_key(), new_types.ToByte())); 927 set_sub_minor_key(TypesBits::update(sub_minor_key(), new_types.ToIntegral()));
928 return to_boolean_value; 928 return to_boolean_value;
929 } 929 }
930 930
931 931
932 void ToBooleanStub::PrintState(std::ostream& os) const { // NOLINT 932 void ToBooleanStub::PrintState(std::ostream& os) const { // NOLINT
933 os << types(); 933 os << types();
934 } 934 }
935 935
936 936
937 std::ostream& operator<<(std::ostream& os, const ToBooleanStub::Types& s) { 937 std::ostream& operator<<(std::ostream& os, const ToBooleanStub::Types& s) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 1041
1042 1042
1043 InternalArrayConstructorStub::InternalArrayConstructorStub( 1043 InternalArrayConstructorStub::InternalArrayConstructorStub(
1044 Isolate* isolate) : PlatformCodeStub(isolate) { 1044 Isolate* isolate) : PlatformCodeStub(isolate) {
1045 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1045 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1046 } 1046 }
1047 1047
1048 1048
1049 } // namespace internal 1049 } // namespace internal
1050 } // namespace v8 1050 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698