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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 400 |
401 | 401 |
402 char* StackGuard::RestoreStackGuard(char* from) { | 402 char* StackGuard::RestoreStackGuard(char* from) { |
403 ExecutionAccess access; | 403 ExecutionAccess access; |
404 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal)); | 404 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal)); |
405 Heap::SetStackLimit(thread_local_.jslimit_); | 405 Heap::SetStackLimit(thread_local_.jslimit_); |
406 return from + sizeof(ThreadLocal); | 406 return from + sizeof(ThreadLocal); |
407 } | 407 } |
408 | 408 |
409 | 409 |
| 410 void StackGuard::FreeThreadResources() { |
| 411 } |
| 412 |
| 413 |
410 // --- C a l l s t o n a t i v e s --- | 414 // --- C a l l s t o n a t i v e s --- |
411 | 415 |
412 #define RETURN_NATIVE_CALL(name, argc, argv, has_pending_exception) \ | 416 #define RETURN_NATIVE_CALL(name, argc, argv, has_pending_exception) \ |
413 do { \ | 417 do { \ |
414 Object** args[argc] = argv; \ | 418 Object** args[argc] = argv; \ |
415 ASSERT(has_pending_exception != NULL); \ | 419 ASSERT(has_pending_exception != NULL); \ |
416 return Call(Top::name##_fun(), Top::builtins(), argc, args, \ | 420 return Call(Top::name##_fun(), Top::builtins(), argc, args, \ |
417 has_pending_exception); \ | 421 has_pending_exception); \ |
418 } while (false) | 422 } while (false) |
419 | 423 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 // All allocation spaces other than NEW_SPACE have the same effect. | 689 // All allocation spaces other than NEW_SPACE have the same effect. |
686 Heap::CollectAllGarbage(false); | 690 Heap::CollectAllGarbage(false); |
687 return v8::Undefined(); | 691 return v8::Undefined(); |
688 } | 692 } |
689 | 693 |
690 | 694 |
691 static GCExtension kGCExtension; | 695 static GCExtension kGCExtension; |
692 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); | 696 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); |
693 | 697 |
694 } } // namespace v8::internal | 698 } } // namespace v8::internal |
OLD | NEW |