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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/hydrogen.cc ('k') | src/mips/lithium-codegen-mips.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 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
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 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after
3179 // Check for the hole value. 3179 // Check for the hole value.
3180 if (instr->hydrogen()->RequiresHoleCheck()) { 3180 if (instr->hydrogen()->RequiresHoleCheck()) {
3181 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { 3181 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
3182 __ test(result, Immediate(kSmiTagMask)); 3182 __ test(result, Immediate(kSmiTagMask));
3183 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotASmi); 3183 DeoptimizeIf(not_equal, instr, Deoptimizer::kNotASmi);
3184 } else { 3184 } else {
3185 __ cmp(result, factory()->the_hole_value()); 3185 __ cmp(result, factory()->the_hole_value());
3186 DeoptimizeIf(equal, instr, Deoptimizer::kHole); 3186 DeoptimizeIf(equal, instr, Deoptimizer::kHole);
3187 } 3187 }
3188 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 3188 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3189 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3189 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
3190 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3190 Label done; 3191 Label done;
3191 __ cmp(result, factory()->the_hole_value()); 3192 __ cmp(result, factory()->the_hole_value());
3192 __ j(not_equal, &done); 3193 __ j(not_equal, &done);
3193 if (info()->IsStub()) { 3194 if (info()->IsStub()) {
3194 // A stub can safely convert the hole to undefined only if the array 3195 // A stub can safely convert the hole to undefined only if the array
3195 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3196 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
3196 // it needs to bail out. 3197 // it needs to bail out.
3197 __ mov(result, isolate()->factory()->array_protector()); 3198 __ mov(result, isolate()->factory()->array_protector());
3198 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), 3199 __ cmp(FieldOperand(result, PropertyCell::kValueOffset),
3199 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); 3200 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid)));
(...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after
5774 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5775 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5775 RecordSafepoint(Safepoint::kNoLazyDeopt); 5776 RecordSafepoint(Safepoint::kNoLazyDeopt);
5776 } 5777 }
5777 5778
5778 5779
5779 #undef __ 5780 #undef __
5780 5781
5781 } } // namespace v8::internal 5782 } } // namespace v8::internal
5782 5783
5783 #endif // V8_TARGET_ARCH_IA32 5784 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698