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

Side by Side Diff: src/ic/x64/handler-compiler-x64.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/ia32/handler-compiler-ia32.cc ('k') | src/x64/macro-assembler-x64.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_X64 7 #if V8_TARGET_ARCH_X64
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 318 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
319 Handle<Name> name) { 319 Handle<Name> name) {
320 if (!label->is_unused()) { 320 if (!label->is_unused()) {
321 __ bind(label); 321 __ bind(label);
322 __ Move(this->name(), name); 322 __ Move(this->name(), name);
323 } 323 }
324 } 324 }
325 325
326 326
327 void NamedStoreHandlerCompiler::GenerateRestoreNameAndMap( 327 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) {
328 Handle<Name> name, Handle<Map> transition) {
329 __ Move(this->name(), name); 328 __ Move(this->name(), name);
330 __ Move(StoreTransitionDescriptor::MapRegister(), transition);
331 } 329 }
332 330
333 331
332 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition,
333 Register scratch,
334 Label* miss) {
335 Handle<WeakCell> cell = Map::WeakCellForMap(transition);
336 Register map_reg = StoreTransitionDescriptor::MapRegister();
337 DCHECK(!map_reg.is(scratch));
338 __ LoadWeakValue(map_reg, cell, miss);
339 if (transition->CanBeDeprecated()) {
340 __ movl(scratch, FieldOperand(map_reg, Map::kBitField3Offset));
341 __ andl(scratch, Immediate(Map::Deprecated::kMask));
342 __ j(not_zero, miss);
343 }
344 }
345
334 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, 346 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant,
335 Register value_reg, 347 Register value_reg,
336 Label* miss_label) { 348 Label* miss_label) {
337 __ Cmp(value_reg, handle(constant, isolate())); 349 __ Cmp(value_reg, handle(constant, isolate()));
338 __ j(not_equal, miss_label); 350 __ j(not_equal, miss_label);
339 } 351 }
340 352
341 353
342 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, 354 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
343 Register value_reg, 355 Register value_reg,
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 // Return the generated code. 697 // Return the generated code.
686 return GetCode(kind(), Code::NORMAL, name); 698 return GetCode(kind(), Code::NORMAL, name);
687 } 699 }
688 700
689 701
690 #undef __ 702 #undef __
691 } 703 }
692 } // namespace v8::internal 704 } // namespace v8::internal
693 705
694 #endif // V8_TARGET_ARCH_X64 706 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698