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

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

Issue 23618007: MIPS: Convert FastNewClosureStub into hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/mips/full-codegen-mips.cc ('k') | src/mips/lithium-mips.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 4049 matching lines...) Expand 10 before | Expand all | Expand 10 after
4060 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 4060 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
4061 } 4061 }
4062 } 4062 }
4063 4063
4064 4064
4065 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 4065 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
4066 CallRuntime(instr->function(), instr->arity(), instr); 4066 CallRuntime(instr->function(), instr->arity(), instr);
4067 } 4067 }
4068 4068
4069 4069
4070 void LCodeGen::DoStoreCodeEntry(LStoreCodeEntry* instr) {
4071 Register function = ToRegister(instr->function());
4072 Register code_object = ToRegister(instr->code_object());
4073 __ Addu(code_object, code_object,
4074 Operand(Code::kHeaderSize - kHeapObjectTag));
4075 __ sw(code_object,
4076 FieldMemOperand(function, JSFunction::kCodeEntryOffset));
4077 }
4078
4079
4070 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { 4080 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) {
4071 Register result = ToRegister(instr->result()); 4081 Register result = ToRegister(instr->result());
4072 Register base = ToRegister(instr->base_object()); 4082 Register base = ToRegister(instr->base_object());
4073 __ Addu(result, base, Operand(instr->offset())); 4083 __ Addu(result, base, Operand(instr->offset()));
4074 } 4084 }
4075 4085
4076 4086
4077 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 4087 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
4078 Representation representation = instr->representation(); 4088 Representation representation = instr->representation();
4079 4089
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after
5400 } 5410 }
5401 5411
5402 5412
5403 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 5413 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
5404 // Use the fast case closure allocation code that allocates in new 5414 // Use the fast case closure allocation code that allocates in new
5405 // space for nested functions that don't need literals cloning. 5415 // space for nested functions that don't need literals cloning.
5406 bool pretenure = instr->hydrogen()->pretenure(); 5416 bool pretenure = instr->hydrogen()->pretenure();
5407 if (!pretenure && instr->hydrogen()->has_no_literals()) { 5417 if (!pretenure && instr->hydrogen()->has_no_literals()) {
5408 FastNewClosureStub stub(instr->hydrogen()->language_mode(), 5418 FastNewClosureStub stub(instr->hydrogen()->language_mode(),
5409 instr->hydrogen()->is_generator()); 5419 instr->hydrogen()->is_generator());
5410 __ li(a1, Operand(instr->hydrogen()->shared_info())); 5420 __ li(a2, Operand(instr->hydrogen()->shared_info()));
5411 __ push(a1);
5412 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5421 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
5413 } else { 5422 } else {
5414 __ li(a2, Operand(instr->hydrogen()->shared_info())); 5423 __ li(a2, Operand(instr->hydrogen()->shared_info()));
5415 __ li(a1, Operand(pretenure ? factory()->true_value() 5424 __ li(a1, Operand(pretenure ? factory()->true_value()
5416 : factory()->false_value())); 5425 : factory()->false_value()));
5417 __ Push(cp, a2, a1); 5426 __ Push(cp, a2, a1);
5418 CallRuntime(Runtime::kNewClosure, 3, instr); 5427 CallRuntime(Runtime::kNewClosure, 3, instr);
5419 } 5428 }
5420 } 5429 }
5421 5430
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
5795 __ Subu(scratch, result, scratch); 5804 __ Subu(scratch, result, scratch);
5796 __ lw(result, FieldMemOperand(scratch, 5805 __ lw(result, FieldMemOperand(scratch,
5797 FixedArray::kHeaderSize - kPointerSize)); 5806 FixedArray::kHeaderSize - kPointerSize));
5798 __ bind(&done); 5807 __ bind(&done);
5799 } 5808 }
5800 5809
5801 5810
5802 #undef __ 5811 #undef __
5803 5812
5804 } } // namespace v8::internal 5813 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698