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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12088108: Separate the array/string .length load from the bounds check. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
===================================================================
--- runtime/vm/intermediate_language.h (revision 17967)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -3108,6 +3108,12 @@
return recognized_kind_;
}
+ bool IsImmutableLengthLoad() const;
+
+ virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer);
+
+ static MethodRecognizer::Kind RecognizedKindFromArrayCid(intptr_t cid);
+
private:
const intptr_t offset_in_bytes_;
const AbstractType& type_;
@@ -4208,14 +4214,14 @@
class CheckArrayBoundInstr : public TemplateInstruction<2> {
public:
- CheckArrayBoundInstr(Value* array,
+ CheckArrayBoundInstr(Value* length,
Value* index,
intptr_t array_type,
InstanceCallInstr* instance_call)
: array_type_(array_type) {
- ASSERT(array != NULL);
+ ASSERT(length != NULL);
ASSERT(index != NULL);
- inputs_[0] = array;
+ inputs_[0] = length;
inputs_[1] = index;
deopt_id_ = instance_call->deopt_id();
}
@@ -4233,7 +4239,7 @@
virtual bool AffectedBySideEffect() const { return false; }
- Value* array() const { return inputs_[0]; }
+ Value* length() const { return inputs_[0]; }
Value* index() const { return inputs_[1]; }
intptr_t array_type() const { return array_type_; }

Powered by Google App Engine
This is Rietveld 408576698