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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) { | 867 Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) { |
868 DCHECK(0 <= length); | 868 DCHECK(0 <= length); |
869 CALL_HEAP_FUNCTION( | 869 CALL_HEAP_FUNCTION( |
870 isolate(), | 870 isolate(), |
871 isolate()->heap()->AllocateByteArray(length, pretenure), | 871 isolate()->heap()->AllocateByteArray(length, pretenure), |
872 ByteArray); | 872 ByteArray); |
873 } | 873 } |
874 | 874 |
875 | 875 |
876 Handle<BytecodeArray> Factory::NewBytecodeArray(int length, | 876 Handle<BytecodeArray> Factory::NewBytecodeArray(int length, |
877 const byte* raw_bytecodes) { | 877 const byte* raw_bytecodes, |
| 878 int frame_size) { |
878 DCHECK(0 <= length); | 879 DCHECK(0 <= length); |
879 CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateBytecodeArray( | 880 CALL_HEAP_FUNCTION(isolate(), isolate()->heap()->AllocateBytecodeArray( |
880 length, raw_bytecodes), | 881 length, raw_bytecodes, frame_size), |
881 BytecodeArray); | 882 BytecodeArray); |
882 } | 883 } |
883 | 884 |
884 | 885 |
885 Handle<ExternalArray> Factory::NewExternalArray(int length, | 886 Handle<ExternalArray> Factory::NewExternalArray(int length, |
886 ExternalArrayType array_type, | 887 ExternalArrayType array_type, |
887 void* external_pointer, | 888 void* external_pointer, |
888 PretenureFlag pretenure) { | 889 PretenureFlag pretenure) { |
889 DCHECK(0 <= length && length <= Smi::kMaxValue); | 890 DCHECK(0 <= length && length <= Smi::kMaxValue); |
890 CALL_HEAP_FUNCTION( | 891 CALL_HEAP_FUNCTION( |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2428 } | 2429 } |
2429 | 2430 |
2430 | 2431 |
2431 Handle<Object> Factory::ToBoolean(bool value) { | 2432 Handle<Object> Factory::ToBoolean(bool value) { |
2432 return value ? true_value() : false_value(); | 2433 return value ? true_value() : false_value(); |
2433 } | 2434 } |
2434 | 2435 |
2435 | 2436 |
2436 } // namespace internal | 2437 } // namespace internal |
2437 } // namespace v8 | 2438 } // namespace v8 |
OLD | NEW |