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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 1015983003: Disinherit PropertyCell from Cell (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | src/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
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 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after
2820 __ ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); 2820 __ ldr(map, FieldMemOperand(object, HeapObject::kMapOffset));
2821 { 2821 {
2822 // Block constant pool emission to ensure the positions of instructions are 2822 // Block constant pool emission to ensure the positions of instructions are
2823 // as expected by the patcher. See InstanceofStub::Generate(). 2823 // as expected by the patcher. See InstanceofStub::Generate().
2824 Assembler::BlockConstPoolScope block_const_pool(masm()); 2824 Assembler::BlockConstPoolScope block_const_pool(masm());
2825 __ bind(deferred->map_check()); // Label for calculating code patching. 2825 __ bind(deferred->map_check()); // Label for calculating code patching.
2826 // We use Factory::the_hole_value() on purpose instead of loading from the 2826 // We use Factory::the_hole_value() on purpose instead of loading from the
2827 // root array to force relocation to be able to later patch with 2827 // root array to force relocation to be able to later patch with
2828 // the cached map. 2828 // the cached map.
2829 Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value()); 2829 Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value());
2830 __ mov(ip, Operand(Handle<Object>(cell))); 2830 __ mov(ip, Operand(cell));
2831 __ ldr(ip, FieldMemOperand(ip, PropertyCell::kValueOffset)); 2831 __ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset));
2832 __ cmp(map, Operand(ip)); 2832 __ cmp(map, Operand(ip));
2833 __ b(ne, &cache_miss); 2833 __ b(ne, &cache_miss);
2834 __ bind(deferred->load_bool()); // Label for calculating code patching. 2834 __ bind(deferred->load_bool()); // Label for calculating code patching.
2835 // We use Factory::the_hole_value() on purpose instead of loading from the 2835 // We use Factory::the_hole_value() on purpose instead of loading from the
2836 // root array to force relocation to be able to later patch 2836 // root array to force relocation to be able to later patch
2837 // with true or false. 2837 // with true or false.
2838 __ mov(result, Operand(factory()->the_hole_value())); 2838 __ mov(result, Operand(factory()->the_hole_value()));
2839 } 2839 }
2840 __ b(&done); 2840 __ b(&done);
2841 2841
(...skipping 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after
5191 } 5191 }
5192 5192
5193 5193
5194 void LCodeGen::DoCheckValue(LCheckValue* instr) { 5194 void LCodeGen::DoCheckValue(LCheckValue* instr) {
5195 Register reg = ToRegister(instr->value()); 5195 Register reg = ToRegister(instr->value());
5196 Handle<HeapObject> object = instr->hydrogen()->object().handle(); 5196 Handle<HeapObject> object = instr->hydrogen()->object().handle();
5197 AllowDeferredHandleDereference smi_check; 5197 AllowDeferredHandleDereference smi_check;
5198 if (isolate()->heap()->InNewSpace(*object)) { 5198 if (isolate()->heap()->InNewSpace(*object)) {
5199 Register reg = ToRegister(instr->value()); 5199 Register reg = ToRegister(instr->value());
5200 Handle<Cell> cell = isolate()->factory()->NewCell(object); 5200 Handle<Cell> cell = isolate()->factory()->NewCell(object);
5201 __ mov(ip, Operand(Handle<Object>(cell))); 5201 __ mov(ip, Operand(cell));
5202 __ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset)); 5202 __ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset));
5203 __ cmp(reg, ip); 5203 __ cmp(reg, ip);
5204 } else { 5204 } else {
5205 __ cmp(reg, Operand(object)); 5205 __ cmp(reg, Operand(object));
5206 } 5206 }
5207 DeoptimizeIf(ne, instr, Deoptimizer::kValueMismatch); 5207 DeoptimizeIf(ne, instr, Deoptimizer::kValueMismatch);
5208 } 5208 }
5209 5209
5210 5210
5211 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { 5211 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
5928 __ Push(scope_info); 5928 __ Push(scope_info);
5929 __ push(ToRegister(instr->function())); 5929 __ push(ToRegister(instr->function()));
5930 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5930 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5931 RecordSafepoint(Safepoint::kNoLazyDeopt); 5931 RecordSafepoint(Safepoint::kNoLazyDeopt);
5932 } 5932 }
5933 5933
5934 5934
5935 #undef __ 5935 #undef __
5936 5936
5937 } } // namespace v8::internal 5937 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698