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

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

Issue 1019843003: PPC: 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 | « src/ic/ppc/handler-compiler-ppc.cc ('k') | no next file » | 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 // 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 2875 matching lines...) Expand 10 before | Expand all | Expand 10 after
2886 __ LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset)); 2886 __ LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset));
2887 { 2887 {
2888 // Block constant pool emission to ensure the positions of instructions are 2888 // Block constant pool emission to ensure the positions of instructions are
2889 // as expected by the patcher. See InstanceofStub::Generate(). 2889 // as expected by the patcher. See InstanceofStub::Generate().
2890 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 2890 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
2891 __ bind(deferred->map_check()); // Label for calculating code patching. 2891 __ bind(deferred->map_check()); // Label for calculating code patching.
2892 // We use Factory::the_hole_value() on purpose instead of loading from the 2892 // We use Factory::the_hole_value() on purpose instead of loading from the
2893 // root array to force relocation to be able to later patch with 2893 // root array to force relocation to be able to later patch with
2894 // the cached map. 2894 // the cached map.
2895 Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value()); 2895 Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value());
2896 __ mov(ip, Operand(Handle<Object>(cell))); 2896 __ mov(ip, Operand(cell));
2897 __ LoadP(ip, FieldMemOperand(ip, PropertyCell::kValueOffset)); 2897 __ LoadP(ip, FieldMemOperand(ip, Cell::kValueOffset));
2898 __ cmp(map, ip); 2898 __ cmp(map, ip);
2899 __ bne(&cache_miss); 2899 __ bne(&cache_miss);
2900 // We use Factory::the_hole_value() on purpose instead of loading from the 2900 // We use Factory::the_hole_value() on purpose instead of loading from the
2901 // root array to force relocation to be able to later patch 2901 // root array to force relocation to be able to later patch
2902 // with true or false. 2902 // with true or false.
2903 __ mov(result, Operand(factory()->the_hole_value())); 2903 __ mov(result, Operand(factory()->the_hole_value()));
2904 } 2904 }
2905 __ b(&done); 2905 __ b(&done);
2906 2906
2907 // The inlined call site cache did not match. Check null and string before 2907 // The inlined call site cache did not match. Check null and string before
(...skipping 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after
5499 } 5499 }
5500 5500
5501 5501
5502 void LCodeGen::DoCheckValue(LCheckValue* instr) { 5502 void LCodeGen::DoCheckValue(LCheckValue* instr) {
5503 Register reg = ToRegister(instr->value()); 5503 Register reg = ToRegister(instr->value());
5504 Handle<HeapObject> object = instr->hydrogen()->object().handle(); 5504 Handle<HeapObject> object = instr->hydrogen()->object().handle();
5505 AllowDeferredHandleDereference smi_check; 5505 AllowDeferredHandleDereference smi_check;
5506 if (isolate()->heap()->InNewSpace(*object)) { 5506 if (isolate()->heap()->InNewSpace(*object)) {
5507 Register reg = ToRegister(instr->value()); 5507 Register reg = ToRegister(instr->value());
5508 Handle<Cell> cell = isolate()->factory()->NewCell(object); 5508 Handle<Cell> cell = isolate()->factory()->NewCell(object);
5509 __ mov(ip, Operand(Handle<Object>(cell))); 5509 __ mov(ip, Operand(cell));
5510 __ LoadP(ip, FieldMemOperand(ip, Cell::kValueOffset)); 5510 __ LoadP(ip, FieldMemOperand(ip, Cell::kValueOffset));
5511 __ cmp(reg, ip); 5511 __ cmp(reg, ip);
5512 } else { 5512 } else {
5513 __ Cmpi(reg, Operand(object), r0); 5513 __ Cmpi(reg, Operand(object), r0);
5514 } 5514 }
5515 DeoptimizeIf(ne, instr, Deoptimizer::kValueMismatch); 5515 DeoptimizeIf(ne, instr, Deoptimizer::kValueMismatch);
5516 } 5516 }
5517 5517
5518 5518
5519 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { 5519 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
6230 __ Push(scope_info); 6230 __ Push(scope_info);
6231 __ push(ToRegister(instr->function())); 6231 __ push(ToRegister(instr->function()));
6232 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6232 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6233 RecordSafepoint(Safepoint::kNoLazyDeopt); 6233 RecordSafepoint(Safepoint::kNoLazyDeopt);
6234 } 6234 }
6235 6235
6236 6236
6237 #undef __ 6237 #undef __
6238 } 6238 }
6239 } // namespace v8::internal 6239 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ppc/handler-compiler-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698