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

Unified Diff: runtime/vm/intermediate_language.h

Issue 23003026: Avoid array bounds check when allowed by guarded field. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 644cb99c8471c14976986bf7cbdfda90c3ed077d..38ee18dd00fd15d008fe5eb5af20865e76778f19 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -6488,7 +6488,8 @@ class CheckSmiInstr : public TemplateInstruction<1> {
class CheckArrayBoundInstr : public TemplateInstruction<2> {
public:
- CheckArrayBoundInstr(Value* length, Value* index, intptr_t deopt_id) {
+ CheckArrayBoundInstr(const Field* array, Value* length, Value* index,
+ intptr_t deopt_id) : array_(array) {
SetInputAt(kLengthPos, length);
SetInputAt(kIndexPos, index);
// Override generated deopt-id.
@@ -6527,6 +6528,8 @@ class CheckArrayBoundInstr : public TemplateInstruction<2> {
kIndexPos = 1
};
+ const Field* array_;
+
DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr);
};

Powered by Google App Engine
This is Rietveld 408576698