Mercurial > hg > truffle
diff src/share/vm/ci/ciSymbol.cpp @ 1138:dd57230ba8fe
6893268: additional dynamic language related optimizations in C2
Summary: C2 needs some additional optimizations to be able to handle MethodHandle invokes and invokedynamic instructions at the best performance.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Tue, 05 Jan 2010 15:21:25 +0100 |
parents | a61af66fc99e |
children | cd5dbf694d45 |
line wrap: on
line diff
--- a/src/share/vm/ci/ciSymbol.cpp Tue Jan 05 13:05:58 2010 +0100 +++ b/src/share/vm/ci/ciSymbol.cpp Tue Jan 05 15:21:25 2010 +0100 @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,6 +60,22 @@ } // ------------------------------------------------------------------ +// ciSymbol::starts_with +// +// Tests if the symbol starts with the given prefix. +bool ciSymbol::starts_with(const char* prefix, int len) const { + GUARDED_VM_ENTRY(return get_symbolOop()->starts_with(prefix, len);) +} + +// ------------------------------------------------------------------ +// ciSymbol::index_of +// +// Determines where the symbol contains the given substring. +int ciSymbol::index_of_at(int i, const char* str, int len) const { + GUARDED_VM_ENTRY(return get_symbolOop()->index_of_at(i, str, len);) +} + +// ------------------------------------------------------------------ // ciSymbol::utf8_length int ciSymbol::utf8_length() { GUARDED_VM_ENTRY(return get_symbolOop()->utf8_length();)