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 109026: Add inferred function name to the json protocol (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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/runtime.h ('k') | test/mjsunit/debug-backtrace.js » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 6842 matching lines...) Expand 10 before | Expand all | Expand 10 after
6853 ASSERT(args.length() == 1); 6853 ASSERT(args.length() == 1);
6854 // Get the function and make sure it is compiled. 6854 // Get the function and make sure it is compiled.
6855 CONVERT_ARG_CHECKED(JSFunction, func, 0); 6855 CONVERT_ARG_CHECKED(JSFunction, func, 0);
6856 if (!func->is_compiled() && !CompileLazy(func, KEEP_EXCEPTION)) { 6856 if (!func->is_compiled() && !CompileLazy(func, KEEP_EXCEPTION)) {
6857 return Failure::Exception(); 6857 return Failure::Exception();
6858 } 6858 }
6859 func->code()->PrintLn(); 6859 func->code()->PrintLn();
6860 #endif // DEBUG 6860 #endif // DEBUG
6861 return Heap::undefined_value(); 6861 return Heap::undefined_value();
6862 } 6862 }
6863
6864
6865 static Object* Runtime_FunctionGetInferredName(Arguments args) {
6866 NoHandleAllocation ha;
6867 ASSERT(args.length() == 1);
6868
6869 CONVERT_CHECKED(JSFunction, f, args[0]);
6870 return f->shared()->inferred_name();
6871 }
6863 #endif // ENABLE_DEBUGGER_SUPPORT 6872 #endif // ENABLE_DEBUGGER_SUPPORT
6864 6873
6865 6874
6866 // Finds the script object from the script data. NOTE: This operation uses 6875 // Finds the script object from the script data. NOTE: This operation uses
6867 // heap traversal to find the function generated for the source position 6876 // heap traversal to find the function generated for the source position
6868 // for the requested break point. For lazily compiled functions several heap 6877 // for the requested break point. For lazily compiled functions several heap
6869 // traversals might be required rendering this operation as a rather slow 6878 // traversals might be required rendering this operation as a rather slow
6870 // operation. However for setting break points which is normally done through 6879 // operation. However for setting break points which is normally done through
6871 // some kind of user interaction the performance is not crucial. 6880 // some kind of user interaction the performance is not crucial.
6872 static Handle<Object> Runtime_GetScriptFromScriptName( 6881 static Handle<Object> Runtime_GetScriptFromScriptName(
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
7004 } else { 7013 } else {
7005 // Handle last resort GC and make sure to allow future allocations 7014 // Handle last resort GC and make sure to allow future allocations
7006 // to grow the heap without causing GCs (if possible). 7015 // to grow the heap without causing GCs (if possible).
7007 Counters::gc_last_resort_from_js.Increment(); 7016 Counters::gc_last_resort_from_js.Increment();
7008 Heap::CollectAllGarbage(); 7017 Heap::CollectAllGarbage();
7009 } 7018 }
7010 } 7019 }
7011 7020
7012 7021
7013 } } // namespace v8::internal 7022 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/debug-backtrace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698