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

Unified Diff: runtime/vm/intermediate_language.h

Issue 722243002: Indirectly dispatch all backtracking jumps through the same block. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: return on unreachable Created 6 years, 1 month 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 | « runtime/vm/compiler.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 0f0cfdb8d13eaff760112adcd63f7464f7e50684..4430060c11bf0f669d143e6a338b8e52d5da1d75 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -2191,6 +2191,7 @@ class GotoInstr : public TemplateInstruction<0, NoThrow> {
// In order to preserve split-edge form, an indirect goto does not itself point
// to its targets. Instead, for each possible target, the successors_ field
// will contain an ordinary goto instruction that jumps to the target.
+// TODO(zerny): Implement direct support instead of embedding gotos.
//
// Byte offsets of all possible targets are stored in the offsets_ array. The
// desired offset is looked up while the generated code is executing, and passed
@@ -2227,17 +2228,7 @@ class IndirectGotoInstr : public TemplateInstruction<1, NoThrow> {
virtual void PrintTo(BufferFormatter* f) const;
const GrowableObjectArray& offsets() const { return offsets_; }
- void SetOffsetCount(Isolate* isolate, intptr_t count) {
- if (offsets_.Capacity() < count) {
- offsets_.Grow(count, Heap::kOld);
- }
- if (offsets_.Length() < count) {
- offsets_.SetLength(count);
- }
- }
- void SetOffsetAt(Isolate* isolate, intptr_t index, intptr_t offset) {
- offsets_.SetAt(index, Smi::ZoneHandle(isolate, Smi::New(offset)));
- }
+ void ComputeOffsetTable(Isolate* isolate);
private:
GrowableArray<TargetEntryInstr*> successors_;
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698