| 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 6981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6992 | 6992 |
| 6993 | 6993 |
| 6994 static Object* Runtime_StackOverflow(Arguments args) { | 6994 static Object* Runtime_StackOverflow(Arguments args) { |
| 6995 NoHandleAllocation na; | 6995 NoHandleAllocation na; |
| 6996 return Top::StackOverflow(); | 6996 return Top::StackOverflow(); |
| 6997 } | 6997 } |
| 6998 | 6998 |
| 6999 | 6999 |
| 7000 static Object* Runtime_StackGuard(Arguments args) { | 7000 static Object* Runtime_StackGuard(Arguments args) { |
| 7001 ASSERT(args.length() == 1); | 7001 ASSERT(args.length() == 1); |
| 7002 | 7002 Isolate* isolate = Isolate::Current(); |
| 7003 // First check if this is a real stack overflow. | 7003 // First check if this is a real stack overflow. |
| 7004 if (StackGuard::IsStackOverflow()) { | 7004 if (isolate->stack_guard()->IsStackOverflow()) { |
| 7005 return Runtime_StackOverflow(args); | 7005 return Runtime_StackOverflow(args); |
| 7006 } | 7006 } |
| 7007 | 7007 |
| 7008 return Execution::HandleStackGuardInterrupt(); | 7008 return Execution::HandleStackGuardInterrupt(); |
| 7009 } | 7009 } |
| 7010 | 7010 |
| 7011 | 7011 |
| 7012 // NOTE: These PrintXXX functions are defined for all builds (not just | 7012 // NOTE: These PrintXXX functions are defined for all builds (not just |
| 7013 // DEBUG builds) because we may want to be able to trace function | 7013 // DEBUG builds) because we may want to be able to trace function |
| 7014 // calls in all modes. | 7014 // calls in all modes. |
| (...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7942 Handle<Object> callback = args.at<Object>(0); | 7942 Handle<Object> callback = args.at<Object>(0); |
| 7943 Handle<Object> data = args.at<Object>(1); | 7943 Handle<Object> data = args.at<Object>(1); |
| 7944 Debugger::SetEventListener(callback, data); | 7944 Debugger::SetEventListener(callback, data); |
| 7945 | 7945 |
| 7946 return HEAP->undefined_value(); | 7946 return HEAP->undefined_value(); |
| 7947 } | 7947 } |
| 7948 | 7948 |
| 7949 | 7949 |
| 7950 static Object* Runtime_Break(Arguments args) { | 7950 static Object* Runtime_Break(Arguments args) { |
| 7951 ASSERT(args.length() == 0); | 7951 ASSERT(args.length() == 0); |
| 7952 StackGuard::DebugBreak(); | 7952 Isolate* isolate = Isolate::Current(); |
| 7953 return HEAP->undefined_value(); | 7953 isolate->stack_guard()->DebugBreak(); |
| 7954 return isolate->heap()->undefined_value(); |
| 7954 } | 7955 } |
| 7955 | 7956 |
| 7956 | 7957 |
| 7957 static Object* DebugLookupResultValue(Object* receiver, String* name, | 7958 static Object* DebugLookupResultValue(Object* receiver, String* name, |
| 7958 LookupResult* result, | 7959 LookupResult* result, |
| 7959 bool* caught_exception) { | 7960 bool* caught_exception) { |
| 7960 Object* value; | 7961 Object* value; |
| 7961 switch (result->type()) { | 7962 switch (result->type()) { |
| 7962 case NORMAL: | 7963 case NORMAL: |
| 7963 value = result->holder()->GetNormalizedProperty(result); | 7964 value = result->holder()->GetNormalizedProperty(result); |
| (...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10308 } else { | 10309 } else { |
| 10309 // Handle last resort GC and make sure to allow future allocations | 10310 // Handle last resort GC and make sure to allow future allocations |
| 10310 // to grow the heap without causing GCs (if possible). | 10311 // to grow the heap without causing GCs (if possible). |
| 10311 Counters::gc_last_resort_from_js.Increment(); | 10312 Counters::gc_last_resort_from_js.Increment(); |
| 10312 Heap::CollectAllGarbage(false); | 10313 Heap::CollectAllGarbage(false); |
| 10313 } | 10314 } |
| 10314 } | 10315 } |
| 10315 | 10316 |
| 10316 | 10317 |
| 10317 } } // namespace v8::internal | 10318 } } // namespace v8::internal |
| OLD | NEW |