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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 22562002: Convert FastNewClosureStub into hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 6194 matching lines...) Expand 10 before | Expand all | Expand 10 after
6205 6205
6206 6206
6207 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 6207 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
6208 ASSERT(ToRegister(instr->context()).is(esi)); 6208 ASSERT(ToRegister(instr->context()).is(esi));
6209 // Use the fast case closure allocation code that allocates in new 6209 // Use the fast case closure allocation code that allocates in new
6210 // space for nested functions that don't need literals cloning. 6210 // space for nested functions that don't need literals cloning.
6211 bool pretenure = instr->hydrogen()->pretenure(); 6211 bool pretenure = instr->hydrogen()->pretenure();
6212 if (!pretenure && instr->hydrogen()->has_no_literals()) { 6212 if (!pretenure && instr->hydrogen()->has_no_literals()) {
6213 FastNewClosureStub stub(instr->hydrogen()->language_mode(), 6213 FastNewClosureStub stub(instr->hydrogen()->language_mode(),
6214 instr->hydrogen()->is_generator()); 6214 instr->hydrogen()->is_generator());
6215 __ push(Immediate(instr->hydrogen()->shared_info())); 6215 __ mov(ebx, Immediate(instr->hydrogen()->shared_info()));
6216 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 6216 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
6217 } else { 6217 } else {
6218 __ push(esi); 6218 __ push(esi);
6219 __ push(Immediate(instr->hydrogen()->shared_info())); 6219 __ push(Immediate(instr->hydrogen()->shared_info()));
6220 __ push(Immediate(pretenure ? factory()->true_value() 6220 __ push(Immediate(pretenure ? factory()->true_value()
6221 : factory()->false_value())); 6221 : factory()->false_value()));
6222 CallRuntime(Runtime::kNewClosure, 3, instr); 6222 CallRuntime(Runtime::kNewClosure, 3, instr);
6223 } 6223 }
6224 } 6224 }
6225 6225
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
6550 FixedArray::kHeaderSize - kPointerSize)); 6550 FixedArray::kHeaderSize - kPointerSize));
6551 __ bind(&done); 6551 __ bind(&done);
6552 } 6552 }
6553 6553
6554 6554
6555 #undef __ 6555 #undef __
6556 6556
6557 } } // namespace v8::internal 6557 } } // namespace v8::internal
6558 6558
6559 #endif // V8_TARGET_ARCH_IA32 6559 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/code-stubs-hydrogen.cc ('K') | « src/ia32/full-codegen-ia32.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698