about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/020run14
-rw-r--r--cpp/035call8
2 files changed, 11 insertions, 11 deletions
diff --git a/cpp/020run b/cpp/020run
index 41b62f80..cafeef75 100644
--- a/cpp/020run
+++ b/cpp/020run
@@ -32,8 +32,8 @@ recipe main [
 //: Later layers will change this.
 struct routine {
   recipe_number running_recipe;
-  size_t running_at;
-  routine(recipe_number r) :running_recipe(r), running_at(0) {}
+  size_t running_step_index;
+  routine(recipe_number r) :running_recipe(r), running_step_index(0) {}
   bool completed() const;
 };
 
@@ -52,7 +52,7 @@ void run_current_routine()
   while (!Current_routine->completed())  // later layers will modify condition
   {
     // Running One Instruction.
-    size_t& pc = running_at();
+    size_t& pc = current_step_index();
 //?     trace("foo") << "2: " << pc << " " << &pc; //? 1
     if (current_instruction().is_label) { ++pc; continue; }
 //?     cout << "AAA " << Trace_stream << " ^" << Trace_stream->dump_layer << "$\n"; //? 1
@@ -83,8 +83,8 @@ void run_current_routine()
 //: We'll need to override these later as we change the definition of routine.
 //: Important that they return referrences into the routine.
 
-inline size_t& running_at() {
-  return Current_routine->running_at;
+inline size_t& current_step_index() {
+  return Current_routine->running_step_index;
 }
 
 inline string recipe_name() {
@@ -96,11 +96,11 @@ inline vector<instruction>& steps() {
 }
 
 inline const instruction& current_instruction() {
-  return Recipe[Current_routine->running_recipe].steps[Current_routine->running_at];
+  return Recipe[Current_routine->running_recipe].steps[Current_routine->running_step_index];
 }
 
 inline bool routine::completed() const {
-  return Current_routine->running_at >= Recipe[running_recipe].steps.size();
+  return Current_routine->running_step_index >= Recipe[running_recipe].steps.size();
 }
 
 :(before "End Commandline Parsing")
diff --git a/cpp/035call b/cpp/035call
index 799cb739..d01b0e30 100644
--- a/cpp/035call
+++ b/cpp/035call
@@ -53,8 +53,8 @@ struct routine {
 
 //:: now update routine's helpers
 
-:(replace{} "inline size_t& running_at()")
-inline size_t& running_at() {
+:(replace{} "inline size_t& current_step_index()")
+inline size_t& current_step_index() {
   return Current_routine->calls.top().pc;
 }
 :(replace{} "inline string recipe_name()")
@@ -92,12 +92,12 @@ inline bool routine::completed() const {
 // when we reach the end of one call, we may reach the end of the one below
 // it, and the one below that, and so on
 //? trace("foo") << "0: " << pc << " " << &pc; //? 1
-while (running_at() >= steps().size()) {
+while (current_step_index() >= steps().size()) {
 //?   trace("foo") << "pop"; //? 1
   Current_routine->calls.pop();
   if (Current_routine->calls.empty()) return;
   // todo: no results returned warning
-  ++running_at();
+  ++current_step_index();
 }
 //? trace("foo") << "1: " << pc << " " << &pc; //? 1
 
> 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427