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

Side by Side Diff: src/hydrogen.h

Issue 22611009: H-BuildIncrement should make use of available type feedback (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fixed casting bug Created 7 years, 3 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 | « src/ast.h ('k') | src/hydrogen.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 // 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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 HInstruction* AddUncasted(P1 p1, P2 p2) { 1051 HInstruction* AddUncasted(P1 p1, P2 p2) {
1052 HInstruction* result = AddInstruction(NewUncasted<I>(p1, p2)); 1052 HInstruction* result = AddInstruction(NewUncasted<I>(p1, p2));
1053 // Specializations must have their parameters properly casted 1053 // Specializations must have their parameters properly casted
1054 // to avoid landing here. 1054 // to avoid landing here.
1055 ASSERT(!result->IsSimulate()); 1055 ASSERT(!result->IsSimulate());
1056 return result; 1056 return result;
1057 } 1057 }
1058 1058
1059 template<class I, class P1, class P2> 1059 template<class I, class P1, class P2>
1060 I* Add(P1 p1, P2 p2) { 1060 I* Add(P1 p1, P2 p2) {
1061 return static_cast<I*>(AddUncasted<I>(p1, p2)); 1061 return I::cast(AddUncasted<I>(p1, p2));
1062 } 1062 }
1063 1063
1064 template<class I, class P1, class P2, class P3> 1064 template<class I, class P1, class P2, class P3>
1065 HInstruction* NewUncasted(P1 p1, P2 p2, P3 p3) { 1065 HInstruction* NewUncasted(P1 p1, P2 p2, P3 p3) {
1066 return I::New(zone(), context(), p1, p2, p3); 1066 return I::New(zone(), context(), p1, p2, p3);
1067 } 1067 }
1068 1068
1069 template<class I, class P1, class P2, class P3> 1069 template<class I, class P1, class P2, class P3>
1070 I* New(P1 p1, P2 p2, P3 p3) { 1070 I* New(P1 p1, P2 p2, P3 p3) {
1071 return I::cast(NewUncasted<I>(p1, p2, p3)); 1071 return I::cast(NewUncasted<I>(p1, p2, p3));
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 } 2308 }
2309 2309
2310 private: 2310 private:
2311 HGraphBuilder* builder_; 2311 HGraphBuilder* builder_;
2312 }; 2312 };
2313 2313
2314 2314
2315 } } // namespace v8::internal 2315 } } // namespace v8::internal
2316 2316
2317 #endif // V8_HYDROGEN_H_ 2317 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698