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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2781 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 2792 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
2793 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 2793 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
2794 Label done; 2794 Label done;
2795 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 2795 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
2796 __ Branch(&done, ne, result, Operand(scratch)); 2796 __ Branch(&done, ne, result, Operand(scratch));
2797 if (info()->IsStub()) { 2797 if (info()->IsStub()) {
2798 // A stub can safely convert the hole to undefined only if the array 2798 // A stub can safely convert the hole to undefined only if the array
2799 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise 2799 // protector cell contains (Smi) Isolate::kProtectorValid. Otherwise
2800 // it needs to bail out. 2800 // it needs to bail out.
2801 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 2801 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
2802 __ lw(result, FieldMemOperand(result, Cell::kValueOffset)); 2802 __ lw(result, FieldMemOperand(result, PropertyCell::kValueOffset));
2803 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole, result, 2803 DeoptimizeIf(ne, instr, DeoptimizeReason::kHole, result,
2804 Operand(Smi::FromInt(Isolate::kProtectorValid))); 2804 Operand(Smi::FromInt(Isolate::kProtectorValid)));
2805 } 2805 }
2806 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); 2806 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
2807 __ bind(&done); 2807 __ bind(&done);
2808 } 2808 }
2809 } 2809 }
2810 2810
2811 2811
2812 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { 2812 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) {
(...skipping 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after
5414 __ lw(result, FieldMemOperand(scratch, 5414 __ lw(result, FieldMemOperand(scratch,
5415 FixedArray::kHeaderSize - kPointerSize)); 5415 FixedArray::kHeaderSize - kPointerSize));
5416 __ bind(deferred->exit()); 5416 __ bind(deferred->exit());
5417 __ bind(&done); 5417 __ bind(&done);
5418 } 5418 }
5419 5419
5420 #undef __ 5420 #undef __
5421 5421
5422 } // namespace internal 5422 } // namespace internal
5423 } // namespace v8 5423 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698