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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
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 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3342 if (instr->hydrogen()->RequiresHoleCheck()) { | 3342 if (instr->hydrogen()->RequiresHoleCheck()) { |
3343 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { | 3343 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { |
3344 __ SmiTst(result); | 3344 __ SmiTst(result); |
3345 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi); | 3345 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi); |
3346 } else { | 3346 } else { |
3347 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3347 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
3348 __ cmp(result, scratch); | 3348 __ cmp(result, scratch); |
3349 DeoptimizeIf(eq, instr, Deoptimizer::kHole); | 3349 DeoptimizeIf(eq, instr, Deoptimizer::kHole); |
3350 } | 3350 } |
3351 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3351 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
3352 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS || | 3352 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
3353 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | |
3354 Label done; | 3353 Label done; |
3355 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3354 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
3356 __ cmp(result, scratch); | 3355 __ cmp(result, scratch); |
3357 __ b(ne, &done); | 3356 __ b(ne, &done); |
3358 if (info()->IsStub()) { | 3357 if (info()->IsStub()) { |
3359 // A stub can safely convert the hole to undefined only if the array | 3358 // A stub can safely convert the hole to undefined only if the array |
3360 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3359 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise |
3361 // it needs to bail out. | 3360 // it needs to bail out. |
3362 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 3361 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
3363 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); | 3362 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); |
(...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5952 __ Push(scope_info); | 5951 __ Push(scope_info); |
5953 __ push(ToRegister(instr->function())); | 5952 __ push(ToRegister(instr->function())); |
5954 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5953 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5955 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5954 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5956 } | 5955 } |
5957 | 5956 |
5958 | 5957 |
5959 #undef __ | 5958 #undef __ |
5960 | 5959 |
5961 } } // namespace v8::internal | 5960 } } // namespace v8::internal |
OLD | NEW |