OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3259 | 3259 |
3260 // The receiver should be a JS object. | 3260 // The receiver should be a JS object. |
3261 Condition is_smi = __ CheckSmi(receiver); | 3261 Condition is_smi = __ CheckSmi(receiver); |
3262 DeoptimizeIf(is_smi, instr, Deoptimizer::kSmi); | 3262 DeoptimizeIf(is_smi, instr, Deoptimizer::kSmi); |
3263 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, kScratchRegister); | 3263 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, kScratchRegister); |
3264 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject); | 3264 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject); |
3265 | 3265 |
3266 __ jmp(&receiver_ok, Label::kNear); | 3266 __ jmp(&receiver_ok, Label::kNear); |
3267 __ bind(&global_object); | 3267 __ bind(&global_object); |
3268 __ movp(receiver, FieldOperand(function, JSFunction::kContextOffset)); | 3268 __ movp(receiver, FieldOperand(function, JSFunction::kContextOffset)); |
3269 __ movp(receiver, ContextOperand(receiver, Context::NATIVE_CONTEXT_INDEX)); | 3269 __ movp(receiver, |
3270 __ movp(receiver, ContextOperand(receiver, Context::GLOBAL_PROXY_INDEX)); | 3270 Operand(receiver, |
| 3271 Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 3272 __ movp(receiver, FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
3271 | 3273 |
3272 __ bind(&receiver_ok); | 3274 __ bind(&receiver_ok); |
3273 } | 3275 } |
3274 | 3276 |
3275 | 3277 |
3276 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { | 3278 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { |
3277 Register receiver = ToRegister(instr->receiver()); | 3279 Register receiver = ToRegister(instr->receiver()); |
3278 Register function = ToRegister(instr->function()); | 3280 Register function = ToRegister(instr->function()); |
3279 Register length = ToRegister(instr->length()); | 3281 Register length = ToRegister(instr->length()); |
3280 Register elements = ToRegister(instr->elements()); | 3282 Register elements = ToRegister(instr->elements()); |
(...skipping 2507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5788 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5790 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5789 } | 5791 } |
5790 | 5792 |
5791 | 5793 |
5792 #undef __ | 5794 #undef __ |
5793 | 5795 |
5794 } // namespace internal | 5796 } // namespace internal |
5795 } // namespace v8 | 5797 } // namespace v8 |
5796 | 5798 |
5797 #endif // V8_TARGET_ARCH_X64 | 5799 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |