| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 if (info_->this_has_uses() && | 145 if (info_->this_has_uses() && |
| 146 info_->strict_mode() == SLOPPY && | 146 info_->strict_mode() == SLOPPY && |
| 147 !info_->is_native()) { | 147 !info_->is_native()) { |
| 148 Label ok; | 148 Label ok; |
| 149 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; | 149 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; |
| 150 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 150 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
| 151 __ lw(a2, MemOperand(sp, receiver_offset)); | 151 __ lw(a2, MemOperand(sp, receiver_offset)); |
| 152 __ Branch(&ok, ne, a2, Operand(at)); | 152 __ Branch(&ok, ne, a2, Operand(at)); |
| 153 | 153 |
| 154 __ lw(a2, GlobalObjectOperand()); | 154 __ lw(a2, GlobalObjectOperand()); |
| 155 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset)); | 155 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); |
| 156 | 156 |
| 157 __ sw(a2, MemOperand(sp, receiver_offset)); | 157 __ sw(a2, MemOperand(sp, receiver_offset)); |
| 158 | 158 |
| 159 __ bind(&ok); | 159 __ bind(&ok); |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 info()->set_prologue_offset(masm_->pc_offset()); | 163 info()->set_prologue_offset(masm_->pc_offset()); |
| 164 if (NeedsEagerFrame()) { | 164 if (NeedsEagerFrame()) { |
| 165 if (info()->IsStub()) { | 165 if (info()->IsStub()) { |
| (...skipping 3252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3418 __ GetObjectType(receiver, scratch, scratch); | 3418 __ GetObjectType(receiver, scratch, scratch); |
| 3419 DeoptimizeIf(lt, instr->environment(), | 3419 DeoptimizeIf(lt, instr->environment(), |
| 3420 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); | 3420 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); |
| 3421 | 3421 |
| 3422 __ Branch(&result_in_receiver); | 3422 __ Branch(&result_in_receiver); |
| 3423 __ bind(&global_object); | 3423 __ bind(&global_object); |
| 3424 __ lw(result, FieldMemOperand(function, JSFunction::kContextOffset)); | 3424 __ lw(result, FieldMemOperand(function, JSFunction::kContextOffset)); |
| 3425 __ lw(result, | 3425 __ lw(result, |
| 3426 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); | 3426 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); |
| 3427 __ lw(result, | 3427 __ lw(result, |
| 3428 FieldMemOperand(result, GlobalObject::kGlobalReceiverOffset)); | 3428 FieldMemOperand(result, GlobalObject::kGlobalProxyOffset)); |
| 3429 | 3429 |
| 3430 if (result.is(receiver)) { | 3430 if (result.is(receiver)) { |
| 3431 __ bind(&result_in_receiver); | 3431 __ bind(&result_in_receiver); |
| 3432 } else { | 3432 } else { |
| 3433 Label result_ok; | 3433 Label result_ok; |
| 3434 __ Branch(&result_ok); | 3434 __ Branch(&result_ok); |
| 3435 __ bind(&result_in_receiver); | 3435 __ bind(&result_in_receiver); |
| 3436 __ mov(result, receiver); | 3436 __ mov(result, receiver); |
| 3437 __ bind(&result_ok); | 3437 __ bind(&result_ok); |
| 3438 } | 3438 } |
| (...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5884 __ li(at, scope_info); | 5884 __ li(at, scope_info); |
| 5885 __ Push(at, ToRegister(instr->function())); | 5885 __ Push(at, ToRegister(instr->function())); |
| 5886 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5886 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5887 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5887 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5888 } | 5888 } |
| 5889 | 5889 |
| 5890 | 5890 |
| 5891 #undef __ | 5891 #undef __ |
| 5892 | 5892 |
| 5893 } } // namespace v8::internal | 5893 } } // namespace v8::internal |
| OLD | NEW |