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 3122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3133 | 3133 |
3134 | 3134 |
3135 void NormalizedMapCache::Clear() { | 3135 void NormalizedMapCache::Clear() { |
3136 int entries = length(); | 3136 int entries = length(); |
3137 for (int i = 0; i != entries; i++) { | 3137 for (int i = 0; i != entries; i++) { |
3138 set_undefined(i); | 3138 set_undefined(i); |
3139 } | 3139 } |
3140 } | 3140 } |
3141 | 3141 |
3142 | 3142 |
3143 void JSObject::UpdateMapCodeCache(Isolate* isolate, | 3143 void JSObject::UpdateMapCodeCache(Handle<JSObject> object, |
3144 Handle<JSObject> object, | |
3145 Handle<String> name, | 3144 Handle<String> name, |
3146 Handle<Code> code) { | 3145 Handle<Code> code) { |
| 3146 Isolate* isolate = object->GetIsolate(); |
3147 CALL_HEAP_FUNCTION_VOID(isolate, | 3147 CALL_HEAP_FUNCTION_VOID(isolate, |
3148 object->UpdateMapCodeCache(*name, *code)); | 3148 object->UpdateMapCodeCache(*name, *code)); |
3149 } | 3149 } |
3150 | 3150 |
3151 | 3151 |
3152 MaybeObject* JSObject::UpdateMapCodeCache(String* name, Code* code) { | 3152 MaybeObject* JSObject::UpdateMapCodeCache(String* name, Code* code) { |
3153 if (map()->is_shared()) { | 3153 if (map()->is_shared()) { |
3154 // Fast case maps are never marked as shared. | 3154 // Fast case maps are never marked as shared. |
3155 ASSERT(!HasFastProperties()); | 3155 ASSERT(!HasFastProperties()); |
3156 // Replace the map with an identical copy that can be safely modified. | 3156 // Replace the map with an identical copy that can be safely modified. |
(...skipping 9242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12399 if (break_point_objects()->IsUndefined()) return 0; | 12399 if (break_point_objects()->IsUndefined()) return 0; |
12400 // Single break point. | 12400 // Single break point. |
12401 if (!break_point_objects()->IsFixedArray()) return 1; | 12401 if (!break_point_objects()->IsFixedArray()) return 1; |
12402 // Multiple break points. | 12402 // Multiple break points. |
12403 return FixedArray::cast(break_point_objects())->length(); | 12403 return FixedArray::cast(break_point_objects())->length(); |
12404 } | 12404 } |
12405 #endif // ENABLE_DEBUGGER_SUPPORT | 12405 #endif // ENABLE_DEBUGGER_SUPPORT |
12406 | 12406 |
12407 | 12407 |
12408 } } // namespace v8::internal | 12408 } } // namespace v8::internal |
OLD | NEW |