Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(925)

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 1134483002: Allow loading holes from holey smi arrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update the DCHECK Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.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 3611 matching lines...) Expand 10 before | Expand all | Expand 10 after
3622 __ Load(result, mem_op, representation); 3622 __ Load(result, mem_op, representation);
3623 3623
3624 if (instr->hydrogen()->RequiresHoleCheck()) { 3624 if (instr->hydrogen()->RequiresHoleCheck()) {
3625 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { 3625 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
3626 DeoptimizeIfNotSmi(result, instr, Deoptimizer::kNotASmi); 3626 DeoptimizeIfNotSmi(result, instr, Deoptimizer::kNotASmi);
3627 } else { 3627 } else {
3628 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr, 3628 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr,
3629 Deoptimizer::kHole); 3629 Deoptimizer::kHole);
3630 } 3630 }
3631 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 3631 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3632 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3632 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
3633 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3633 Label done; 3634 Label done;
3634 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 3635 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
3635 __ B(ne, &done); 3636 __ B(ne, &done);
3636 if (info()->IsStub()) { 3637 if (info()->IsStub()) {
3637 // A stub can safely convert the hole to undefined only if the array 3638 // A stub can safely convert the hole to undefined only if the array
3638 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3639 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
3639 // it needs to bail out. 3640 // it needs to bail out.
3640 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3641 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
3641 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); 3642 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
3642 __ Cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); 3643 __ Cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid)));
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after
6049 Handle<ScopeInfo> scope_info = instr->scope_info(); 6050 Handle<ScopeInfo> scope_info = instr->scope_info();
6050 __ Push(scope_info); 6051 __ Push(scope_info);
6051 __ Push(ToRegister(instr->function())); 6052 __ Push(ToRegister(instr->function()));
6052 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6053 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6053 RecordSafepoint(Safepoint::kNoLazyDeopt); 6054 RecordSafepoint(Safepoint::kNoLazyDeopt);
6054 } 6055 }
6055 6056
6056 6057
6057 6058
6058 } } // namespace v8::internal 6059 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698