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

Side by Side Diff: test/cctest/interpreter/test-interpreter-intrinsics.cc

Issue 2103733003: [turbofan] Introduce Float64Pow and NumberPow operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE on ARM64 bug fix. Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interpreter/interpreter-intrinsics.h" 7 #include "src/interpreter/interpreter-intrinsics.h"
8 #include "test/cctest/interpreter/interpreter-tester.h" 8 #include "test/cctest/interpreter/interpreter-tester.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 InvokeIntrinsicHelper to_number_helper(isolate, handles.main_zone(), 219 InvokeIntrinsicHelper to_number_helper(isolate, handles.main_zone(),
220 Runtime::kInlineToNumber); 220 Runtime::kInlineToNumber);
221 CHECK_EQ(Smi::FromInt(46), 221 CHECK_EQ(Smi::FromInt(46),
222 *to_number_helper.Invoke(to_number_helper.NewObject("'46'"))); 222 *to_number_helper.Invoke(to_number_helper.NewObject("'46'")));
223 223
224 InvokeIntrinsicHelper to_integer_helper(isolate, handles.main_zone(), 224 InvokeIntrinsicHelper to_integer_helper(isolate, handles.main_zone(),
225 Runtime::kInlineToInteger); 225 Runtime::kInlineToInteger);
226 CHECK_EQ(Smi::FromInt(502), 226 CHECK_EQ(Smi::FromInt(502),
227 *to_integer_helper.Invoke(to_integer_helper.NewObject("502.67"))); 227 *to_integer_helper.Invoke(to_integer_helper.NewObject("502.67")));
228 228
229 InvokeIntrinsicHelper math_pow_helper(isolate, handles.main_zone(),
230 Runtime::kInlineMathPow);
231 CHECK(math_pow_helper
232 .Invoke(math_pow_helper.NewObject("3"),
233 math_pow_helper.NewObject("7"))
234 ->SameValue(Smi::FromInt(2187)));
235
236 InvokeIntrinsicHelper has_property_helper(isolate, handles.main_zone(), 229 InvokeIntrinsicHelper has_property_helper(isolate, handles.main_zone(),
237 Runtime::kInlineHasProperty); 230 Runtime::kInlineHasProperty);
238 CHECK_EQ(*factory->true_value(), 231 CHECK_EQ(*factory->true_value(),
239 *has_property_helper.Invoke( 232 *has_property_helper.Invoke(
240 has_property_helper.NewObject("'x'"), 233 has_property_helper.NewObject("'x'"),
241 has_property_helper.NewObject("({ x: 20 })"))); 234 has_property_helper.NewObject("({ x: 20 })")));
242 CHECK_EQ(*factory->false_value(), 235 CHECK_EQ(*factory->false_value(),
243 *has_property_helper.Invoke( 236 *has_property_helper.Invoke(
244 has_property_helper.NewObject("'y'"), 237 has_property_helper.NewObject("'y'"),
245 has_property_helper.NewObject("({ x: 20 })"))); 238 has_property_helper.NewObject("({ x: 20 })")));
(...skipping 24 matching lines...) Expand all
270 263
271 CHECK(helper.Invoke(helper.NewObject("'foobar'")) 264 CHECK(helper.Invoke(helper.NewObject("'foobar'"))
272 ->SameValue(*helper.NewObject("'foobar'"))); 265 ->SameValue(*helper.NewObject("'foobar'")));
273 CHECK(helper.Invoke(helper.NewObject("new Object('foobar')")) 266 CHECK(helper.Invoke(helper.NewObject("new Object('foobar')"))
274 ->SameValue(*helper.NewObject("'foobar'"))); 267 ->SameValue(*helper.NewObject("'foobar'")));
275 } 268 }
276 269
277 } // namespace interpreter 270 } // namespace interpreter
278 } // namespace internal 271 } // namespace internal
279 } // namespace v8 272 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-code-assembler.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698