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

Side by Side Diff: src/arm/lithium-codegen-arm.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 | « no previous file | src/arm64/lithium-codegen-arm64.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 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
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_ELEMENTS); 3352 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
3353 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3353 Label done; 3354 Label done;
3354 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3355 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3355 __ cmp(result, scratch); 3356 __ cmp(result, scratch);
3356 __ b(ne, &done); 3357 __ b(ne, &done);
3357 if (info()->IsStub()) { 3358 if (info()->IsStub()) {
3358 // A stub can safely convert the hole to undefined only if the array 3359 // A stub can safely convert the hole to undefined only if the array
3359 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3360 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
3360 // it needs to bail out. 3361 // it needs to bail out.
3361 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3362 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
3362 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); 3363 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset));
(...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after
5951 __ Push(scope_info); 5952 __ Push(scope_info);
5952 __ push(ToRegister(instr->function())); 5953 __ push(ToRegister(instr->function()));
5953 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5954 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5954 RecordSafepoint(Safepoint::kNoLazyDeopt); 5955 RecordSafepoint(Safepoint::kNoLazyDeopt);
5955 } 5956 }
5956 5957
5957 5958
5958 #undef __ 5959 #undef __
5959 5960
5960 } } // namespace v8::internal 5961 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698