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

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

Issue 1100083002: Don't MISS if you read the hole from certain FastHoley arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE and fix arm64 compilation. Created 5 years, 8 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-arm.cc ('k') | src/arm64/lithium-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 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3341 // Check for the hole value. 3341 // Check for the hole value.
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) {
3352 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3353 Label done;
3354 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3355 __ cmp(result, scratch);
3356 __ b(ne, &done);
3357 if (info()->IsStub()) {
3358 // A stub can safely convert the hole to undefined only if the array
3359 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
3360 // it needs to bail out.
3361 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
3362 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset));
3363 __ cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid)));
3364 DeoptimizeIf(ne, instr, Deoptimizer::kHole);
3365 }
3366 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
3367 __ bind(&done);
3351 } 3368 }
3352 } 3369 }
3353 3370
3354 3371
3355 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { 3372 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) {
3356 if (instr->is_typed_elements()) { 3373 if (instr->is_typed_elements()) {
3357 DoLoadKeyedExternalArray(instr); 3374 DoLoadKeyedExternalArray(instr);
3358 } else if (instr->hydrogen()->representation().IsDouble()) { 3375 } else if (instr->hydrogen()->representation().IsDouble()) {
3359 DoLoadKeyedFixedDoubleArray(instr); 3376 DoLoadKeyedFixedDoubleArray(instr);
3360 } else { 3377 } else {
(...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after
5910 __ Push(scope_info); 5927 __ Push(scope_info);
5911 __ push(ToRegister(instr->function())); 5928 __ push(ToRegister(instr->function()));
5912 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5929 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5913 RecordSafepoint(Safepoint::kNoLazyDeopt); 5930 RecordSafepoint(Safepoint::kNoLazyDeopt);
5914 } 5931 }
5915 5932
5916 5933
5917 #undef __ 5934 #undef __
5918 5935
5919 } } // namespace v8::internal 5936 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698