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

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: Nit fixin Created 7 years, 3 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
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4331 matching lines...) Expand 10 before | Expand all | Expand 10 after
4342 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 4342 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
4343 } 4343 }
4344 } 4344 }
4345 4345
4346 4346
4347 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 4347 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
4348 CallRuntime(instr->function(), instr->arity(), instr); 4348 CallRuntime(instr->function(), instr->arity(), instr);
4349 } 4349 }
4350 4350
4351 4351
4352 void LCodeGen::DoStoreCodeEntry(LStoreCodeEntry* instr) {
4353 Register function = ToRegister(instr->function());
4354 Register code_object = ToRegister(instr->code_object());
4355 __ lea(code_object, FieldOperand(code_object, Code::kHeaderSize));
4356 __ mov(FieldOperand(function, JSFunction::kCodeEntryOffset), code_object);
4357 }
4358
4359
4352 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { 4360 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) {
4353 Register result = ToRegister(instr->result()); 4361 Register result = ToRegister(instr->result());
4354 Register base = ToRegister(instr->base_object()); 4362 Register base = ToRegister(instr->base_object());
4355 __ lea(result, Operand(base, instr->offset())); 4363 __ lea(result, Operand(base, instr->offset()));
4356 } 4364 }
4357 4365
4358 4366
4359 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 4367 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
4360 Representation representation = instr->representation(); 4368 Representation representation = instr->representation();
4361 4369
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after
6202 6210
6203 6211
6204 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 6212 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
6205 ASSERT(ToRegister(instr->context()).is(esi)); 6213 ASSERT(ToRegister(instr->context()).is(esi));
6206 // Use the fast case closure allocation code that allocates in new 6214 // Use the fast case closure allocation code that allocates in new
6207 // space for nested functions that don't need literals cloning. 6215 // space for nested functions that don't need literals cloning.
6208 bool pretenure = instr->hydrogen()->pretenure(); 6216 bool pretenure = instr->hydrogen()->pretenure();
6209 if (!pretenure && instr->hydrogen()->has_no_literals()) { 6217 if (!pretenure && instr->hydrogen()->has_no_literals()) {
6210 FastNewClosureStub stub(instr->hydrogen()->language_mode(), 6218 FastNewClosureStub stub(instr->hydrogen()->language_mode(),
6211 instr->hydrogen()->is_generator()); 6219 instr->hydrogen()->is_generator());
6212 __ push(Immediate(instr->hydrogen()->shared_info())); 6220 __ mov(ebx, Immediate(instr->hydrogen()->shared_info()));
6213 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 6221 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
6214 } else { 6222 } else {
6215 __ push(esi); 6223 __ push(esi);
6216 __ push(Immediate(instr->hydrogen()->shared_info())); 6224 __ push(Immediate(instr->hydrogen()->shared_info()));
6217 __ push(Immediate(pretenure ? factory()->true_value() 6225 __ push(Immediate(pretenure ? factory()->true_value()
6218 : factory()->false_value())); 6226 : factory()->false_value()));
6219 CallRuntime(Runtime::kNewClosure, 3, instr); 6227 CallRuntime(Runtime::kNewClosure, 3, instr);
6220 } 6228 }
6221 } 6229 }
6222 6230
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
6550 FixedArray::kHeaderSize - kPointerSize)); 6558 FixedArray::kHeaderSize - kPointerSize));
6551 __ bind(&done); 6559 __ bind(&done);
6552 } 6560 }
6553 6561
6554 6562
6555 #undef __ 6563 #undef __
6556 6564
6557 } } // namespace v8::internal 6565 } } // namespace v8::internal
6558 6566
6559 #endif // V8_TARGET_ARCH_IA32 6567 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698