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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 | 90 |
91 { | 91 { |
92 // Save and restore context around invocation and block the | 92 // Save and restore context around invocation and block the |
93 // allocation of handles without explicit handle scopes. | 93 // allocation of handles without explicit handle scopes. |
94 SaveContext save; | 94 SaveContext save; |
95 NoHandleAllocation na; | 95 NoHandleAllocation na; |
96 JSEntryFunction entry = FUNCTION_CAST<JSEntryFunction>(code->entry()); | 96 JSEntryFunction entry = FUNCTION_CAST<JSEntryFunction>(code->entry()); |
97 | 97 |
98 // Call the function through the right JS entry stub. | 98 // Call the function through the right JS entry stub. |
99 value = CALL_GENERATED_CODE(entry, func->code()->entry(), *func, | 99 byte* entry_address= func->code()->entry(); |
100 *receiver, argc, args); | 100 JSFunction* function = *func; |
| 101 Object* receiver_pointer = *receiver; |
| 102 value = CALL_GENERATED_CODE(entry, entry_address, function, |
| 103 receiver_pointer, argc, args); |
101 } | 104 } |
102 | 105 |
103 #ifdef DEBUG | 106 #ifdef DEBUG |
104 value->Verify(); | 107 value->Verify(); |
105 #endif | 108 #endif |
106 | 109 |
107 // Update the pending exception flag and return the value. | 110 // Update the pending exception flag and return the value. |
108 *has_pending_exception = value->IsException(); | 111 *has_pending_exception = value->IsException(); |
109 ASSERT(*has_pending_exception == Top::has_pending_exception()); | 112 ASSERT(*has_pending_exception == Top::has_pending_exception()); |
110 if (*has_pending_exception) { | 113 if (*has_pending_exception) { |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 // All allocation spaces other than NEW_SPACE have the same effect. | 692 // All allocation spaces other than NEW_SPACE have the same effect. |
690 Heap::CollectAllGarbage(false); | 693 Heap::CollectAllGarbage(false); |
691 return v8::Undefined(); | 694 return v8::Undefined(); |
692 } | 695 } |
693 | 696 |
694 | 697 |
695 static GCExtension kGCExtension; | 698 static GCExtension kGCExtension; |
696 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); | 699 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); |
697 | 700 |
698 } } // namespace v8::internal | 701 } } // namespace v8::internal |
OLD | NEW |