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

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

Issue 1424153003: VectorICs: Remove --vector-stores flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Response to Hannes comment. Created 5 years, 1 month 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/arm64/ic-compiler-arm64.cc ('k') | src/ic/ia32/access-compiler-ia32.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/ic/handler-compiler.h" 5 #include "src/ic/handler-compiler.h"
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-inl.h" 9 #include "src/ic/ic-inl.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 expected_arguments, scratch2()); 420 expected_arguments, scratch2());
421 return GetCode(kind(), Code::FAST, name); 421 return GetCode(kind(), Code::FAST, name);
422 } 422 }
423 423
424 424
425 // TODO(verwaest): Cleanup. holder() is actually the receiver. 425 // TODO(verwaest): Cleanup. holder() is actually the receiver.
426 Handle<Code> NamedStoreHandlerCompiler::CompileStoreTransition( 426 Handle<Code> NamedStoreHandlerCompiler::CompileStoreTransition(
427 Handle<Map> transition, Handle<Name> name) { 427 Handle<Map> transition, Handle<Name> name) {
428 Label miss; 428 Label miss;
429 429
430 if (FLAG_vector_stores) PushVectorAndSlot(); 430 PushVectorAndSlot();
431 431
432 // Check that we are allowed to write this. 432 // Check that we are allowed to write this.
433 bool is_nonexistent = holder()->map() == transition->GetBackPointer(); 433 bool is_nonexistent = holder()->map() == transition->GetBackPointer();
434 if (is_nonexistent) { 434 if (is_nonexistent) {
435 // Find the top object. 435 // Find the top object.
436 Handle<JSObject> last; 436 Handle<JSObject> last;
437 PrototypeIterator::WhereToEnd end = 437 PrototypeIterator::WhereToEnd end =
438 name->IsPrivate() ? PrototypeIterator::END_AT_NON_HIDDEN 438 name->IsPrivate() ? PrototypeIterator::END_AT_NON_HIDDEN
439 : PrototypeIterator::END_AT_NULL; 439 : PrototypeIterator::END_AT_NULL;
440 PrototypeIterator iter(isolate(), holder()); 440 PrototypeIterator iter(isolate(), holder());
(...skipping 23 matching lines...) Expand all
464 464
465 if (details.type() == DATA_CONSTANT) { 465 if (details.type() == DATA_CONSTANT) {
466 DCHECK(descriptors->GetValue(descriptor)->IsJSFunction()); 466 DCHECK(descriptors->GetValue(descriptor)->IsJSFunction());
467 Register tmp = 467 Register tmp =
468 virtual_args ? VectorStoreICDescriptor::VectorRegister() : map_reg; 468 virtual_args ? VectorStoreICDescriptor::VectorRegister() : map_reg;
469 GenerateRestoreMap(transition, tmp, scratch2(), &miss); 469 GenerateRestoreMap(transition, tmp, scratch2(), &miss);
470 GenerateConstantCheck(tmp, descriptor, value(), scratch2(), &miss); 470 GenerateConstantCheck(tmp, descriptor, value(), scratch2(), &miss);
471 if (virtual_args) { 471 if (virtual_args) {
472 // This will move the map from tmp into map_reg. 472 // This will move the map from tmp into map_reg.
473 RearrangeVectorAndSlot(tmp, map_reg); 473 RearrangeVectorAndSlot(tmp, map_reg);
474 } else if (FLAG_vector_stores) { 474 } else {
475 PopVectorAndSlot(); 475 PopVectorAndSlot();
476 } 476 }
477 GenerateRestoreName(name); 477 GenerateRestoreName(name);
478 StoreTransitionStub stub(isolate()); 478 StoreTransitionStub stub(isolate());
479 GenerateTailCall(masm(), stub.GetCode()); 479 GenerateTailCall(masm(), stub.GetCode());
480 480
481 } else { 481 } else {
482 if (representation.IsHeapObject()) { 482 if (representation.IsHeapObject()) {
483 GenerateFieldTypeChecks(descriptors->GetFieldType(descriptor), value(), 483 GenerateFieldTypeChecks(descriptors->GetFieldType(descriptor), value(),
484 &miss); 484 &miss);
485 } 485 }
486 StoreTransitionStub::StoreMode store_mode = 486 StoreTransitionStub::StoreMode store_mode =
487 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0 487 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0
488 ? StoreTransitionStub::ExtendStorageAndStoreMapAndValue 488 ? StoreTransitionStub::ExtendStorageAndStoreMapAndValue
489 : StoreTransitionStub::StoreMapAndValue; 489 : StoreTransitionStub::StoreMapAndValue;
490 490
491 Register tmp = 491 Register tmp =
492 virtual_args ? VectorStoreICDescriptor::VectorRegister() : map_reg; 492 virtual_args ? VectorStoreICDescriptor::VectorRegister() : map_reg;
493 GenerateRestoreMap(transition, tmp, scratch2(), &miss); 493 GenerateRestoreMap(transition, tmp, scratch2(), &miss);
494 if (virtual_args) { 494 if (virtual_args) {
495 RearrangeVectorAndSlot(tmp, map_reg); 495 RearrangeVectorAndSlot(tmp, map_reg);
496 } else if (FLAG_vector_stores) { 496 } else {
497 PopVectorAndSlot(); 497 PopVectorAndSlot();
498 } 498 }
499 GenerateRestoreName(name); 499 GenerateRestoreName(name);
500 StoreTransitionStub stub(isolate(), 500 StoreTransitionStub stub(isolate(),
501 FieldIndex::ForDescriptor(*transition, descriptor), 501 FieldIndex::ForDescriptor(*transition, descriptor),
502 representation, store_mode); 502 representation, store_mode);
503 GenerateTailCall(masm(), stub.GetCode()); 503 GenerateTailCall(masm(), stub.GetCode());
504 } 504 }
505 505
506 GenerateRestoreName(&miss, name); 506 GenerateRestoreName(&miss, name);
507 if (FLAG_vector_stores) PopVectorAndSlot(); 507 PopVectorAndSlot();
508 TailCallBuiltin(masm(), MissBuiltin(kind())); 508 TailCallBuiltin(masm(), MissBuiltin(kind()));
509 509
510 return GetCode(kind(), Code::FAST, name); 510 return GetCode(kind(), Code::FAST, name);
511 } 511 }
512 512
513 513
514 bool NamedStoreHandlerCompiler::RequiresFieldTypeChecks( 514 bool NamedStoreHandlerCompiler::RequiresFieldTypeChecks(
515 HeapType* field_type) const { 515 HeapType* field_type) const {
516 return !field_type->Classes().Done(); 516 return !field_type->Classes().Done();
517 } 517 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 : kNoExtraICState); 605 : kNoExtraICState);
606 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); 606 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode();
607 } 607 }
608 } 608 }
609 609
610 handlers->Add(cached_stub); 610 handlers->Add(cached_stub);
611 } 611 }
612 } 612 }
613 } // namespace internal 613 } // namespace internal
614 } // namespace v8 614 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/arm64/ic-compiler-arm64.cc ('k') | src/ic/ia32/access-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698