| 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 27 matching lines...) Expand all Loading... |
| 38 #include "codegen.h" | 38 #include "codegen.h" |
| 39 #include "compilation-cache.h" | 39 #include "compilation-cache.h" |
| 40 #include "compiler.h" | 40 #include "compiler.h" |
| 41 #include "cpu.h" | 41 #include "cpu.h" |
| 42 #include "cpu-profiler.h" | 42 #include "cpu-profiler.h" |
| 43 #include "dateparser-inl.h" | 43 #include "dateparser-inl.h" |
| 44 #include "debug.h" | 44 #include "debug.h" |
| 45 #include "deoptimizer.h" | 45 #include "deoptimizer.h" |
| 46 #include "date.h" | 46 #include "date.h" |
| 47 #include "execution.h" | 47 #include "execution.h" |
| 48 #include "feedbackslots.h" |
| 48 #include "full-codegen.h" | 49 #include "full-codegen.h" |
| 49 #include "global-handles.h" | 50 #include "global-handles.h" |
| 50 #include "isolate-inl.h" | 51 #include "isolate-inl.h" |
| 51 #include "jsregexp.h" | 52 #include "jsregexp.h" |
| 52 #include "jsregexp-inl.h" | 53 #include "jsregexp-inl.h" |
| 53 #include "json-parser.h" | 54 #include "json-parser.h" |
| 54 #include "json-stringifier.h" | 55 #include "json-stringifier.h" |
| 55 #include "liveedit.h" | 56 #include "liveedit.h" |
| 56 #include "misc-intrinsics.h" | 57 #include "misc-intrinsics.h" |
| 57 #include "parser.h" | 58 #include "parser.h" |
| (...skipping 8407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8465 } | 8466 } |
| 8466 | 8467 |
| 8467 | 8468 |
| 8468 RUNTIME_FUNCTION(MaybeObject*, Runtime_ClearFunctionTypeFeedback) { | 8469 RUNTIME_FUNCTION(MaybeObject*, Runtime_ClearFunctionTypeFeedback) { |
| 8469 HandleScope scope(isolate); | 8470 HandleScope scope(isolate); |
| 8470 ASSERT(args.length() == 1); | 8471 ASSERT(args.length() == 1); |
| 8471 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 8472 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
| 8472 Code* unoptimized = function->shared()->code(); | 8473 Code* unoptimized = function->shared()->code(); |
| 8473 if (unoptimized->kind() == Code::FUNCTION) { | 8474 if (unoptimized->kind() == Code::FUNCTION) { |
| 8474 unoptimized->ClearInlineCaches(); | 8475 unoptimized->ClearInlineCaches(); |
| 8475 unoptimized->ClearTypeFeedbackCells(isolate->heap()); | 8476 unoptimized->ClearTypeFeedbackInfo(isolate->heap()); |
| 8476 } | 8477 } |
| 8477 return isolate->heap()->undefined_value(); | 8478 return isolate->heap()->undefined_value(); |
| 8478 } | 8479 } |
| 8479 | 8480 |
| 8480 | 8481 |
| 8481 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunningInSimulator) { | 8482 RUNTIME_FUNCTION(MaybeObject*, Runtime_RunningInSimulator) { |
| 8482 SealHandleScope shs(isolate); | 8483 SealHandleScope shs(isolate); |
| 8483 #if defined(USE_SIMULATOR) | 8484 #if defined(USE_SIMULATOR) |
| 8484 return isolate->heap()->true_value(); | 8485 return isolate->heap()->true_value(); |
| 8485 #else | 8486 #else |
| (...skipping 3273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11759 if (scope_info->scope_type() != FUNCTION_SCOPE) { | 11760 if (scope_info->scope_type() != FUNCTION_SCOPE) { |
| 11760 // Global or eval code. | 11761 // Global or eval code. |
| 11761 CompilationInfoWithZone info(script); | 11762 CompilationInfoWithZone info(script); |
| 11762 if (scope_info->scope_type() == GLOBAL_SCOPE) { | 11763 if (scope_info->scope_type() == GLOBAL_SCOPE) { |
| 11763 info.MarkAsGlobal(); | 11764 info.MarkAsGlobal(); |
| 11764 } else { | 11765 } else { |
| 11765 ASSERT(scope_info->scope_type() == EVAL_SCOPE); | 11766 ASSERT(scope_info->scope_type() == EVAL_SCOPE); |
| 11766 info.MarkAsEval(); | 11767 info.MarkAsEval(); |
| 11767 info.SetContext(Handle<Context>(function_->context())); | 11768 info.SetContext(Handle<Context>(function_->context())); |
| 11768 } | 11769 } |
| 11769 if (Parser::Parse(&info) && Scope::Analyze(&info)) { | 11770 if (Parser::Parse(&info) && Scope::Analyze(&info) && |
| 11771 FeedbackSlotAllocator::Run(&info)) { |
| 11770 scope = info.function()->scope(); | 11772 scope = info.function()->scope(); |
| 11771 } | 11773 } |
| 11772 RetrieveScopeChain(scope, shared_info); | 11774 RetrieveScopeChain(scope, shared_info); |
| 11773 } else { | 11775 } else { |
| 11774 // Function code | 11776 // Function code |
| 11775 CompilationInfoWithZone info(shared_info); | 11777 CompilationInfoWithZone info(shared_info); |
| 11776 if (Parser::Parse(&info) && Scope::Analyze(&info)) { | 11778 if (Parser::Parse(&info) && Scope::Analyze(&info) && |
| 11779 FeedbackSlotAllocator::Run(&info)) { |
| 11777 scope = info.function()->scope(); | 11780 scope = info.function()->scope(); |
| 11778 } | 11781 } |
| 11779 RetrieveScopeChain(scope, shared_info); | 11782 RetrieveScopeChain(scope, shared_info); |
| 11780 } | 11783 } |
| 11781 } | 11784 } |
| 11782 } | 11785 } |
| 11783 | 11786 |
| 11784 ScopeIterator(Isolate* isolate, | 11787 ScopeIterator(Isolate* isolate, |
| 11785 Handle<JSFunction> function) | 11788 Handle<JSFunction> function) |
| 11786 : isolate_(isolate), | 11789 : isolate_(isolate), |
| (...skipping 3041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14828 // Handle last resort GC and make sure to allow future allocations | 14831 // Handle last resort GC and make sure to allow future allocations |
| 14829 // to grow the heap without causing GCs (if possible). | 14832 // to grow the heap without causing GCs (if possible). |
| 14830 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14833 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 14831 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14834 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 14832 "Runtime::PerformGC"); | 14835 "Runtime::PerformGC"); |
| 14833 } | 14836 } |
| 14834 } | 14837 } |
| 14835 | 14838 |
| 14836 | 14839 |
| 14837 } } // namespace v8::internal | 14840 } } // namespace v8::internal |
| OLD | NEW |