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

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 2895183002: More compact string representation on 64 bit. (Closed)
Patch Set: Created 3 years, 7 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/raw_object.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 26419a784003eec6043add9027b2fd3eb71f3235..75b94dd9236a77ce62d06c7b8c67fdcb81cbf762 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -2957,9 +2957,11 @@ RawObject* Simulator::Call(const Code& code,
BYTECODE(CreateArrayOpt, A_B_C);
const intptr_t length = Smi::Value(RAW_CAST(Smi, FP[rB]));
if (LIKELY(static_cast<uintptr_t>(length) <= Array::kMaxElements)) {
- const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
+ const intptr_t fixed_size_plus_alignment_padding =
+ sizeof(RawArray) + kObjectAlignment - 1;
const intptr_t instance_size =
- (fixed_size + length * kWordSize) & ~(kObjectAlignment - 1);
+ (fixed_size_plus_alignment_padding + length * kWordSize) &
+ ~(kObjectAlignment - 1);
const uword start =
thread->heap()->new_space()->TryAllocate(instance_size);
if (LIKELY(start != 0)) {
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698