| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 Top::optional_reschedule_exception(true); | 147 Top::optional_reschedule_exception(true); |
| 148 result = v8::Utils::OpenHandle(*catcher.Exception()); | 148 result = v8::Utils::OpenHandle(*catcher.Exception()); |
| 149 } | 149 } |
| 150 | 150 |
| 151 ASSERT(!Top::has_pending_exception()); | 151 ASSERT(!Top::has_pending_exception()); |
| 152 ASSERT(!Top::external_caught_exception()); | 152 ASSERT(!Top::external_caught_exception()); |
| 153 return result; | 153 return result; |
| 154 } | 154 } |
| 155 | 155 |
| 156 | 156 |
| 157 DEFINE_bool(call_regexp, false, "allow calls to RegExp objects"); | |
| 158 | |
| 159 Handle<Object> Execution::GetFunctionDelegate(Handle<Object> object) { | 157 Handle<Object> Execution::GetFunctionDelegate(Handle<Object> object) { |
| 160 ASSERT(!object->IsJSFunction()); | 158 ASSERT(!object->IsJSFunction()); |
| 161 | 159 |
| 162 // If you return a function from here, it will be called when an | 160 // If you return a function from here, it will be called when an |
| 163 // attempt is made to call the given object as a function. | 161 // attempt is made to call the given object as a function. |
| 164 | 162 |
| 165 // The regular expression code here is really meant more as an | 163 // The regular expression code here is really meant more as an |
| 166 // example than anything else. KJS does not support calling regular | 164 // example than anything else. KJS does not support calling regular |
| 167 // expressions as functions, but SpiderMonkey does. | 165 // expressions as functions, but SpiderMonkey does. |
| 168 if (FLAG_call_regexp) { | 166 if (FLAG_call_regexp) { |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 // All allocation spaces other than NEW_SPACE have the same effect. | 659 // All allocation spaces other than NEW_SPACE have the same effect. |
| 662 Heap::CollectGarbage(0, OLD_DATA_SPACE); | 660 Heap::CollectGarbage(0, OLD_DATA_SPACE); |
| 663 return v8::Undefined(); | 661 return v8::Undefined(); |
| 664 } | 662 } |
| 665 | 663 |
| 666 | 664 |
| 667 static GCExtension kGCExtension; | 665 static GCExtension kGCExtension; |
| 668 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); | 666 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); |
| 669 | 667 |
| 670 } } // namespace v8::internal | 668 } } // namespace v8::internal |
| OLD | NEW |