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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.cc

Issue 2512943002: [crankshaft] The array protector is a PropertyCell, not a Cell. (Closed)
Patch Set: Created 4 years, 1 month 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/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2994 matching lines...) Expand 10 before | Expand all | Expand 10 after
3005 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3005 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3006 Label done; 3006 Label done;
3007 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3007 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3008 __ CmpP(result, scratch); 3008 __ CmpP(result, scratch);
3009 __ bne(&done); 3009 __ bne(&done);
3010 if (info()->IsStub()) { 3010 if (info()->IsStub()) {
3011 // A stub can safely convert the hole to undefined only if the array 3011 // A stub can safely convert the hole to undefined only if the array
3012 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise 3012 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise
3013 // it needs to bail out. 3013 // it needs to bail out.
3014 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3014 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
3015 __ LoadP(result, FieldMemOperand(result, Cell::kValueOffset)); 3015 __ LoadP(result, FieldMemOperand(result, PropertyCell::kValueOffset));
3016 __ CmpSmiLiteral(result, Smi::FromInt(Isolate::kProtectorValid), r0); 3016 __ CmpSmiLiteral(result, Smi::FromInt(Isolate::kProtectorValid), r0);
3017 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole); 3017 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole);
3018 } 3018 }
3019 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); 3019 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
3020 __ bind(&done); 3020 __ bind(&done);
3021 } 3021 }
3022 } 3022 }
3023 3023
3024 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { 3024 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) {
3025 if (instr->is_fixed_typed_array()) { 3025 if (instr->is_fixed_typed_array()) {
(...skipping 2534 matching lines...) Expand 10 before | Expand all | Expand 10 after
5560 __ LoadP(result, 5560 __ LoadP(result,
5561 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5561 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5562 __ bind(deferred->exit()); 5562 __ bind(deferred->exit());
5563 __ bind(&done); 5563 __ bind(&done);
5564 } 5564 }
5565 5565
5566 #undef __ 5566 #undef __
5567 5567
5568 } // namespace internal 5568 } // namespace internal
5569 } // namespace v8 5569 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698