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 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3180 HValue* key = AddInstruction( | 3180 HValue* key = AddInstruction( |
3181 new(zone()) HConstant(Handle<Object>(Smi::FromInt(i)), | 3181 new(zone()) HConstant(Handle<Object>(Smi::FromInt(i)), |
3182 Representation::Integer32())); | 3182 Representation::Integer32())); |
3183 AddInstruction(new(zone()) HStoreKeyedFastElement(elements, key, value)); | 3183 AddInstruction(new(zone()) HStoreKeyedFastElement(elements, key, value)); |
3184 AddSimulate(expr->GetIdForElement(i)); | 3184 AddSimulate(expr->GetIdForElement(i)); |
3185 } | 3185 } |
3186 ast_context()->ReturnValue(Pop()); | 3186 ast_context()->ReturnValue(Pop()); |
3187 } | 3187 } |
3188 | 3188 |
3189 | 3189 |
3190 void HGraphBuilder::VisitCatchExtensionObject(CatchExtensionObject* expr) { | |
3191 ASSERT(!HasStackOverflow()); | |
3192 ASSERT(current_block() != NULL); | |
3193 ASSERT(current_block()->HasPredecessor()); | |
3194 return Bailout("CatchExtensionObject"); | |
3195 } | |
3196 | |
3197 | |
3198 // Sets the lookup result and returns true if the store can be inlined. | 3190 // Sets the lookup result and returns true if the store can be inlined. |
3199 static bool ComputeStoredField(Handle<Map> type, | 3191 static bool ComputeStoredField(Handle<Map> type, |
3200 Handle<String> name, | 3192 Handle<String> name, |
3201 LookupResult* lookup) { | 3193 LookupResult* lookup) { |
3202 type->LookupInDescriptors(NULL, *name, lookup); | 3194 type->LookupInDescriptors(NULL, *name, lookup); |
3203 if (!lookup->IsPropertyOrTransition()) return false; | 3195 if (!lookup->IsPropertyOrTransition()) return false; |
3204 if (lookup->type() == FIELD) return true; | 3196 if (lookup->type() == FIELD) return true; |
3205 return (lookup->type() == MAP_TRANSITION) && | 3197 return (lookup->type() == MAP_TRANSITION) && |
3206 (type->unused_property_fields() > 0); | 3198 (type->unused_property_fields() > 0); |
3207 } | 3199 } |
(...skipping 3139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6347 } | 6339 } |
6348 } | 6340 } |
6349 | 6341 |
6350 #ifdef DEBUG | 6342 #ifdef DEBUG |
6351 if (graph_ != NULL) graph_->Verify(); | 6343 if (graph_ != NULL) graph_->Verify(); |
6352 if (allocator_ != NULL) allocator_->Verify(); | 6344 if (allocator_ != NULL) allocator_->Verify(); |
6353 #endif | 6345 #endif |
6354 } | 6346 } |
6355 | 6347 |
6356 } } // namespace v8::internal | 6348 } } // namespace v8::internal |
OLD | NEW |