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/type-info.h" | 5 #include "src/type-info.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 Handle<Code> code = Handle<Code>::cast(maybe_code); | 129 Handle<Code> code = Handle<Code>::cast(maybe_code); |
130 return code->ic_state() == UNINITIALIZED; | 130 return code->ic_state() == UNINITIALIZED; |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 bool TypeFeedbackOracle::StoreIsUninitialized(FeedbackVectorICSlot slot) { | 134 bool TypeFeedbackOracle::StoreIsUninitialized(FeedbackVectorICSlot slot) { |
135 if (!slot.IsInvalid()) { | 135 if (!slot.IsInvalid()) { |
136 Code::Kind kind = feedback_vector_->GetKind(slot); | 136 Code::Kind kind = feedback_vector_->GetKind(slot); |
137 if (kind == Code::STORE_IC) { | 137 if (kind == Code::STORE_IC) { |
138 StoreICNexus nexus(feedback_vector_, slot); | 138 StoreICNexus nexus(feedback_vector_, slot); |
139 return nexus.StateFromFeedback() == UNINITIALIZED; | 139 return nexus.StateFromFeedback(); |
140 } else if (kind == Code::KEYED_STORE_IC) { | 140 } else if (kind == Code::KEYED_STORE_IC) { |
141 KeyedStoreICNexus nexus(feedback_vector_, slot); | 141 KeyedStoreICNexus nexus(feedback_vector_, slot); |
142 return nexus.StateFromFeedback() == UNINITIALIZED; | 142 return nexus.StateFromFeedback(); |
143 } | 143 } |
144 } | 144 } |
145 return true; | 145 return true; |
146 } | 146 } |
147 | 147 |
148 | 148 |
149 bool TypeFeedbackOracle::CallIsUninitialized(FeedbackVectorICSlot slot) { | 149 bool TypeFeedbackOracle::CallIsUninitialized(FeedbackVectorICSlot slot) { |
150 Handle<Object> value = GetInfo(slot); | 150 Handle<Object> value = GetInfo(slot); |
151 return value->IsUndefined() || | 151 return value->IsUndefined() || |
152 value.is_identical_to( | 152 value.is_identical_to( |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 // Dictionary has been allocated with sufficient size for all elements. | 572 // Dictionary has been allocated with sufficient size for all elements. |
573 DisallowHeapAllocation no_need_to_resize_dictionary; | 573 DisallowHeapAllocation no_need_to_resize_dictionary; |
574 HandleScope scope(isolate()); | 574 HandleScope scope(isolate()); |
575 USE(UnseededNumberDictionary::AtNumberPut( | 575 USE(UnseededNumberDictionary::AtNumberPut( |
576 dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 576 dictionary_, IdToKey(ast_id), handle(target, isolate()))); |
577 } | 577 } |
578 | 578 |
579 | 579 |
580 } // namespace internal | 580 } // namespace internal |
581 } // namespace v8 | 581 } // namespace v8 |
OLD | NEW |