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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 838763003: Use a fixed-size typed array for the dispatch offsets table. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/regexp_assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index df597c811dbc303f7eb03b5659ba4136ada26099..80843b78f8eb96dab1b0e2dcdc639cb065a7caba 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -2580,8 +2580,8 @@ void IndirectGotoInstr::ComputeOffsetTable(Isolate* isolate) {
// Don't generate a table when contained in an unreachable block.
return;
}
- ASSERT(SuccessorCount() == offsets_.Capacity());
- offsets_.SetLength(SuccessorCount());
+ ASSERT(SuccessorCount() == offsets_.Length());
+ intptr_t element_size = offsets_.ElementSizeInBytes();
for (intptr_t i = 0; i < SuccessorCount(); i++) {
TargetEntryInstr* target = SuccessorAt(i);
intptr_t offset = target->offset();
@@ -2605,7 +2605,7 @@ void IndirectGotoInstr::ComputeOffsetTable(Isolate* isolate) {
ASSERT(offset > 0);
offset -= Assembler::EntryPointToPcMarkerOffset();
- offsets_.SetAt(i, Smi::ZoneHandle(isolate, Smi::New(offset)));
+ offsets_.SetInt32(i * element_size, offset);
}
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/regexp_assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698