| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3686 __ mov(FieldOperand(eax, size - kPointerSize), edx); | 3686 __ mov(FieldOperand(eax, size - kPointerSize), edx); |
| 3687 } | 3687 } |
| 3688 } | 3688 } |
| 3689 | 3689 |
| 3690 | 3690 |
| 3691 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 3691 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 3692 // Use the fast case closure allocation code that allocates in new | 3692 // Use the fast case closure allocation code that allocates in new |
| 3693 // space for nested functions that don't need literals cloning. | 3693 // space for nested functions that don't need literals cloning. |
| 3694 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); | 3694 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); |
| 3695 bool pretenure = instr->hydrogen()->pretenure(); | 3695 bool pretenure = instr->hydrogen()->pretenure(); |
| 3696 if (!pretenure && shared_info->num_literals() == 0 && | 3696 if (!pretenure && shared_info->num_literals() == 0) { |
| 3697 !shared_info->strict_mode()) { | 3697 FastNewClosureStub stub( |
| 3698 FastNewClosureStub stub; | 3698 shared_info->strict_mode() ? kStrictMode : kNonStrictMode); |
| 3699 __ push(Immediate(shared_info)); | 3699 __ push(Immediate(shared_info)); |
| 3700 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr, false); | 3700 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr, false); |
| 3701 } else { | 3701 } else { |
| 3702 __ push(Operand(ebp, StandardFrameConstants::kContextOffset)); | 3702 __ push(Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 3703 __ push(Immediate(shared_info)); | 3703 __ push(Immediate(shared_info)); |
| 3704 __ push(Immediate(pretenure | 3704 __ push(Immediate(pretenure |
| 3705 ? Factory::true_value() | 3705 ? Factory::true_value() |
| 3706 : Factory::false_value())); | 3706 : Factory::false_value())); |
| 3707 CallRuntime(Runtime::kNewClosure, 3, instr, false); | 3707 CallRuntime(Runtime::kNewClosure, 3, instr, false); |
| 3708 } | 3708 } |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3939 ASSERT(osr_pc_offset_ == -1); | 3939 ASSERT(osr_pc_offset_ == -1); |
| 3940 osr_pc_offset_ = masm()->pc_offset(); | 3940 osr_pc_offset_ = masm()->pc_offset(); |
| 3941 } | 3941 } |
| 3942 | 3942 |
| 3943 | 3943 |
| 3944 #undef __ | 3944 #undef __ |
| 3945 | 3945 |
| 3946 } } // namespace v8::internal | 3946 } } // namespace v8::internal |
| 3947 | 3947 |
| 3948 #endif // V8_TARGET_ARCH_IA32 | 3948 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |