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

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

Issue 774473004: Use weak cells to embed maps in store handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 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/handler-compiler.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 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 364 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
365 Handle<Name> name) { 365 Handle<Name> name) {
366 if (!label->is_unused()) { 366 if (!label->is_unused()) {
367 __ Bind(label); 367 __ Bind(label);
368 __ Mov(this->name(), Operand(name)); 368 __ Mov(this->name(), Operand(name));
369 } 369 }
370 } 370 }
371 371
372 372
373 void NamedStoreHandlerCompiler::GenerateRestoreNameAndMap( 373 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) {
374 Handle<Name> name, Handle<Map> transition) {
375 __ Mov(this->name(), Operand(name)); 374 __ Mov(this->name(), Operand(name));
376 __ Mov(StoreTransitionDescriptor::MapRegister(), Operand(transition));
377 } 375 }
378 376
379 377
378 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition,
379 Register scratch,
380 Label* miss) {
381 Handle<WeakCell> cell = Map::WeakCellForMap(transition);
382 Register map_reg = StoreTransitionDescriptor::MapRegister();
383 DCHECK(!map_reg.is(scratch));
384 __ LoadWeakValue(map_reg, cell, miss);
385 if (transition->CanBeDeprecated()) {
386 __ Ldrsw(scratch, FieldMemOperand(map_reg, Map::kBitField3Offset));
387 __ TestAndBranchIfAnySet(scratch, Map::Deprecated::kMask, miss);
388 }
389 }
390
391
380 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, 392 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant,
381 Register value_reg, 393 Register value_reg,
382 Label* miss_label) { 394 Label* miss_label) {
383 __ LoadObject(scratch1(), handle(constant, isolate())); 395 __ LoadObject(scratch1(), handle(constant, isolate()));
384 __ Cmp(value_reg, scratch1()); 396 __ Cmp(value_reg, scratch1());
385 __ B(ne, miss_label); 397 __ B(ne, miss_label);
386 } 398 }
387 399
388 400
389 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, 401 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 // Return the generated code. 705 // Return the generated code.
694 return GetCode(kind(), Code::FAST, name); 706 return GetCode(kind(), Code::FAST, name);
695 } 707 }
696 708
697 709
698 #undef __ 710 #undef __
699 } 711 }
700 } // namespace v8::internal 712 } // namespace v8::internal
701 713
702 #endif // V8_TARGET_ARCH_IA32 714 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/handler-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698