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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 js_object); | 213 js_object); |
214 if (!maybe_result->ToObject(&result)) return maybe_result; | 214 if (!maybe_result->ToObject(&result)) return maybe_result; |
215 } | 215 } |
216 element_dictionary->ValueAtPut(i, result); | 216 element_dictionary->ValueAtPut(i, result); |
217 } | 217 } |
218 } | 218 } |
219 } | 219 } |
220 break; | 220 break; |
221 } | 221 } |
222 default: | 222 default: |
223 UNREACHABLE(); | 223 case JSObject::EXTERNAL_PIXEL_ELEMENTS: |
Rico
2011/07/27 11:31:01
default: last?
| |
224 case JSObject::EXTERNAL_BYTE_ELEMENTS: | |
225 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | |
226 case JSObject::EXTERNAL_SHORT_ELEMENTS: | |
227 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | |
228 case JSObject::EXTERNAL_INT_ELEMENTS: | |
229 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: | |
230 case JSObject::EXTERNAL_FLOAT_ELEMENTS: | |
231 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: | |
232 case JSObject::FAST_DOUBLE_ELEMENTS: | |
233 // No contained objects, nothing to do. | |
224 break; | 234 break; |
225 } | 235 } |
226 return copy; | 236 return copy; |
227 } | 237 } |
228 | 238 |
229 | 239 |
230 RUNTIME_FUNCTION(MaybeObject*, Runtime_CloneLiteralBoilerplate) { | 240 RUNTIME_FUNCTION(MaybeObject*, Runtime_CloneLiteralBoilerplate) { |
231 CONVERT_CHECKED(JSObject, boilerplate, args[0]); | 241 CONVERT_CHECKED(JSObject, boilerplate, args[0]); |
232 return DeepCopyBoilerplate(isolate, boilerplate); | 242 return DeepCopyBoilerplate(isolate, boilerplate); |
233 } | 243 } |
(...skipping 12517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12751 } else { | 12761 } else { |
12752 // Handle last resort GC and make sure to allow future allocations | 12762 // Handle last resort GC and make sure to allow future allocations |
12753 // to grow the heap without causing GCs (if possible). | 12763 // to grow the heap without causing GCs (if possible). |
12754 isolate->counters()->gc_last_resort_from_js()->Increment(); | 12764 isolate->counters()->gc_last_resort_from_js()->Increment(); |
12755 isolate->heap()->CollectAllGarbage(false); | 12765 isolate->heap()->CollectAllGarbage(false); |
12756 } | 12766 } |
12757 } | 12767 } |
12758 | 12768 |
12759 | 12769 |
12760 } } // namespace v8::internal | 12770 } } // namespace v8::internal |
OLD | NEW |