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 3228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3239 | 3239 |
3240 | 3240 |
3241 void NormalizedMapCache::Clear() { | 3241 void NormalizedMapCache::Clear() { |
3242 int entries = length(); | 3242 int entries = length(); |
3243 for (int i = 0; i != entries; i++) { | 3243 for (int i = 0; i != entries; i++) { |
3244 set_undefined(i); | 3244 set_undefined(i); |
3245 } | 3245 } |
3246 } | 3246 } |
3247 | 3247 |
3248 | 3248 |
3249 void JSObject::UpdateMapCodeCache(Isolate* isolate, | 3249 void JSObject::UpdateMapCodeCache(Handle<JSObject> object, |
3250 Handle<JSObject> object, | |
3251 Handle<String> name, | 3250 Handle<String> name, |
3252 Handle<Code> code) { | 3251 Handle<Code> code) { |
| 3252 Isolate* isolate = object->GetIsolate(); |
3253 CALL_HEAP_FUNCTION_VOID(isolate, | 3253 CALL_HEAP_FUNCTION_VOID(isolate, |
3254 object->UpdateMapCodeCache(*name, *code)); | 3254 object->UpdateMapCodeCache(*name, *code)); |
3255 } | 3255 } |
3256 | 3256 |
3257 | 3257 |
3258 MaybeObject* JSObject::UpdateMapCodeCache(String* name, Code* code) { | 3258 MaybeObject* JSObject::UpdateMapCodeCache(String* name, Code* code) { |
3259 if (map()->is_shared()) { | 3259 if (map()->is_shared()) { |
3260 // Fast case maps are never marked as shared. | 3260 // Fast case maps are never marked as shared. |
3261 ASSERT(!HasFastProperties()); | 3261 ASSERT(!HasFastProperties()); |
3262 // Replace the map with an identical copy that can be safely modified. | 3262 // Replace the map with an identical copy that can be safely modified. |
(...skipping 9319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12582 if (break_point_objects()->IsUndefined()) return 0; | 12582 if (break_point_objects()->IsUndefined()) return 0; |
12583 // Single break point. | 12583 // Single break point. |
12584 if (!break_point_objects()->IsFixedArray()) return 1; | 12584 if (!break_point_objects()->IsFixedArray()) return 1; |
12585 // Multiple break points. | 12585 // Multiple break points. |
12586 return FixedArray::cast(break_point_objects())->length(); | 12586 return FixedArray::cast(break_point_objects())->length(); |
12587 } | 12587 } |
12588 #endif // ENABLE_DEBUGGER_SUPPORT | 12588 #endif // ENABLE_DEBUGGER_SUPPORT |
12589 | 12589 |
12590 | 12590 |
12591 } } // namespace v8::internal | 12591 } } // namespace v8::internal |
OLD | NEW |