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

Side by Side Diff: src/code-stubs.cc

Issue 2182103002: [KeyedLoadIC] Support Smi "handlers" for simple field loads (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 4 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/code-stubs.h ('k') | src/compiler/code-assembler.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/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 462
463 Node* slot = assembler->Parameter(Descriptor::kSlot); 463 Node* slot = assembler->Parameter(Descriptor::kSlot);
464 Node* vector = assembler->Parameter(Descriptor::kVector); 464 Node* vector = assembler->Parameter(Descriptor::kVector);
465 Node* context = assembler->Parameter(Descriptor::kContext); 465 Node* context = assembler->Parameter(Descriptor::kContext);
466 466
467 CodeStubAssembler::LoadICParameters p(context, nullptr, nullptr, slot, 467 CodeStubAssembler::LoadICParameters p(context, nullptr, nullptr, slot,
468 vector); 468 vector);
469 assembler->LoadGlobalIC(&p); 469 assembler->LoadGlobalIC(&p);
470 } 470 }
471 471
472 void KeyedLoadICTrampolineTFStub::GenerateAssembly(
473 CodeStubAssembler* assembler) const {
474 typedef compiler::Node Node;
475
476 Node* receiver = assembler->Parameter(Descriptor::kReceiver);
477 Node* name = assembler->Parameter(Descriptor::kName);
478 Node* slot = assembler->Parameter(Descriptor::kSlot);
479 Node* context = assembler->Parameter(Descriptor::kContext);
480 Node* vector = assembler->LoadTypeFeedbackVectorForStub();
481
482 CodeStubAssembler::LoadICParameters p(context, receiver, name, slot, vector);
483 assembler->KeyedLoadIC(&p);
484 }
485
486 void KeyedLoadICTFStub::GenerateAssembly(CodeStubAssembler* assembler) const {
487 typedef compiler::Node Node;
488
489 Node* receiver = assembler->Parameter(Descriptor::kReceiver);
490 Node* name = assembler->Parameter(Descriptor::kName);
491 Node* slot = assembler->Parameter(Descriptor::kSlot);
492 Node* vector = assembler->Parameter(Descriptor::kVector);
493 Node* context = assembler->Parameter(Descriptor::kContext);
494
495 CodeStubAssembler::LoadICParameters p(context, receiver, name, slot, vector);
496 assembler->KeyedLoadIC(&p);
497 }
498
472 void AllocateHeapNumberStub::GenerateAssembly( 499 void AllocateHeapNumberStub::GenerateAssembly(
473 CodeStubAssembler* assembler) const { 500 CodeStubAssembler* assembler) const {
474 typedef compiler::Node Node; 501 typedef compiler::Node Node;
475 502
476 Node* result = assembler->AllocateHeapNumber(); 503 Node* result = assembler->AllocateHeapNumber();
477 assembler->Return(result); 504 assembler->Return(result);
478 } 505 }
479 506
480 #define SIMD128_GEN_ASM(TYPE, Type, type, lane_count, lane_type) \ 507 #define SIMD128_GEN_ASM(TYPE, Type, type, lane_count, lane_type) \
481 void Allocate##Type##Stub::GenerateAssembly(CodeStubAssembler* assembler) \ 508 void Allocate##Type##Stub::GenerateAssembly(CodeStubAssembler* assembler) \
(...skipping 4358 matching lines...) Expand 10 before | Expand all | Expand 10 after
4840 if (type->Is(Type::UntaggedPointer())) { 4867 if (type->Is(Type::UntaggedPointer())) {
4841 return Representation::External(); 4868 return Representation::External();
4842 } 4869 }
4843 4870
4844 DCHECK(!type->Is(Type::Untagged())); 4871 DCHECK(!type->Is(Type::Untagged()));
4845 return Representation::Tagged(); 4872 return Representation::Tagged();
4846 } 4873 }
4847 4874
4848 } // namespace internal 4875 } // namespace internal
4849 } // namespace v8 4876 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698