OLD | NEW |
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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2198 index_name_split.End(); | 2198 index_name_split.End(); |
2199 | 2199 |
2200 return Pop(); | 2200 return Pop(); |
2201 } | 2201 } |
2202 | 2202 |
2203 | 2203 |
2204 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2204 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2205 return DoGenerateCode(this); | 2205 return DoGenerateCode(this); |
2206 } | 2206 } |
2207 | 2207 |
2208 | |
2209 Handle<Code> MegamorphicLoadStub::GenerateCode() { | |
2210 return DoGenerateCode(this); | |
2211 } | |
2212 | |
2213 | |
2214 template <> | |
2215 HValue* CodeStubGraphBuilder<MegamorphicLoadStub>::BuildCodeStub() { | |
2216 HValue* receiver = GetParameter(LoadDescriptor::kReceiverIndex); | |
2217 HValue* name = GetParameter(LoadDescriptor::kNameIndex); | |
2218 | |
2219 // We shouldn't generate this when FLAG_vector_ics is true because the | |
2220 // megamorphic case is handled as part of the default stub. | |
2221 DCHECK(!FLAG_vector_ics); | |
2222 | |
2223 // This stub tail calls, and an erected frame presents complications we don't | |
2224 // need. | |
2225 info()->MarkMustNotHaveEagerFrame(); | |
2226 | |
2227 // Probe the stub cache. | |
2228 Add<HTailCallThroughMegamorphicCache>(receiver, name); | |
2229 | |
2230 // We never continue. | |
2231 return graph()->GetConstant0(); | |
2232 } | |
2233 } } // namespace v8::internal | 2208 } } // namespace v8::internal |
OLD | NEW |