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 3299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3310 __ cmp(result, factory()->the_hole_value()); | 3310 __ cmp(result, factory()->the_hole_value()); |
3311 DeoptimizeIf(equal, instr, Deoptimizer::kHole); | 3311 DeoptimizeIf(equal, instr, Deoptimizer::kHole); |
3312 } | 3312 } |
3313 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3313 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
3314 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3314 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
3315 Label done; | 3315 Label done; |
3316 __ cmp(result, factory()->the_hole_value()); | 3316 __ cmp(result, factory()->the_hole_value()); |
3317 __ j(not_equal, &done); | 3317 __ j(not_equal, &done); |
3318 if (info()->IsStub()) { | 3318 if (info()->IsStub()) { |
3319 // A stub can safely convert the hole to undefined only if the array | 3319 // A stub can safely convert the hole to undefined only if the array |
3320 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3320 // protector cell contains (Smi) Isolate::kArrayElementsProtectorValid. |
| 3321 // Otherwise |
3321 // it needs to bail out. | 3322 // it needs to bail out. |
3322 __ mov(result, isolate()->factory()->array_protector()); | 3323 __ LoadRoot(result, Heap::kArrayElementsProtectorRootIndex); |
3323 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), | 3324 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), |
3324 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); | 3325 Immediate(Smi::FromInt(Isolate::kArrayElementsProtectorValid))); |
3325 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole); | 3326 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole); |
3326 } | 3327 } |
3327 __ mov(result, isolate()->factory()->undefined_value()); | 3328 __ mov(result, isolate()->factory()->undefined_value()); |
3328 __ bind(&done); | 3329 __ bind(&done); |
3329 } | 3330 } |
3330 } | 3331 } |
3331 | 3332 |
3332 | 3333 |
3333 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 3334 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { |
3334 if (instr->is_fixed_typed_array()) { | 3335 if (instr->is_fixed_typed_array()) { |
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6288 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6289 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6289 } | 6290 } |
6290 | 6291 |
6291 | 6292 |
6292 #undef __ | 6293 #undef __ |
6293 | 6294 |
6294 } // namespace internal | 6295 } // namespace internal |
6295 } // namespace v8 | 6296 } // namespace v8 |
6296 | 6297 |
6297 #endif // V8_TARGET_ARCH_X87 | 6298 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |