OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/handles-inl.h" | 6 #include "src/handles-inl.h" |
7 #include "src/handles.h" | 7 #include "src/handles.h" |
8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
9 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 CheckString(isolate, "fisk hest", "fisk hest"); | 52 CheckString(isolate, "fisk hest", "fisk hest"); |
53 CheckNumber(isolate, 42.3, "42.3"); | 53 CheckNumber(isolate, 42.3, "42.3"); |
54 CheckSmi(isolate, 42, "42"); | 54 CheckSmi(isolate, 42, "42"); |
55 CheckBoolean(isolate, true, "true"); | 55 CheckBoolean(isolate, true, "true"); |
56 CheckBoolean(isolate, false, "false"); | 56 CheckBoolean(isolate, false, "false"); |
57 CheckBoolean(isolate, false, "false"); | 57 CheckBoolean(isolate, false, "false"); |
58 CheckObject(isolate, factory->undefined_value(), "undefined"); | 58 CheckObject(isolate, factory->undefined_value(), "undefined"); |
59 CheckObject(isolate, factory->null_value(), "null"); | 59 CheckObject(isolate, factory->null_value(), "null"); |
60 | 60 |
61 int lanes[] = {0, 1, 2, 3}; | |
62 CheckObject(isolate, factory->NewInt32x4(lanes), "SIMD.Int32x4(0, 1, 2, 3)"); | |
63 | |
64 CheckObject(isolate, factory->error_to_string(), "[object Error]"); | 61 CheckObject(isolate, factory->error_to_string(), "[object Error]"); |
65 CheckObject(isolate, factory->stack_trace_symbol(), | 62 CheckObject(isolate, factory->stack_trace_symbol(), |
66 "Symbol(stack_trace_symbol)"); | 63 "Symbol(stack_trace_symbol)"); |
67 CheckObject(isolate, factory->NewError(isolate->error_function(), | 64 CheckObject(isolate, factory->NewError(isolate->error_function(), |
68 factory->empty_string()), | 65 factory->empty_string()), |
69 "Error"); | 66 "Error"); |
70 CheckObject(isolate, factory->NewError( | 67 CheckObject(isolate, factory->NewError( |
71 isolate->error_function(), | 68 isolate->error_function(), |
72 factory->NewStringFromAsciiChecked("fisk hest")), | 69 factory->NewStringFromAsciiChecked("fisk hest")), |
73 "Error: fisk hest"); | 70 "Error: fisk hest"); |
74 CheckObject(isolate, factory->NewJSObject(isolate->object_function()), | 71 CheckObject(isolate, factory->NewJSObject(isolate->object_function()), |
75 "#<Object>"); | 72 "#<Object>"); |
76 } | 73 } |
OLD | NEW |