| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) { | 398 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) { |
| 399 CALL_HEAP_FUNCTION(isolate(), src->GetFastElementsMap(), Map); | 399 CALL_HEAP_FUNCTION(isolate(), src->GetFastElementsMap(), Map); |
| 400 } | 400 } |
| 401 | 401 |
| 402 | 402 |
| 403 Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) { | 403 Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) { |
| 404 CALL_HEAP_FUNCTION(isolate(), src->GetSlowElementsMap(), Map); | 404 CALL_HEAP_FUNCTION(isolate(), src->GetSlowElementsMap(), Map); |
| 405 } | 405 } |
| 406 | 406 |
| 407 | 407 |
| 408 Handle<Map> Factory::GetPixelArrayElementsMap(Handle<Map> src) { |
| 409 CALL_HEAP_FUNCTION(isolate(), src->GetPixelArrayElementsMap(), Map); |
| 410 } |
| 411 |
| 412 |
| 408 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { | 413 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { |
| 409 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); | 414 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); |
| 410 } | 415 } |
| 411 | 416 |
| 412 | 417 |
| 413 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( | 418 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( |
| 414 Handle<SharedFunctionInfo> function_info, | 419 Handle<SharedFunctionInfo> function_info, |
| 415 Handle<Map> function_map, | 420 Handle<Map> function_map, |
| 416 PretenureFlag pretenure) { | 421 PretenureFlag pretenure) { |
| 417 CALL_HEAP_FUNCTION( | 422 CALL_HEAP_FUNCTION( |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 type != JS_OBJECT_TYPE || | 652 type != JS_OBJECT_TYPE || |
| 648 instance_size != JSObject::kHeaderSize) { | 653 instance_size != JSObject::kHeaderSize) { |
| 649 Handle<Map> initial_map = NewMap(type, instance_size); | 654 Handle<Map> initial_map = NewMap(type, instance_size); |
| 650 function->set_initial_map(*initial_map); | 655 function->set_initial_map(*initial_map); |
| 651 initial_map->set_constructor(*function); | 656 initial_map->set_constructor(*function); |
| 652 } | 657 } |
| 653 | 658 |
| 654 // Set function.prototype and give the prototype a constructor | 659 // Set function.prototype and give the prototype a constructor |
| 655 // property that refers to the function. | 660 // property that refers to the function. |
| 656 SetPrototypeProperty(function, prototype); | 661 SetPrototypeProperty(function, prototype); |
| 657 SetProperty(prototype, constructor_symbol(), function, DONT_ENUM); | 662 // Currently safe because it is only invoked from Genesis. |
| 663 SetLocalPropertyNoThrow(prototype, constructor_symbol(), function, DONT_ENUM); |
| 658 return function; | 664 return function; |
| 659 } | 665 } |
| 660 | 666 |
| 661 | 667 |
| 662 Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, | 668 Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, |
| 663 Handle<Code> code) { | 669 Handle<Code> code) { |
| 664 Handle<JSFunction> function = NewFunctionWithoutPrototype(name); | 670 Handle<JSFunction> function = NewFunctionWithoutPrototype(name); |
| 665 function->shared()->set_code(*code); | 671 function->shared()->set_code(*code); |
| 666 function->set_code(*code); | 672 function->set_code(*code); |
| 667 ASSERT(!function->has_initial_map()); | 673 ASSERT(!function->has_initial_map()); |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 Execution::ConfigureInstance(instance, | 1182 Execution::ConfigureInstance(instance, |
| 1177 instance_template, | 1183 instance_template, |
| 1178 pending_exception); | 1184 pending_exception); |
| 1179 } else { | 1185 } else { |
| 1180 *pending_exception = false; | 1186 *pending_exception = false; |
| 1181 } | 1187 } |
| 1182 } | 1188 } |
| 1183 | 1189 |
| 1184 | 1190 |
| 1185 } } // namespace v8::internal | 1191 } } // namespace v8::internal |
| OLD | NEW |