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

Side by Side Diff: src/ic/arm64/handler-compiler-arm64.cc

Issue 816923004: Use weak cell in LoadGlobal handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/arm/handler-compiler-arm.cc ('k') | src/ic/ia32/handler-compiler-ia32.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 // 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 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 327 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
328 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 328 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
329 Label miss; 329 Label miss;
330 if (IC::ICUseVector(kind())) { 330 if (IC::ICUseVector(kind())) {
331 PushVectorAndSlot(); 331 PushVectorAndSlot();
332 } 332 }
333 FrontendHeader(receiver(), name, &miss); 333 FrontendHeader(receiver(), name, &miss);
334 334
335 // Get the value from the cell. 335 // Get the value from the cell.
336 Register result = StoreDescriptor::ValueRegister(); 336 Register result = StoreDescriptor::ValueRegister();
337 __ Mov(result, Operand(cell)); 337 Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell);
338 __ LoadWeakValue(result, weak_cell, &miss);
338 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); 339 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
339 340
340 // Check for deleted property if property can actually be deleted. 341 // Check for deleted property if property can actually be deleted.
341 if (is_configurable) { 342 if (is_configurable) {
342 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss); 343 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss);
343 } 344 }
344 345
345 Counters* counters = isolate()->counters(); 346 Counters* counters = isolate()->counters();
346 __ IncrementCounter(counters->named_load_global_stub(), 1, x1, x3); 347 __ IncrementCounter(counters->named_load_global_stub(), 1, x1, x3);
347 if (IC::ICUseVector(kind())) { 348 if (IC::ICUseVector(kind())) {
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 // Return the generated code. 742 // Return the generated code.
742 return GetCode(kind(), Code::FAST, name); 743 return GetCode(kind(), Code::FAST, name);
743 } 744 }
744 745
745 746
746 #undef __ 747 #undef __
747 } 748 }
748 } // namespace v8::internal 749 } // namespace v8::internal
749 750
750 #endif // V8_TARGET_ARCH_IA32 751 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698