| 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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 isolate->counters()->cow_arrays_created_runtime()->Increment(); | 672 isolate->counters()->cow_arrays_created_runtime()->Increment(); |
| 673 } | 673 } |
| 674 | 674 |
| 675 JSObject* boilerplate_object = JSObject::cast(*boilerplate); | 675 JSObject* boilerplate_object = JSObject::cast(*boilerplate); |
| 676 AllocationSiteMode mode = AllocationSiteInfo::GetMode( | 676 AllocationSiteMode mode = AllocationSiteInfo::GetMode( |
| 677 boilerplate_object->GetElementsKind()); | 677 boilerplate_object->GetElementsKind()); |
| 678 return isolate->heap()->CopyJSObject(boilerplate_object, mode); | 678 return isolate->heap()->CopyJSObject(boilerplate_object, mode); |
| 679 } | 679 } |
| 680 | 680 |
| 681 | 681 |
| 682 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateSymbol) { |
| 683 NoHandleAllocation ha; |
| 684 ASSERT(args.length() == 0); |
| 685 return isolate->heap()->AllocateSymbol(); |
| 686 } |
| 687 |
| 688 |
| 682 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSProxy) { | 689 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSProxy) { |
| 683 ASSERT(args.length() == 2); | 690 ASSERT(args.length() == 2); |
| 684 CONVERT_ARG_CHECKED(JSReceiver, handler, 0); | 691 CONVERT_ARG_CHECKED(JSReceiver, handler, 0); |
| 685 Object* prototype = args[1]; | 692 Object* prototype = args[1]; |
| 686 Object* used_prototype = | 693 Object* used_prototype = |
| 687 prototype->IsJSReceiver() ? prototype : isolate->heap()->null_value(); | 694 prototype->IsJSReceiver() ? prototype : isolate->heap()->null_value(); |
| 688 return isolate->heap()->AllocateJSProxy(handler, used_prototype); | 695 return isolate->heap()->AllocateJSProxy(handler, used_prototype); |
| 689 } | 696 } |
| 690 | 697 |
| 691 | 698 |
| (...skipping 12836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13528 // Handle last resort GC and make sure to allow future allocations | 13535 // Handle last resort GC and make sure to allow future allocations |
| 13529 // to grow the heap without causing GCs (if possible). | 13536 // to grow the heap without causing GCs (if possible). |
| 13530 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13537 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13531 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13538 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13532 "Runtime::PerformGC"); | 13539 "Runtime::PerformGC"); |
| 13533 } | 13540 } |
| 13534 } | 13541 } |
| 13535 | 13542 |
| 13536 | 13543 |
| 13537 } } // namespace v8::internal | 13544 } } // namespace v8::internal |
| OLD | NEW |