summaryrefslogtreecommitdiff
path: root/indra/lscript/lscript_execute.h
diff options
context:
space:
mode:
authorKyle Ambroff <ambroff@lindenlab.com>2008-09-17 10:21:38 +0000
committerKyle Ambroff <ambroff@lindenlab.com>2008-09-17 10:21:38 +0000
commit2945882258ad1befe8e8094c0a1a655e4ddbcd30 (patch)
tree32c458b582367c61404c7dda1e452a39a8183c7b /indra/lscript/lscript_execute.h
parent7920b59c9c557f8108219ff91de5bda14265d448 (diff)
svn merge -r95195:96886 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-24-Server --> release
Merging fixes from 1.24 Server. From vcr-maint-2: * QAR-856: viewer crash log analyzer updates. From direct-slurl-1: * login.cgi: simplification of the way start-locations are chosen and the new-user browser tutorial is shown. * No longer fake ever-logged-in flag * support for dataservice query string encryption from maint-server-4: * DEV-19961: llInstantMessages of length N fail. from landstore-v2-01-merge: * DEV-12330: Allow Neighbors & Tweaks. * DEV-14126: Re-order items on Region Detail page. * DEV-14064: Add "Delete" order buttons in the View Cart area. * DEV-15026: Indicate in the Event Log whether purchase is a Openspace or regular region. * DEV-15242: disable checkout button after first click. * DEV-15285: Region Names in cart or fulfilled should expire after 30 min or when delivered. * DEV-14018: No currency listed for land prices * DEV-1688: Tool: Ability to view and clear Allowed Neighbors from a region. * DEV-17199: Fatal error when adding your login name to your allowed neighbors list. * DEV-17251: Deleting an unavailable item from the shopping cart causes a fatal error. * DEV-17291: Fatal error occurs when performing various activities. * DEV-17177: Typo on Land store 2.01 checkout page. From 1.24: * DEV-19865 (SVC-2927): Abandoning land changes land name and description even when done by an Estate Manager. * DEV-19916 (SVC-2938): bug fix for llGetNextEmail() failure. * DEV-19936 (SVC-2962): adding a value to a list also modifies the list in place. * SVC-2750, SVC-2958, SVC-2973: Changed LSL scheduler logic to yield if finished and no state change is pending. * indra/lib/python/indra/agent/auth.py no longer assumes there is a critical message, and checks credential as specified by OGP rev3. * DEV-20051: Added defensive checks on script rez path. * Improvements to scripts/make_deploy_group.py. * DEV-18897: llScriptReset wasn't resetting events for LSL scripts. * DEV-20127: Fix for stl misuse in newsim/llsimparcel.cpp. * DEV-18897: Mono Beta - LSL attach() event survives reset. * DEV-20212 (VWR-9026): String fix - Attempting to teleport to "Help Island" produces a dialog referencing "Orientation Island" * DEV-20164: llListen caching indefinitely across states. * DEV-19950: timer() event triggers before on_rez(), & state_entry() * DEV-19712 (SVC-2908): C# error messages with Mono Compiled scripts * Fixes for chat service unit tests. * DEV-19106: (SVC-1571): Rezzing a coalesced objects with 1024 scripted prims fails.
Diffstat (limited to 'indra/lscript/lscript_execute.h')
-rw-r--r--indra/lscript/lscript_execute.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/indra/lscript/lscript_execute.h b/indra/lscript/lscript_execute.h
index 271b53aae1..2f67e77c93 100644
--- a/indra/lscript/lscript_execute.h
+++ b/indra/lscript/lscript_execute.h
@@ -370,7 +370,7 @@ public:
LLScriptExecute();
virtual ~LLScriptExecute() {;}
- virtual S32 getVersion() = 0;
+ virtual S32 getVersion() const = 0;
virtual void deleteAllEvents() = 0;
virtual void addEvent(LLScriptDataCollection* event) = 0;
virtual U32 getEventCount() = 0;
@@ -384,12 +384,12 @@ public:
virtual void setSleep(F32 value) = 0;
virtual F32 getEnergy() const = 0;
virtual void setEnergy(F32 value) = 0;
- virtual U64 getCurrentEvents(S32 version) = 0;
- virtual void setCurrentEvents(U64 value, S32 version) = 0;
- virtual U64 getEventHandlers(S32 version) = 0;
- virtual void setEventHandlers(U64 value, S32 version) = 0;
- virtual U64 getCurrentHandler(S32 version) = 0;
- virtual void setCurrentHandler(U64 value, S32 version) = 0;
+ virtual U64 getCurrentEvents() = 0;
+ virtual void setCurrentEvents(U64 value) = 0;
+ virtual U64 getEventHandlers() = 0;
+ virtual void setEventHandlers(U64 value) = 0;
+ virtual U64 getCurrentHandler() = 0;
+ virtual void setCurrentHandler(U64 value) = 0;
virtual BOOL isFinished() const = 0;
virtual BOOL isStateChangePending() const = 0;
virtual S32 writeState(U8 **dest, U32 header_size, U32 footer_size) = 0; // Allocate memory for header, state and footer return size of state.
@@ -409,17 +409,17 @@ public:
// Run handler for event for a maximum of time_slice seconds.
// Updates current handler and current events registers.
- virtual void callEventHandler(LSCRIPTStateEventType event, S32 major_version, const LLUUID &id, F32 time_slice) = 0;;
+ virtual void callEventHandler(LSCRIPTStateEventType event, const LLUUID &id, F32 time_slice) = 0;;
// Run handler for next queued event for maximum of time_slice seconds.
// Updates current handler and current events registers.
// Removes processed event from queue.
- virtual void callNextQueuedEventHandler(U64 event_register, S32 major_version, const LLUUID &id, F32 time_slice) = 0;
+ virtual void callNextQueuedEventHandler(U64 event_register, const LLUUID &id, F32 time_slice) = 0;
// Run handler for event for a maximum of time_slice seconds.
// Updates current handler and current events registers.
// Removes processed event from queue.
- virtual void callQueuedEventHandler(LSCRIPTStateEventType event, S32 major_version, const LLUUID &id, F32 time_slice) = 0;
+ virtual void callQueuedEventHandler(LSCRIPTStateEventType event, const LLUUID &id, F32 time_slice) = 0;
// Switch to next state.
// Returns new set of handled events.
@@ -428,14 +428,14 @@ public:
// Returns time taken.
virtual F32 runQuanta(BOOL b_print, const LLUUID &id,
const char **errorstr,
- BOOL &state_transition, F32 quanta,
+ F32 quanta,
U32& events_processed, LLTimer& timer);
// Run smallest possible amount of code: an instruction for LSL2, a segment
// between save tests for Mono
void runInstructions(BOOL b_print, const LLUUID &id,
const char **errorstr,
- BOOL &state_transition, U32& events_processed,
+ U32& events_processed,
F32 quanta);
bool isYieldDue() const;
@@ -461,7 +461,7 @@ public:
LLScriptExecuteLSL2(const U8* bytecode, U32 bytecode_size);
virtual ~LLScriptExecuteLSL2();
- virtual S32 getVersion() {return get_register(mBuffer, LREG_VN);}
+ virtual S32 getVersion() const {return get_register(mBuffer, LREG_VN);}
virtual void deleteAllEvents() {mEventData.mEventDataList.deleteAllData();}
virtual void addEvent(LLScriptDataCollection* event);
virtual U32 getEventCount() {return mEventData.mEventDataList.getLength();}
@@ -475,12 +475,12 @@ public:
virtual void setSleep(F32 value);
virtual F32 getEnergy() const;
virtual void setEnergy(F32 value);
- virtual U64 getCurrentEvents(S32 version) {return get_event_register(mBuffer, LREG_CE, version);}
- virtual void setCurrentEvents(U64 value, S32 version) {return set_event_register(mBuffer, LREG_CE, value, version);}
- virtual U64 getEventHandlers(S32 version) {return get_event_register(mBuffer, LREG_ER, version);}
- virtual void setEventHandlers(U64 value, S32 version) {set_event_register(mBuffer, LREG_ER, value, version);}
- virtual U64 getCurrentHandler(S32 version);
- virtual void setCurrentHandler(U64 value, S32 version) {return set_event_register(mBuffer, LREG_IE, value, version);}
+ virtual U64 getCurrentEvents() {return get_event_register(mBuffer, LREG_CE, getMajorVersion());}
+ virtual void setCurrentEvents(U64 value) {return set_event_register(mBuffer, LREG_CE, value, getMajorVersion());}
+ virtual U64 getEventHandlers() {return get_event_register(mBuffer, LREG_ER, getMajorVersion());}
+ virtual void setEventHandlers(U64 value) {set_event_register(mBuffer, LREG_ER, value, getMajorVersion());}
+ virtual U64 getCurrentHandler();
+ virtual void setCurrentHandler(U64 value) {return set_event_register(mBuffer, LREG_IE, value, getMajorVersion());}
virtual BOOL isFinished() const {return get_register(mBuffer, LREG_IP) == 0;}
virtual BOOL isStateChangePending() const {return get_register(mBuffer, LREG_CS) != get_register(mBuffer, LREG_NS);}
virtual S32 writeState(U8 **dest, U32 header_size, U32 footer_size); // Not including Events.
@@ -500,17 +500,17 @@ public:
// Run handler for event for a maximum of time_slice seconds.
// Updates current handler and current events registers.
- virtual void callEventHandler(LSCRIPTStateEventType event, S32 major_version, const LLUUID &id, F32 time_slice);
+ virtual void callEventHandler(LSCRIPTStateEventType event, const LLUUID &id, F32 time_slice);
// Run handler for next queued event for maximum of time_slice seconds.
// Updates current handler and current events registers.
// Removes processed event from queue.
- virtual void callNextQueuedEventHandler(U64 event_register, S32 major_version, const LLUUID &id, F32 time_slice);
+ virtual void callNextQueuedEventHandler(U64 event_register, const LLUUID &id, F32 time_slice);
// Run handler for event for a maximum of time_slice seconds.
// Updates current handler and current events registers.
// Removes processed event from queue.
- virtual void callQueuedEventHandler(LSCRIPTStateEventType event, S32 major_version, const LLUUID &id, F32 time_slice);
+ virtual void callQueuedEventHandler(LSCRIPTStateEventType event, const LLUUID &id, F32 time_slice);
// Switch to next state.
// Returns new set of handled events.
@@ -527,6 +527,7 @@ public:
U32 mBytecodeSize;
private:
+ S32 getMajorVersion() const;
void recordBoundaryError( const LLUUID &id );
void setStateEventOpcoodeStartSafely( S32 state, LSCRIPTStateEventType event, const LLUUID &id );