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