| 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 3793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3804 *map_or_index_field = heap()->fixed_array_map(); | 3804 *map_or_index_field = heap()->fixed_array_map(); |
| 3805 Map* prev = current->map(); | 3805 Map* prev = current->map(); |
| 3806 current->set_map(meta_map); | 3806 current->set_map(meta_map); |
| 3807 callback(current, data); | 3807 callback(current, data); |
| 3808 current = prev; | 3808 current = prev; |
| 3809 } | 3809 } |
| 3810 } | 3810 } |
| 3811 | 3811 |
| 3812 | 3812 |
| 3813 MaybeObject* CodeCache::Update(String* name, Code* code) { | 3813 MaybeObject* CodeCache::Update(String* name, Code* code) { |
| 3814 ASSERT(code->ic_state() == MONOMORPHIC); | |
| 3815 | |
| 3816 // The number of monomorphic stubs for normal load/store/call IC's can grow to | 3814 // The number of monomorphic stubs for normal load/store/call IC's can grow to |
| 3817 // a large number and therefore they need to go into a hash table. They are | 3815 // a large number and therefore they need to go into a hash table. They are |
| 3818 // used to load global properties from cells. | 3816 // used to load global properties from cells. |
| 3819 if (code->type() == NORMAL) { | 3817 if (code->type() == NORMAL) { |
| 3820 // Make sure that a hash table is allocated for the normal load code cache. | 3818 // Make sure that a hash table is allocated for the normal load code cache. |
| 3821 if (normal_type_cache()->IsUndefined()) { | 3819 if (normal_type_cache()->IsUndefined()) { |
| 3822 Object* result; | 3820 Object* result; |
| 3823 { MaybeObject* maybe_result = | 3821 { MaybeObject* maybe_result = |
| 3824 CodeCacheHashTable::Allocate(CodeCacheHashTable::kInitialSize); | 3822 CodeCacheHashTable::Allocate(CodeCacheHashTable::kInitialSize); |
| 3825 if (!maybe_result->ToObject(&result)) return maybe_result; | 3823 if (!maybe_result->ToObject(&result)) return maybe_result; |
| (...skipping 2722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6548 | 6546 |
| 6549 // Identify kind of code. | 6547 // Identify kind of code. |
| 6550 const char* Code::Kind2String(Kind kind) { | 6548 const char* Code::Kind2String(Kind kind) { |
| 6551 switch (kind) { | 6549 switch (kind) { |
| 6552 case FUNCTION: return "FUNCTION"; | 6550 case FUNCTION: return "FUNCTION"; |
| 6553 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; | 6551 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; |
| 6554 case STUB: return "STUB"; | 6552 case STUB: return "STUB"; |
| 6555 case BUILTIN: return "BUILTIN"; | 6553 case BUILTIN: return "BUILTIN"; |
| 6556 case LOAD_IC: return "LOAD_IC"; | 6554 case LOAD_IC: return "LOAD_IC"; |
| 6557 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; | 6555 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; |
| 6558 case KEYED_EXTERNAL_ARRAY_LOAD_IC: return "KEYED_EXTERNAL_ARRAY_LOAD_IC"; | |
| 6559 case STORE_IC: return "STORE_IC"; | 6556 case STORE_IC: return "STORE_IC"; |
| 6560 case KEYED_STORE_IC: return "KEYED_STORE_IC"; | 6557 case KEYED_STORE_IC: return "KEYED_STORE_IC"; |
| 6561 case KEYED_EXTERNAL_ARRAY_STORE_IC: return "KEYED_EXTERNAL_ARRAY_STORE_IC"; | |
| 6562 case CALL_IC: return "CALL_IC"; | 6558 case CALL_IC: return "CALL_IC"; |
| 6563 case KEYED_CALL_IC: return "KEYED_CALL_IC"; | 6559 case KEYED_CALL_IC: return "KEYED_CALL_IC"; |
| 6564 case TYPE_RECORDING_UNARY_OP_IC: return "TYPE_RECORDING_UNARY_OP_IC"; | 6560 case TYPE_RECORDING_UNARY_OP_IC: return "TYPE_RECORDING_UNARY_OP_IC"; |
| 6565 case TYPE_RECORDING_BINARY_OP_IC: return "TYPE_RECORDING_BINARY_OP_IC"; | 6561 case TYPE_RECORDING_BINARY_OP_IC: return "TYPE_RECORDING_BINARY_OP_IC"; |
| 6566 case COMPARE_IC: return "COMPARE_IC"; | 6562 case COMPARE_IC: return "COMPARE_IC"; |
| 6567 } | 6563 } |
| 6568 UNREACHABLE(); | 6564 UNREACHABLE(); |
| 6569 return NULL; | 6565 return NULL; |
| 6570 } | 6566 } |
| 6571 | 6567 |
| (...skipping 3900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10472 if (break_point_objects()->IsUndefined()) return 0; | 10468 if (break_point_objects()->IsUndefined()) return 0; |
| 10473 // Single beak point. | 10469 // Single beak point. |
| 10474 if (!break_point_objects()->IsFixedArray()) return 1; | 10470 if (!break_point_objects()->IsFixedArray()) return 1; |
| 10475 // Multiple break points. | 10471 // Multiple break points. |
| 10476 return FixedArray::cast(break_point_objects())->length(); | 10472 return FixedArray::cast(break_point_objects())->length(); |
| 10477 } | 10473 } |
| 10478 #endif | 10474 #endif |
| 10479 | 10475 |
| 10480 | 10476 |
| 10481 } } // namespace v8::internal | 10477 } } // namespace v8::internal |
| OLD | NEW |