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

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

Issue 2147043002: Cleanup interface descriptors to reflect that vectors are part of stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rename-store-ic
Patch Set: Rebasing Created 4 years, 5 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/arm64/stub-cache-arm64.cc ('k') | src/ic/ia32/handler-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/field-type.h" 7 #include "src/field-type.h"
8 #include "src/ic/call-optimization.h" 8 #include "src/ic/call-optimization.h"
9 #include "src/ic/ic-inl.h" 9 #include "src/ic/ic-inl.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 // Stub is never generated for objects that require access checks. 468 // Stub is never generated for objects that require access checks.
469 DCHECK(!transition->is_access_check_needed()); 469 DCHECK(!transition->is_access_check_needed());
470 470
471 // Call to respective StoreTransitionStub. 471 // Call to respective StoreTransitionStub.
472 bool virtual_args = StoreTransitionHelper::HasVirtualSlotArg(); 472 bool virtual_args = StoreTransitionHelper::HasVirtualSlotArg();
473 Register map_reg = StoreTransitionHelper::MapRegister(); 473 Register map_reg = StoreTransitionHelper::MapRegister();
474 474
475 if (details.type() == DATA_CONSTANT) { 475 if (details.type() == DATA_CONSTANT) {
476 DCHECK(descriptors->GetValue(descriptor)->IsJSFunction()); 476 DCHECK(descriptors->GetValue(descriptor)->IsJSFunction());
477 Register tmp = 477 Register tmp =
478 virtual_args ? VectorStoreICDescriptor::VectorRegister() : map_reg; 478 virtual_args ? StoreWithVectorDescriptor::VectorRegister() : map_reg;
479 GenerateRestoreMap(transition, tmp, scratch2(), &miss); 479 GenerateRestoreMap(transition, tmp, scratch2(), &miss);
480 GenerateConstantCheck(tmp, descriptor, value(), scratch2(), &miss); 480 GenerateConstantCheck(tmp, descriptor, value(), scratch2(), &miss);
481 if (virtual_args) { 481 if (virtual_args) {
482 // This will move the map from tmp into map_reg. 482 // This will move the map from tmp into map_reg.
483 RearrangeVectorAndSlot(tmp, map_reg); 483 RearrangeVectorAndSlot(tmp, map_reg);
484 } else { 484 } else {
485 PopVectorAndSlot(); 485 PopVectorAndSlot();
486 } 486 }
487 GenerateRestoreName(name); 487 GenerateRestoreName(name);
488 StoreTransitionStub stub(isolate()); 488 StoreTransitionStub stub(isolate());
489 GenerateTailCall(masm(), stub.GetCode()); 489 GenerateTailCall(masm(), stub.GetCode());
490 490
491 } else { 491 } else {
492 if (representation.IsHeapObject()) { 492 if (representation.IsHeapObject()) {
493 GenerateFieldTypeChecks(descriptors->GetFieldType(descriptor), value(), 493 GenerateFieldTypeChecks(descriptors->GetFieldType(descriptor), value(),
494 &miss); 494 &miss);
495 } 495 }
496 StoreTransitionStub::StoreMode store_mode = 496 StoreTransitionStub::StoreMode store_mode =
497 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0 497 Map::cast(transition->GetBackPointer())->unused_property_fields() == 0
498 ? StoreTransitionStub::ExtendStorageAndStoreMapAndValue 498 ? StoreTransitionStub::ExtendStorageAndStoreMapAndValue
499 : StoreTransitionStub::StoreMapAndValue; 499 : StoreTransitionStub::StoreMapAndValue;
500 500
501 Register tmp = 501 Register tmp =
502 virtual_args ? VectorStoreICDescriptor::VectorRegister() : map_reg; 502 virtual_args ? StoreWithVectorDescriptor::VectorRegister() : map_reg;
503 GenerateRestoreMap(transition, tmp, scratch2(), &miss); 503 GenerateRestoreMap(transition, tmp, scratch2(), &miss);
504 if (virtual_args) { 504 if (virtual_args) {
505 RearrangeVectorAndSlot(tmp, map_reg); 505 RearrangeVectorAndSlot(tmp, map_reg);
506 } else { 506 } else {
507 PopVectorAndSlot(); 507 PopVectorAndSlot();
508 } 508 }
509 GenerateRestoreName(name); 509 GenerateRestoreName(name);
510 StoreTransitionStub stub(isolate(), 510 StoreTransitionStub stub(isolate(),
511 FieldIndex::ForDescriptor(*transition, descriptor), 511 FieldIndex::ForDescriptor(*transition, descriptor),
512 representation, store_mode); 512 representation, store_mode);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 DCHECK(elements_kind == DICTIONARY_ELEMENTS); 611 DCHECK(elements_kind == DICTIONARY_ELEMENTS);
612 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); 612 cached_stub = LoadDictionaryElementStub(isolate()).GetCode();
613 } 613 }
614 } 614 }
615 615
616 handlers->Add(cached_stub); 616 handlers->Add(cached_stub);
617 } 617 }
618 } 618 }
619 } // namespace internal 619 } // namespace internal
620 } // namespace v8 620 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/arm64/stub-cache-arm64.cc ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698