OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
164 | 164 |
165 | 165 |
166 CheckType TypeFeedbackOracle::GetCallCheckType(Call* expr) { | 166 CheckType TypeFeedbackOracle::GetCallCheckType(Call* expr) { |
167 Handle<Object> value = GetInfo(expr->id()); | 167 Handle<Object> value = GetInfo(expr->id()); |
168 if (!value->IsSmi()) return RECEIVER_MAP_CHECK; | 168 if (!value->IsSmi()) return RECEIVER_MAP_CHECK; |
169 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value()); | 169 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value()); |
170 ASSERT(check != RECEIVER_MAP_CHECK); | 170 ASSERT(check != RECEIVER_MAP_CHECK); |
171 return check; | 171 return check; |
172 } | 172 } |
173 | 173 |
174 ExternalArrayType TypeFeedbackOracle::GetKeyedLoadExternalArrayType( | 174 JSObject::ElementsKind TypeFeedbackOracle::GetKeyedLoadElementsKind( |
Jakob Kummerow
2011/06/09 14:26:40
See the comment in type-info.h -- I think you can
danno
2011/06/09 15:03:27
Done.
| |
175 Property* expr) { | 175 Property* expr) { |
176 Handle<Object> stub = GetInfo(expr->id()); | 176 Handle<Object> stub = GetInfo(expr->id()); |
177 ASSERT(stub->IsCode()); | 177 ASSERT(stub->IsCode()); |
178 return Code::cast(*stub)->external_array_type(); | 178 return Code::cast(*stub)->FindFirstMap()->elements_kind(); |
179 } | 179 } |
180 | 180 |
181 ExternalArrayType TypeFeedbackOracle::GetKeyedStoreExternalArrayType( | 181 JSObject::ElementsKind TypeFeedbackOracle::GetKeyedStoreElementsKind( |
182 Expression* expr) { | 182 Expression* expr) { |
183 Handle<Object> stub = GetInfo(expr->id()); | 183 Handle<Object> stub = GetInfo(expr->id()); |
184 ASSERT(stub->IsCode()); | 184 ASSERT(stub->IsCode()); |
185 return Code::cast(*stub)->external_array_type(); | 185 return Code::cast(*stub)->FindFirstMap()->elements_kind(); |
186 } | 186 } |
187 | 187 |
188 Handle<JSObject> TypeFeedbackOracle::GetPrototypeForPrimitiveCheck( | 188 Handle<JSObject> TypeFeedbackOracle::GetPrototypeForPrimitiveCheck( |
189 CheckType check) { | 189 CheckType check) { |
190 JSFunction* function = NULL; | 190 JSFunction* function = NULL; |
191 switch (check) { | 191 switch (check) { |
192 case RECEIVER_MAP_CHECK: | 192 case RECEIVER_MAP_CHECK: |
193 UNREACHABLE(); | 193 UNREACHABLE(); |
194 break; | 194 break; |
195 case STRING_CHECK: | 195 case STRING_CHECK: |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
496 static_cast<int>(info->pc() - code->instruction_start())); | 496 static_cast<int>(info->pc() - code->instruction_start())); |
497 ASSERT(ast_ids->length() == 0 || | 497 ASSERT(ast_ids->length() == 0 || |
498 (*ast_ids)[ast_ids->length()-1] != | 498 (*ast_ids)[ast_ids->length()-1] != |
499 static_cast<unsigned>(info->data())); | 499 static_cast<unsigned>(info->data())); |
500 ast_ids->Add(static_cast<unsigned>(info->data())); | 500 ast_ids->Add(static_cast<unsigned>(info->data())); |
501 } | 501 } |
502 } | 502 } |
503 } | 503 } |
504 | 504 |
505 } } // namespace v8::internal | 505 } } // namespace v8::internal |
OLD | NEW |