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: src/ia32/code-stubs-ia32.cc

Issue 55933002: Inline array constructor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Even better codegen for 1 arg case, and refactoring. Created 7 years, 1 month 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
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index 941bb32affdfcc7dd5b0fc87829bf46d8429eb81..3905e13a59e5a98ac0dd8c150beb2242d774d783 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -5763,9 +5763,12 @@ static void CreateArrayDispatchOneArgument(MacroAssembler* masm,
}
// Save the resulting elements kind in type info
- __ SmiTag(edx);
- __ mov(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset), edx);
- __ SmiUntag(edx);
+ __ add(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset),
+ Immediate(2));
Toon Verwaest 2013/11/06 16:42:44 I don't know what the line above means.
mvstanton 2013/11/07 16:34:05 Trying to be clever adding 1 to a smi in memory. :
+ /*
Toon Verwaest 2013/11/06 16:42:44 leftover comment?
mvstanton 2013/11/07 16:34:05 Done.
+ __ inc(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset));
+ __ inc(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset));
+ */
__ bind(&normal_sequence);
int last_index = GetSequenceIndexFromFastElementsKind(
@@ -5906,8 +5909,10 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
masm->isolate()->factory()->allocation_site_map()));
__ j(not_equal, &no_info);
+ // Only look at the lower 16 bits of the transition info.
__ mov(edx, FieldOperand(edx, AllocationSite::kTransitionInfoOffset));
__ SmiUntag(edx);
+ __ and_(edx, Immediate(0xffff));
mvstanton 2013/11/07 16:34:05 Fixed this up too.
GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
__ bind(&no_info);

Powered by Google App Engine
This is Rietveld 408576698