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 4637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4648 } | 4648 } |
4649 Object* descriptors; | 4649 Object* descriptors; |
4650 { MaybeObject* maybe_descriptors = | 4650 { MaybeObject* maybe_descriptors = |
4651 instance_descriptors()->RemoveTransitions(); | 4651 instance_descriptors()->RemoveTransitions(); |
4652 if (!maybe_descriptors->ToObject(&descriptors)) return maybe_descriptors; | 4652 if (!maybe_descriptors->ToObject(&descriptors)) return maybe_descriptors; |
4653 } | 4653 } |
4654 cast(new_map)->set_instance_descriptors(DescriptorArray::cast(descriptors)); | 4654 cast(new_map)->set_instance_descriptors(DescriptorArray::cast(descriptors)); |
4655 return new_map; | 4655 return new_map; |
4656 } | 4656 } |
4657 | 4657 |
| 4658 void Map::UpdateCodeCache(Handle<Map> map, |
| 4659 Handle<String> name, |
| 4660 Handle<Code> code) { |
| 4661 Isolate* isolate = map->GetIsolate(); |
| 4662 CALL_HEAP_FUNCTION_VOID(isolate, |
| 4663 map->UpdateCodeCache(*name, *code)); |
| 4664 } |
4658 | 4665 |
4659 MaybeObject* Map::UpdateCodeCache(String* name, Code* code) { | 4666 MaybeObject* Map::UpdateCodeCache(String* name, Code* code) { |
4660 // Allocate the code cache if not present. | 4667 // Allocate the code cache if not present. |
4661 if (code_cache()->IsFixedArray()) { | 4668 if (code_cache()->IsFixedArray()) { |
4662 Object* result; | 4669 Object* result; |
4663 { MaybeObject* maybe_result = GetHeap()->AllocateCodeCache(); | 4670 { MaybeObject* maybe_result = GetHeap()->AllocateCodeCache(); |
4664 if (!maybe_result->ToObject(&result)) return maybe_result; | 4671 if (!maybe_result->ToObject(&result)) return maybe_result; |
4665 } | 4672 } |
4666 set_code_cache(result); | 4673 set_code_cache(result); |
4667 } | 4674 } |
(...skipping 7809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12477 if (break_point_objects()->IsUndefined()) return 0; | 12484 if (break_point_objects()->IsUndefined()) return 0; |
12478 // Single break point. | 12485 // Single break point. |
12479 if (!break_point_objects()->IsFixedArray()) return 1; | 12486 if (!break_point_objects()->IsFixedArray()) return 1; |
12480 // Multiple break points. | 12487 // Multiple break points. |
12481 return FixedArray::cast(break_point_objects())->length(); | 12488 return FixedArray::cast(break_point_objects())->length(); |
12482 } | 12489 } |
12483 #endif // ENABLE_DEBUGGER_SUPPORT | 12490 #endif // ENABLE_DEBUGGER_SUPPORT |
12484 | 12491 |
12485 | 12492 |
12486 } } // namespace v8::internal | 12493 } } // namespace v8::internal |
OLD | NEW |