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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 5220007: Force pretenuring of closures that are immediately assigned to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Return and remove the on-stack parameter. 74 // Return and remove the on-stack parameter.
75 __ ret(1 * kPointerSize); 75 __ ret(1 * kPointerSize);
76 76
77 // Create a new closure through the slower runtime call. 77 // Create a new closure through the slower runtime call.
78 __ bind(&gc); 78 __ bind(&gc);
79 __ pop(ecx); // Temporarily remove return address. 79 __ pop(ecx); // Temporarily remove return address.
80 __ pop(edx); 80 __ pop(edx);
81 __ push(esi); 81 __ push(esi);
82 __ push(edx); 82 __ push(edx);
83 __ push(Immediate(Factory::false_value()));
83 __ push(ecx); // Restore return address. 84 __ push(ecx); // Restore return address.
84 __ TailCallRuntime(Runtime::kNewClosure, 2, 1); 85 __ TailCallRuntime(Runtime::kNewClosure, 3, 1);
85 } 86 }
86 87
87 88
88 void FastNewContextStub::Generate(MacroAssembler* masm) { 89 void FastNewContextStub::Generate(MacroAssembler* masm) {
89 // Try to allocate the context in new space. 90 // Try to allocate the context in new space.
90 Label gc; 91 Label gc;
91 int length = slots_ + Context::MIN_CONTEXT_SLOTS; 92 int length = slots_ + Context::MIN_CONTEXT_SLOTS;
92 __ AllocateInNewSpace((length * kPointerSize) + FixedArray::kHeaderSize, 93 __ AllocateInNewSpace((length * kPointerSize) + FixedArray::kHeaderSize,
93 eax, ebx, ecx, &gc, TAG_OBJECT); 94 eax, ebx, ecx, &gc, TAG_OBJECT);
94 95
(...skipping 4475 matching lines...) Expand 10 before | Expand all | Expand 10 after
4570 // tagged as a small integer. 4571 // tagged as a small integer.
4571 __ bind(&runtime); 4572 __ bind(&runtime);
4572 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 4573 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
4573 } 4574 }
4574 4575
4575 #undef __ 4576 #undef __
4576 4577
4577 } } // namespace v8::internal 4578 } } // namespace v8::internal
4578 4579
4579 #endif // V8_TARGET_ARCH_IA32 4580 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/arm/codegen-arm.cc ('K') | « src/full-codegen.cc ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698