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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 9704012: Improve representation inference for HUnknownOSRValue. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: revert flag-definitions.h Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.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 // 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 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 stream->Add(" "); 2255 stream->Add(" ");
2256 object()->PrintNameTo(stream); 2256 object()->PrintNameTo(stream);
2257 } 2257 }
2258 2258
2259 2259
2260 Representation HPhi::InferredRepresentation() { 2260 Representation HPhi::InferredRepresentation() {
2261 bool double_occurred = false; 2261 bool double_occurred = false;
2262 bool int32_occurred = false; 2262 bool int32_occurred = false;
2263 for (int i = 0; i < OperandCount(); ++i) { 2263 for (int i = 0; i < OperandCount(); ++i) {
2264 HValue* value = OperandAt(i); 2264 HValue* value = OperandAt(i);
2265 if (value->IsUnknownOSRValue()) continue; 2265 if (value->IsUnknownOSRValue()) {
2266 HPhi* hint_value = HUnknownOSRValue::cast(value)->incoming_value();
2267 if (hint_value != NULL) {
2268 Representation hint = hint_value->representation();
2269 if (hint.IsDouble()) double_occurred = true;
2270 if (hint.IsInteger32()) int32_occurred = true;
2271 }
2272 continue;
2273 }
2266 if (value->representation().IsDouble()) double_occurred = true; 2274 if (value->representation().IsDouble()) double_occurred = true;
2267 if (value->representation().IsInteger32()) int32_occurred = true; 2275 if (value->representation().IsInteger32()) int32_occurred = true;
2268 if (value->representation().IsTagged()) { 2276 if (value->representation().IsTagged()) {
2269 if (value->IsConstant()) { 2277 if (value->IsConstant()) {
2270 HConstant* constant = HConstant::cast(value); 2278 HConstant* constant = HConstant::cast(value);
2271 if (constant->IsConvertibleToInteger()) { 2279 if (constant->IsConvertibleToInteger()) {
2272 int32_occurred = true; 2280 int32_occurred = true;
2273 } else if (constant->HasNumberValue()) { 2281 } else if (constant->HasNumberValue()) {
2274 double_occurred = true; 2282 double_occurred = true;
2275 } else { 2283 } else {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 2337
2330 2338
2331 void HCheckPrototypeMaps::Verify() { 2339 void HCheckPrototypeMaps::Verify() {
2332 HInstruction::Verify(); 2340 HInstruction::Verify();
2333 ASSERT(HasNoUses()); 2341 ASSERT(HasNoUses());
2334 } 2342 }
2335 2343
2336 #endif 2344 #endif
2337 2345
2338 } } // namespace v8::internal 2346 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698