Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: src/factory.cc

Issue 1250733005: SIMD.js Add the other SIMD Phase 1 types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't run downloaded SIMD value type tests. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/factory.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 Handle<HeapNumber> Factory::NewHeapNumber(double value, 1040 Handle<HeapNumber> Factory::NewHeapNumber(double value,
1041 MutableMode mode, 1041 MutableMode mode,
1042 PretenureFlag pretenure) { 1042 PretenureFlag pretenure) {
1043 CALL_HEAP_FUNCTION( 1043 CALL_HEAP_FUNCTION(
1044 isolate(), 1044 isolate(),
1045 isolate()->heap()->AllocateHeapNumber(value, mode, pretenure), 1045 isolate()->heap()->AllocateHeapNumber(value, mode, pretenure),
1046 HeapNumber); 1046 HeapNumber);
1047 } 1047 }
1048 1048
1049 1049
1050 Handle<Float32x4> Factory::NewFloat32x4(float w, float x, float y, float z, 1050 Handle<Float32x4> Factory::NewFloat32x4(float lanes[4],
1051 PretenureFlag pretenure) { 1051 PretenureFlag pretenure) {
1052 CALL_HEAP_FUNCTION( 1052 CALL_HEAP_FUNCTION(isolate(),
1053 isolate(), isolate()->heap()->AllocateFloat32x4(w, x, y, z, pretenure), 1053 isolate()->heap()->AllocateFloat32x4(lanes, pretenure),
1054 Float32x4); 1054 Float32x4);
1055 } 1055 }
1056 1056
1057 1057
1058 Handle<Int32x4> Factory::NewInt32x4(int32_t lanes[4], PretenureFlag pretenure) {
1059 CALL_HEAP_FUNCTION(
1060 isolate(), isolate()->heap()->AllocateInt32x4(lanes, pretenure), Int32x4);
1061 }
1062
1063
1064 Handle<Bool32x4> Factory::NewBool32x4(bool lanes[4], PretenureFlag pretenure) {
1065 CALL_HEAP_FUNCTION(isolate(),
1066 isolate()->heap()->AllocateBool32x4(lanes, pretenure),
1067 Bool32x4);
1068 }
1069
1070
1071 Handle<Int16x8> Factory::NewInt16x8(int16_t lanes[8], PretenureFlag pretenure) {
1072 CALL_HEAP_FUNCTION(
1073 isolate(), isolate()->heap()->AllocateInt16x8(lanes, pretenure), Int16x8);
1074 }
1075
1076
1077 Handle<Bool16x8> Factory::NewBool16x8(bool lanes[8], PretenureFlag pretenure) {
1078 CALL_HEAP_FUNCTION(isolate(),
1079 isolate()->heap()->AllocateBool16x8(lanes, pretenure),
1080 Bool16x8);
1081 }
1082
1083
1084 Handle<Int8x16> Factory::NewInt8x16(int8_t lanes[16], PretenureFlag pretenure) {
1085 CALL_HEAP_FUNCTION(
1086 isolate(), isolate()->heap()->AllocateInt8x16(lanes, pretenure), Int8x16);
1087 }
1088
1089
1090 Handle<Bool8x16> Factory::NewBool8x16(bool lanes[16], PretenureFlag pretenure) {
1091 CALL_HEAP_FUNCTION(isolate(),
1092 isolate()->heap()->AllocateBool8x16(lanes, pretenure),
1093 Bool8x16);
1094 }
1095
1096
1058 Handle<Object> Factory::NewError(const char* maker, 1097 Handle<Object> Factory::NewError(const char* maker,
1059 MessageTemplate::Template template_index, 1098 MessageTemplate::Template template_index,
1060 Handle<Object> arg0, Handle<Object> arg1, 1099 Handle<Object> arg0, Handle<Object> arg1,
1061 Handle<Object> arg2) { 1100 Handle<Object> arg2) {
1062 HandleScope scope(isolate()); 1101 HandleScope scope(isolate());
1063 Handle<String> error_maker = InternalizeUtf8String(maker); 1102 Handle<String> error_maker = InternalizeUtf8String(maker);
1064 if (isolate()->bootstrapper()->IsActive()) { 1103 if (isolate()->bootstrapper()->IsActive()) {
1065 // If this exception is being thrown during bootstrapping, 1104 // If this exception is being thrown during bootstrapping,
1066 // js_builtins_object is unavailable. We return the error maker 1105 // js_builtins_object is unavailable. We return the error maker
1067 // name's string as the exception since we have nothing better 1106 // name's string as the exception since we have nothing better
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 } 2464 }
2426 2465
2427 2466
2428 Handle<Object> Factory::ToBoolean(bool value) { 2467 Handle<Object> Factory::ToBoolean(bool value) {
2429 return value ? true_value() : false_value(); 2468 return value ? true_value() : false_value();
2430 } 2469 }
2431 2470
2432 2471
2433 } // namespace internal 2472 } // namespace internal
2434 } // namespace v8 2473 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698