diff options
Diffstat (limited to '')
33 files changed, 257 insertions, 68 deletions
diff --git a/linden/indra/lscript/lscript_alloc.h b/linden/indra/lscript/lscript_alloc.h index 8179446..d90cc14 100644 --- a/linden/indra/lscript/lscript_alloc.h +++ b/linden/indra/lscript/lscript_alloc.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_alloc.h | 2 | * @file lscript_alloc.h |
3 | * @brief General heap management for scripting system | 3 | * @brief General heap management for scripting system |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_ALLOC_H | 32 | #ifndef LL_LSCRIPT_ALLOC_H |
@@ -32,11 +35,8 @@ | |||
32 | // Under gcc 2.9, the manual is unclear if comments can appear above #ifndef | 35 | // Under gcc 2.9, the manual is unclear if comments can appear above #ifndef |
33 | // Under gcc 3, the manual explicitly states comments can appear above the #ifndef | 36 | // Under gcc 3, the manual explicitly states comments can appear above the #ifndef |
34 | 37 | ||
35 | #include "stdtypes.h" | ||
36 | #include "lscript_byteconvert.h" | 38 | #include "lscript_byteconvert.h" |
37 | #include "lscript_library.h" | 39 | #include "lscript_library.h" |
38 | #include "llrand.h" | ||
39 | #include <stdio.h> | ||
40 | 40 | ||
41 | void reset_hp_to_safe_spot(const U8 *buffer); | 41 | void reset_hp_to_safe_spot(const U8 *buffer); |
42 | 42 | ||
diff --git a/linden/indra/lscript/lscript_byteconvert.h b/linden/indra/lscript/lscript_byteconvert.h index 06d494e..6d0e2d0 100644 --- a/linden/indra/lscript/lscript_byteconvert.h +++ b/linden/indra/lscript/lscript_byteconvert.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_byteconvert.h | 2 | * @file lscript_byteconvert.h |
3 | * @brief Shared code for compiler and assembler for LSL | 3 | * @brief Shared code for compiler and assembler for LSL |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | // data shared between compiler/assembler | 32 | // data shared between compiler/assembler |
@@ -781,9 +784,17 @@ inline S32 get_state_event_opcoode_start(U8 *stream, S32 state, LSCRIPTStateEven | |||
781 | major_version = LSL2_MAJOR_VERSION_TWO; | 784 | major_version = LSL2_MAJOR_VERSION_TWO; |
782 | state_offset_offset = sr + LSCRIPTDataSize[LST_INTEGER] + LSCRIPTDataSize[LST_INTEGER]*3*state; | 785 | state_offset_offset = sr + LSCRIPTDataSize[LST_INTEGER] + LSCRIPTDataSize[LST_INTEGER]*3*state; |
783 | } | 786 | } |
787 | if ( state_offset_offset < 0 || state_offset_offset > TOP_OF_MEMORY ) | ||
788 | { | ||
789 | return -1; | ||
790 | } | ||
784 | 791 | ||
785 | // get the actual position in memory of the desired state | 792 | // get the actual position in memory of the desired state |
786 | S32 state_offset = sr + bytestream2integer(stream, state_offset_offset); | 793 | S32 state_offset = sr + bytestream2integer(stream, state_offset_offset); |
794 | if ( state_offset < 0 || state_offset > TOP_OF_MEMORY ) | ||
795 | { | ||
796 | return -1; | ||
797 | } | ||
787 | 798 | ||
788 | // save that value | 799 | // save that value |
789 | S32 state_offset_base = state_offset; | 800 | S32 state_offset_base = state_offset; |
@@ -793,18 +804,32 @@ inline S32 get_state_event_opcoode_start(U8 *stream, S32 state, LSCRIPTStateEven | |||
793 | 804 | ||
794 | // get the location of the event offset | 805 | // get the location of the event offset |
795 | S32 event_offset = event_jump_offset + LSCRIPTDataSize[LST_INTEGER]*2*get_event_handler_jump_position(get_event_register(stream, LREG_ER, major_version), event); | 806 | S32 event_offset = event_jump_offset + LSCRIPTDataSize[LST_INTEGER]*2*get_event_handler_jump_position(get_event_register(stream, LREG_ER, major_version), event); |
807 | if ( event_offset < 0 || event_offset > TOP_OF_MEMORY ) | ||
808 | { | ||
809 | return -1; | ||
810 | } | ||
796 | 811 | ||
797 | // now, jump to the event | 812 | // now, jump to the event |
798 | S32 event_start = bytestream2integer(stream, event_offset); | 813 | S32 event_start = bytestream2integer(stream, event_offset); |
814 | if ( event_start < 0 || event_start > TOP_OF_MEMORY ) | ||
815 | { | ||
816 | return -1; | ||
817 | } | ||
799 | event_start += event_jump_offset; | 818 | event_start += event_jump_offset; |
800 | 819 | ||
801 | S32 event_start_original = event_start; | 820 | S32 event_start_original = event_start; |
802 | 821 | ||
803 | // now skip past the parameters | 822 | // now skip past the parameters |
804 | S32 opcode_offset = bytestream2integer(stream, event_start); | 823 | S32 opcode_offset = bytestream2integer(stream, event_start); |
824 | if ( opcode_offset < 0 || opcode_offset > TOP_OF_MEMORY ) | ||
825 | { | ||
826 | return -1; | ||
827 | } | ||
828 | |||
805 | return opcode_offset + event_start_original; | 829 | return opcode_offset + event_start_original; |
806 | } | 830 | } |
807 | 831 | ||
832 | |||
808 | inline U64 get_handled_events(U8 *stream, S32 state) | 833 | inline U64 get_handled_events(U8 *stream, S32 state) |
809 | { | 834 | { |
810 | U64 retvalue = 0; | 835 | U64 retvalue = 0; |
@@ -829,6 +854,7 @@ inline U64 get_handled_events(U8 *stream, S32 state) | |||
829 | return retvalue; | 854 | return retvalue; |
830 | } | 855 | } |
831 | 856 | ||
857 | // Returns -1 on error | ||
832 | inline S32 get_event_stack_size(U8 *stream, S32 state, LSCRIPTStateEventType event) | 858 | inline S32 get_event_stack_size(U8 *stream, S32 state, LSCRIPTStateEventType event) |
833 | { | 859 | { |
834 | // get the start of the state table | 860 | // get the start of the state table |
@@ -849,21 +875,39 @@ inline S32 get_event_stack_size(U8 *stream, S32 state, LSCRIPTStateEventType eve | |||
849 | state_offset_offset = sr + LSCRIPTDataSize[LST_INTEGER] + LSCRIPTDataSize[LST_INTEGER]*3*state; | 875 | state_offset_offset = sr + LSCRIPTDataSize[LST_INTEGER] + LSCRIPTDataSize[LST_INTEGER]*3*state; |
850 | } | 876 | } |
851 | 877 | ||
878 | if ( state_offset_offset < 0 || state_offset_offset > TOP_OF_MEMORY ) | ||
879 | { | ||
880 | return -1; | ||
881 | } | ||
882 | |||
852 | S32 state_offset = bytestream2integer(stream, state_offset_offset); | 883 | S32 state_offset = bytestream2integer(stream, state_offset_offset); |
853 | state_offset += sr; | 884 | state_offset += sr; |
854 | 885 | ||
855 | state_offset_offset = state_offset; | 886 | state_offset_offset = state_offset; |
887 | if ( state_offset_offset < 0 || state_offset_offset > TOP_OF_MEMORY ) | ||
888 | { | ||
889 | return -1; | ||
890 | } | ||
856 | 891 | ||
857 | // skip to jump table | 892 | // skip to jump table |
858 | S32 jump_table = bytestream2integer(stream, state_offset_offset); | 893 | S32 jump_table = bytestream2integer(stream, state_offset_offset); |
859 | 894 | ||
860 | jump_table += state_offset; | 895 | jump_table += state_offset; |
896 | if ( jump_table < 0 || jump_table > TOP_OF_MEMORY ) | ||
897 | { | ||
898 | return -1; | ||
899 | } | ||
861 | 900 | ||
862 | // get the position of the jump to the desired state | 901 | // get the position of the jump to the desired state |
863 | S32 stack_size_offset = jump_table + LSCRIPTDataSize[LST_INTEGER]*2*get_event_handler_jump_position(get_event_register(stream, LREG_ER, major_version), event) + LSCRIPTDataSize[LST_INTEGER]; | 902 | S32 stack_size_offset = jump_table + LSCRIPTDataSize[LST_INTEGER]*2*get_event_handler_jump_position(get_event_register(stream, LREG_ER, major_version), event) + LSCRIPTDataSize[LST_INTEGER]; |
864 | 903 | ||
865 | // get the handled events | 904 | // get the handled events |
866 | S32 stack_size = bytestream2integer(stream, stack_size_offset); | 905 | S32 stack_size = bytestream2integer(stream, stack_size_offset); |
906 | if ( stack_size < 0 || stack_size > TOP_OF_MEMORY ) | ||
907 | { | ||
908 | return -1; | ||
909 | } | ||
910 | |||
867 | return stack_size; | 911 | return stack_size; |
868 | } | 912 | } |
869 | 913 | ||
diff --git a/linden/indra/lscript/lscript_byteformat.h b/linden/indra/lscript/lscript_byteformat.h index 2feee9f..4e8f13f 100644 --- a/linden/indra/lscript/lscript_byteformat.h +++ b/linden/indra/lscript/lscript_byteformat.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_byteformat.h | 2 | * @file lscript_byteformat.h |
3 | * @brief Shared code between compiler and assembler and LSL | 3 | * @brief Shared code between compiler and assembler and LSL |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_BYTEFORMAT_H | 32 | #ifndef LL_LSCRIPT_BYTEFORMAT_H |
diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l index de5ba11..69e77fb 100644 --- a/linden/indra/lscript/lscript_compile/indra.l +++ b/linden/indra/lscript/lscript_compile/indra.l | |||
@@ -9,13 +9,15 @@ FS (f|F) | |||
9 | %p 5000 | 9 | %p 5000 |
10 | 10 | ||
11 | %{ | 11 | %{ |
12 | #include <stdio.h> | 12 | #include "linden_common.h" |
13 | #include "stdtypes.h" | 13 | // Deal with the fact that lex/yacc generates unreachable code |
14 | #ifdef LL_WINDOWS | ||
15 | #pragma warning (disable : 4702) // warning C4702: unreachable code | ||
16 | #endif // LL_WINDOWS | ||
14 | #include "llmath.h" | 17 | #include "llmath.h" |
15 | #include "lscript_tree.h" | 18 | #include "lscript_tree.h" |
16 | #include "lscript_typecheck.h" | 19 | #include "lscript_typecheck.h" |
17 | #include "lscript_resource.h" | 20 | #include "lscript_resource.h" |
18 | #include "llfile.h" | ||
19 | #if LL_WINDOWS | 21 | #if LL_WINDOWS |
20 | #include "ytab.h" | 22 | #include "ytab.h" |
21 | #else | 23 | #else |
diff --git a/linden/indra/lscript/lscript_compile/indra.y b/linden/indra/lscript/lscript_compile/indra.y index 56f40c9..d10cbfe 100644 --- a/linden/indra/lscript/lscript_compile/indra.y +++ b/linden/indra/lscript/lscript_compile/indra.y | |||
@@ -1,7 +1,7 @@ | |||
1 | %{ | 1 | %{ |
2 | #include "stdtypes.h" | 2 | #include "linden_common.h" |
3 | #include "lscript_tree.h" | 3 | #include "lscript_tree.h" |
4 | 4 | ||
5 | #ifdef __cplusplus | 5 | #ifdef __cplusplus |
6 | extern "C" { | 6 | extern "C" { |
7 | #endif | 7 | #endif |
@@ -16,6 +16,7 @@ | |||
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | #ifdef LL_WINDOWS | 18 | #ifdef LL_WINDOWS |
19 | #pragma warning (disable : 4702) // warning C4702: unreachable code | ||
19 | #pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels | 20 | #pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels |
20 | #endif | 21 | #endif |
21 | 22 | ||
diff --git a/linden/indra/lscript/lscript_compile/lscript_alloc.cpp b/linden/indra/lscript/lscript_compile/lscript_alloc.cpp index 9298524..873fc36 100644 --- a/linden/indra/lscript/lscript_compile/lscript_alloc.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_alloc.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_alloc.cpp | 2 | * @file lscript_alloc.cpp |
3 | * @brief Allocation tracking | 3 | * @brief Allocation tracking |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,5 +26,6 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
diff --git a/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp b/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp index 0d75eee..c41c34c 100644 --- a/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_bytecode.cpp | 2 | * @file lscript_bytecode.cpp |
3 | * @brief classes to build actual bytecode | 3 | * @brief classes to build actual bytecode |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
diff --git a/linden/indra/lscript/lscript_compile/lscript_bytecode.h b/linden/indra/lscript/lscript_compile/lscript_bytecode.h index 2dd4719..8db031a 100644 --- a/linden/indra/lscript/lscript_compile/lscript_bytecode.h +++ b/linden/indra/lscript/lscript_compile/lscript_bytecode.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_bytecode.h | 2 | * @file lscript_bytecode.h |
3 | * @brief classes to build actual bytecode | 3 | * @brief classes to build actual bytecode |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_BYTECODE_H | 32 | #ifndef LL_LSCRIPT_BYTECODE_H |
diff --git a/linden/indra/lscript/lscript_compile/lscript_error.cpp b/linden/indra/lscript/lscript_compile/lscript_error.cpp index d54bbb4..f4960fc 100644 --- a/linden/indra/lscript/lscript_compile/lscript_error.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_error.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_error.cpp | 2 | * @file lscript_error.cpp |
3 | * @brief error reporting class and strings | 3 | * @brief error reporting class and strings |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
diff --git a/linden/indra/lscript/lscript_compile/lscript_error.h b/linden/indra/lscript/lscript_compile/lscript_error.h index c795b0c..aba3932 100644 --- a/linden/indra/lscript/lscript_compile/lscript_error.h +++ b/linden/indra/lscript/lscript_compile/lscript_error.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_error.h | 2 | * @file lscript_error.h |
3 | * @brief error reporting class and strings | 3 | * @brief error reporting class and strings |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,16 +26,14 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_ERROR_H | 32 | #ifndef LL_LSCRIPT_ERROR_H |
30 | #define LL_LSCRIPT_ERROR_H | 33 | #define LL_LSCRIPT_ERROR_H |
31 | 34 | ||
32 | #include <stdio.h> | ||
33 | #include "stdtypes.h" | ||
34 | #include "lscript_scope.h" | 35 | #include "lscript_scope.h" |
35 | 36 | ||
36 | |||
37 | typedef enum e_lscript_compile_pass | 37 | typedef enum e_lscript_compile_pass |
38 | { | 38 | { |
39 | LSCP_INVALID, | 39 | LSCP_INVALID, |
diff --git a/linden/indra/lscript/lscript_compile/lscript_heap.cpp b/linden/indra/lscript/lscript_compile/lscript_heap.cpp index 33c52e7..7242b72 100644 --- a/linden/indra/lscript/lscript_compile/lscript_heap.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_heap.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_heap.cpp | 2 | * @file lscript_heap.cpp |
3 | * @brief classes to manage script heap | 3 | * @brief classes to manage script heap |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #if 0 | 32 | #if 0 |
diff --git a/linden/indra/lscript/lscript_compile/lscript_heap.h b/linden/indra/lscript/lscript_compile/lscript_heap.h index 2c55abc..a06466a 100644 --- a/linden/indra/lscript/lscript_compile/lscript_heap.h +++ b/linden/indra/lscript/lscript_compile/lscript_heap.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_heap.h | 2 | * @file lscript_heap.h |
3 | * @brief classes to manage script heap | 3 | * @brief classes to manage script heap |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #if 0 | 32 | #if 0 |
diff --git a/linden/indra/lscript/lscript_compile/lscript_resource.cpp b/linden/indra/lscript/lscript_compile/lscript_resource.cpp index 4747524..0e01385 100644 --- a/linden/indra/lscript/lscript_compile/lscript_resource.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_resource.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_resource.cpp | 2 | * @file lscript_resource.cpp |
3 | * @brief resource determination prior to assembly | 3 | * @brief resource determination prior to assembly |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
diff --git a/linden/indra/lscript/lscript_compile/lscript_resource.h b/linden/indra/lscript/lscript_compile/lscript_resource.h index 91e9e70..80e6c83 100644 --- a/linden/indra/lscript/lscript_compile/lscript_resource.h +++ b/linden/indra/lscript/lscript_compile/lscript_resource.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_resource.h | 2 | * @file lscript_resource.h |
3 | * @brief resource determination prior to assembly | 3 | * @brief resource determination prior to assembly |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,13 +26,12 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_RESOURCE_H | 32 | #ifndef LL_LSCRIPT_RESOURCE_H |
30 | #define LL_LSCRIPT_RESOURCE_H | 33 | #define LL_LSCRIPT_RESOURCE_H |
31 | 34 | ||
32 | #include <stdio.h> | ||
33 | #include "stdtypes.h" | ||
34 | #include "lscript_scope.h" | 35 | #include "lscript_scope.h" |
35 | 36 | ||
36 | void init_temp_jumps(); | 37 | void init_temp_jumps(); |
diff --git a/linden/indra/lscript/lscript_compile/lscript_scope.cpp b/linden/indra/lscript/lscript_compile/lscript_scope.cpp index 747327b..4d00661 100644 --- a/linden/indra/lscript/lscript_compile/lscript_scope.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_scope.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_scope.cpp | 2 | * @file lscript_scope.cpp |
3 | * @brief builds nametable and checks scope | 3 | * @brief builds nametable and checks scope |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
diff --git a/linden/indra/lscript/lscript_compile/lscript_scope.h b/linden/indra/lscript/lscript_compile/lscript_scope.h index 2b82d4b..c55d995 100644 --- a/linden/indra/lscript/lscript_compile/lscript_scope.h +++ b/linden/indra/lscript/lscript_compile/lscript_scope.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_scope.h | 2 | * @file lscript_scope.h |
3 | * @brief builds nametable and checks scope | 3 | * @brief builds nametable and checks scope |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_SCOPE_H | 32 | #ifndef LL_LSCRIPT_SCOPE_H |
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.cpp b/linden/indra/lscript/lscript_compile/lscript_tree.cpp index 075418d..cad6fc2 100644 --- a/linden/indra/lscript/lscript_compile/lscript_tree.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_tree.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_tree.cpp | 2 | * @file lscript_tree.cpp |
3 | * @brief implements methods for lscript_tree.h classes | 3 | * @brief implements methods for lscript_tree.h classes |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | // TO DO: Move print functionality from .h file to here | 32 | // TO DO: Move print functionality from .h file to here |
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.h b/linden/indra/lscript/lscript_compile/lscript_tree.h index a70db87..fee648e 100644 --- a/linden/indra/lscript/lscript_compile/lscript_tree.h +++ b/linden/indra/lscript/lscript_compile/lscript_tree.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_tree.h | 2 | * @file lscript_tree.h |
3 | * @brief provides the classes required to build lscript's abstract syntax tree and symbol table | 3 | * @brief provides the classes required to build lscript's abstract syntax tree and symbol table |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,13 +26,12 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_TREE_H | 32 | #ifndef LL_LSCRIPT_TREE_H |
30 | #define LL_LSCRIPT_TREE_H | 33 | #define LL_LSCRIPT_TREE_H |
31 | 34 | ||
32 | #include <stdio.h> | ||
33 | #include "stdtypes.h" | ||
34 | #include "v3math.h" | 35 | #include "v3math.h" |
35 | #include "llquaternion.h" | 36 | #include "llquaternion.h" |
36 | #include "linked_lists.h" | 37 | #include "linked_lists.h" |
diff --git a/linden/indra/lscript/lscript_compile/lscript_typecheck.cpp b/linden/indra/lscript/lscript_compile/lscript_typecheck.cpp index 9fa7720..847a54e 100644 --- a/linden/indra/lscript/lscript_compile/lscript_typecheck.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_typecheck.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_typecheck.cpp | 2 | * @file lscript_typecheck.cpp |
3 | * @brief typechecks script | 3 | * @brief typechecks script |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
diff --git a/linden/indra/lscript/lscript_compile/lscript_typecheck.h b/linden/indra/lscript/lscript_compile/lscript_typecheck.h index c10d11b..0ebae2d 100644 --- a/linden/indra/lscript/lscript_compile/lscript_typecheck.h +++ b/linden/indra/lscript/lscript_compile/lscript_typecheck.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_typecheck.h | 2 | * @file lscript_typecheck.h |
3 | * @brief typechecks script | 3 | * @brief typechecks script |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_TYPECHECK_H | 32 | #ifndef LL_LSCRIPT_TYPECHECK_H |
diff --git a/linden/indra/lscript/lscript_execute.h b/linden/indra/lscript/lscript_execute.h index 82109fd..1e11d32 100644 --- a/linden/indra/lscript/lscript_execute.h +++ b/linden/indra/lscript/lscript_execute.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_execute.h | 2 | * @file lscript_execute.h |
3 | * @brief Classes to execute bytecode | 3 | * @brief Classes to execute bytecode |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,12 +26,12 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_EXECUTE_H | 32 | #ifndef LL_LSCRIPT_EXECUTE_H |
30 | #define LL_LSCRIPT_EXECUTE_H | 33 | #define LL_LSCRIPT_EXECUTE_H |
31 | 34 | ||
32 | #include <stdio.h> | ||
33 | #include "lscript_byteconvert.h" | 35 | #include "lscript_byteconvert.h" |
34 | #include "linked_lists.h" | 36 | #include "linked_lists.h" |
35 | #include "lscript_library.h" | 37 | #include "lscript_library.h" |
@@ -379,6 +381,10 @@ public: | |||
379 | LLScriptEventData mEventData; | 381 | LLScriptEventData mEventData; |
380 | 382 | ||
381 | static S64 sGlobalInstructionCount; | 383 | static S64 sGlobalInstructionCount; |
384 | |||
385 | private: | ||
386 | void recordBoundaryError( const LLUUID &id ); | ||
387 | void setStateEventOpcoodeStartSafely( S32 state, LSCRIPTStateEventType event, const LLUUID &id ); | ||
382 | }; | 388 | }; |
383 | 389 | ||
384 | #endif | 390 | #endif |
diff --git a/linden/indra/lscript/lscript_execute/lscript_execute.cpp b/linden/indra/lscript/lscript_execute/lscript_execute.cpp index 9e8be15..5bbbc47 100644 --- a/linden/indra/lscript/lscript_execute/lscript_execute.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_execute.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_execute.cpp | 2 | * @file lscript_execute.cpp |
3 | * @brief classes to execute bytecode | 3 | * @brief classes to execute bytecode |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
@@ -265,6 +268,32 @@ void LLScriptExecute::init() | |||
265 | 268 | ||
266 | } | 269 | } |
267 | 270 | ||
271 | |||
272 | // Utility routine for when there's a boundary error parsing bytecode | ||
273 | void LLScriptExecute::recordBoundaryError( const LLUUID &id ) | ||
274 | { | ||
275 | set_fault(mBuffer, LSRF_BOUND_CHECK_ERROR); | ||
276 | llwarns << "Script boundary error for ID " << id << llendl; | ||
277 | } | ||
278 | |||
279 | |||
280 | // set IP to the event handler with some error checking | ||
281 | void LLScriptExecute::setStateEventOpcoodeStartSafely( S32 state, LSCRIPTStateEventType event, const LLUUID &id ) | ||
282 | { | ||
283 | S32 opcode_start = get_state_event_opcoode_start( mBuffer, state, event ); | ||
284 | if ( opcode_start == -1 ) | ||
285 | { | ||
286 | recordBoundaryError( id ); | ||
287 | } | ||
288 | else | ||
289 | { | ||
290 | set_ip( mBuffer, opcode_start ); | ||
291 | } | ||
292 | } | ||
293 | |||
294 | |||
295 | |||
296 | |||
268 | S32 lscript_push_variable(LLScriptLibData *data, U8 *buffer); | 297 | S32 lscript_push_variable(LLScriptLibData *data, U8 *buffer); |
269 | 298 | ||
270 | U32 LLScriptExecute::run(BOOL b_print, const LLUUID &id, char **errorstr, BOOL &state_transition) | 299 | U32 LLScriptExecute::run(BOOL b_print, const LLUUID &id, char **errorstr, BOOL &state_transition) |
@@ -373,14 +402,20 @@ U32 LLScriptExecute::run(BOOL b_print, const LLUUID &id, char **errorstr, BOOL & | |||
373 | 402 | ||
374 | // now, push any additional stack space | 403 | // now, push any additional stack space |
375 | S32 additional_size = get_event_stack_size(mBuffer, current_state, LSTT_STATE_EXIT); | 404 | S32 additional_size = get_event_stack_size(mBuffer, current_state, LSTT_STATE_EXIT); |
376 | lscript_pusharge(mBuffer, additional_size); | 405 | if ( additional_size == -1 ) |
377 | 406 | { | |
378 | sp = get_register(mBuffer, LREG_SP); | 407 | recordBoundaryError( id ); |
379 | sp += additional_size; | 408 | } |
380 | set_bp(mBuffer, sp); | 409 | else |
381 | // set IP to the event handler | 410 | { |
382 | S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, LSTT_STATE_EXIT); | 411 | lscript_pusharge(mBuffer, additional_size); |
383 | set_ip(mBuffer, opcode_start); | 412 | |
413 | sp = get_register(mBuffer, LREG_SP); | ||
414 | sp += additional_size; | ||
415 | set_bp(mBuffer, sp); | ||
416 | // set IP to the event handler | ||
417 | setStateEventOpcoodeStartSafely( current_state, LSTT_STATE_EXIT, id ); | ||
418 | } | ||
384 | return NO_DELETE_FLAG; | 419 | return NO_DELETE_FLAG; |
385 | } | 420 | } |
386 | } | 421 | } |
@@ -431,20 +466,27 @@ U32 LLScriptExecute::run(BOOL b_print, const LLUUID &id, char **errorstr, BOOL & | |||
431 | current_events &= ~LSCRIPTStateBitField[event]; | 466 | current_events &= ~LSCRIPTStateBitField[event]; |
432 | set_event_register(mBuffer, LREG_CE, current_events, major_version); | 467 | set_event_register(mBuffer, LREG_CE, current_events, major_version); |
433 | // now, push any additional stack space | 468 | // now, push any additional stack space |
434 | S32 additional_size = get_event_stack_size(mBuffer, current_state, event) - size; | 469 | S32 additional_size = get_event_stack_size(mBuffer, current_state, event); |
435 | lscript_pusharge(mBuffer, additional_size); | 470 | if ( additional_size == -1 ) |
471 | { // b_done will be set, so we'll exit the loop at the bottom | ||
472 | recordBoundaryError( id ); | ||
473 | } | ||
474 | else | ||
475 | { | ||
476 | additional_size -= size; | ||
477 | lscript_pusharge(mBuffer, additional_size); | ||
436 | 478 | ||
437 | // now set the bp correctly | 479 | // now set the bp correctly |
438 | sp = get_register(mBuffer, LREG_SP); | 480 | sp = get_register(mBuffer, LREG_SP); |
439 | sp += additional_size + size; | 481 | sp += additional_size + size; |
440 | set_bp(mBuffer, sp); | 482 | set_bp(mBuffer, sp); |
441 | // set IP to the function | 483 | // set IP to the function |
442 | S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, event); | 484 | setStateEventOpcoodeStartSafely( current_state, event, id ); |
443 | set_ip(mBuffer, opcode_start); | 485 | } |
444 | b_done = TRUE; | 486 | b_done = TRUE; |
445 | } | 487 | } |
446 | else if ( (current_events & LSCRIPTStateBitField[LSTT_REZ]) | 488 | else if ( (current_events & LSCRIPTStateBitField[LSTT_REZ]) |
447 | &&(current_events & event_register)) | 489 | &&(current_events & event_register)) |
448 | { | 490 | { |
449 | for (eventdata = mEventData.mEventDataList.getFirstData(); eventdata; eventdata = mEventData.mEventDataList.getNextData()) | 491 | for (eventdata = mEventData.mEventDataList.getFirstData(); eventdata; eventdata = mEventData.mEventDataList.getNextData()) |
450 | { | 492 | { |
@@ -469,17 +511,24 @@ U32 LLScriptExecute::run(BOOL b_print, const LLUUID &id, char **errorstr, BOOL & | |||
469 | data++; | 511 | data++; |
470 | } | 512 | } |
471 | // now, push any additional stack space | 513 | // now, push any additional stack space |
472 | S32 additional_size = get_event_stack_size(mBuffer, current_state, event) - size; | 514 | S32 additional_size = get_event_stack_size(mBuffer, current_state, event); |
473 | lscript_pusharge(mBuffer, additional_size); | 515 | if ( additional_size == -1 ) |
474 | 516 | { // b_done will be set, so we'll exit the loop at the bottom | |
475 | // now set the bp correctly | 517 | recordBoundaryError( id ); |
476 | sp = get_register(mBuffer, LREG_SP); | 518 | } |
477 | sp += additional_size + size; | 519 | else |
478 | set_bp(mBuffer, sp); | 520 | { |
479 | // set IP to the function | 521 | additional_size -= size; |
480 | S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, event); | 522 | lscript_pusharge(mBuffer, additional_size); |
481 | set_ip(mBuffer, opcode_start); | 523 | |
482 | mEventData.mEventDataList.deleteCurrentData(); | 524 | // now set the bp correctly |
525 | sp = get_register(mBuffer, LREG_SP); | ||
526 | sp += additional_size + size; | ||
527 | set_bp(mBuffer, sp); | ||
528 | // set IP to the function | ||
529 | setStateEventOpcoodeStartSafely( current_state, event, id ); | ||
530 | mEventData.mEventDataList.deleteCurrentData(); | ||
531 | } | ||
483 | b_done = TRUE; | 532 | b_done = TRUE; |
484 | break; | 533 | break; |
485 | } | 534 | } |
@@ -516,16 +565,23 @@ U32 LLScriptExecute::run(BOOL b_print, const LLUUID &id, char **errorstr, BOOL & | |||
516 | } | 565 | } |
517 | b_done = TRUE; | 566 | b_done = TRUE; |
518 | // now, push any additional stack space | 567 | // now, push any additional stack space |
519 | S32 additional_size = get_event_stack_size(mBuffer, current_state, event) - size; | 568 | S32 additional_size = get_event_stack_size(mBuffer, current_state, event); |
520 | lscript_pusharge(mBuffer, additional_size); | 569 | if ( additional_size == -1 ) |
521 | 570 | { // b_done was just set, so we'll exit the loop at the bottom | |
522 | // now set the bp correctly | 571 | recordBoundaryError( id ); |
523 | sp = get_register(mBuffer, LREG_SP); | 572 | } |
524 | sp += additional_size + size; | 573 | else |
525 | set_bp(mBuffer, sp); | 574 | { |
526 | // set IP to the function | 575 | additional_size -= size; |
527 | S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, event); | 576 | lscript_pusharge(mBuffer, additional_size); |
528 | set_ip(mBuffer, opcode_start); | 577 | |
578 | // now set the bp correctly | ||
579 | sp = get_register(mBuffer, LREG_SP); | ||
580 | sp += additional_size + size; | ||
581 | set_bp(mBuffer, sp); | ||
582 | // set IP to the function | ||
583 | setStateEventOpcoodeStartSafely( current_state, event, id ); | ||
584 | } | ||
529 | } | 585 | } |
530 | else | 586 | else |
531 | { | 587 | { |
@@ -550,23 +606,30 @@ U32 LLScriptExecute::run(BOOL b_print, const LLUUID &id, char **errorstr, BOOL & | |||
550 | current_events &= ~LSCRIPTStateBitField[event]; | 606 | current_events &= ~LSCRIPTStateBitField[event]; |
551 | set_event_register(mBuffer, LREG_CE, current_events, major_version); | 607 | set_event_register(mBuffer, LREG_CE, current_events, major_version); |
552 | // now, push any additional stack space | 608 | // now, push any additional stack space |
553 | S32 additional_size = get_event_stack_size(mBuffer, current_state, event) - size; | 609 | S32 additional_size = get_event_stack_size(mBuffer, current_state, event); |
554 | lscript_pusharge(mBuffer, additional_size); | 610 | if ( additional_size == -1 ) |
555 | 611 | { // b_done will be set, so we'll exit the loop at the bottom | |
556 | // now set the bp correctly | 612 | recordBoundaryError( id ); |
557 | sp = get_register(mBuffer, LREG_SP); | 613 | } |
558 | sp += additional_size + size; | 614 | else |
559 | set_bp(mBuffer, sp); | 615 | { |
560 | // set IP to the function | 616 | additional_size -= size; |
561 | S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, event); | 617 | lscript_pusharge(mBuffer, additional_size); |
562 | set_ip(mBuffer, opcode_start); | 618 | |
619 | // now set the bp correctly | ||
620 | sp = get_register(mBuffer, LREG_SP); | ||
621 | sp += additional_size + size; | ||
622 | set_bp(mBuffer, sp); | ||
623 | // set IP to the function | ||
624 | setStateEventOpcoodeStartSafely( current_state, event, id ); | ||
625 | } | ||
563 | } | 626 | } |
564 | b_done = TRUE; | 627 | b_done = TRUE; |
565 | } | 628 | } |
566 | } | 629 | } // while (!b_done) |
630 | } // end of else ... in state processing code | ||
567 | 631 | ||
568 | return NO_DELETE_FLAG; | 632 | return NO_DELETE_FLAG; |
569 | } | ||
570 | } | 633 | } |
571 | 634 | ||
572 | BOOL run_noop(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id) | 635 | BOOL run_noop(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id) |
diff --git a/linden/indra/lscript/lscript_execute/lscript_heapruntime.cpp b/linden/indra/lscript/lscript_execute/lscript_heapruntime.cpp index 073a736..057db79 100644 --- a/linden/indra/lscript/lscript_execute/lscript_heapruntime.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_heapruntime.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_heapruntime.cpp | 2 | * @file lscript_heapruntime.cpp |
3 | * @brief classes to manage script heap at runtime | 3 | * @brief classes to manage script heap at runtime |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #if 0 | 32 | #if 0 |
diff --git a/linden/indra/lscript/lscript_execute/lscript_heapruntime.h b/linden/indra/lscript/lscript_execute/lscript_heapruntime.h index 8431ea5..c4ade6c 100644 --- a/linden/indra/lscript/lscript_execute/lscript_heapruntime.h +++ b/linden/indra/lscript/lscript_execute/lscript_heapruntime.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_heapruntime.h | 2 | * @file lscript_heapruntime.h |
3 | * @brief classes to manage script heap at runtime | 3 | * @brief classes to manage script heap at runtime |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #if 0 | 32 | #if 0 |
diff --git a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp index f84abc5..8ecd8cd 100644 --- a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_readlso.cpp | 2 | * @file lscript_readlso.cpp |
3 | * @brief classes to read lso file | 3 | * @brief classes to read lso file |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
diff --git a/linden/indra/lscript/lscript_execute/lscript_readlso.h b/linden/indra/lscript/lscript_execute/lscript_readlso.h index 8fa5211..92c9dfa 100644 --- a/linden/indra/lscript/lscript_execute/lscript_readlso.h +++ b/linden/indra/lscript/lscript_execute/lscript_readlso.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_readlso.h | 2 | * @file lscript_readlso.h |
3 | * @brief classes to read lso file | 3 | * @brief classes to read lso file |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_READLSO_H | 32 | #ifndef LL_LSCRIPT_READLSO_H |
diff --git a/linden/indra/lscript/lscript_export.h b/linden/indra/lscript/lscript_export.h index d9f7f18..0384569 100644 --- a/linden/indra/lscript/lscript_export.h +++ b/linden/indra/lscript/lscript_export.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_export.h | 2 | * @file lscript_export.h |
3 | * @brief Export interface class | 3 | * @brief Export interface class |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_EXPORT_H | 32 | #ifndef LL_LSCRIPT_EXPORT_H |
diff --git a/linden/indra/lscript/lscript_http.h b/linden/indra/lscript/lscript_http.h index c562093..cb60090 100644 --- a/linden/indra/lscript/lscript_http.h +++ b/linden/indra/lscript/lscript_http.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_http.h | 2 | * @file lscript_http.h |
3 | * @brief LSL HTTP keys | 3 | * @brief LSL HTTP keys |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2006-2007, Linden Research, Inc. | 7 | * Copyright (c) 2006-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | // Keys used in LSL HTTP function <key,value> pair lists. | 32 | // Keys used in LSL HTTP function <key,value> pair lists. |
diff --git a/linden/indra/lscript/lscript_library.h b/linden/indra/lscript/lscript_library.h index 353ff69..a15805f 100644 --- a/linden/indra/lscript/lscript_library.h +++ b/linden/indra/lscript/lscript_library.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_library.h | 2 | * @file lscript_library.h |
3 | * @brief External library interface | 3 | * @brief External library interface |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_LIBRARY_H | 32 | #ifndef LL_LSCRIPT_LIBRARY_H |
@@ -34,7 +37,6 @@ | |||
34 | #include "llquaternion.h" | 37 | #include "llquaternion.h" |
35 | #include "lluuid.h" | 38 | #include "lluuid.h" |
36 | #include "lscript_byteconvert.h" | 39 | #include "lscript_byteconvert.h" |
37 | #include <stdio.h> | ||
38 | 40 | ||
39 | class LLScriptLibData; | 41 | class LLScriptLibData; |
40 | 42 | ||
diff --git a/linden/indra/lscript/lscript_library/lscript_alloc.cpp b/linden/indra/lscript/lscript_library/lscript_alloc.cpp index 99e6917..a2f83e7 100644 --- a/linden/indra/lscript/lscript_library/lscript_alloc.cpp +++ b/linden/indra/lscript/lscript_library/lscript_alloc.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_alloc.cpp | 2 | * @file lscript_alloc.cpp |
3 | * @brief general heap management for scripting system | 3 | * @brief general heap management for scripting system |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | // #define at top of file accelerates gcc compiles | 32 | // #define at top of file accelerates gcc compiles |
@@ -31,8 +34,8 @@ | |||
31 | // Under gcc 3, the manual explicitly states comments can appear above the #ifndef | 34 | // Under gcc 3, the manual explicitly states comments can appear above the #ifndef |
32 | 35 | ||
33 | #include "linden_common.h" | 36 | #include "linden_common.h" |
34 | |||
35 | #include "lscript_alloc.h" | 37 | #include "lscript_alloc.h" |
38 | #include "llrand.h" | ||
36 | 39 | ||
37 | // supported data types | 40 | // supported data types |
38 | 41 | ||
diff --git a/linden/indra/lscript/lscript_library/lscript_export.cpp b/linden/indra/lscript/lscript_library/lscript_export.cpp index be95d30..26d1361 100644 --- a/linden/indra/lscript/lscript_library/lscript_export.cpp +++ b/linden/indra/lscript/lscript_library/lscript_export.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_export.cpp | 2 | * @file lscript_export.cpp |
3 | * @brief export interface class | 3 | * @brief export interface class |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,5 +26,6 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
diff --git a/linden/indra/lscript/lscript_library/lscript_library.cpp b/linden/indra/lscript/lscript_library/lscript_library.cpp index 3f939c4..e082220 100644 --- a/linden/indra/lscript/lscript_library/lscript_library.cpp +++ b/linden/indra/lscript/lscript_library/lscript_library.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_library.cpp | 2 | * @file lscript_library.cpp |
3 | * @brief external library interface | 3 | * @brief external library interface |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | // *WARNING* | 32 | // *WARNING* |
diff --git a/linden/indra/lscript/lscript_rt_interface.h b/linden/indra/lscript/lscript_rt_interface.h index f595cbe..791c447 100644 --- a/linden/indra/lscript/lscript_rt_interface.h +++ b/linden/indra/lscript/lscript_rt_interface.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lscript_rt_interface.h | 2 | * @file lscript_rt_interface.h |
3 | * @brief Interface between compiler library and applications | 3 | * @brief Interface between compiler library and applications |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LSCRIPT_RT_INTERFACE_H | 32 | #ifndef LL_LSCRIPT_RT_INTERFACE_H |