| Index: src/type-info.cc
|
| diff --git a/src/type-info.cc b/src/type-info.cc
|
| index 81cbff3b0a9d144e3d8706e1062d472335dd1d43..fa479b2e515b5c811b30c67bae9ce4c3fd4c9e09 100644
|
| --- a/src/type-info.cc
|
| +++ b/src/type-info.cc
|
| @@ -154,6 +154,13 @@ bool TypeFeedbackOracle::CallNewIsMonomorphic(CallNew* expr) {
|
| }
|
|
|
|
|
| +bool TypeFeedbackOracle::IsForInFastCase(ForInStatement* stmt) {
|
| + Handle<Object> value = GetInfo(stmt->PrepareId());
|
| + return value->IsSmi() &&
|
| + Smi::cast(*value)->value() == TypeFeedbackCells::kForInFastCaseMarker;
|
| +}
|
| +
|
| +
|
| Handle<Map> TypeFeedbackOracle::LoadMonomorphicReceiverType(Property* expr) {
|
| ASSERT(LoadIsMonomorphicNormal(expr));
|
| Handle<Object> map_or_code = GetInfo(expr->id());
|
| @@ -659,9 +666,10 @@ void TypeFeedbackOracle::ProcessTypeFeedbackCells(Handle<Code> code) {
|
| for (int i = 0; i < cache->CellCount(); i++) {
|
| unsigned ast_id = cache->AstId(i)->value();
|
| Object* value = cache->Cell(i)->value();
|
| - if (value->IsJSFunction() &&
|
| - !CanRetainOtherContext(JSFunction::cast(value),
|
| - *global_context_)) {
|
| + if (value->IsSmi() ||
|
| + (value->IsJSFunction() &&
|
| + !CanRetainOtherContext(JSFunction::cast(value),
|
| + *global_context_))) {
|
| SetInfo(ast_id, value);
|
| }
|
| }
|
|
|