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

Unified Diff: src/hydrogen-instructions.h

Issue 7298003: Add fake data dependencies (instead of disabling GVN) to fix code motion (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase; handle HLoadElements differently Created 9 years, 5 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
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 93a7073b6ad14a1b3f16c4d481eeb5f4328a1ad4..0149b57776caf8a604d89f4ea330aa487f7c2f52 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -1661,12 +1661,14 @@ class HCallRuntime: public HCall<1> {
};
-class HJSArrayLength: public HUnaryOperation {
+class HJSArrayLength: public HTemplateInstruction<2> {
public:
- explicit HJSArrayLength(HValue* value) : HUnaryOperation(value) {
+ HJSArrayLength(HValue* value, HValue* typecheck) {
// The length of an array is stored as a tagged value in the array
// object. It is guaranteed to be 32 bit integer, but it can be
// represented as either a smi or heap number.
+ SetOperandAt(0, value);
+ SetOperandAt(1, typecheck);
set_representation(Representation::Tagged());
SetFlag(kUseGVN);
SetFlag(kDependsOnArrayLengths);
@@ -1677,6 +1679,8 @@ class HJSArrayLength: public HUnaryOperation {
return Representation::Tagged();
}
+ HValue* value() { return OperandAt(0); }
+
DECLARE_CONCRETE_INSTRUCTION(JSArrayLength)
protected:
@@ -1907,10 +1911,6 @@ class HCheckMap: public HUnaryOperation {
virtual void PrintDataTo(StringStream* stream);
virtual HType CalculateInferredType();
-#ifdef DEBUG
- virtual void Verify();
-#endif
-
Handle<Map> map() const { return map_; }
DECLARE_CONCRETE_INSTRUCTION(CheckMap)
@@ -1978,10 +1978,6 @@ class HCheckInstanceType: public HUnaryOperation {
return Representation::Tagged();
}
-#ifdef DEBUG
- virtual void Verify();
-#endif
-
virtual HValue* Canonicalize();
bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; }
@@ -2456,10 +2452,6 @@ class HBoundsCheck: public HTemplateInstruction<2> {
return Representation::Integer32();
}
-#ifdef DEBUG
- virtual void Verify();
-#endif
-
HValue* index() { return OperandAt(0); }
HValue* length() { return OperandAt(1); }
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698