| 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( | |
| 175 Property* expr) { | |
| 176 Handle<Object> stub = GetInfo(expr->id()); | |
| 177 ASSERT(stub->IsCode()); | |
| 178 return Code::cast(*stub)->external_array_type(); | |
| 179 } | |
| 180 | |
| 181 ExternalArrayType TypeFeedbackOracle::GetKeyedStoreExternalArrayType( | |
| 182 Expression* expr) { | |
| 183 Handle<Object> stub = GetInfo(expr->id()); | |
| 184 ASSERT(stub->IsCode()); | |
| 185 return Code::cast(*stub)->external_array_type(); | |
| 186 } | |
| 187 | |
| 188 Handle<JSObject> TypeFeedbackOracle::GetPrototypeForPrimitiveCheck( | 174 Handle<JSObject> TypeFeedbackOracle::GetPrototypeForPrimitiveCheck( |
| 189 CheckType check) { | 175 CheckType check) { |
| 190 JSFunction* function = NULL; | 176 JSFunction* function = NULL; |
| 191 switch (check) { | 177 switch (check) { |
| 192 case RECEIVER_MAP_CHECK: | 178 case RECEIVER_MAP_CHECK: |
| 193 UNREACHABLE(); | 179 UNREACHABLE(); |
| 194 break; | 180 break; |
| 195 case STRING_CHECK: | 181 case STRING_CHECK: |
| 196 function = global_context_->string_function(); | 182 function = global_context_->string_function(); |
| 197 break; | 183 break; |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 static_cast<int>(info->pc() - code->instruction_start())); | 482 static_cast<int>(info->pc() - code->instruction_start())); |
| 497 ASSERT(ast_ids->length() == 0 || | 483 ASSERT(ast_ids->length() == 0 || |
| 498 (*ast_ids)[ast_ids->length()-1] != | 484 (*ast_ids)[ast_ids->length()-1] != |
| 499 static_cast<unsigned>(info->data())); | 485 static_cast<unsigned>(info->data())); |
| 500 ast_ids->Add(static_cast<unsigned>(info->data())); | 486 ast_ids->Add(static_cast<unsigned>(info->data())); |
| 501 } | 487 } |
| 502 } | 488 } |
| 503 } | 489 } |
| 504 | 490 |
| 505 } } // namespace v8::internal | 491 } } // namespace v8::internal |
| OLD | NEW |