| OLD | NEW |
| 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 5247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5258 } | 5258 } |
| 5259 | 5259 |
| 5260 | 5260 |
| 5261 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 5261 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 5262 // Use the fast case closure allocation code that allocates in new | 5262 // Use the fast case closure allocation code that allocates in new |
| 5263 // space for nested functions that don't need literals cloning. | 5263 // space for nested functions that don't need literals cloning. |
| 5264 bool pretenure = instr->hydrogen()->pretenure(); | 5264 bool pretenure = instr->hydrogen()->pretenure(); |
| 5265 if (!pretenure && instr->hydrogen()->has_no_literals()) { | 5265 if (!pretenure && instr->hydrogen()->has_no_literals()) { |
| 5266 FastNewClosureStub stub(instr->hydrogen()->language_mode(), | 5266 FastNewClosureStub stub(instr->hydrogen()->language_mode(), |
| 5267 instr->hydrogen()->is_generator()); | 5267 instr->hydrogen()->is_generator()); |
| 5268 __ Push(instr->hydrogen()->shared_info()); | 5268 __ Move(rbx, instr->hydrogen()->shared_info()); |
| 5269 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 5269 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 5270 } else { | 5270 } else { |
| 5271 __ push(rsi); | 5271 __ push(rsi); |
| 5272 __ Push(instr->hydrogen()->shared_info()); | 5272 __ Push(instr->hydrogen()->shared_info()); |
| 5273 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : | 5273 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : |
| 5274 Heap::kFalseValueRootIndex); | 5274 Heap::kFalseValueRootIndex); |
| 5275 CallRuntime(Runtime::kNewClosure, 3, instr); | 5275 CallRuntime(Runtime::kNewClosure, 3, instr); |
| 5276 } | 5276 } |
| 5277 } | 5277 } |
| 5278 | 5278 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5617 FixedArray::kHeaderSize - kPointerSize)); | 5617 FixedArray::kHeaderSize - kPointerSize)); |
| 5618 __ bind(&done); | 5618 __ bind(&done); |
| 5619 } | 5619 } |
| 5620 | 5620 |
| 5621 | 5621 |
| 5622 #undef __ | 5622 #undef __ |
| 5623 | 5623 |
| 5624 } } // namespace v8::internal | 5624 } } // namespace v8::internal |
| 5625 | 5625 |
| 5626 #endif // V8_TARGET_ARCH_X64 | 5626 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |