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

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

Issue 2052763003: [ic] [stubs] Remove InlineCacheState field from the code flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 6 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/debug/arm/debug-arm.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/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #endif 92 #endif
93 } 93 }
94 94
95 95
96 Code::Kind CodeStub::GetCodeKind() const { 96 Code::Kind CodeStub::GetCodeKind() const {
97 return Code::STUB; 97 return Code::STUB;
98 } 98 }
99 99
100 100
101 Code::Flags CodeStub::GetCodeFlags() const { 101 Code::Flags CodeStub::GetCodeFlags() const {
102 return Code::ComputeFlags(GetCodeKind(), GetICState(), GetExtraICState()); 102 return Code::ComputeFlags(GetCodeKind(), GetExtraICState());
103 } 103 }
104 104
105 105
106 Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) { 106 Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) {
107 Handle<Code> ic = GetCode(); 107 Handle<Code> ic = GetCode();
108 ic = isolate()->factory()->CopyCode(ic); 108 ic = isolate()->factory()->CopyCode(ic);
109 ic->FindAndReplace(pattern); 109 ic->FindAndReplace(pattern);
110 RecordCodeGeneration(ic); 110 RecordCodeGeneration(ic);
111 return ic; 111 return ic;
112 } 112 }
(...skipping 14 matching lines...) Expand all
127 // TODO(yangguo): remove this once we can serialize IC stubs. 127 // TODO(yangguo): remove this once we can serialize IC stubs.
128 masm.enable_serializer(); 128 masm.enable_serializer();
129 NoCurrentFrameScope scope(&masm); 129 NoCurrentFrameScope scope(&masm);
130 Generate(&masm); 130 Generate(&masm);
131 } 131 }
132 132
133 // Create the code object. 133 // Create the code object.
134 CodeDesc desc; 134 CodeDesc desc;
135 masm.GetCode(&desc); 135 masm.GetCode(&desc);
136 // Copy the generated code into a heap object. 136 // Copy the generated code into a heap object.
137 Code::Flags flags = 137 Code::Flags flags = Code::ComputeFlags(GetCodeKind(), GetExtraICState());
138 Code::ComputeFlags(GetCodeKind(), GetICState(), GetExtraICState());
139 Handle<Code> new_object = factory->NewCode( 138 Handle<Code> new_object = factory->NewCode(
140 desc, flags, masm.CodeObject(), NeedsImmovableCode()); 139 desc, flags, masm.CodeObject(), NeedsImmovableCode());
141 return new_object; 140 return new_object;
142 } 141 }
143 142
144 143
145 Handle<Code> CodeStub::GetCode() { 144 Handle<Code> CodeStub::GetCode() {
146 Heap* heap = isolate()->heap(); 145 Heap* heap = isolate()->heap();
147 Code* code; 146 Code* code;
148 if (UseSpecialCache() ? FindCodeInSpecialCache(&code) 147 if (UseSpecialCache() ? FindCodeInSpecialCache(&code)
(...skipping 4595 matching lines...) Expand 10 before | Expand all | Expand 10 after
4744 if (type->Is(Type::UntaggedPointer())) { 4743 if (type->Is(Type::UntaggedPointer())) {
4745 return Representation::External(); 4744 return Representation::External();
4746 } 4745 }
4747 4746
4748 DCHECK(!type->Is(Type::Untagged())); 4747 DCHECK(!type->Is(Type::Untagged()));
4749 return Representation::Tagged(); 4748 return Representation::Tagged();
4750 } 4749 }
4751 4750
4752 } // namespace internal 4751 } // namespace internal
4753 } // namespace v8 4752 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/debug/arm/debug-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698