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