Bug 617935: Check string lengths using StringBuffer. (r=lw)
[mozilla-central.git] / js / src / nanojit / Fragmento.cpp
blob6bf35cfcfd70976e30b5943c04a589bbc36849ec
1 /* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
2 /* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */
3 /* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is [Open Source Virtual Machine].
18 * The Initial Developer of the Original Code is
19 * Adobe System Incorporated.
20 * Portions created by the Initial Developer are Copyright (C) 2004-2007
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Adobe AS3 Team
25 * Mozilla TraceMonkey Team
26 * Asko Tontti <atontti@cc.hut.fi>
28 * Alternatively, the contents of this file may be used under the terms of
29 * either the GNU General Public License Version 2 or later (the "GPL"), or
30 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the GPL or the LGPL are applicable instead
32 * of those above. If you wish to allow use of your version of this file only
33 * under the terms of either the GPL or the LGPL, and not to allow others to
34 * use your version of this file under the terms of the MPL, indicate your
35 * decision by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL or the LGPL. If you do not delete
37 * the provisions above, a recipient may use your version of this file under
38 * the terms of any one of the MPL, the GPL or the LGPL.
40 * ***** END LICENSE BLOCK ***** */
42 #include "nanojit.h"
44 namespace nanojit
46 #ifdef FEATURE_NANOJIT
48 using namespace avmplus;
51 // Fragment
53 Fragment::Fragment(const void* _ip
54 verbose_only(, uint32_t profFragID))
56 lirbuf(NULL),
57 lastIns(NULL),
58 ip(_ip),
59 recordAttempts(0),
60 fragEntry(NULL),
61 verbose_only( loopLabel(NULL), )
62 verbose_only( profFragID(profFragID), )
63 verbose_only( profCount(0), )
64 verbose_only( nStaticExits(0), )
65 verbose_only( nCodeBytes(0), )
66 verbose_only( nExitBytes(0), )
67 verbose_only( guardNumberer(1), )
68 verbose_only( guardsForFrag(NULL), )
69 _code(NULL),
70 _hits(0)
72 // when frag profiling is enabled, profFragID should be >= 1,
73 // else it should be zero. However, there's no way to assert
74 // that here since there's no way to determine whether frag
75 // profiling is enabled.
77 #endif /* FEATURE_NANOJIT */