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

Side by Side Diff: src/x64/lithium-codegen-x64.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/x64/full-codegen-x64.cc ('k') | src/x64/lithium-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3888 matching lines...) Expand 10 before | Expand all | Expand 10 after
3899 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3899 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3900 } 3900 }
3901 } 3901 }
3902 3902
3903 3903
3904 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 3904 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
3905 CallRuntime(instr->function(), instr->arity(), instr); 3905 CallRuntime(instr->function(), instr->arity(), instr);
3906 } 3906 }
3907 3907
3908 3908
3909 void LCodeGen::DoStoreCodeEntry(LStoreCodeEntry* instr) {
3910 Register function = ToRegister(instr->function());
3911 Register code_object = ToRegister(instr->code_object());
3912 __ lea(code_object, FieldOperand(code_object, Code::kHeaderSize));
3913 __ movq(FieldOperand(function, JSFunction::kCodeEntryOffset), code_object);
3914 }
3915
3916
3909 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { 3917 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) {
3910 Register result = ToRegister(instr->result()); 3918 Register result = ToRegister(instr->result());
3911 Register base = ToRegister(instr->base_object()); 3919 Register base = ToRegister(instr->base_object());
3912 __ lea(result, Operand(base, instr->offset())); 3920 __ lea(result, Operand(base, instr->offset()));
3913 } 3921 }
3914 3922
3915 3923
3916 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 3924 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
3917 Representation representation = instr->representation(); 3925 Representation representation = instr->representation();
3918 3926
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
5160 } 5168 }
5161 5169
5162 5170
5163 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 5171 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
5164 // Use the fast case closure allocation code that allocates in new 5172 // Use the fast case closure allocation code that allocates in new
5165 // space for nested functions that don't need literals cloning. 5173 // space for nested functions that don't need literals cloning.
5166 bool pretenure = instr->hydrogen()->pretenure(); 5174 bool pretenure = instr->hydrogen()->pretenure();
5167 if (!pretenure && instr->hydrogen()->has_no_literals()) { 5175 if (!pretenure && instr->hydrogen()->has_no_literals()) {
5168 FastNewClosureStub stub(instr->hydrogen()->language_mode(), 5176 FastNewClosureStub stub(instr->hydrogen()->language_mode(),
5169 instr->hydrogen()->is_generator()); 5177 instr->hydrogen()->is_generator());
5170 __ Push(instr->hydrogen()->shared_info()); 5178 __ Move(rbx, instr->hydrogen()->shared_info());
5171 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5179 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
5172 } else { 5180 } else {
5173 __ push(rsi); 5181 __ push(rsi);
5174 __ Push(instr->hydrogen()->shared_info()); 5182 __ Push(instr->hydrogen()->shared_info());
5175 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : 5183 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex :
5176 Heap::kFalseValueRootIndex); 5184 Heap::kFalseValueRootIndex);
5177 CallRuntime(Runtime::kNewClosure, 3, instr); 5185 CallRuntime(Runtime::kNewClosure, 3, instr);
5178 } 5186 }
5179 } 5187 }
5180 5188
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
5523 FixedArray::kHeaderSize - kPointerSize)); 5531 FixedArray::kHeaderSize - kPointerSize));
5524 __ bind(&done); 5532 __ bind(&done);
5525 } 5533 }
5526 5534
5527 5535
5528 #undef __ 5536 #undef __
5529 5537
5530 } } // namespace v8::internal 5538 } } // namespace v8::internal
5531 5539
5532 #endif // V8_TARGET_ARCH_X64 5540 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698