| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 | 78 |
| 79 Handle<NumberDictionary> Factory::NewNumberDictionary(int at_least_space_for) { | 79 Handle<NumberDictionary> Factory::NewNumberDictionary(int at_least_space_for) { |
| 80 ASSERT(0 <= at_least_space_for); | 80 ASSERT(0 <= at_least_space_for); |
| 81 CALL_HEAP_FUNCTION(isolate(), | 81 CALL_HEAP_FUNCTION(isolate(), |
| 82 NumberDictionary::Allocate(at_least_space_for), | 82 NumberDictionary::Allocate(at_least_space_for), |
| 83 NumberDictionary); | 83 NumberDictionary); |
| 84 } | 84 } |
| 85 | 85 |
| 86 | 86 |
| 87 Handle<ObjectHashTable> Factory::NewObjectHashTable(int at_least_space_for) { |
| 88 ASSERT(0 <= at_least_space_for); |
| 89 CALL_HEAP_FUNCTION(isolate(), |
| 90 ObjectHashTable::Allocate(at_least_space_for), |
| 91 ObjectHashTable); |
| 92 } |
| 93 |
| 94 |
| 87 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors) { | 95 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors) { |
| 88 ASSERT(0 <= number_of_descriptors); | 96 ASSERT(0 <= number_of_descriptors); |
| 89 CALL_HEAP_FUNCTION(isolate(), | 97 CALL_HEAP_FUNCTION(isolate(), |
| 90 DescriptorArray::Allocate(number_of_descriptors), | 98 DescriptorArray::Allocate(number_of_descriptors), |
| 91 DescriptorArray); | 99 DescriptorArray); |
| 92 } | 100 } |
| 93 | 101 |
| 94 | 102 |
| 95 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( | 103 Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData( |
| 96 int deopt_entry_count, | 104 int deopt_entry_count, |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 | 893 |
| 886 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, | 894 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, |
| 887 Handle<Object> prototype) { | 895 Handle<Object> prototype) { |
| 888 CALL_HEAP_FUNCTION( | 896 CALL_HEAP_FUNCTION( |
| 889 isolate(), | 897 isolate(), |
| 890 isolate()->heap()->AllocateJSProxy(*handler, *prototype), | 898 isolate()->heap()->AllocateJSProxy(*handler, *prototype), |
| 891 JSProxy); | 899 JSProxy); |
| 892 } | 900 } |
| 893 | 901 |
| 894 | 902 |
| 903 void Factory::BecomeJSObject(Handle<JSProxy> object) { |
| 904 CALL_HEAP_FUNCTION_VOID( |
| 905 isolate(), |
| 906 isolate()->heap()->ReinitializeJSProxyAsJSObject(*object)); |
| 907 } |
| 908 |
| 909 |
| 895 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( | 910 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( |
| 896 Handle<String> name, | 911 Handle<String> name, |
| 897 int number_of_literals, | 912 int number_of_literals, |
| 898 Handle<Code> code, | 913 Handle<Code> code, |
| 899 Handle<SerializedScopeInfo> scope_info) { | 914 Handle<SerializedScopeInfo> scope_info) { |
| 900 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name); | 915 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name); |
| 901 shared->set_code(*code); | 916 shared->set_code(*code); |
| 902 shared->set_scope_info(*scope_info); | 917 shared->set_scope_info(*scope_info); |
| 903 int literals_array_size = number_of_literals; | 918 int literals_array_size = number_of_literals; |
| 904 // If the function contains object, regexp or array literals, | 919 // 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, | 1262 Execution::ConfigureInstance(instance, |
| 1248 instance_template, | 1263 instance_template, |
| 1249 pending_exception); | 1264 pending_exception); |
| 1250 } else { | 1265 } else { |
| 1251 *pending_exception = false; | 1266 *pending_exception = false; |
| 1252 } | 1267 } |
| 1253 } | 1268 } |
| 1254 | 1269 |
| 1255 | 1270 |
| 1256 } } // namespace v8::internal | 1271 } } // namespace v8::internal |
| OLD | NEW |