mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
- Optimization: common parameters to built in functions are no longer looked up as a string at each call, instead their integer ids are global constants
- Optimization: some other minor tweaks. - Nicer --help message git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@783 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -242,7 +242,7 @@ ScriptValueP Context::dependencies(const Dependency& dep, const Script& script)
|
||||
size_t scope = openScope();
|
||||
// prepare arguments
|
||||
for (unsigned int j = 0 ; j < i.data ; ++j) {
|
||||
setVariable(instr[i.data - j - 1].data, stack.back());
|
||||
setVariable((Variable)instr[i.data - j - 1].data, stack.back());
|
||||
stack.pop_back();
|
||||
}
|
||||
instr += i.data; // skip arguments, there had better not be any jumps into the argument list
|
||||
@@ -267,14 +267,14 @@ ScriptValueP Context::dependencies(const Dependency& dep, const Script& script)
|
||||
case I_GET_VAR: {
|
||||
ScriptValueP value = variables[i.data].value;
|
||||
if (!value) {
|
||||
value = new_intrusive1<ScriptMissingVariable>(variable_to_string(i.data)); // no errors here
|
||||
value = new_intrusive1<ScriptMissingVariable>(variable_to_string((Variable)i.data)); // no errors here
|
||||
}
|
||||
stack.push_back(value);
|
||||
break;
|
||||
}
|
||||
// Set a variable (as normal)
|
||||
case I_SET_VAR: {
|
||||
setVariable(i.data, stack.back());
|
||||
setVariable((Variable)i.data, stack.back());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user