| 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 3702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3713 __ str(r3, FieldMemOperand(r0, size - kPointerSize)); | 3713 __ str(r3, FieldMemOperand(r0, size - kPointerSize)); |
| 3714 } | 3714 } |
| 3715 } | 3715 } |
| 3716 | 3716 |
| 3717 | 3717 |
| 3718 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { | 3718 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { |
| 3719 // Use the fast case closure allocation code that allocates in new | 3719 // Use the fast case closure allocation code that allocates in new |
| 3720 // space for nested functions that don't need literals cloning. | 3720 // space for nested functions that don't need literals cloning. |
| 3721 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); | 3721 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); |
| 3722 bool pretenure = instr->hydrogen()->pretenure(); | 3722 bool pretenure = instr->hydrogen()->pretenure(); |
| 3723 if (shared_info->num_literals() == 0 && !pretenure) { | 3723 if (!pretenure && shared_info->num_literals() == 0 && |
| 3724 !shared_info->strict_mode()) { // Strict mode functions use slow path. |
| 3724 FastNewClosureStub stub; | 3725 FastNewClosureStub stub; |
| 3725 __ mov(r1, Operand(shared_info)); | 3726 __ mov(r1, Operand(shared_info)); |
| 3726 __ push(r1); | 3727 __ push(r1); |
| 3727 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3728 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 3728 } else { | 3729 } else { |
| 3729 __ mov(r2, Operand(shared_info)); | 3730 __ mov(r2, Operand(shared_info)); |
| 3730 __ mov(r1, Operand(pretenure | 3731 __ mov(r1, Operand(pretenure |
| 3731 ? Factory::true_value() | 3732 ? Factory::true_value() |
| 3732 : Factory::false_value())); | 3733 : Factory::false_value())); |
| 3733 __ Push(cp, r2, r1); | 3734 __ Push(cp, r2, r1); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3950 ASSERT(!environment->HasBeenRegistered()); | 3951 ASSERT(!environment->HasBeenRegistered()); |
| 3951 RegisterEnvironmentForDeoptimization(environment); | 3952 RegisterEnvironmentForDeoptimization(environment); |
| 3952 ASSERT(osr_pc_offset_ == -1); | 3953 ASSERT(osr_pc_offset_ == -1); |
| 3953 osr_pc_offset_ = masm()->pc_offset(); | 3954 osr_pc_offset_ = masm()->pc_offset(); |
| 3954 } | 3955 } |
| 3955 | 3956 |
| 3956 | 3957 |
| 3957 #undef __ | 3958 #undef __ |
| 3958 | 3959 |
| 3959 } } // namespace v8::internal | 3960 } } // namespace v8::internal |
| OLD | NEW |