OLD | NEW |
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 7899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7910 CONVERT_CHECKED(JSFunction, f, args[0]); | 7910 CONVERT_CHECKED(JSFunction, f, args[0]); |
7911 return f->shared()->inferred_name(); | 7911 return f->shared()->inferred_name(); |
7912 } | 7912 } |
7913 | 7913 |
7914 #endif // ENABLE_DEBUGGER_SUPPORT | 7914 #endif // ENABLE_DEBUGGER_SUPPORT |
7915 | 7915 |
7916 #ifdef ENABLE_LOGGING_AND_PROFILING | 7916 #ifdef ENABLE_LOGGING_AND_PROFILING |
7917 | 7917 |
7918 static Object* Runtime_ProfilerResume(Arguments args) { | 7918 static Object* Runtime_ProfilerResume(Arguments args) { |
7919 NoHandleAllocation ha; | 7919 NoHandleAllocation ha; |
7920 ASSERT(args.length() == 1); | 7920 ASSERT(args.length() == 2); |
7921 | 7921 |
7922 CONVERT_CHECKED(Smi, smi_modules, args[0]); | 7922 CONVERT_CHECKED(Smi, smi_modules, args[0]); |
7923 v8::V8::ResumeProfilerEx(smi_modules->value()); | 7923 CONVERT_CHECKED(Smi, smi_tag, args[1]); |
| 7924 v8::V8::ResumeProfilerEx(smi_modules->value(), smi_tag->value()); |
7924 return Heap::undefined_value(); | 7925 return Heap::undefined_value(); |
7925 } | 7926 } |
7926 | 7927 |
7927 | 7928 |
7928 static Object* Runtime_ProfilerPause(Arguments args) { | 7929 static Object* Runtime_ProfilerPause(Arguments args) { |
7929 NoHandleAllocation ha; | 7930 NoHandleAllocation ha; |
7930 ASSERT(args.length() == 1); | 7931 ASSERT(args.length() == 2); |
7931 | 7932 |
7932 CONVERT_CHECKED(Smi, smi_modules, args[0]); | 7933 CONVERT_CHECKED(Smi, smi_modules, args[0]); |
7933 v8::V8::PauseProfilerEx(smi_modules->value()); | 7934 CONVERT_CHECKED(Smi, smi_tag, args[1]); |
| 7935 v8::V8::PauseProfilerEx(smi_modules->value(), smi_tag->value()); |
7934 return Heap::undefined_value(); | 7936 return Heap::undefined_value(); |
7935 } | 7937 } |
7936 | 7938 |
7937 #endif // ENABLE_LOGGING_AND_PROFILING | 7939 #endif // ENABLE_LOGGING_AND_PROFILING |
7938 | 7940 |
7939 // Finds the script object from the script data. NOTE: This operation uses | 7941 // Finds the script object from the script data. NOTE: This operation uses |
7940 // heap traversal to find the function generated for the source position | 7942 // heap traversal to find the function generated for the source position |
7941 // for the requested break point. For lazily compiled functions several heap | 7943 // for the requested break point. For lazily compiled functions several heap |
7942 // traversals might be required rendering this operation as a rather slow | 7944 // traversals might be required rendering this operation as a rather slow |
7943 // operation. However for setting break points which is normally done through | 7945 // operation. However for setting break points which is normally done through |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8177 } else { | 8179 } else { |
8178 // Handle last resort GC and make sure to allow future allocations | 8180 // Handle last resort GC and make sure to allow future allocations |
8179 // to grow the heap without causing GCs (if possible). | 8181 // to grow the heap without causing GCs (if possible). |
8180 Counters::gc_last_resort_from_js.Increment(); | 8182 Counters::gc_last_resort_from_js.Increment(); |
8181 Heap::CollectAllGarbage(false); | 8183 Heap::CollectAllGarbage(false); |
8182 } | 8184 } |
8183 } | 8185 } |
8184 | 8186 |
8185 | 8187 |
8186 } } // namespace v8::internal | 8188 } } // namespace v8::internal |
OLD | NEW |