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

Unified Diff: runtime/vm/stub_code_arm.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/simulator_dbc.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 4f2cf296aae709739b3147f3879bda41ac6a831c..17bfc42b4f2bfe4c063809d7f96035e405d3420c 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -694,9 +694,10 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
const intptr_t cid = kArrayCid;
NOT_IN_PRODUCT(__ MaybeTraceAllocation(cid, R4, &slow_case));
- const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
- __ LoadImmediate(R9, fixed_size);
- __ add(R9, R9, Operand(R3, LSL, 1)); // R3 is a Smi.
+ const intptr_t fixed_size_plus_alignment_padding =
+ sizeof(RawArray) + kObjectAlignment - 1;
+ __ LoadImmediate(R9, fixed_size_plus_alignment_padding);
+ __ add(R9, R9, Operand(R3, LSL, 1)); // R3 is a Smi.
ASSERT(kSmiTagShift == 1);
__ bic(R9, R9, Operand(kObjectAlignment - 1));
@@ -915,8 +916,9 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
Label slow_case;
// First compute the rounded instance size.
// R1: number of context variables.
- intptr_t fixed_size = sizeof(RawContext) + kObjectAlignment - 1;
- __ LoadImmediate(R2, fixed_size);
+ intptr_t fixed_size_plus_alignment_padding =
+ sizeof(RawContext) + kObjectAlignment - 1;
+ __ LoadImmediate(R2, fixed_size_plus_alignment_padding);
__ add(R2, R2, Operand(R1, LSL, 2));
ASSERT(kSmiTagShift == 1);
__ bic(R2, R2, Operand(kObjectAlignment - 1));
« no previous file with comments | « runtime/vm/simulator_dbc.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698