| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return NewProxy((Address) desc, TENURED); | 243 return NewProxy((Address) desc, TENURED); |
| 244 } | 244 } |
| 245 | 245 |
| 246 | 246 |
| 247 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) { | 247 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) { |
| 248 ASSERT(0 <= length); | 248 ASSERT(0 <= length); |
| 249 CALL_HEAP_FUNCTION(Heap::AllocateByteArray(length, pretenure), ByteArray); | 249 CALL_HEAP_FUNCTION(Heap::AllocateByteArray(length, pretenure), ByteArray); |
| 250 } | 250 } |
| 251 | 251 |
| 252 | 252 |
| 253 Handle<PixelArray> Factory::NewPixelArray(int length, | |
| 254 uint8_t* external_pointer, | |
| 255 PretenureFlag pretenure) { | |
| 256 ASSERT(0 <= length); | |
| 257 CALL_HEAP_FUNCTION(Heap::AllocatePixelArray(length, | |
| 258 external_pointer, | |
| 259 pretenure), PixelArray); | |
| 260 } | |
| 261 | |
| 262 | |
| 263 Handle<ExternalArray> Factory::NewExternalArray(int length, | 253 Handle<ExternalArray> Factory::NewExternalArray(int length, |
| 264 ExternalArrayType array_type, | 254 ExternalArrayType array_type, |
| 265 void* external_pointer, | 255 void* external_pointer, |
| 266 PretenureFlag pretenure) { | 256 PretenureFlag pretenure) { |
| 267 ASSERT(0 <= length); | 257 ASSERT(0 <= length); |
| 268 CALL_HEAP_FUNCTION(Heap::AllocateExternalArray(length, | 258 CALL_HEAP_FUNCTION(Heap::AllocateExternalArray(length, |
| 269 array_type, | 259 array_type, |
| 270 external_pointer, | 260 external_pointer, |
| 271 pretenure), ExternalArray); | 261 pretenure), ExternalArray); |
| 272 } | 262 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) { | 317 Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) { |
| 328 CALL_HEAP_FUNCTION(src->GetFastElementsMap(), Map); | 318 CALL_HEAP_FUNCTION(src->GetFastElementsMap(), Map); |
| 329 } | 319 } |
| 330 | 320 |
| 331 | 321 |
| 332 Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) { | 322 Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) { |
| 333 CALL_HEAP_FUNCTION(src->GetSlowElementsMap(), Map); | 323 CALL_HEAP_FUNCTION(src->GetSlowElementsMap(), Map); |
| 334 } | 324 } |
| 335 | 325 |
| 336 | 326 |
| 337 Handle<Map> Factory::GetPixelArrayElementsMap(Handle<Map> src) { | 327 Handle<Map> Factory::NewExternalArrayElementsMap(Handle<Map> src) { |
| 338 CALL_HEAP_FUNCTION(src->GetPixelArrayElementsMap(), Map); | 328 CALL_HEAP_FUNCTION(src->NewExternalArrayElementsMap(), Map); |
| 339 } | 329 } |
| 340 | 330 |
| 341 | 331 |
| 342 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { | 332 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { |
| 343 CALL_HEAP_FUNCTION(array->Copy(), FixedArray); | 333 CALL_HEAP_FUNCTION(array->Copy(), FixedArray); |
| 344 } | 334 } |
| 345 | 335 |
| 346 | 336 |
| 347 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( | 337 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( |
| 348 Handle<SharedFunctionInfo> function_info, | 338 Handle<SharedFunctionInfo> function_info, |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 function->shared()->set_code(*code); | 588 function->shared()->set_code(*code); |
| 599 function->set_code(*code); | 589 function->set_code(*code); |
| 600 ASSERT(!function->has_initial_map()); | 590 ASSERT(!function->has_initial_map()); |
| 601 ASSERT(!function->has_prototype()); | 591 ASSERT(!function->has_prototype()); |
| 602 return function; | 592 return function; |
| 603 } | 593 } |
| 604 | 594 |
| 605 | 595 |
| 606 Handle<Code> Factory::NewCode(const CodeDesc& desc, | 596 Handle<Code> Factory::NewCode(const CodeDesc& desc, |
| 607 Code::Flags flags, | 597 Code::Flags flags, |
| 608 Handle<Object> self_ref) { | 598 Handle<Object> self_ref, |
| 609 CALL_HEAP_FUNCTION(Heap::CreateCode(desc, flags, self_ref), Code); | 599 bool immovable) { |
| 600 CALL_HEAP_FUNCTION(Heap::CreateCode(desc, flags, self_ref, immovable), Code); |
| 610 } | 601 } |
| 611 | 602 |
| 612 | 603 |
| 613 Handle<Code> Factory::CopyCode(Handle<Code> code) { | 604 Handle<Code> Factory::CopyCode(Handle<Code> code) { |
| 614 CALL_HEAP_FUNCTION(Heap::CopyCode(*code), Code); | 605 CALL_HEAP_FUNCTION(Heap::CopyCode(*code), Code); |
| 615 } | 606 } |
| 616 | 607 |
| 617 | 608 |
| 618 Handle<Code> Factory::CopyCode(Handle<Code> code, Vector<byte> reloc_info) { | 609 Handle<Code> Factory::CopyCode(Handle<Code> code, Vector<byte> reloc_info) { |
| 619 CALL_HEAP_FUNCTION(Heap::CopyCode(*code, reloc_info), Code); | 610 CALL_HEAP_FUNCTION(Heap::CopyCode(*code, reloc_info), Code); |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 Execution::ConfigureInstance(instance, | 1069 Execution::ConfigureInstance(instance, |
| 1079 instance_template, | 1070 instance_template, |
| 1080 pending_exception); | 1071 pending_exception); |
| 1081 } else { | 1072 } else { |
| 1082 *pending_exception = false; | 1073 *pending_exception = false; |
| 1083 } | 1074 } |
| 1084 } | 1075 } |
| 1085 | 1076 |
| 1086 | 1077 |
| 1087 } } // namespace v8::internal | 1078 } } // namespace v8::internal |
| OLD | NEW |