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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 3335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3346 __ imulp(rcx, rcx, Immediate(DescriptorArray::kDescriptorSize)); | 3346 __ imulp(rcx, rcx, Immediate(DescriptorArray::kDescriptorSize)); |
3347 __ leap(rcx, | 3347 __ leap(rcx, |
3348 Operand(r8, rcx, times_pointer_size, DescriptorArray::kFirstOffset)); | 3348 Operand(r8, rcx, times_pointer_size, DescriptorArray::kFirstOffset)); |
3349 // Calculate location of the first key name. | 3349 // Calculate location of the first key name. |
3350 __ addp(r8, Immediate(DescriptorArray::kFirstOffset)); | 3350 __ addp(r8, Immediate(DescriptorArray::kFirstOffset)); |
3351 // Loop through all the keys in the descriptor array. If one of these is the | 3351 // Loop through all the keys in the descriptor array. If one of these is the |
3352 // internalized string "valueOf" the result is false. | 3352 // internalized string "valueOf" the result is false. |
3353 __ jmp(&entry); | 3353 __ jmp(&entry); |
3354 __ bind(&loop); | 3354 __ bind(&loop); |
3355 __ movp(rdx, FieldOperand(r8, 0)); | 3355 __ movp(rdx, FieldOperand(r8, 0)); |
3356 __ Cmp(rdx, isolate()->factory()->value_of_string()); | 3356 __ CompareRoot(rdx, Heap::kvalueOf_stringRootIndex); |
3357 __ j(equal, if_false); | 3357 __ j(equal, if_false); |
3358 __ addp(r8, Immediate(DescriptorArray::kDescriptorSize * kPointerSize)); | 3358 __ addp(r8, Immediate(DescriptorArray::kDescriptorSize * kPointerSize)); |
3359 __ bind(&entry); | 3359 __ bind(&entry); |
3360 __ cmpp(r8, rcx); | 3360 __ cmpp(r8, rcx); |
3361 __ j(not_equal, &loop); | 3361 __ j(not_equal, &loop); |
3362 | 3362 |
3363 __ bind(&done); | 3363 __ bind(&done); |
3364 | 3364 |
3365 // Set the bit in the map to indicate that there is no local valueOf field. | 3365 // Set the bit in the map to indicate that there is no local valueOf field. |
3366 __ orp(FieldOperand(rbx, Map::kBitField2Offset), | 3366 __ orp(FieldOperand(rbx, Map::kBitField2Offset), |
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5265 Assembler::target_address_at(call_target_address, | 5265 Assembler::target_address_at(call_target_address, |
5266 unoptimized_code)); | 5266 unoptimized_code)); |
5267 return OSR_AFTER_STACK_CHECK; | 5267 return OSR_AFTER_STACK_CHECK; |
5268 } | 5268 } |
5269 | 5269 |
5270 | 5270 |
5271 } // namespace internal | 5271 } // namespace internal |
5272 } // namespace v8 | 5272 } // namespace v8 |
5273 | 5273 |
5274 #endif // V8_TARGET_ARCH_X64 | 5274 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |