| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 14135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14146 | 14146 |
| 14147 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) { | 14147 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) { |
| 14148 HandleScope scope(isolate); | 14148 HandleScope scope(isolate); |
| 14149 ASSERT(args.length() == 1); | 14149 ASSERT(args.length() == 1); |
| 14150 CONVERT_ARG_HANDLE_CHECKED(String, str, 0); | 14150 CONVERT_ARG_HANDLE_CHECKED(String, str, 0); |
| 14151 FlattenString(str); | 14151 FlattenString(str); |
| 14152 return isolate->heap()->undefined_value(); | 14152 return isolate->heap()->undefined_value(); |
| 14153 } | 14153 } |
| 14154 | 14154 |
| 14155 | 14155 |
| 14156 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyContextDisposed) { |
| 14157 HandleScope scope(isolate); |
| 14158 ASSERT(args.length() == 0); |
| 14159 isolate->heap()->NotifyContextDisposed(); |
| 14160 return isolate->heap()->undefined_value(); |
| 14161 } |
| 14162 |
| 14163 |
| 14156 RUNTIME_FUNCTION(MaybeObject*, Runtime_MigrateInstance) { | 14164 RUNTIME_FUNCTION(MaybeObject*, Runtime_MigrateInstance) { |
| 14157 HandleScope scope(isolate); | 14165 HandleScope scope(isolate); |
| 14158 ASSERT(args.length() == 1); | 14166 ASSERT(args.length() == 1); |
| 14159 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 14167 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 14160 if (!object->IsJSObject()) return Smi::FromInt(0); | 14168 if (!object->IsJSObject()) return Smi::FromInt(0); |
| 14161 Handle<JSObject> js_object = Handle<JSObject>::cast(object); | 14169 Handle<JSObject> js_object = Handle<JSObject>::cast(object); |
| 14162 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); | 14170 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); |
| 14163 JSObject::MigrateInstance(js_object); | 14171 JSObject::MigrateInstance(js_object); |
| 14164 return *object; | 14172 return *object; |
| 14165 } | 14173 } |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14641 // Handle last resort GC and make sure to allow future allocations | 14649 // Handle last resort GC and make sure to allow future allocations |
| 14642 // to grow the heap without causing GCs (if possible). | 14650 // to grow the heap without causing GCs (if possible). |
| 14643 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14651 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14644 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14652 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14645 "Runtime::PerformGC"); | 14653 "Runtime::PerformGC"); |
| 14646 } | 14654 } |
| 14647 } | 14655 } |
| 14648 | 14656 |
| 14649 | 14657 |
| 14650 } } // namespace v8::internal | 14658 } } // namespace v8::internal |
| OLD | NEW |