Mercurial > hg > truffle
comparison src/share/vm/utilities/numberSeq.cpp @ 6152:958bb4b7be49
Merge
author | asaha |
---|---|
date | Tue, 10 Apr 2012 10:42:34 -0700 |
parents | 2c0751569716 |
children | bbc900c2482a |
comparison
equal
deleted
inserted
replaced
6151:e778c29768e6 | 6152:958bb4b7be49 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 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. |
154 _sequence = NEW_C_HEAP_ARRAY(double, _length); | 154 _sequence = NEW_C_HEAP_ARRAY(double, _length); |
155 for (int i = 0; i < _length; ++i) | 155 for (int i = 0; i < _length; ++i) |
156 _sequence[i] = 0.0; | 156 _sequence[i] = 0.0; |
157 } | 157 } |
158 | 158 |
159 TruncatedSeq::~TruncatedSeq() { | |
160 FREE_C_HEAP_ARRAY(double, _sequence); | |
161 } | |
162 | |
159 void TruncatedSeq::add(double val) { | 163 void TruncatedSeq::add(double val) { |
160 AbsSeq::add(val); | 164 AbsSeq::add(val); |
161 | 165 |
162 // get the oldest value in the sequence... | 166 // get the oldest value in the sequence... |
163 double old_val = _sequence[_next]; | 167 double old_val = _sequence[_next]; |