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

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

Issue 779843002: X87: Use weak cells to embed maps in store 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 | « no previous file | src/x87/macro-assembler-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 7 #if V8_TARGET_ARCH_X87
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 323 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
324 Handle<Name> name) { 324 Handle<Name> name) {
325 if (!label->is_unused()) { 325 if (!label->is_unused()) {
326 __ bind(label); 326 __ bind(label);
327 __ mov(this->name(), Immediate(name)); 327 __ mov(this->name(), Immediate(name));
328 } 328 }
329 } 329 }
330 330
331 331
332 void NamedStoreHandlerCompiler::GenerateRestoreNameAndMap( 332 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) {
333 Handle<Name> name, Handle<Map> transition) {
334 __ mov(this->name(), Immediate(name)); 333 __ mov(this->name(), Immediate(name));
335 __ mov(StoreTransitionDescriptor::MapRegister(), Immediate(transition));
336 } 334 }
337 335
338 336
337 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition,
338 Register scratch,
339 Label* miss) {
340 Handle<WeakCell> cell = Map::WeakCellForMap(transition);
341 Register map_reg = StoreTransitionDescriptor::MapRegister();
342 DCHECK(!map_reg.is(scratch));
343 __ LoadWeakValue(map_reg, cell, miss);
344 if (transition->CanBeDeprecated()) {
345 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset));
346 __ and_(scratch, Immediate(Map::Deprecated::kMask));
347 __ j(not_zero, miss);
348 }
349 }
350
351
339 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, 352 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant,
340 Register value_reg, 353 Register value_reg,
341 Label* miss_label) { 354 Label* miss_label) {
342 __ CmpObject(value_reg, handle(constant, isolate())); 355 __ CmpObject(value_reg, handle(constant, isolate()));
343 __ j(not_equal, miss_label); 356 __ j(not_equal, miss_label);
344 } 357 }
345 358
346 359
347 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, 360 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
348 Register value_reg, 361 Register value_reg,
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 // Return the generated code. 718 // Return the generated code.
706 return GetCode(kind(), Code::NORMAL, name); 719 return GetCode(kind(), Code::NORMAL, name);
707 } 720 }
708 721
709 722
710 #undef __ 723 #undef __
711 } 724 }
712 } // namespace v8::internal 725 } // namespace v8::internal
713 726
714 #endif // V8_TARGET_ARCH_X87 727 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698