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

Unified Diff: src/hydrogen-instructions.h

Issue 10581014: BoundsCheck should be extended to support array_bounds_checks_elimination (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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
===================================================================
--- src/hydrogen-instructions.h (revision 11854)
+++ src/hydrogen-instructions.h (working copy)
@@ -2700,7 +2700,9 @@
class HBoundsCheck: public HTemplateInstruction<2> {
public:
- HBoundsCheck(HValue* index, HValue* length) {
+ HBoundsCheck(HValue* index, HValue* length)
+ : lower_offset_(0),
+ upper_offset_(0) {
SetOperandAt(0, index);
SetOperandAt(1, length);
set_representation(Representation::Integer32());
@@ -2718,8 +2720,18 @@
DECLARE_CONCRETE_INSTRUCTION(BoundsCheck)
+ void set_offset(int32_t lower_offset, int32_t upper_offset) {
+ lower_offset_ = lower_offset;
+ upper_offset_ = upper_offset;
+ }
+
+ int32_t lower_offset() { return lower_offset_; }
+ int32_t upper_offset() { return upper_offset_; }
+
protected:
virtual bool DataEquals(HValue* other) { return true; }
+ int32_t lower_offset_;
+ int32_t upper_offset_;
};
« 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