| OLD | NEW | 
|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "src/factory.h" | 5 #include "src/factory.h" | 
| 6 | 6 | 
| 7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" | 
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" | 
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" | 
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" | 
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 882   DCHECK(0 <= length); | 882   DCHECK(0 <= length); | 
| 883   CALL_HEAP_FUNCTION( | 883   CALL_HEAP_FUNCTION( | 
| 884       isolate(), | 884       isolate(), | 
| 885       isolate()->heap()->AllocateByteArray(length, pretenure), | 885       isolate()->heap()->AllocateByteArray(length, pretenure), | 
| 886       ByteArray); | 886       ByteArray); | 
| 887 } | 887 } | 
| 888 | 888 | 
| 889 | 889 | 
| 890 Handle<BytecodeArray> Factory::NewBytecodeArray(int length, | 890 Handle<BytecodeArray> Factory::NewBytecodeArray(int length, | 
| 891                                                 const byte* raw_bytecodes, | 891                                                 const byte* raw_bytecodes, | 
| 892                                                 int frame_size) { | 892                                                 int frame_size, | 
|  | 893                                                 int parameter_count) { | 
| 893   DCHECK(0 <= length); | 894   DCHECK(0 <= length); | 
| 894   CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateBytecodeArray( | 895   CALL_HEAP_FUNCTION(isolate(), | 
| 895                                     length, raw_bytecodes, frame_size), | 896                      isolate()->heap()->AllocateBytecodeArray( | 
|  | 897                          length, raw_bytecodes, frame_size, parameter_count), | 
| 896                      BytecodeArray); | 898                      BytecodeArray); | 
| 897 } | 899 } | 
| 898 | 900 | 
| 899 | 901 | 
| 900 Handle<FixedTypedArrayBase> Factory::NewFixedTypedArrayWithExternalPointer( | 902 Handle<FixedTypedArrayBase> Factory::NewFixedTypedArrayWithExternalPointer( | 
| 901     int length, ExternalArrayType array_type, void* external_pointer, | 903     int length, ExternalArrayType array_type, void* external_pointer, | 
| 902     PretenureFlag pretenure) { | 904     PretenureFlag pretenure) { | 
| 903   DCHECK(0 <= length && length <= Smi::kMaxValue); | 905   DCHECK(0 <= length && length <= Smi::kMaxValue); | 
| 904   CALL_HEAP_FUNCTION( | 906   CALL_HEAP_FUNCTION( | 
| 905       isolate(), isolate()->heap()->AllocateFixedTypedArrayWithExternalPointer( | 907       isolate(), isolate()->heap()->AllocateFixedTypedArrayWithExternalPointer( | 
| (...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2331 } | 2333 } | 
| 2332 | 2334 | 
| 2333 | 2335 | 
| 2334 Handle<Object> Factory::ToBoolean(bool value) { | 2336 Handle<Object> Factory::ToBoolean(bool value) { | 
| 2335   return value ? true_value() : false_value(); | 2337   return value ? true_value() : false_value(); | 
| 2336 } | 2338 } | 
| 2337 | 2339 | 
| 2338 | 2340 | 
| 2339 }  // namespace internal | 2341 }  // namespace internal | 
| 2340 }  // namespace v8 | 2342 }  // namespace v8 | 
| OLD | NEW | 
|---|