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

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

Issue 1604543002: [compiler] Remove CodeStub from CompilationInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 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/code-stubs.h ('k') | src/code-stubs-hydrogen.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 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/compiler/code-stub-assembler.h" 10 #include "src/compiler/code-stub-assembler.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 code->VerifyEmbeddedObjects(); 89 code->VerifyEmbeddedObjects();
90 #endif 90 #endif
91 } 91 }
92 92
93 93
94 Code::Kind CodeStub::GetCodeKind() const { 94 Code::Kind CodeStub::GetCodeKind() const {
95 return Code::STUB; 95 return Code::STUB;
96 } 96 }
97 97
98 98
99 Code::Flags CodeStub::GetCodeFlags() const {
100 return Code::ComputeFlags(GetCodeKind(), GetICState(), GetExtraICState(),
101 GetStubType());
102 }
103
104
99 Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) { 105 Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) {
100 Handle<Code> ic = GetCode(); 106 Handle<Code> ic = GetCode();
101 ic = isolate()->factory()->CopyCode(ic); 107 ic = isolate()->factory()->CopyCode(ic);
102 ic->FindAndReplace(pattern); 108 ic->FindAndReplace(pattern);
103 RecordCodeGeneration(ic); 109 RecordCodeGeneration(ic);
104 return ic; 110 return ic;
105 } 111 }
106 112
107 113
108 Handle<Code> PlatformCodeStub::GenerateCode() { 114 Handle<Code> PlatformCodeStub::GenerateCode() {
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 TraceTransition(old_state, state); 473 TraceTransition(old_state, state);
468 set_sub_minor_key(TypesBits::update(sub_minor_key(), state.ToIntegral())); 474 set_sub_minor_key(TypesBits::update(sub_minor_key(), state.ToIntegral()));
469 } 475 }
470 476
471 477
472 Handle<Code> TurboFanCodeStub::GenerateCode() { 478 Handle<Code> TurboFanCodeStub::GenerateCode() {
473 const char* name = CodeStub::MajorName(MajorKey()); 479 const char* name = CodeStub::MajorName(MajorKey());
474 Zone zone; 480 Zone zone;
475 CallInterfaceDescriptor descriptor(GetCallInterfaceDescriptor()); 481 CallInterfaceDescriptor descriptor(GetCallInterfaceDescriptor());
476 compiler::CodeStubAssembler assembler(isolate(), &zone, descriptor, 482 compiler::CodeStubAssembler assembler(isolate(), &zone, descriptor,
477 GetCodeKind(), name); 483 GetCodeFlags(), name);
478 GenerateAssembly(&assembler); 484 GenerateAssembly(&assembler);
479 return assembler.GenerateCode(); 485 return assembler.GenerateCode();
480 } 486 }
481 487
482 488
483 void StringLengthStub::GenerateAssembly( 489 void StringLengthStub::GenerateAssembly(
484 compiler::CodeStubAssembler* assembler) const { 490 compiler::CodeStubAssembler* assembler) const {
485 compiler::Node* value = assembler->Parameter(0); 491 compiler::Node* value = assembler->Parameter(0);
486 compiler::Node* string = 492 compiler::Node* string =
487 assembler->LoadObjectField(value, JSValue::kValueOffset); 493 assembler->LoadObjectField(value, JSValue::kValueOffset);
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 if (type->Is(Type::UntaggedPointer())) { 1058 if (type->Is(Type::UntaggedPointer())) {
1053 return Representation::External(); 1059 return Representation::External();
1054 } 1060 }
1055 1061
1056 DCHECK(!type->Is(Type::Untagged())); 1062 DCHECK(!type->Is(Type::Untagged()));
1057 return Representation::Tagged(); 1063 return Representation::Tagged();
1058 } 1064 }
1059 1065
1060 } // namespace internal 1066 } // namespace internal
1061 } // namespace v8 1067 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698