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 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 | 885 |
886 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, | 886 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, |
887 Handle<Object> prototype) { | 887 Handle<Object> prototype) { |
888 CALL_HEAP_FUNCTION( | 888 CALL_HEAP_FUNCTION( |
889 isolate(), | 889 isolate(), |
890 isolate()->heap()->AllocateJSProxy(*handler, *prototype), | 890 isolate()->heap()->AllocateJSProxy(*handler, *prototype), |
891 JSProxy); | 891 JSProxy); |
892 } | 892 } |
893 | 893 |
894 | 894 |
| 895 void Factory::BecomeJSObject(Handle<JSProxy> object) { |
| 896 CALL_HEAP_FUNCTION_VOID( |
| 897 isolate(), |
| 898 isolate()->heap()->ReinitializeJSProxyAsJSObject(*object)); |
| 899 } |
| 900 |
| 901 |
895 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( | 902 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( |
896 Handle<String> name, | 903 Handle<String> name, |
897 int number_of_literals, | 904 int number_of_literals, |
898 Handle<Code> code, | 905 Handle<Code> code, |
899 Handle<SerializedScopeInfo> scope_info) { | 906 Handle<SerializedScopeInfo> scope_info) { |
900 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name); | 907 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name); |
901 shared->set_code(*code); | 908 shared->set_code(*code); |
902 shared->set_scope_info(*scope_info); | 909 shared->set_scope_info(*scope_info); |
903 int literals_array_size = number_of_literals; | 910 int literals_array_size = number_of_literals; |
904 // If the function contains object, regexp or array literals, | 911 // If the function contains object, regexp or array literals, |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 Execution::ConfigureInstance(instance, | 1254 Execution::ConfigureInstance(instance, |
1248 instance_template, | 1255 instance_template, |
1249 pending_exception); | 1256 pending_exception); |
1250 } else { | 1257 } else { |
1251 *pending_exception = false; | 1258 *pending_exception = false; |
1252 } | 1259 } |
1253 } | 1260 } |
1254 | 1261 |
1255 | 1262 |
1256 } } // namespace v8::internal | 1263 } } // namespace v8::internal |
OLD | NEW |