Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/runtime.cc

Issue 10538102: Enable lazy compilation for non-trivial outer contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ulan Degenbaev. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/scopes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 2176
2177 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0); 2177 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0);
2178 Handle<Object> code = args.at<Object>(1); 2178 Handle<Object> code = args.at<Object>(1);
2179 2179
2180 if (code->IsNull()) return *target; 2180 if (code->IsNull()) return *target;
2181 RUNTIME_ASSERT(code->IsJSFunction()); 2181 RUNTIME_ASSERT(code->IsJSFunction());
2182 Handle<JSFunction> source = Handle<JSFunction>::cast(code); 2182 Handle<JSFunction> source = Handle<JSFunction>::cast(code);
2183 Handle<SharedFunctionInfo> target_shared(target->shared()); 2183 Handle<SharedFunctionInfo> target_shared(target->shared());
2184 Handle<SharedFunctionInfo> source_shared(source->shared()); 2184 Handle<SharedFunctionInfo> source_shared(source->shared());
2185 2185
2186 if (!source->is_compiled() && 2186 if (!JSFunction::EnsureCompiled(source, KEEP_EXCEPTION)) {
2187 !JSFunction::CompileLazy(source, KEEP_EXCEPTION)) {
2188 return Failure::Exception(); 2187 return Failure::Exception();
2189 } 2188 }
2190 2189
2191 // Set the code, scope info, formal parameter count, and the length 2190 // Set the code, scope info, formal parameter count, and the length
2192 // of the target shared function info. Set the source code of the 2191 // of the target shared function info. Set the source code of the
2193 // target function to undefined. SetCode is only used for built-in 2192 // target function to undefined. SetCode is only used for built-in
2194 // constructors like String, Array, and Object, and some web code 2193 // constructors like String, Array, and Object, and some web code
2195 // doesn't like seeing source code for constructors. 2194 // doesn't like seeing source code for constructors.
2196 target_shared->set_code(source_shared->code()); 2195 target_shared->set_code(source_shared->code());
2197 target_shared->set_scope_info(source_shared->scope_info()); 2196 target_shared->set_scope_info(source_shared->scope_info());
(...skipping 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after
4848 } 4847 }
4849 return isolate->heap()->true_value(); 4848 return isolate->heap()->true_value();
4850 } 4849 }
4851 4850
4852 4851
4853 // Set one shot breakpoints for the callback function that is passed to a 4852 // Set one shot breakpoints for the callback function that is passed to a
4854 // built-in function such as Array.forEach to enable stepping into the callback. 4853 // built-in function such as Array.forEach to enable stepping into the callback.
4855 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrepareStepInIfStepping) { 4854 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrepareStepInIfStepping) {
4856 Debug* debug = isolate->debug(); 4855 Debug* debug = isolate->debug();
4857 if (!debug->IsStepping()) return NULL; 4856 if (!debug->IsStepping()) return NULL;
4858 CONVERT_ARG_CHECKED(Object, callback, 0); 4857 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callback, 0);
4859 HandleScope scope(isolate); 4858 HandleScope scope(isolate);
4860 Handle<SharedFunctionInfo> shared_info(JSFunction::cast(callback)->shared());
4861 // When leaving the callback, step out has been activated, but not performed 4859 // When leaving the callback, step out has been activated, but not performed
4862 // if we do not leave the builtin. To be able to step into the callback 4860 // if we do not leave the builtin. To be able to step into the callback
4863 // again, we need to clear the step out at this point. 4861 // again, we need to clear the step out at this point.
4864 debug->ClearStepOut(); 4862 debug->ClearStepOut();
4865 debug->FloodWithOneShot(shared_info); 4863 debug->FloodWithOneShot(callback);
4866 return NULL; 4864 return NULL;
4867 } 4865 }
4868 4866
4869 4867
4870 // Set a local property, even if it is READ_ONLY. If the property does not 4868 // Set a local property, even if it is READ_ONLY. If the property does not
4871 // exist, it will be added with attributes NONE. 4869 // exist, it will be added with attributes NONE.
4872 RUNTIME_FUNCTION(MaybeObject*, Runtime_IgnoreAttributesAndSetProperty) { 4870 RUNTIME_FUNCTION(MaybeObject*, Runtime_IgnoreAttributesAndSetProperty) {
4873 NoHandleAllocation ha; 4871 NoHandleAllocation ha;
4874 RUNTIME_ASSERT(args.length() == 3 || args.length() == 4); 4872 RUNTIME_ASSERT(args.length() == 3 || args.length() == 4);
4875 CONVERT_ARG_CHECKED(JSObject, object, 0); 4873 CONVERT_ARG_CHECKED(JSObject, object, 0);
(...skipping 3257 matching lines...) Expand 10 before | Expand all | Expand 10 after
8133 // the shared part of the function. Since the receiver is 8131 // the shared part of the function. Since the receiver is
8134 // ignored anyway, we use the global object as the receiver 8132 // ignored anyway, we use the global object as the receiver
8135 // instead of a new JSFunction object. This way, errors are 8133 // instead of a new JSFunction object. This way, errors are
8136 // reported the same way whether or not 'Function' is called 8134 // reported the same way whether or not 'Function' is called
8137 // using 'new'. 8135 // using 'new'.
8138 return isolate->context()->global(); 8136 return isolate->context()->global();
8139 } 8137 }
8140 } 8138 }
8141 8139
8142 // The function should be compiled for the optimization hints to be 8140 // The function should be compiled for the optimization hints to be
8143 // available. We cannot use EnsureCompiled because that forces a 8141 // available.
8144 // compilation through the shared function info which makes it 8142 JSFunction::EnsureCompiled(function, CLEAR_EXCEPTION);
8145 // impossible for us to optimize.
8146 if (!function->is_compiled()) {
8147 JSFunction::CompileLazy(function, CLEAR_EXCEPTION);
8148 }
8149 8143
8150 Handle<SharedFunctionInfo> shared(function->shared(), isolate); 8144 Handle<SharedFunctionInfo> shared(function->shared(), isolate);
8151 if (!function->has_initial_map() && 8145 if (!function->has_initial_map() &&
8152 shared->IsInobjectSlackTrackingInProgress()) { 8146 shared->IsInobjectSlackTrackingInProgress()) {
8153 // The tracking is already in progress for another function. We can only 8147 // The tracking is already in progress for another function. We can only
8154 // track one initial_map at a time, so we force the completion before the 8148 // track one initial_map at a time, so we force the completion before the
8155 // function is called as a constructor for the first time. 8149 // function is called as a constructor for the first time.
8156 shared->CompleteInobjectSlackTracking(); 8150 shared->CompleteInobjectSlackTracking();
8157 } 8151 }
8158 8152
(...skipping 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after
11148 Handle<SharedFunctionInfo> shared_info(function_->shared()); 11142 Handle<SharedFunctionInfo> shared_info(function_->shared());
11149 Handle<ScopeInfo> scope_info(shared_info->scope_info()); 11143 Handle<ScopeInfo> scope_info(shared_info->scope_info());
11150 if (shared_info->script() == isolate->heap()->undefined_value()) { 11144 if (shared_info->script() == isolate->heap()->undefined_value()) {
11151 while (context_->closure() == *function_) { 11145 while (context_->closure() == *function_) {
11152 context_ = Handle<Context>(context_->previous(), isolate_); 11146 context_ = Handle<Context>(context_->previous(), isolate_);
11153 } 11147 }
11154 return; 11148 return;
11155 } 11149 }
11156 11150
11157 // Get the debug info (create it if it does not exist). 11151 // Get the debug info (create it if it does not exist).
11158 if (!isolate->debug()->EnsureDebugInfo(shared_info)) { 11152 if (!isolate->debug()->EnsureDebugInfo(shared_info, function_)) {
11159 // Return if ensuring debug info failed. 11153 // Return if ensuring debug info failed.
11160 return; 11154 return;
11161 } 11155 }
11162 Handle<DebugInfo> debug_info = Debug::GetDebugInfo(shared_info); 11156 Handle<DebugInfo> debug_info = Debug::GetDebugInfo(shared_info);
11163 11157
11164 // Find the break point where execution has stopped. 11158 // Find the break point where execution has stopped.
11165 BreakLocationIterator break_location_iterator(debug_info, 11159 BreakLocationIterator break_location_iterator(debug_info,
11166 ALL_BREAK_LOCATIONS); 11160 ALL_BREAK_LOCATIONS);
11167 break_location_iterator.FindBreakLocationFromAddress(frame->pc()); 11161 break_location_iterator.FindBreakLocationFromAddress(frame->pc());
11168 if (break_location_iterator.IsExit()) { 11162 if (break_location_iterator.IsExit()) {
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
11671 Handle<SharedFunctionInfo> shared(fun->shared()); 11665 Handle<SharedFunctionInfo> shared(fun->shared());
11672 // Find the number of break points 11666 // Find the number of break points
11673 Handle<Object> break_locations = Debug::GetSourceBreakLocations(shared); 11667 Handle<Object> break_locations = Debug::GetSourceBreakLocations(shared);
11674 if (break_locations->IsUndefined()) return isolate->heap()->undefined_value(); 11668 if (break_locations->IsUndefined()) return isolate->heap()->undefined_value();
11675 // Return array as JS array 11669 // Return array as JS array
11676 return *isolate->factory()->NewJSArrayWithElements( 11670 return *isolate->factory()->NewJSArrayWithElements(
11677 Handle<FixedArray>::cast(break_locations)); 11671 Handle<FixedArray>::cast(break_locations));
11678 } 11672 }
11679 11673
11680 11674
11681 // Set a break point in a function
11682 // args[0]: function
11683 // args[1]: number: break source position (within the function source)
11684 // args[2]: number: break point object
11685 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetFunctionBreakPoint) {
11686 HandleScope scope(isolate);
11687 ASSERT(args.length() == 3);
11688 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
11689 Handle<SharedFunctionInfo> shared(fun->shared());
11690 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
11691 RUNTIME_ASSERT(source_position >= 0);
11692 Handle<Object> break_point_object_arg = args.at<Object>(2);
11693
11694 // Set break point.
11695 isolate->debug()->SetBreakPoint(shared, break_point_object_arg,
11696 &source_position);
11697
11698 return Smi::FromInt(source_position);
11699 }
11700
11701
11702 Object* Runtime::FindSharedFunctionInfoInScript(Isolate* isolate, 11675 Object* Runtime::FindSharedFunctionInfoInScript(Isolate* isolate,
11703 Handle<Script> script, 11676 Handle<Script> script,
11704 int position) { 11677 int position) {
11678 // The below fix-point iteration depends on all functions that cannot be
11679 // compiled lazily without a context to not be compiled at all. Compilation
11680 // will be triggered at points where we do not need a context.
11681 isolate->debug()->PrepareForBreakPoints();
11682
11705 // Iterate the heap looking for SharedFunctionInfo generated from the 11683 // Iterate the heap looking for SharedFunctionInfo generated from the
11706 // script. The inner most SharedFunctionInfo containing the source position 11684 // script. The inner most SharedFunctionInfo containing the source position
11707 // for the requested break point is found. 11685 // for the requested break point is found.
11708 // NOTE: This might require several heap iterations. If the SharedFunctionInfo 11686 // NOTE: This might require several heap iterations. If the SharedFunctionInfo
11709 // which is found is not compiled it is compiled and the heap is iterated 11687 // which is found is not compiled it is compiled and the heap is iterated
11710 // again as the compilation might create inner functions from the newly 11688 // again as the compilation might create inner functions from the newly
11711 // compiled function and the actual requested break point might be in one of 11689 // compiled function and the actual requested break point might be in one of
11712 // these functions. 11690 // these functions.
11713 bool done = false; 11691 bool done = false;
11714 // The current candidate for the source position: 11692 // The current candidate for the source position:
11715 int target_start_position = RelocInfo::kNoPosition; 11693 int target_start_position = RelocInfo::kNoPosition;
11716 Handle<SharedFunctionInfo> target; 11694 Handle<SharedFunctionInfo> target;
11717 while (!done) { 11695 while (!done) {
11718 { // Extra scope for iterator and no-allocation. 11696 { // Extra scope for iterator and no-allocation.
11719 isolate->heap()->EnsureHeapIsIterable(); 11697 isolate->heap()->EnsureHeapIsIterable();
11720 AssertNoAllocation no_alloc_during_heap_iteration; 11698 AssertNoAllocation no_alloc_during_heap_iteration;
11721 HeapIterator iterator; 11699 HeapIterator iterator;
11722 for (HeapObject* obj = iterator.next(); 11700 for (HeapObject* obj = iterator.next();
11723 obj != NULL; obj = iterator.next()) { 11701 obj != NULL; obj = iterator.next()) {
11724 if (obj->IsSharedFunctionInfo()) { 11702 if (obj->IsSharedFunctionInfo()) {
11725 Handle<SharedFunctionInfo> shared(SharedFunctionInfo::cast(obj)); 11703 Handle<SharedFunctionInfo> shared(SharedFunctionInfo::cast(obj));
11704 if (!shared->allows_lazy_compilation_without_context() &&
11705 !shared->is_compiled()) {
11706 // Skip functions that we cannot compile lazily without a context,
11707 // which is not available here.
11708 continue;
11709 }
11726 if (shared->script() == *script) { 11710 if (shared->script() == *script) {
11727 // If the SharedFunctionInfo found has the requested script data and 11711 // If the SharedFunctionInfo found has the requested script data and
11728 // contains the source position it is a candidate. 11712 // contains the source position it is a candidate.
11729 int start_position = shared->function_token_position(); 11713 int start_position = shared->function_token_position();
11730 if (start_position == RelocInfo::kNoPosition) { 11714 if (start_position == RelocInfo::kNoPosition) {
11731 start_position = shared->start_position(); 11715 start_position = shared->start_position();
11732 } 11716 }
11733 if (start_position <= position && 11717 if (start_position <= position &&
11734 position <= shared->end_position()) { 11718 position <= shared->end_position()) {
11735 // If there is no candidate or this function is within the current 11719 // If there is no candidate or this function is within the current
(...skipping 24 matching lines...) Expand all
11760 } 11744 }
11761 } 11745 }
11762 } 11746 }
11763 } // End for loop. 11747 } // End for loop.
11764 } // End No allocation scope. 11748 } // End No allocation scope.
11765 11749
11766 if (target.is_null()) { 11750 if (target.is_null()) {
11767 return isolate->heap()->undefined_value(); 11751 return isolate->heap()->undefined_value();
11768 } 11752 }
11769 11753
11770 // If the candidate found is compiled we are done. NOTE: when lazy 11754 // If the candidate found is compiled we are done.
11771 // compilation of inner functions is introduced some additional checking
11772 // needs to be done here to compile inner functions.
11773 done = target->is_compiled(); 11755 done = target->is_compiled();
11774 if (!done) { 11756 if (!done) {
11775 // If the candidate is not compiled compile it to reveal any inner 11757 // If the candidate is not compiled, compile it to reveal any inner
11776 // functions which might contain the requested source position. 11758 // functions which might contain the requested source position. This
11759 // will compile all inner functions that cannot be compiled without a
11760 // context, because Compiler::BuildFunctionInfo checks whether the
11761 // debugger is active.
11777 SharedFunctionInfo::CompileLazy(target, KEEP_EXCEPTION); 11762 SharedFunctionInfo::CompileLazy(target, KEEP_EXCEPTION);
11778 } 11763 }
11779 } // End while loop. 11764 } // End while loop.
11780 11765
11781 return *target; 11766 return *target;
11782 } 11767 }
11783 11768
11784 11769
11770 // Set a break point in a function.
11771 // args[0]: function
11772 // args[1]: number: break source position (within the function source)
11773 // args[2]: number: break point object
11774 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetFunctionBreakPoint) {
11775 HandleScope scope(isolate);
11776 ASSERT(args.length() == 3);
11777 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
11778 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
11779 RUNTIME_ASSERT(source_position >= 0);
11780 Handle<Object> break_point_object_arg = args.at<Object>(2);
11781
11782 // Set break point.
11783 isolate->debug()->SetBreakPoint(function, break_point_object_arg,
11784 &source_position);
11785
11786 return Smi::FromInt(source_position);
11787 }
11788
11789
11785 // Changes the state of a break point in a script and returns source position 11790 // Changes the state of a break point in a script and returns source position
11786 // where break point was set. NOTE: Regarding performance see the NOTE for 11791 // where break point was set. NOTE: Regarding performance see the NOTE for
11787 // GetScriptFromScriptData. 11792 // GetScriptFromScriptData.
11788 // args[0]: script to set break point in 11793 // args[0]: script to set break point in
11789 // args[1]: number: break source position (within the script source) 11794 // args[1]: number: break source position (within the script source)
11790 // args[2]: number: break point object 11795 // args[2]: number: break point object
11791 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetScriptBreakPoint) { 11796 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetScriptBreakPoint) {
11792 HandleScope scope(isolate); 11797 HandleScope scope(isolate);
11793 ASSERT(args.length() == 3); 11798 ASSERT(args.length() == 3);
11794 CONVERT_ARG_HANDLE_CHECKED(JSValue, wrapper, 0); 11799 CONVERT_ARG_HANDLE_CHECKED(JSValue, wrapper, 0);
11795 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]); 11800 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
11796 RUNTIME_ASSERT(source_position >= 0); 11801 RUNTIME_ASSERT(source_position >= 0);
11797 Handle<Object> break_point_object_arg = args.at<Object>(2); 11802 Handle<Object> break_point_object_arg = args.at<Object>(2);
11798 11803
11799 // Get the script from the script wrapper. 11804 // Get the script from the script wrapper.
11800 RUNTIME_ASSERT(wrapper->value()->IsScript()); 11805 RUNTIME_ASSERT(wrapper->value()->IsScript());
11801 Handle<Script> script(Script::cast(wrapper->value())); 11806 Handle<Script> script(Script::cast(wrapper->value()));
11802 11807
11803 Object* result = Runtime::FindSharedFunctionInfoInScript( 11808 // Set break point.
11804 isolate, script, source_position); 11809 if (!isolate->debug()->SetBreakPointForScript(script, break_point_object_arg,
11805 if (!result->IsUndefined()) { 11810 &source_position)) {
11806 Handle<SharedFunctionInfo> shared(SharedFunctionInfo::cast(result)); 11811 return isolate->heap()->undefined_value();
11807 // Find position within function. The script position might be before the
11808 // source position of the first function.
11809 int position;
11810 if (shared->start_position() > source_position) {
11811 position = 0;
11812 } else {
11813 position = source_position - shared->start_position();
11814 }
11815 isolate->debug()->SetBreakPoint(shared, break_point_object_arg, &position);
11816 position += shared->start_position();
11817 return Smi::FromInt(position);
11818 } 11812 }
11819 return isolate->heap()->undefined_value(); 11813
11814 return Smi::FromInt(source_position);
11820 } 11815 }
11821 11816
11822 11817
11823 // Clear a break point 11818 // Clear a break point
11824 // args[0]: number: break point object 11819 // args[0]: number: break point object
11825 RUNTIME_FUNCTION(MaybeObject*, Runtime_ClearBreakPoint) { 11820 RUNTIME_FUNCTION(MaybeObject*, Runtime_ClearBreakPoint) {
11826 HandleScope scope(isolate); 11821 HandleScope scope(isolate);
11827 ASSERT(args.length() == 1); 11822 ASSERT(args.length() == 1);
11828 Handle<Object> break_point_object_arg = args.at<Object>(0); 11823 Handle<Object> break_point_object_arg = args.at<Object>(0);
11829 11824
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
12533 return isolate->heap()->undefined_value(); 12528 return isolate->heap()->undefined_value();
12534 } 12529 }
12535 12530
12536 12531
12537 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugDisassembleFunction) { 12532 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugDisassembleFunction) {
12538 #ifdef DEBUG 12533 #ifdef DEBUG
12539 HandleScope scope(isolate); 12534 HandleScope scope(isolate);
12540 ASSERT(args.length() == 1); 12535 ASSERT(args.length() == 1);
12541 // Get the function and make sure it is compiled. 12536 // Get the function and make sure it is compiled.
12542 CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0); 12537 CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0);
12543 if (!JSFunction::CompileLazy(func, KEEP_EXCEPTION)) { 12538 if (!JSFunction::EnsureCompiled(func, KEEP_EXCEPTION)) {
12544 return Failure::Exception(); 12539 return Failure::Exception();
12545 } 12540 }
12546 func->code()->PrintLn(); 12541 func->code()->PrintLn();
12547 #endif // DEBUG 12542 #endif // DEBUG
12548 return isolate->heap()->undefined_value(); 12543 return isolate->heap()->undefined_value();
12549 } 12544 }
12550 12545
12551 12546
12552 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugDisassembleConstructor) { 12547 RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugDisassembleConstructor) {
12553 #ifdef DEBUG 12548 #ifdef DEBUG
12554 HandleScope scope(isolate); 12549 HandleScope scope(isolate);
12555 ASSERT(args.length() == 1); 12550 ASSERT(args.length() == 1);
12556 // Get the function and make sure it is compiled. 12551 // Get the function and make sure it is compiled.
12557 CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0); 12552 CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0);
12558 if (!JSFunction::CompileLazy(func, KEEP_EXCEPTION)) { 12553 if (!JSFunction::EnsureCompiled(func, KEEP_EXCEPTION)) {
12559 return Failure::Exception(); 12554 return Failure::Exception();
12560 } 12555 }
12561 func->shared()->construct_stub()->PrintLn(); 12556 func->shared()->construct_stub()->PrintLn();
12562 #endif // DEBUG 12557 #endif // DEBUG
12563 return isolate->heap()->undefined_value(); 12558 return isolate->heap()->undefined_value();
12564 } 12559 }
12565 12560
12566 12561
12567 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetInferredName) { 12562 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetInferredName) {
12568 NoHandleAllocation ha; 12563 NoHandleAllocation ha;
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
13595 // Handle last resort GC and make sure to allow future allocations 13590 // Handle last resort GC and make sure to allow future allocations
13596 // to grow the heap without causing GCs (if possible). 13591 // to grow the heap without causing GCs (if possible).
13597 isolate->counters()->gc_last_resort_from_js()->Increment(); 13592 isolate->counters()->gc_last_resort_from_js()->Increment();
13598 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13593 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13599 "Runtime::PerformGC"); 13594 "Runtime::PerformGC");
13600 } 13595 }
13601 } 13596 }
13602 13597
13603 13598
13604 } } // namespace v8::internal 13599 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698