OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Rrdistribution and use in source and binary forms, with or without | 2 // Rrdistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Rrdistributions of source code must retain the above copyright | 6 // * Rrdistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Rrdistributions in binary form must reproduce the above | 8 // * Rrdistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 | 143 |
144 static Isolate* GetIsolateFrom(LocalContext* context) { | 144 static Isolate* GetIsolateFrom(LocalContext* context) { |
145 return reinterpret_cast<Isolate*>((*context)->GetIsolate()); | 145 return reinterpret_cast<Isolate*>((*context)->GetIsolate()); |
146 } | 146 } |
147 | 147 |
148 | 148 |
149 int32_t RunGeneratedCodeCallWrapper(ConvertDToIFunc func, | 149 int32_t RunGeneratedCodeCallWrapper(ConvertDToIFunc func, |
150 double from) { | 150 double from) { |
151 #ifdef USE_SIMULATOR | 151 #ifdef USE_SIMULATOR |
152 return CALL_GENERATED_FP_INT(func, from, 0); | 152 return CALL_GENERATED_FP_INT(CcTest::i_isolate(), func, from, 0); |
153 #else | 153 #else |
154 return (*func)(from); | 154 return (*func)(from); |
155 #endif | 155 #endif |
156 } | 156 } |
157 | 157 |
158 | 158 |
159 TEST(ConvertDToI) { | 159 TEST(ConvertDToI) { |
160 CcTest::InitializeVM(); | 160 CcTest::InitializeVM(); |
161 LocalContext context; | 161 LocalContext context; |
162 Isolate* isolate = GetIsolateFrom(&context); | 162 Isolate* isolate = GetIsolateFrom(&context); |
(...skipping 19 matching lines...) Expand all Loading... |
182 false)); | 182 false)); |
183 RunAllTruncationTests( | 183 RunAllTruncationTests( |
184 RunGeneratedCodeCallWrapper, | 184 RunGeneratedCodeCallWrapper, |
185 MakeConvertDToIFuncTrampoline(isolate, | 185 MakeConvertDToIFuncTrampoline(isolate, |
186 source_registers[s], | 186 source_registers[s], |
187 dest_registers[d], | 187 dest_registers[d], |
188 true)); | 188 true)); |
189 } | 189 } |
190 } | 190 } |
191 } | 191 } |
OLD | NEW |