OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 134 matching lines...) Loading... | |
145 Handle<Code> code = Handle<Code>::cast(maybe_code); | 145 Handle<Code> code = Handle<Code>::cast(maybe_code); |
146 if (code->kind() == Code::KEYED_STORE_IC) { | 146 if (code->kind() == Code::KEYED_STORE_IC) { |
147 return KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state()); | 147 return KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state()); |
148 } | 148 } |
149 } | 149 } |
150 return STANDARD_STORE; | 150 return STANDARD_STORE; |
151 } | 151 } |
152 | 152 |
153 | 153 |
154 Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(int slot) { | 154 Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(int slot) { |
155 Handle<Object> info = GetInfo(slot); | 155 Handle<Object> info = GetInfo(slot); |
Hannes Payer (out of office)
2014/02/11 15:51:23
we can do that in one line
mvstanton
2014/02/17 15:53:08
Done.
| |
156 if (info->IsAllocationSite()) { | 156 return Handle<JSFunction>::cast(info); |
157 return Handle<JSFunction>(isolate()->global_context()->array_function()); | |
158 } else { | |
159 return Handle<JSFunction>::cast(info); | |
160 } | |
161 } | 157 } |
162 | 158 |
163 | 159 |
164 Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget(int slot) { | 160 Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget(int slot) { |
165 Handle<Object> info = GetInfo(slot); | 161 Handle<Object> info = GetInfo(slot); |
Hannes Payer (out of office)
2014/02/11 15:51:23
we can do that in one line
mvstanton
2014/02/17 15:53:08
Done.
| |
166 if (info->IsAllocationSite()) { | 162 return Handle<JSFunction>::cast(info); |
167 return Handle<JSFunction>(isolate()->global_context()->array_function()); | |
168 } else { | |
169 return Handle<JSFunction>::cast(info); | |
170 } | |
171 } | 163 } |
172 | 164 |
173 | 165 |
174 Handle<AllocationSite> TypeFeedbackOracle::GetCallNewAllocationSite(int slot) { | 166 Handle<AllocationSite> TypeFeedbackOracle::GetCallNewAllocationSite(int slot) { |
175 Handle<Object> info = GetInfo(slot); | 167 Handle<Object> info = GetInfo(slot); |
Hannes Payer (out of office)
2014/02/11 15:51:23
we can do that in one line
mvstanton
2014/02/17 15:53:08
Done.
| |
176 if (info->IsAllocationSite()) { | 168 return Handle<AllocationSite>::cast(info); |
177 return Handle<AllocationSite>::cast(info); | |
178 } | |
179 return Handle<AllocationSite>::null(); | |
180 } | 169 } |
181 | 170 |
182 | 171 |
183 bool TypeFeedbackOracle::LoadIsBuiltin( | 172 bool TypeFeedbackOracle::LoadIsBuiltin( |
184 TypeFeedbackId id, Builtins::Name builtin) { | 173 TypeFeedbackId id, Builtins::Name builtin) { |
185 return *GetInfo(id) == isolate()->builtins()->builtin(builtin); | 174 return *GetInfo(id) == isolate()->builtins()->builtin(builtin); |
186 } | 175 } |
187 | 176 |
188 | 177 |
189 bool TypeFeedbackOracle::LoadIsStub(TypeFeedbackId id, ICStub* stub) { | 178 bool TypeFeedbackOracle::LoadIsStub(TypeFeedbackId id, ICStub* stub) { |
(...skipping 304 matching lines...) Loading... | |
494 #ifdef DEBUG | 483 #ifdef DEBUG |
495 Object* result = NULL; | 484 Object* result = NULL; |
496 // Dictionary has been allocated with sufficient size for all elements. | 485 // Dictionary has been allocated with sufficient size for all elements. |
497 ASSERT(maybe_result->ToObject(&result)); | 486 ASSERT(maybe_result->ToObject(&result)); |
498 ASSERT(*dictionary_ == result); | 487 ASSERT(*dictionary_ == result); |
499 #endif | 488 #endif |
500 } | 489 } |
501 | 490 |
502 | 491 |
503 } } // namespace v8::internal | 492 } } // namespace v8::internal |
OLD | NEW |