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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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/mips/lithium-codegen-mips.cc ('k') | src/ppc/lithium-codegen-ppc.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 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) { 3337 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3338 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3338 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
3339 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3339 Label done; 3340 Label done;
3340 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3341 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3341 __ Branch(&done, ne, result, Operand(scratch)); 3342 __ Branch(&done, ne, result, Operand(scratch));
3342 if (info()->IsStub()) { 3343 if (info()->IsStub()) {
3343 // A stub can safely convert the hole to undefined only if the array 3344 // A stub can safely convert the hole to undefined only if the array
3344 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3345 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
3345 // it needs to bail out. 3346 // it needs to bail out.
3346 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3347 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
3347 // The comparison only needs LS bits of value, which is a smi. 3348 // The comparison only needs LS bits of value, which is a smi.
3348 __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); 3349 __ ld(result, FieldMemOperand(result, Cell::kValueOffset));
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after
6061 __ li(at, scope_info); 6062 __ li(at, scope_info);
6062 __ Push(at, ToRegister(instr->function())); 6063 __ Push(at, ToRegister(instr->function()));
6063 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6064 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6064 RecordSafepoint(Safepoint::kNoLazyDeopt); 6065 RecordSafepoint(Safepoint::kNoLazyDeopt);
6065 } 6066 }
6066 6067
6067 6068
6068 #undef __ 6069 #undef __
6069 6070
6070 } } // namespace v8::internal 6071 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698