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 8454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8465 } | 8465 } |
8466 | 8466 |
8467 | 8467 |
8468 RUNTIME_FUNCTION(MaybeObject*, Runtime_ClearFunctionTypeFeedback) { | 8468 RUNTIME_FUNCTION(MaybeObject*, Runtime_ClearFunctionTypeFeedback) { |
8469 HandleScope scope(isolate); | 8469 HandleScope scope(isolate); |
8470 ASSERT(args.length() == 1); | 8470 ASSERT(args.length() == 1); |
8471 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 8471 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
8472 Code* unoptimized = function->shared()->code(); | 8472 Code* unoptimized = function->shared()->code(); |
8473 if (unoptimized->kind() == Code::FUNCTION) { | 8473 if (unoptimized->kind() == Code::FUNCTION) { |
8474 unoptimized->ClearInlineCaches(); | 8474 unoptimized->ClearInlineCaches(); |
8475 unoptimized->ClearTypeFeedbackCells(isolate->heap()); | 8475 unoptimized->ClearTypeFeedbackInfo(isolate->heap()); |
8476 } | 8476 } |
8477 return isolate->heap()->undefined_value(); | 8477 return isolate->heap()->undefined_value(); |
8478 } | 8478 } |
8479 | 8479 |
8480 | 8480 |
8481 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunningInSimulator) { | 8481 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunningInSimulator) { |
8482 SealHandleScope shs(isolate); | 8482 SealHandleScope shs(isolate); |
8483 #if defined(USE_SIMULATOR) | 8483 #if defined(USE_SIMULATOR) |
8484 return isolate->heap()->true_value(); | 8484 return isolate->heap()->true_value(); |
8485 #else | 8485 #else |
(...skipping 6342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14828 // Handle last resort GC and make sure to allow future allocations | 14828 // Handle last resort GC and make sure to allow future allocations |
14829 // to grow the heap without causing GCs (if possible). | 14829 // to grow the heap without causing GCs (if possible). |
14830 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14830 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14831 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14831 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14832 "Runtime::PerformGC"); | 14832 "Runtime::PerformGC"); |
14833 } | 14833 } |
14834 } | 14834 } |
14835 | 14835 |
14836 | 14836 |
14837 } } // namespace v8::internal | 14837 } } // namespace v8::internal |
OLD | NEW |