OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // global proxy when called as functions (without an explicit receiver | 118 // global proxy when called as functions (without an explicit receiver |
119 // object). | 119 // object). |
120 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { | 120 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { |
121 Label ok; | 121 Label ok; |
122 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; | 122 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; |
123 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 123 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
124 __ ld(a2, MemOperand(sp, receiver_offset)); | 124 __ ld(a2, MemOperand(sp, receiver_offset)); |
125 __ Branch(&ok, ne, a2, Operand(at)); | 125 __ Branch(&ok, ne, a2, Operand(at)); |
126 | 126 |
127 __ ld(a2, GlobalObjectOperand()); | 127 __ ld(a2, GlobalObjectOperand()); |
128 __ ld(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); | 128 __ ld(a2, FieldMemOperand(a2, JSGlobalObject::kGlobalProxyOffset)); |
129 | 129 |
130 __ sd(a2, MemOperand(sp, receiver_offset)); | 130 __ sd(a2, MemOperand(sp, receiver_offset)); |
131 | 131 |
132 __ bind(&ok); | 132 __ bind(&ok); |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 info()->set_prologue_offset(masm_->pc_offset()); | 136 info()->set_prologue_offset(masm_->pc_offset()); |
137 if (NeedsEagerFrame()) { | 137 if (NeedsEagerFrame()) { |
138 if (info()->IsStub()) { | 138 if (info()->IsStub()) { |
(...skipping 3284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3423 | 3423 |
3424 __ GetObjectType(receiver, scratch, scratch); | 3424 __ GetObjectType(receiver, scratch, scratch); |
3425 DeoptimizeIf(lt, instr, Deoptimizer::kNotAJavaScriptObject, scratch, | 3425 DeoptimizeIf(lt, instr, Deoptimizer::kNotAJavaScriptObject, scratch, |
3426 Operand(FIRST_SPEC_OBJECT_TYPE)); | 3426 Operand(FIRST_SPEC_OBJECT_TYPE)); |
3427 __ Branch(&result_in_receiver); | 3427 __ Branch(&result_in_receiver); |
3428 | 3428 |
3429 __ bind(&global_object); | 3429 __ bind(&global_object); |
3430 __ ld(result, FieldMemOperand(function, JSFunction::kContextOffset)); | 3430 __ ld(result, FieldMemOperand(function, JSFunction::kContextOffset)); |
3431 __ ld(result, | 3431 __ ld(result, |
3432 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); | 3432 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); |
3433 __ ld(result, | 3433 __ ld(result, FieldMemOperand(result, JSGlobalObject::kGlobalProxyOffset)); |
3434 FieldMemOperand(result, GlobalObject::kGlobalProxyOffset)); | |
3435 | 3434 |
3436 if (result.is(receiver)) { | 3435 if (result.is(receiver)) { |
3437 __ bind(&result_in_receiver); | 3436 __ bind(&result_in_receiver); |
3438 } else { | 3437 } else { |
3439 Label result_ok; | 3438 Label result_ok; |
3440 __ Branch(&result_ok); | 3439 __ Branch(&result_ok); |
3441 __ bind(&result_in_receiver); | 3440 __ bind(&result_in_receiver); |
3442 __ mov(result, receiver); | 3441 __ mov(result, receiver); |
3443 __ bind(&result_ok); | 3442 __ bind(&result_ok); |
3444 } | 3443 } |
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6034 __ Push(at, ToRegister(instr->function())); | 6033 __ Push(at, ToRegister(instr->function())); |
6035 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6034 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6036 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6035 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6037 } | 6036 } |
6038 | 6037 |
6039 | 6038 |
6040 #undef __ | 6039 #undef __ |
6041 | 6040 |
6042 } // namespace internal | 6041 } // namespace internal |
6043 } // namespace v8 | 6042 } // namespace v8 |
OLD | NEW |