OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 typedef Object* (*JSEntryFunction)( | 82 typedef Object* (*JSEntryFunction)( |
83 byte* entry, | 83 byte* entry, |
84 Object* function, | 84 Object* function, |
85 Object* receiver, | 85 Object* receiver, |
86 int argc, | 86 int argc, |
87 Object*** args); | 87 Object*** args); |
88 | 88 |
89 Handle<Code> code; | 89 Handle<Code> code; |
90 if (construct) { | 90 if (construct) { |
91 JSConstructEntryStub stub; | 91 code = isolate->factory()->js_construct_entry_code(); |
92 code = stub.GetCode(); | |
93 } else { | 92 } else { |
94 JSEntryStub stub; | 93 code = isolate->factory()->js_entry_code(); |
95 code = stub.GetCode(); | |
96 } | 94 } |
97 | 95 |
98 // Convert calls on global objects to be calls on the global | 96 // Convert calls on global objects to be calls on the global |
99 // receiver instead to avoid having a 'this' pointer which refers | 97 // receiver instead to avoid having a 'this' pointer which refers |
100 // directly to a global object. | 98 // directly to a global object. |
101 if (receiver->IsGlobalObject()) { | 99 if (receiver->IsGlobalObject()) { |
102 Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver); | 100 Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver); |
103 receiver = Handle<JSObject>(global->global_receiver()); | 101 receiver = Handle<JSObject>(global->global_receiver()); |
104 } | 102 } |
105 | 103 |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 return isolate->TerminateExecution(); | 892 return isolate->TerminateExecution(); |
895 } | 893 } |
896 if (stack_guard->IsInterrupted()) { | 894 if (stack_guard->IsInterrupted()) { |
897 stack_guard->Continue(INTERRUPT); | 895 stack_guard->Continue(INTERRUPT); |
898 return isolate->StackOverflow(); | 896 return isolate->StackOverflow(); |
899 } | 897 } |
900 return isolate->heap()->undefined_value(); | 898 return isolate->heap()->undefined_value(); |
901 } | 899 } |
902 | 900 |
903 } } // namespace v8::internal | 901 } } // namespace v8::internal |
OLD | NEW |