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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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, 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/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after
3327 // Check for the hole value. 3327 // Check for the hole value.
3328 if (hinstr->RequiresHoleCheck()) { 3328 if (hinstr->RequiresHoleCheck()) {
3329 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { 3329 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
3330 __ SmiTst(result, scratch); 3330 __ SmiTst(result, scratch);
3331 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi, scratch, 3331 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi, scratch,
3332 Operand(zero_reg)); 3332 Operand(zero_reg));
3333 } else { 3333 } else {
3334 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3334 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3335 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch)); 3335 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch));
3336 } 3336 }
3337 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3338 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3339 Label done;
3340 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3341 __ Branch(&done, ne, result, Operand(scratch));
3342 if (info()->IsStub()) {
3343 // A stub can safely convert the hole to undefined only if the array
3344 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
3345 // it needs to bail out.
3346 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
3347 // The comparison only needs LS bits of value, which is a smi.
3348 __ ld(result, FieldMemOperand(result, Cell::kValueOffset));
3349 DeoptimizeIf(ne, instr, Deoptimizer::kHole, result,
3350 Operand(Smi::FromInt(Isolate::kArrayProtectorValid)));
3351 }
3352 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
3353 __ bind(&done);
3337 } 3354 }
3338 } 3355 }
3339 3356
3340 3357
3341 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { 3358 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) {
3342 if (instr->is_typed_elements()) { 3359 if (instr->is_typed_elements()) {
3343 DoLoadKeyedExternalArray(instr); 3360 DoLoadKeyedExternalArray(instr);
3344 } else if (instr->hydrogen()->representation().IsDouble()) { 3361 } else if (instr->hydrogen()->representation().IsDouble()) {
3345 DoLoadKeyedFixedDoubleArray(instr); 3362 DoLoadKeyedFixedDoubleArray(instr);
3346 } else { 3363 } else {
(...skipping 2678 matching lines...) Expand 10 before | Expand all | Expand 10 after
6025 __ li(at, scope_info); 6042 __ li(at, scope_info);
6026 __ Push(at, ToRegister(instr->function())); 6043 __ Push(at, ToRegister(instr->function()));
6027 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6044 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6028 RecordSafepoint(Safepoint::kNoLazyDeopt); 6045 RecordSafepoint(Safepoint::kNoLazyDeopt);
6029 } 6046 }
6030 6047
6031 6048
6032 #undef __ 6049 #undef __
6033 6050
6034 } } // namespace v8::internal 6051 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698