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 10737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10748 if (scope_info->Type() != FUNCTION_SCOPE) { | 10748 if (scope_info->Type() != FUNCTION_SCOPE) { |
10749 // Global or eval code. | 10749 // Global or eval code. |
10750 CompilationInfoWithZone info(script); | 10750 CompilationInfoWithZone info(script); |
10751 if (scope_info->Type() == GLOBAL_SCOPE) { | 10751 if (scope_info->Type() == GLOBAL_SCOPE) { |
10752 info.MarkAsGlobal(); | 10752 info.MarkAsGlobal(); |
10753 } else { | 10753 } else { |
10754 ASSERT(scope_info->Type() == EVAL_SCOPE); | 10754 ASSERT(scope_info->Type() == EVAL_SCOPE); |
10755 info.MarkAsEval(); | 10755 info.MarkAsEval(); |
10756 info.SetContext(Handle<Context>(function_->context())); | 10756 info.SetContext(Handle<Context>(function_->context())); |
10757 } | 10757 } |
10758 if (ParserApi::Parse(&info, kNoParsingFlags) && Scope::Analyze(&info)) { | 10758 if (Parser::Parse(&info) && Scope::Analyze(&info)) { |
10759 scope = info.function()->scope(); | 10759 scope = info.function()->scope(); |
10760 } | 10760 } |
10761 RetrieveScopeChain(scope, shared_info); | 10761 RetrieveScopeChain(scope, shared_info); |
10762 } else { | 10762 } else { |
10763 // Function code | 10763 // Function code |
10764 CompilationInfoWithZone info(shared_info); | 10764 CompilationInfoWithZone info(shared_info); |
10765 if (ParserApi::Parse(&info, kNoParsingFlags) && Scope::Analyze(&info)) { | 10765 if (Parser::Parse(&info) && Scope::Analyze(&info)) { |
10766 scope = info.function()->scope(); | 10766 scope = info.function()->scope(); |
10767 } | 10767 } |
10768 RetrieveScopeChain(scope, shared_info); | 10768 RetrieveScopeChain(scope, shared_info); |
10769 } | 10769 } |
10770 } | 10770 } |
10771 } | 10771 } |
10772 | 10772 |
10773 ScopeIterator(Isolate* isolate, | 10773 ScopeIterator(Isolate* isolate, |
10774 Handle<JSFunction> function) | 10774 Handle<JSFunction> function) |
10775 : isolate_(isolate), | 10775 : isolate_(isolate), |
(...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13018 // Handle last resort GC and make sure to allow future allocations | 13018 // Handle last resort GC and make sure to allow future allocations |
13019 // to grow the heap without causing GCs (if possible). | 13019 // to grow the heap without causing GCs (if possible). |
13020 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13020 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13021 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13021 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13022 "Runtime::PerformGC"); | 13022 "Runtime::PerformGC"); |
13023 } | 13023 } |
13024 } | 13024 } |
13025 | 13025 |
13026 | 13026 |
13027 } } // namespace v8::internal | 13027 } } // namespace v8::internal |
OLD | NEW |