| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 | 701 |
| 702 | 702 |
| 703 Handle<JSFunction> Execution::InstantiateFunction( | 703 Handle<JSFunction> Execution::InstantiateFunction( |
| 704 Handle<FunctionTemplateInfo> data, | 704 Handle<FunctionTemplateInfo> data, |
| 705 bool* exc) { | 705 bool* exc) { |
| 706 Isolate* isolate = data->GetIsolate(); | 706 Isolate* isolate = data->GetIsolate(); |
| 707 // Fast case: see if the function has already been instantiated | 707 // Fast case: see if the function has already been instantiated |
| 708 int serial_number = Smi::cast(data->serial_number())->value(); | 708 int serial_number = Smi::cast(data->serial_number())->value(); |
| 709 Object* elm = | 709 Object* elm = |
| 710 isolate->native_context()->function_cache()-> | 710 isolate->native_context()->function_cache()-> |
| 711 GetElementNoExceptionThrown(serial_number); | 711 GetElementNoExceptionThrown(isolate, serial_number); |
| 712 if (elm->IsJSFunction()) return Handle<JSFunction>(JSFunction::cast(elm)); | 712 if (elm->IsJSFunction()) return Handle<JSFunction>(JSFunction::cast(elm)); |
| 713 // The function has not yet been instantiated in this context; do it. | 713 // The function has not yet been instantiated in this context; do it. |
| 714 Handle<Object> args[] = { data }; | 714 Handle<Object> args[] = { data }; |
| 715 Handle<Object> result = Call(isolate->instantiate_fun(), | 715 Handle<Object> result = Call(isolate->instantiate_fun(), |
| 716 isolate->js_builtins_object(), | 716 isolate->js_builtins_object(), |
| 717 ARRAY_SIZE(args), | 717 ARRAY_SIZE(args), |
| 718 args, | 718 args, |
| 719 exc); | 719 exc); |
| 720 if (*exc) return Handle<JSFunction>::null(); | 720 if (*exc) return Handle<JSFunction>::null(); |
| 721 return Handle<JSFunction>::cast(result); | 721 return Handle<JSFunction>::cast(result); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 } | 927 } |
| 928 if (stack_guard->IsFullDeopt()) { | 928 if (stack_guard->IsFullDeopt()) { |
| 929 stack_guard->Continue(FULL_DEOPT); | 929 stack_guard->Continue(FULL_DEOPT); |
| 930 Deoptimizer::DeoptimizeAll(isolate); | 930 Deoptimizer::DeoptimizeAll(isolate); |
| 931 } | 931 } |
| 932 return isolate->heap()->undefined_value(); | 932 return isolate->heap()->undefined_value(); |
| 933 } | 933 } |
| 934 | 934 |
| 935 | 935 |
| 936 } } // namespace v8::internal | 936 } } // namespace v8::internal |
| OLD | NEW |