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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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 | « src/arm/lithium-codegen-arm.cc ('k') | src/ast.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.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 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 2650
2651 2651
2652 void LCodeGen::DoCheckValue(LCheckValue* instr) { 2652 void LCodeGen::DoCheckValue(LCheckValue* instr) {
2653 Register reg = ToRegister(instr->value()); 2653 Register reg = ToRegister(instr->value());
2654 Handle<HeapObject> object = instr->hydrogen()->object().handle(); 2654 Handle<HeapObject> object = instr->hydrogen()->object().handle();
2655 AllowDeferredHandleDereference smi_check; 2655 AllowDeferredHandleDereference smi_check;
2656 if (isolate()->heap()->InNewSpace(*object)) { 2656 if (isolate()->heap()->InNewSpace(*object)) {
2657 UseScratchRegisterScope temps(masm()); 2657 UseScratchRegisterScope temps(masm());
2658 Register temp = temps.AcquireX(); 2658 Register temp = temps.AcquireX();
2659 Handle<Cell> cell = isolate()->factory()->NewCell(object); 2659 Handle<Cell> cell = isolate()->factory()->NewCell(object);
2660 __ Mov(temp, Operand(Handle<Object>(cell))); 2660 __ Mov(temp, Operand(cell));
2661 __ Ldr(temp, FieldMemOperand(temp, Cell::kValueOffset)); 2661 __ Ldr(temp, FieldMemOperand(temp, Cell::kValueOffset));
2662 __ Cmp(reg, temp); 2662 __ Cmp(reg, temp);
2663 } else { 2663 } else {
2664 __ Cmp(reg, Operand(object)); 2664 __ Cmp(reg, Operand(object));
2665 } 2665 }
2666 DeoptimizeIf(ne, instr, Deoptimizer::kValueMismatch); 2666 DeoptimizeIf(ne, instr, Deoptimizer::kValueMismatch);
2667 } 2667 }
2668 2668
2669 2669
2670 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { 2670 void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3125 // instanceof stub. 3125 // instanceof stub.
3126 __ Ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); 3126 __ Ldr(map, FieldMemOperand(object, HeapObject::kMapOffset));
3127 { 3127 {
3128 // Below we use Factory::the_hole_value() on purpose instead of loading from 3128 // Below we use Factory::the_hole_value() on purpose instead of loading from
3129 // the root array to force relocation and later be able to patch with a 3129 // the root array to force relocation and later be able to patch with a
3130 // custom value. 3130 // custom value.
3131 InstructionAccurateScope scope(masm(), 5); 3131 InstructionAccurateScope scope(masm(), 5);
3132 __ bind(&map_check); 3132 __ bind(&map_check);
3133 // Will be patched with the cached map. 3133 // Will be patched with the cached map.
3134 Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value()); 3134 Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value());
3135 __ ldr(scratch, Immediate(Handle<Object>(cell))); 3135 __ ldr(scratch, Immediate(cell));
3136 __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); 3136 __ ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
3137 __ cmp(map, scratch); 3137 __ cmp(map, scratch);
3138 __ b(&cache_miss, ne); 3138 __ b(&cache_miss, ne);
3139 // The address of this instruction is computed relative to the map check 3139 // The address of this instruction is computed relative to the map check
3140 // above, so check the size of the code generated. 3140 // above, so check the size of the code generated.
3141 DCHECK(masm()->InstructionsGeneratedSince(&map_check) == 4); 3141 DCHECK(masm()->InstructionsGeneratedSince(&map_check) == 4);
3142 // Will be patched with the cached result. 3142 // Will be patched with the cached result.
3143 __ ldr(result, Immediate(factory()->the_hole_value())); 3143 __ ldr(result, Immediate(factory()->the_hole_value()));
3144 } 3144 }
3145 __ B(&done); 3145 __ B(&done);
3146 3146
(...skipping 2915 matching lines...) Expand 10 before | Expand all | Expand 10 after
6062 Handle<ScopeInfo> scope_info = instr->scope_info(); 6062 Handle<ScopeInfo> scope_info = instr->scope_info();
6063 __ Push(scope_info); 6063 __ Push(scope_info);
6064 __ Push(ToRegister(instr->function())); 6064 __ Push(ToRegister(instr->function()));
6065 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6065 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6066 RecordSafepoint(Safepoint::kNoLazyDeopt); 6066 RecordSafepoint(Safepoint::kNoLazyDeopt);
6067 } 6067 }
6068 6068
6069 6069
6070 6070
6071 } } // namespace v8::internal 6071 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698