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

Unified Diff: src/hydrogen-instructions.h

Issue 272513004: Reland r20974: Unify and simplify the FastCloneShallowArrayStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 1cdca4c46efa14ac1cfb764d52fff9c641790749..8f9dd3f7db7c7d4343a93a697bc5ff1bed159166 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -618,6 +618,8 @@ class HValue : public ZoneObject {
// flag.
kUint32,
kHasNoObservableSideEffects,
+ // Indicates an instruction shouldn't be replaced by optimization.
mvstanton 2014/05/09 13:16:49 Or alternatively, instead of commenting the usage
danno 2014/05/09 15:51:25 Done.
+ kCantBeReplaced,
// Indicates the instruction is live during dead code elimination.
kIsLive,
@@ -6245,6 +6247,7 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> {
virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
bool CanBeReplacedWith(HValue* other) const {
+ if (!CheckFlag(HValue::kCantBeReplaced)) return false;
if (!type().Equals(other->type())) return false;
if (!representation().Equals(other->representation())) return false;
if (!other->IsLoadNamedField()) return true;
@@ -6308,7 +6311,9 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> {
HObjectAccess access,
const UniqueSet<Map>* maps,
HType type)
- : HTemplateInstruction<2>(type), access_(access), maps_(maps) {
+ : HTemplateInstruction<2>(type),
+ access_(access),
+ maps_(maps) {
ASSERT_NOT_NULL(maps);
ASSERT_NE(0, maps->size());

Powered by Google App Engine
This is Rietveld 408576698