comparison src/share/vm/opto/loopnode.cpp @ 4862:f457154eee8b

7140882: Don't return booleans from methods returning pointers Summary: Changed "return false" to "return NULL" Reviewed-by: dholmes, rottenha Contributed-by: dbhole@redhat.com
author brutisso
date Mon, 30 Jan 2012 12:36:49 +0100
parents c8d8e124380c
children 5e990493719e
comparison
equal deleted inserted replaced
4860:34e2e90e7182 4862:f457154eee8b
1 /* 1 /*
2 * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
896 // CHAR: (i+1)&0x7fff, BYTE: ((i+1)<<8)>>8, or SHORT: ((i+1)<<16)>>16 896 // CHAR: (i+1)&0x7fff, BYTE: ((i+1)<<8)>>8, or SHORT: ((i+1)<<16)>>16
897 // Return NULL for failure. Success returns the increment node. 897 // Return NULL for failure. Success returns the increment node.
898 Node* CountedLoopNode::match_incr_with_optional_truncation( 898 Node* CountedLoopNode::match_incr_with_optional_truncation(
899 Node* expr, Node** trunc1, Node** trunc2, const TypeInt** trunc_type) { 899 Node* expr, Node** trunc1, Node** trunc2, const TypeInt** trunc_type) {
900 // Quick cutouts: 900 // Quick cutouts:
901 if (expr == NULL || expr->req() != 3) return false; 901 if (expr == NULL || expr->req() != 3) return NULL;
902 902
903 Node *t1 = NULL; 903 Node *t1 = NULL;
904 Node *t2 = NULL; 904 Node *t2 = NULL;
905 const TypeInt* trunc_t = TypeInt::INT; 905 const TypeInt* trunc_t = TypeInt::INT;
906 Node* n1 = expr; 906 Node* n1 = expr;