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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 2893553002: More compact string representation on 64 bit. (Closed)
Patch Set: Slava feedback 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/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index a0cc04a252f04cbb635304f0a222047ac6196c13..f33c9d13f882e786872bab222fb867fb5a5276ab 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -599,8 +599,10 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
NOT_IN_PRODUCT(
__ MaybeTraceAllocation(kArrayCid, EAX, &slow_case, Assembler::kFarJump));
- const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
- __ leal(EBX, Address(EDX, TIMES_2, fixed_size)); // EDX is Smi.
+ const intptr_t fixed_size_plus_alignment_padding =
+ sizeof(RawArray) + kObjectAlignment - 1;
+ // EDX is Smi.
+ __ leal(EBX, Address(EDX, TIMES_2, fixed_size_plus_alignment_padding));
ASSERT(kSmiTagShift == 1);
__ andl(EBX, Immediate(-kObjectAlignment));
@@ -824,8 +826,9 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
Label slow_case;
// First compute the rounded instance size.
// EDX: number of context variables.
- intptr_t fixed_size = (sizeof(RawContext) + kObjectAlignment - 1);
- __ leal(EBX, Address(EDX, TIMES_4, fixed_size));
+ intptr_t fixed_size_plus_alignment_padding =
+ (sizeof(RawContext) + kObjectAlignment - 1);
+ __ leal(EBX, Address(EDX, TIMES_4, fixed_size_plus_alignment_padding));
__ andl(EBX, Immediate(-kObjectAlignment));
NOT_IN_PRODUCT(__ MaybeTraceAllocation(kContextCid, EAX, &slow_case,
@@ -871,7 +874,7 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
// EDX: number of context variables.
{
Label size_tag_overflow, done;
- __ leal(EBX, Address(EDX, TIMES_4, fixed_size));
+ __ leal(EBX, Address(EDX, TIMES_4, fixed_size_plus_alignment_padding));
__ andl(EBX, Immediate(-kObjectAlignment));
__ cmpl(EBX, Immediate(RawObject::SizeTag::kMaxSizeTag));
__ j(ABOVE, &size_tag_overflow, Assembler::kNearJump);
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698