OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 Handle<JSObject> Factory::NewArgumentsObject(Handle<Object> callee, | 980 Handle<JSObject> Factory::NewArgumentsObject(Handle<Object> callee, |
981 int length) { | 981 int length) { |
982 CALL_HEAP_FUNCTION( | 982 CALL_HEAP_FUNCTION( |
983 isolate(), | 983 isolate(), |
984 isolate()->heap()->AllocateArgumentsObject(*callee, length), JSObject); | 984 isolate()->heap()->AllocateArgumentsObject(*callee, length), JSObject); |
985 } | 985 } |
986 | 986 |
987 | 987 |
988 Handle<JSFunction> Factory::CreateApiFunction( | 988 Handle<JSFunction> Factory::CreateApiFunction( |
989 Handle<FunctionTemplateInfo> obj, ApiInstanceType instance_type) { | 989 Handle<FunctionTemplateInfo> obj, ApiInstanceType instance_type) { |
990 Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin( | 990 Handle<Code> code = isolate()->builtins()->HandleApiCall(); |
991 Builtins::HandleApiCall)); | 991 Handle<Code> construct_stub = isolate()->builtins()->JSConstructStubApi(); |
992 Handle<Code> construct_stub = | |
993 Handle<Code>(isolate()->builtins()->builtin( | |
994 Builtins::JSConstructStubApi)); | |
995 | 992 |
996 int internal_field_count = 0; | 993 int internal_field_count = 0; |
997 if (!obj->instance_template()->IsUndefined()) { | 994 if (!obj->instance_template()->IsUndefined()) { |
998 Handle<ObjectTemplateInfo> instance_template = | 995 Handle<ObjectTemplateInfo> instance_template = |
999 Handle<ObjectTemplateInfo>( | 996 Handle<ObjectTemplateInfo>( |
1000 ObjectTemplateInfo::cast(obj->instance_template())); | 997 ObjectTemplateInfo::cast(obj->instance_template())); |
1001 internal_field_count = | 998 internal_field_count = |
1002 Smi::cast(instance_template->internal_field_count())->value(); | 999 Smi::cast(instance_template->internal_field_count())->value(); |
1003 } | 1000 } |
1004 | 1001 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 Execution::ConfigureInstance(instance, | 1179 Execution::ConfigureInstance(instance, |
1183 instance_template, | 1180 instance_template, |
1184 pending_exception); | 1181 pending_exception); |
1185 } else { | 1182 } else { |
1186 *pending_exception = false; | 1183 *pending_exception = false; |
1187 } | 1184 } |
1188 } | 1185 } |
1189 | 1186 |
1190 | 1187 |
1191 } } // namespace v8::internal | 1188 } } // namespace v8::internal |
OLD | NEW |