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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 Handle<HeapNumber> Factory::NewHeapNumber(double value, | 1044 Handle<HeapNumber> Factory::NewHeapNumber(double value, |
1045 MutableMode mode, | 1045 MutableMode mode, |
1046 PretenureFlag pretenure) { | 1046 PretenureFlag pretenure) { |
1047 CALL_HEAP_FUNCTION( | 1047 CALL_HEAP_FUNCTION( |
1048 isolate(), | 1048 isolate(), |
1049 isolate()->heap()->AllocateHeapNumber(value, mode, pretenure), | 1049 isolate()->heap()->AllocateHeapNumber(value, mode, pretenure), |
1050 HeapNumber); | 1050 HeapNumber); |
1051 } | 1051 } |
1052 | 1052 |
1053 | 1053 |
| 1054 Handle<Float32x4> Factory::NewFloat32x4(double w, double x, double y, double z, |
| 1055 PretenureFlag pretenure) { |
| 1056 CALL_HEAP_FUNCTION( |
| 1057 isolate(), isolate()->heap()->AllocateFloat32x4(w, x, y, z, pretenure), |
| 1058 Float32x4); |
| 1059 } |
| 1060 |
| 1061 |
1054 Handle<Object> Factory::NewError(const char* maker, | 1062 Handle<Object> Factory::NewError(const char* maker, |
1055 MessageTemplate::Template template_index, | 1063 MessageTemplate::Template template_index, |
1056 Handle<Object> arg0, Handle<Object> arg1, | 1064 Handle<Object> arg0, Handle<Object> arg1, |
1057 Handle<Object> arg2) { | 1065 Handle<Object> arg2) { |
1058 HandleScope scope(isolate()); | 1066 HandleScope scope(isolate()); |
1059 Handle<String> error_maker = InternalizeUtf8String(maker); | 1067 Handle<String> error_maker = InternalizeUtf8String(maker); |
1060 Handle<Object> fun_obj = Object::GetProperty(isolate()->js_builtins_object(), | 1068 Handle<Object> fun_obj = Object::GetProperty(isolate()->js_builtins_object(), |
1061 error_maker).ToHandleChecked(); | 1069 error_maker).ToHandleChecked(); |
1062 | 1070 |
1063 Handle<JSFunction> fun = Handle<JSFunction>::cast(fun_obj); | 1071 Handle<JSFunction> fun = Handle<JSFunction>::cast(fun_obj); |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2427 } | 2435 } |
2428 | 2436 |
2429 | 2437 |
2430 Handle<Object> Factory::ToBoolean(bool value) { | 2438 Handle<Object> Factory::ToBoolean(bool value) { |
2431 return value ? true_value() : false_value(); | 2439 return value ? true_value() : false_value(); |
2432 } | 2440 } |
2433 | 2441 |
2434 | 2442 |
2435 } // namespace internal | 2443 } // namespace internal |
2436 } // namespace v8 | 2444 } // namespace v8 |
OLD | NEW |