| 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 4016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4027 } | 4027 } |
| 4028 } | 4028 } |
| 4029 | 4029 |
| 4030 | 4030 |
| 4031 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 4031 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 4032 // Use the fast case closure allocation code that allocates in new | 4032 // Use the fast case closure allocation code that allocates in new |
| 4033 // space for nested functions that don't need literals cloning. | 4033 // space for nested functions that don't need literals cloning. |
| 4034 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); | 4034 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); |
| 4035 bool pretenure = instr->hydrogen()->pretenure(); | 4035 bool pretenure = instr->hydrogen()->pretenure(); |
| 4036 if (!pretenure && shared_info->num_literals() == 0) { | 4036 if (!pretenure && shared_info->num_literals() == 0) { |
| 4037 FastNewClosureStub stub( | 4037 FastNewClosureStub stub(shared_info->strict_mode_flag()); |
| 4038 shared_info->strict_mode() ? kStrictMode : kNonStrictMode); | |
| 4039 __ Push(shared_info); | 4038 __ Push(shared_info); |
| 4040 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 4039 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 4041 } else { | 4040 } else { |
| 4042 __ push(rsi); | 4041 __ push(rsi); |
| 4043 __ Push(shared_info); | 4042 __ Push(shared_info); |
| 4044 __ PushRoot(pretenure ? | 4043 __ PushRoot(pretenure ? |
| 4045 Heap::kTrueValueRootIndex : | 4044 Heap::kTrueValueRootIndex : |
| 4046 Heap::kFalseValueRootIndex); | 4045 Heap::kFalseValueRootIndex); |
| 4047 CallRuntime(Runtime::kNewClosure, 3, instr); | 4046 CallRuntime(Runtime::kNewClosure, 3, instr); |
| 4048 } | 4047 } |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4294 RegisterEnvironmentForDeoptimization(environment); | 4293 RegisterEnvironmentForDeoptimization(environment); |
| 4295 ASSERT(osr_pc_offset_ == -1); | 4294 ASSERT(osr_pc_offset_ == -1); |
| 4296 osr_pc_offset_ = masm()->pc_offset(); | 4295 osr_pc_offset_ = masm()->pc_offset(); |
| 4297 } | 4296 } |
| 4298 | 4297 |
| 4299 #undef __ | 4298 #undef __ |
| 4300 | 4299 |
| 4301 } } // namespace v8::internal | 4300 } } // namespace v8::internal |
| 4302 | 4301 |
| 4303 #endif // V8_TARGET_ARCH_X64 | 4302 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |