OLD | NEW |
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/ic-compiler.h" | 5 #include "src/ic/ic-compiler.h" |
6 | 6 |
7 #include "src/cpu-profiler.h" | 7 #include "src/cpu-profiler.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic-inl.h" | 9 #include "src/ic/ic-inl.h" |
10 | 10 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 Object* code = dictionary->ValueAt(entry); | 158 Object* code = dictionary->ValueAt(entry); |
159 // This might be called during the marking phase of the collector | 159 // This might be called during the marking phase of the collector |
160 // hence the unchecked cast. | 160 // hence the unchecked cast. |
161 return reinterpret_cast<Code*>(code); | 161 return reinterpret_cast<Code*>(code); |
162 } | 162 } |
163 | 163 |
164 | 164 |
165 static void FillCache(Isolate* isolate, Handle<Code> code) { | 165 static void FillCache(Isolate* isolate, Handle<Code> code) { |
166 Handle<UnseededNumberDictionary> dictionary = UnseededNumberDictionary::Set( | 166 Handle<UnseededNumberDictionary> dictionary = UnseededNumberDictionary::Set( |
167 isolate->factory()->non_monomorphic_cache(), code->flags(), code); | 167 isolate->factory()->non_monomorphic_cache(), code->flags(), code); |
168 isolate->heap()->public_set_non_monomorphic_cache(*dictionary); | 168 isolate->heap()->SetRootNonMonomorphicCache(*dictionary); |
169 } | 169 } |
170 | 170 |
171 | 171 |
172 Handle<Code> PropertyICCompiler::ComputeStore(Isolate* isolate, | 172 Handle<Code> PropertyICCompiler::ComputeStore(Isolate* isolate, |
173 InlineCacheState ic_state, | 173 InlineCacheState ic_state, |
174 ExtraICState extra_state) { | 174 ExtraICState extra_state) { |
175 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, ic_state, extra_state); | 175 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, ic_state, extra_state); |
176 Handle<UnseededNumberDictionary> cache = | 176 Handle<UnseededNumberDictionary> cache = |
177 isolate->factory()->non_monomorphic_cache(); | 177 isolate->factory()->non_monomorphic_cache(); |
178 int entry = cache->FindEntry(isolate, flags); | 178 int entry = cache->FindEntry(isolate, flags); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 416 |
417 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); | 417 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); |
418 | 418 |
419 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); | 419 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); |
420 } | 420 } |
421 | 421 |
422 | 422 |
423 #undef __ | 423 #undef __ |
424 } // namespace internal | 424 } // namespace internal |
425 } // namespace v8 | 425 } // namespace v8 |
OLD | NEW |