comparison src/gpu/hsail/vm/hsailArgumentsBase.cpp @ 16119:310994c667a7

HSAIL: support offloading some IntStream.reduce() operations to HSA Contributed-by: Eric Caspole <eric.caspole@amd.com>
author Doug Simon <doug.simon@oracle.com>
date Tue, 17 Jun 2014 12:05:34 +0200
parents 3e9a960f0da1
children f55f2d400797
comparison
equal deleted inserted replaced
16117:3b4690ddd92e 16119:310994c667a7
34 oop arg = ((objArrayOop) (_args))->obj_at(_index++); 34 oop arg = ((objArrayOop) (_args))->obj_at(_index++);
35 assert(expectedType == T_OBJECT || 35 assert(expectedType == T_OBJECT ||
36 java_lang_boxing_object::is_instance(arg, expectedType), "arg type mismatch"); 36 java_lang_boxing_object::is_instance(arg, expectedType), "arg type mismatch");
37 37
38 return arg; 38 return arg;
39 }
40
41 void HSAILArgumentsBase::collectArgs() {
42 if (TraceGPUInteraction) {
43 tty->print_cr("[HSAIL] %s::collectArgs, sig:%s args length=%d", argsBuilderName(), _signature->as_C_string(), _length);
44 }
45 if (!_is_static) {
46 // First object in args should be 'this'
47 oop arg = _args->obj_at(_index++);
48 assert(arg->is_instance() && (!arg->is_array()), "First arg should be 'this'");
49 if (TraceGPUInteraction) {
50 tty->print_cr("[HSAIL] %s, instance method, this " PTR_FORMAT ", is a %s", argsBuilderName(), (address) arg, arg->klass()->external_name());
51 }
52 pushObject(arg);
53 } else {
54 if (TraceGPUInteraction) {
55 tty->print_cr("[HSAIL] %s, static method", argsBuilderName());
56 }
57 }
58 // Iterate over the entire signature
59 iterate();
60
61 pushTrailingArgs();
39 } 62 }
40 63
41 void HSAILArgumentsBase::do_bool() { 64 void HSAILArgumentsBase::do_bool() {
42 // Get the boxed value 65 // Get the boxed value
43 oop arg = _args->obj_at(_index++); 66 oop arg = _args->obj_at(_index++);