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

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

Issue 31943002: Allow constants to be deleted by reinserting them into the graph as needed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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-dce.cc ('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 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 } 2556 }
2557 set_representation(r); 2557 set_representation(r);
2558 SetFlag(kUseGVN); 2558 SetFlag(kUseGVN);
2559 } 2559 }
2560 2560
2561 2561
2562 bool HConstant::EmitAtUses() { 2562 bool HConstant::EmitAtUses() {
2563 ASSERT(IsLinked()); 2563 ASSERT(IsLinked());
2564 if (block()->graph()->has_osr() && 2564 if (block()->graph()->has_osr() &&
2565 block()->graph()->IsStandardConstant(this)) { 2565 block()->graph()->IsStandardConstant(this)) {
2566 // TODO(titzer): this seems like a hack that should be fixed by custom OSR.
2566 return true; 2567 return true;
2567 } 2568 }
2568 if (UseCount() == 0) return true; 2569 if (UseCount() == 0) return true;
2569 if (IsCell()) return false; 2570 if (IsCell()) return false;
2570 if (representation().IsDouble()) return false; 2571 if (representation().IsDouble()) return false;
2571 return true; 2572 return true;
2572 } 2573 }
2573 2574
2574 2575
2575 HConstant* HConstant::CopyToRepresentation(Representation r, Zone* zone) const { 2576 HConstant* HConstant::CopyToRepresentation(Representation r, Zone* zone) const {
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
4277 break; 4278 break;
4278 case kExternalMemory: 4279 case kExternalMemory:
4279 stream->Add("[external-memory]"); 4280 stream->Add("[external-memory]");
4280 break; 4281 break;
4281 } 4282 }
4282 4283
4283 stream->Add("@%d", offset()); 4284 stream->Add("@%d", offset());
4284 } 4285 }
4285 4286
4286 } } // namespace v8::internal 4287 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-dce.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698