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

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

Powered by Google App Engine
This is Rietveld 408576698