OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2304 break; | 2304 break; |
2305 case kExternalUnsignedIntArray: | 2305 case kExternalUnsignedIntArray: |
2306 __ movl(result, Operand(external_pointer, key, times_4, 0)); | 2306 __ movl(result, Operand(external_pointer, key, times_4, 0)); |
2307 __ testl(result, result); | 2307 __ testl(result, result); |
2308 // TODO(danno): we could be more clever here, perhaps having a special | 2308 // TODO(danno): we could be more clever here, perhaps having a special |
2309 // version of the stub that detects if the overflow case actually | 2309 // version of the stub that detects if the overflow case actually |
2310 // happens, and generate code that returns a double rather than int. | 2310 // happens, and generate code that returns a double rather than int. |
2311 DeoptimizeIf(negative, instr->environment()); | 2311 DeoptimizeIf(negative, instr->environment()); |
2312 break; | 2312 break; |
2313 case kExternalFloatArray: | 2313 case kExternalFloatArray: |
| 2314 default: |
2314 UNREACHABLE(); | 2315 UNREACHABLE(); |
2315 break; | 2316 break; |
2316 } | 2317 } |
2317 } | 2318 } |
2318 } | 2319 } |
2319 | 2320 |
2320 | 2321 |
2321 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 2322 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
2322 ASSERT(ToRegister(instr->object()).is(rdx)); | 2323 ASSERT(ToRegister(instr->object()).is(rdx)); |
2323 ASSERT(ToRegister(instr->key()).is(rax)); | 2324 ASSERT(ToRegister(instr->key()).is(rax)); |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2957 break; | 2958 break; |
2958 case kExternalShortArray: | 2959 case kExternalShortArray: |
2959 case kExternalUnsignedShortArray: | 2960 case kExternalUnsignedShortArray: |
2960 __ movw(Operand(external_pointer, key, times_2, 0), value); | 2961 __ movw(Operand(external_pointer, key, times_2, 0), value); |
2961 break; | 2962 break; |
2962 case kExternalIntArray: | 2963 case kExternalIntArray: |
2963 case kExternalUnsignedIntArray: | 2964 case kExternalUnsignedIntArray: |
2964 __ movl(Operand(external_pointer, key, times_4, 0), value); | 2965 __ movl(Operand(external_pointer, key, times_4, 0), value); |
2965 break; | 2966 break; |
2966 case kExternalFloatArray: | 2967 case kExternalFloatArray: |
| 2968 default: |
2967 UNREACHABLE(); | 2969 UNREACHABLE(); |
2968 break; | 2970 break; |
2969 } | 2971 } |
2970 } | 2972 } |
2971 } | 2973 } |
2972 | 2974 |
2973 | 2975 |
2974 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { | 2976 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { |
2975 if (instr->length()->IsRegister()) { | 2977 if (instr->length()->IsRegister()) { |
2976 __ cmpq(ToRegister(instr->index()), ToRegister(instr->length())); | 2978 __ cmpq(ToRegister(instr->index()), ToRegister(instr->length())); |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3940 RegisterEnvironmentForDeoptimization(environment); | 3942 RegisterEnvironmentForDeoptimization(environment); |
3941 ASSERT(osr_pc_offset_ == -1); | 3943 ASSERT(osr_pc_offset_ == -1); |
3942 osr_pc_offset_ = masm()->pc_offset(); | 3944 osr_pc_offset_ = masm()->pc_offset(); |
3943 } | 3945 } |
3944 | 3946 |
3945 #undef __ | 3947 #undef __ |
3946 | 3948 |
3947 } } // namespace v8::internal | 3949 } } // namespace v8::internal |
3948 | 3950 |
3949 #endif // V8_TARGET_ARCH_X64 | 3951 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |