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

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

Issue 853713002: Make map check in NamedStoreHandlerCompiler::GenerateFieldTypeChecks weak. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips64 Created 5 years, 11 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/ic/mips/handler-compiler-mips.cc ('k') | src/ic/x64/handler-compiler-x64.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 __ LoadInstanceDescriptors(map_reg, scratch); 364 __ LoadInstanceDescriptors(map_reg, scratch);
365 __ ld(scratch, 365 __ ld(scratch,
366 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); 366 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor)));
367 __ Branch(miss_label, ne, value_reg, Operand(scratch)); 367 __ Branch(miss_label, ne, value_reg, Operand(scratch));
368 } 368 }
369 369
370 370
371 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, 371 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
372 Register value_reg, 372 Register value_reg,
373 Label* miss_label) { 373 Label* miss_label) {
374 Register map_reg = scratch1();
375 Register scratch = scratch2();
376 DCHECK(!value_reg.is(map_reg));
377 DCHECK(!value_reg.is(scratch));
374 __ JumpIfSmi(value_reg, miss_label); 378 __ JumpIfSmi(value_reg, miss_label);
375 HeapType::Iterator<Map> it = field_type->Classes(); 379 HeapType::Iterator<Map> it = field_type->Classes();
376 if (!it.Done()) { 380 if (!it.Done()) {
377 __ ld(scratch1(), FieldMemOperand(value_reg, HeapObject::kMapOffset)); 381 __ ld(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset));
378 Label do_store; 382 Label do_store;
379 Handle<Map> current;
380 while (true) { 383 while (true) {
381 // Do the CompareMap() directly within the Branch() functions. 384 // Compare map directly within the Branch() functions.
382 current = it.Current();
383 it.Advance(); 385 it.Advance();
386 __ GetWeakValue(scratch, Map::WeakCellForMap(it.Current()));
384 if (it.Done()) { 387 if (it.Done()) {
385 __ Branch(miss_label, ne, scratch1(), Operand(current)); 388 __ Branch(miss_label, ne, map_reg, Operand(scratch));
386 break; 389 break;
387 } 390 }
388 __ Branch(&do_store, eq, scratch1(), Operand(current)); 391 __ Branch(&do_store, eq, map_reg, Operand(scratch));
389 } 392 }
390 __ bind(&do_store); 393 __ bind(&do_store);
391 } 394 }
392 } 395 }
393 396
394 397
395 Register PropertyHandlerCompiler::CheckPrototypes( 398 Register PropertyHandlerCompiler::CheckPrototypes(
396 Register object_reg, Register holder_reg, Register scratch1, 399 Register object_reg, Register holder_reg, Register scratch1,
397 Register scratch2, Handle<Name> name, Label* miss, 400 Register scratch2, Handle<Name> name, Label* miss,
398 PrototypeCheckType check) { 401 PrototypeCheckType check) {
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 // Return the generated code. 728 // Return the generated code.
726 return GetCode(kind(), Code::NORMAL, name); 729 return GetCode(kind(), Code::NORMAL, name);
727 } 730 }
728 731
729 732
730 #undef __ 733 #undef __
731 } 734 }
732 } // namespace v8::internal 735 } // namespace v8::internal
733 736
734 #endif // V8_TARGET_ARCH_MIPS64 737 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips/handler-compiler-mips.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698