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

Unified Diff: runtime/vm/stub_code_ia32.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/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 67cd47637a5fa978e98921aed1ba8f860c842d69..8eb2798e3435dd1c4615f7f4f6aec8c54ddba762 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -608,8 +608,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));
@@ -833,8 +835,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,
@@ -880,7 +883,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