OLD | NEW |
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 <stdint.h> | 5 #include <stdint.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "src/wasm/wasm-macro-gen.h" | 10 #include "src/wasm/wasm-macro-gen.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 ADD_CODE(code, kExprCallFunction, 0); | 422 ADD_CODE(code, kExprCallFunction, 0); |
423 | 423 |
424 size_t end = code.size(); | 424 size_t end = code.size(); |
425 code.push_back(0); | 425 code.push_back(0); |
426 | 426 |
427 // Call different select JS functions. | 427 // Call different select JS functions. |
428 for (int which = 0; which < num_params; which++) { | 428 for (int which = 0; which < num_params; which++) { |
429 HandleScope scope(isolate); | 429 HandleScope scope(isolate); |
430 TestingModule module; | 430 TestingModule module; |
431 uint32_t js_index = AddJSSelector(&module, &sig, which); | 431 uint32_t js_index = AddJSSelector(&module, &sig, which); |
432 CHECK_EQ(0, js_index); | 432 CHECK_EQ(0u, js_index); |
433 WasmFunctionCompiler t(&sig, &module); | 433 WasmFunctionCompiler t(&sig, &module); |
434 t.Build(&code[0], &code[end]); | 434 t.Build(&code[0], &code[end]); |
435 | 435 |
436 Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd()); | 436 Handle<JSFunction> jsfunc = module.WrapCode(t.CompileAndAdd()); |
437 | 437 |
438 Handle<Object> args[] = { | 438 Handle<Object> args[] = { |
439 factory->NewNumber(inputs.arg_d(0)), | 439 factory->NewNumber(inputs.arg_d(0)), |
440 factory->NewNumber(inputs.arg_d(1)), | 440 factory->NewNumber(inputs.arg_d(1)), |
441 factory->NewNumber(inputs.arg_d(2)), | 441 factory->NewNumber(inputs.arg_d(2)), |
442 factory->NewNumber(inputs.arg_d(3)), | 442 factory->NewNumber(inputs.arg_d(3)), |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 RunJSSelectAlignTest(9, 9); | 508 RunJSSelectAlignTest(9, 9); |
509 } | 509 } |
510 | 510 |
511 TEST(Run_JSSelectAlign_10) { | 511 TEST(Run_JSSelectAlign_10) { |
512 CcTest::InitializeVM(); | 512 CcTest::InitializeVM(); |
513 RunJSSelectAlignTest(10, 7); | 513 RunJSSelectAlignTest(10, 7); |
514 RunJSSelectAlignTest(10, 8); | 514 RunJSSelectAlignTest(10, 8); |
515 RunJSSelectAlignTest(10, 9); | 515 RunJSSelectAlignTest(10, 9); |
516 RunJSSelectAlignTest(10, 10); | 516 RunJSSelectAlignTest(10, 10); |
517 } | 517 } |
OLD | NEW |