| 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 3441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3452 | 3452 |
| 3453 // The receiver should be a JS object. | 3453 // The receiver should be a JS object. |
| 3454 __ test(receiver, Immediate(kSmiTagMask)); | 3454 __ test(receiver, Immediate(kSmiTagMask)); |
| 3455 DeoptimizeIf(equal, instr, Deoptimizer::kSmi); | 3455 DeoptimizeIf(equal, instr, Deoptimizer::kSmi); |
| 3456 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch); | 3456 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch); |
| 3457 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject); | 3457 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject); |
| 3458 | 3458 |
| 3459 __ jmp(&receiver_ok, Label::kNear); | 3459 __ jmp(&receiver_ok, Label::kNear); |
| 3460 __ bind(&global_object); | 3460 __ bind(&global_object); |
| 3461 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset)); | 3461 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset)); |
| 3462 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); | 3462 __ mov(receiver, ContextOperand(receiver, Context::NATIVE_CONTEXT_INDEX)); |
| 3463 __ mov(receiver, Operand(receiver, global_offset)); | 3463 __ mov(receiver, ContextOperand(receiver, Context::GLOBAL_PROXY_INDEX)); |
| 3464 const int proxy_offset = JSGlobalObject::kGlobalProxyOffset; | |
| 3465 __ mov(receiver, FieldOperand(receiver, proxy_offset)); | |
| 3466 __ bind(&receiver_ok); | 3464 __ bind(&receiver_ok); |
| 3467 } | 3465 } |
| 3468 | 3466 |
| 3469 | 3467 |
| 3470 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { | 3468 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { |
| 3471 Register receiver = ToRegister(instr->receiver()); | 3469 Register receiver = ToRegister(instr->receiver()); |
| 3472 Register function = ToRegister(instr->function()); | 3470 Register function = ToRegister(instr->function()); |
| 3473 Register length = ToRegister(instr->length()); | 3471 Register length = ToRegister(instr->length()); |
| 3474 Register elements = ToRegister(instr->elements()); | 3472 Register elements = ToRegister(instr->elements()); |
| 3475 DCHECK(receiver.is(eax)); // Used for parameter count. | 3473 DCHECK(receiver.is(eax)); // Used for parameter count. |
| (...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6151 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6149 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6152 } | 6150 } |
| 6153 | 6151 |
| 6154 | 6152 |
| 6155 #undef __ | 6153 #undef __ |
| 6156 | 6154 |
| 6157 } // namespace internal | 6155 } // namespace internal |
| 6158 } // namespace v8 | 6156 } // namespace v8 |
| 6159 | 6157 |
| 6160 #endif // V8_TARGET_ARCH_X87 | 6158 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |