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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 Handle<HeapNumber> Factory::NewHeapNumber(double value, | 1070 Handle<HeapNumber> Factory::NewHeapNumber(double value, |
1071 MutableMode mode, | 1071 MutableMode mode, |
1072 PretenureFlag pretenure) { | 1072 PretenureFlag pretenure) { |
1073 CALL_HEAP_FUNCTION( | 1073 CALL_HEAP_FUNCTION( |
1074 isolate(), | 1074 isolate(), |
1075 isolate()->heap()->AllocateHeapNumber(value, mode, pretenure), | 1075 isolate()->heap()->AllocateHeapNumber(value, mode, pretenure), |
1076 HeapNumber); | 1076 HeapNumber); |
1077 } | 1077 } |
1078 | 1078 |
1079 | 1079 |
| 1080 Handle<Float32x4> Factory::NewFloat32x4(float w, float x, float y, float z, |
| 1081 PretenureFlag pretenure) { |
| 1082 CALL_HEAP_FUNCTION( |
| 1083 isolate(), isolate()->heap()->AllocateFloat32x4(w, x, y, z, pretenure), |
| 1084 Float32x4); |
| 1085 } |
| 1086 |
| 1087 |
1080 Handle<Object> Factory::NewError(const char* maker, | 1088 Handle<Object> Factory::NewError(const char* maker, |
1081 MessageTemplate::Template template_index, | 1089 MessageTemplate::Template template_index, |
1082 Handle<Object> arg0, Handle<Object> arg1, | 1090 Handle<Object> arg0, Handle<Object> arg1, |
1083 Handle<Object> arg2) { | 1091 Handle<Object> arg2) { |
1084 HandleScope scope(isolate()); | 1092 HandleScope scope(isolate()); |
1085 Handle<String> error_maker = InternalizeUtf8String(maker); | 1093 Handle<String> error_maker = InternalizeUtf8String(maker); |
1086 Handle<Object> fun_obj = Object::GetProperty(isolate()->js_builtins_object(), | 1094 Handle<Object> fun_obj = Object::GetProperty(isolate()->js_builtins_object(), |
1087 error_maker).ToHandleChecked(); | 1095 error_maker).ToHandleChecked(); |
1088 | 1096 |
1089 Handle<JSFunction> fun = Handle<JSFunction>::cast(fun_obj); | 1097 Handle<JSFunction> fun = Handle<JSFunction>::cast(fun_obj); |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2455 } | 2463 } |
2456 | 2464 |
2457 | 2465 |
2458 Handle<Object> Factory::ToBoolean(bool value) { | 2466 Handle<Object> Factory::ToBoolean(bool value) { |
2459 return value ? true_value() : false_value(); | 2467 return value ? true_value() : false_value(); |
2460 } | 2468 } |
2461 | 2469 |
2462 | 2470 |
2463 } // namespace internal | 2471 } // namespace internal |
2464 } // namespace v8 | 2472 } // namespace v8 |
OLD | NEW |