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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3989 switch (target_state) { | 3989 switch (target_state) { |
3990 case INTERRUPT: | 3990 case INTERRUPT: |
3991 // sub <profiling_counter>, <delta> ;; Not changed | 3991 // sub <profiling_counter>, <delta> ;; Not changed |
3992 // jns ok | 3992 // jns ok |
3993 // call <interrupt stub> | 3993 // call <interrupt stub> |
3994 // ok: | 3994 // ok: |
3995 *jns_instr_address = kJnsInstruction; | 3995 *jns_instr_address = kJnsInstruction; |
3996 *jns_offset_address = kJnsOffset; | 3996 *jns_offset_address = kJnsOffset; |
3997 break; | 3997 break; |
3998 case ON_STACK_REPLACEMENT: | 3998 case ON_STACK_REPLACEMENT: |
3999 case OSR_AFTER_STACK_CHECK: | |
4000 // sub <profiling_counter>, <delta> ;; Not changed | 3999 // sub <profiling_counter>, <delta> ;; Not changed |
4001 // nop | 4000 // nop |
4002 // nop | 4001 // nop |
4003 // call <on-stack replacment> | 4002 // call <on-stack replacment> |
4004 // ok: | 4003 // ok: |
4005 *jns_instr_address = kNopByteOne; | 4004 *jns_instr_address = kNopByteOne; |
4006 *jns_offset_address = kNopByteTwo; | 4005 *jns_offset_address = kNopByteTwo; |
4007 break; | 4006 break; |
4008 } | 4007 } |
4009 | 4008 |
(...skipping 17 matching lines...) Expand all Loading... |
4027 DCHECK_EQ(kJnsOffset, *(call_target_address - 2)); | 4026 DCHECK_EQ(kJnsOffset, *(call_target_address - 2)); |
4028 DCHECK_EQ(isolate->builtins()->InterruptCheck()->entry(), | 4027 DCHECK_EQ(isolate->builtins()->InterruptCheck()->entry(), |
4029 Assembler::target_address_at(call_target_address, | 4028 Assembler::target_address_at(call_target_address, |
4030 unoptimized_code)); | 4029 unoptimized_code)); |
4031 return INTERRUPT; | 4030 return INTERRUPT; |
4032 } | 4031 } |
4033 | 4032 |
4034 DCHECK_EQ(kNopByteOne, *jns_instr_address); | 4033 DCHECK_EQ(kNopByteOne, *jns_instr_address); |
4035 DCHECK_EQ(kNopByteTwo, *(call_target_address - 2)); | 4034 DCHECK_EQ(kNopByteTwo, *(call_target_address - 2)); |
4036 | 4035 |
4037 if (Assembler::target_address_at(call_target_address, | 4036 DCHECK_EQ( |
4038 unoptimized_code) == | 4037 isolate->builtins()->OnStackReplacement()->entry(), |
4039 isolate->builtins()->OnStackReplacement()->entry()) { | 4038 Assembler::target_address_at(call_target_address, unoptimized_code)); |
4040 return ON_STACK_REPLACEMENT; | 4039 return ON_STACK_REPLACEMENT; |
4041 } | |
4042 | |
4043 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | |
4044 Assembler::target_address_at(call_target_address, | |
4045 unoptimized_code)); | |
4046 return OSR_AFTER_STACK_CHECK; | |
4047 } | 4040 } |
4048 | 4041 |
4049 } // namespace internal | 4042 } // namespace internal |
4050 } // namespace v8 | 4043 } // namespace v8 |
4051 | 4044 |
4052 #endif // V8_TARGET_ARCH_X64 | 4045 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |