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

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

Issue 7461107: Use type info for the ToBoolean translation in crankshaft. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/code-stubs.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 class Types { 919 class Types {
920 public: 920 public:
921 Types() {} 921 Types() {}
922 explicit Types(byte bits) : set_(bits) {} 922 explicit Types(byte bits) : set_(bits) {}
923 923
924 bool IsEmpty() const { return set_.IsEmpty(); } 924 bool IsEmpty() const { return set_.IsEmpty(); }
925 bool IsAll() const { return ToByte() == ((1 << NUMBER_OF_TYPES) - 1); } 925 bool IsAll() const { return ToByte() == ((1 << NUMBER_OF_TYPES) - 1); }
926 bool Contains(Type type) const { return set_.Contains(type); } 926 bool Contains(Type type) const { return set_.Contains(type); }
927 void Add(Type type) { set_.Add(type); } 927 void Add(Type type) { set_.Add(type); }
928 byte ToByte() const { return set_.ToIntegral(); } 928 byte ToByte() const { return set_.ToIntegral(); }
929 void Print(StringStream* stream); 929 void Print(StringStream* stream) const;
930 void TraceTransition(Types to); 930 void TraceTransition(Types to) const;
931 bool Record(Handle<Object> object); 931 bool Record(Handle<Object> object);
932 bool NeedsMap() const;
932 933
933 private: 934 private:
934 EnumSet<Type, byte> set_; 935 EnumSet<Type, byte> set_;
935 }; 936 };
936 937
937 static Types no_types() { return Types(); } 938 static Types no_types() { return Types(); }
938 static Types all_types() { return Types((1 << NUMBER_OF_TYPES) - 1); } 939 static Types all_types() { return Types((1 << NUMBER_OF_TYPES) - 1); }
939 940
940 explicit ToBooleanStub(Register tos, Types types = Types()) 941 explicit ToBooleanStub(Register tos, Types types = Types())
941 : tos_(tos), types_(types) { } 942 : tos_(tos), types_(types) { }
(...skipping 17 matching lines...) Expand all
959 Label* patch); 960 Label* patch);
960 void GenerateTypeTransition(MacroAssembler* masm); 961 void GenerateTypeTransition(MacroAssembler* masm);
961 962
962 Register tos_; 963 Register tos_;
963 Types types_; 964 Types types_;
964 }; 965 };
965 966
966 } } // namespace v8::internal 967 } } // namespace v8::internal
967 968
968 #endif // V8_CODE_STUBS_H_ 969 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698