Diff
Not logged in

Differences From Artifact [f0c96fef88]:

To Artifact [caccbfea12]:


2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
	    next = nodePtr->left;

	    switch (nodePtr->lexeme) {
	    case QUESTION:
		if (stack == NULL) {
		    stack = BA_JumpList_Create();
		}
		stack = BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		stack = BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		jumpPtr->depth = envPtr->currStackDepth;
		convert = 1;
		break;
	    case AND:
	    case OR:
		if (stack == NULL) {
		    stack = BA_JumpList_Create();
		}
		stack = BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		stack = BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		stack = BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		jumpPtr->depth = envPtr->currStackDepth;
		break;
	    }
	} else if (nodePtr->mark == MARK_RIGHT) {
	    next = nodePtr->right;







|


|










|


|


|







2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
	    next = nodePtr->left;

	    switch (nodePtr->lexeme) {
	    case QUESTION:
		if (stack == NULL) {
		    stack = BA_JumpList_Create();
		}
		BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		jumpPtr->depth = envPtr->currStackDepth;
		convert = 1;
		break;
	    case AND:
	    case OR:
		if (stack == NULL) {
		    stack = BA_JumpList_Create();
		}
		BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		BA_JumpList_Append(stack, &newJump);
		newJump->next = jumpPtr;
		jumpPtr = newJump;
		jumpPtr->depth = envPtr->currStackDepth;
		break;
	    }
	} else if (nodePtr->mark == MARK_RIGHT) {
	    next = nodePtr->right;
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
			- jumpPtr->next->jump.codeOffset, 127)) {
		    jumpPtr->offset += 3;
		}
		TclFixupForwardJump(envPtr, &jumpPtr->jump,
			jumpPtr->offset - jumpPtr->jump.codeOffset, 127);
		convert |= jumpPtr->convert;
		envPtr->currStackDepth = jumpPtr->depth + 1;
		stack = BA_JumpList_Detach(stack, &jumpPtr);
		stack = BA_JumpList_Detach(stack, &jumpPtr);
		jumpPtr = jumpPtr->next;
		break;
	    case AND:
	    case OR:
		CLANG_ASSERT(jumpPtr);
		TclEmitForwardJump(envPtr, (nodePtr->lexeme == AND)
			?  TCL_FALSE_JUMP : TCL_TRUE_JUMP,







|
|







2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
			- jumpPtr->next->jump.codeOffset, 127)) {
		    jumpPtr->offset += 3;
		}
		TclFixupForwardJump(envPtr, &jumpPtr->jump,
			jumpPtr->offset - jumpPtr->jump.codeOffset, 127);
		convert |= jumpPtr->convert;
		envPtr->currStackDepth = jumpPtr->depth + 1;
		BA_JumpList_Detach(stack, &jumpPtr);
		BA_JumpList_Detach(stack, &jumpPtr);
		jumpPtr = jumpPtr->next;
		break;
	    case AND:
	    case OR:
		CLANG_ASSERT(jumpPtr);
		TclEmitForwardJump(envPtr, (nodePtr->lexeme == AND)
			?  TCL_FALSE_JUMP : TCL_TRUE_JUMP,
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
		}
		TclEmitPush(TclRegisterNewLiteral(envPtr,
			(nodePtr->lexeme == AND) ? "0" : "1", 1), envPtr);
		TclFixupForwardJumpToHere(envPtr, &jumpPtr->next->next->jump,
			127);
		convert = 0;
		envPtr->currStackDepth = jumpPtr->depth + 1;
		stack = BA_JumpList_Detach(stack, &jumpPtr);
		stack = BA_JumpList_Detach(stack, &jumpPtr);
		stack = BA_JumpList_Detach(stack, &jumpPtr);
		jumpPtr = jumpPtr->next;
		break;
	    default:
		TclEmitOpcode(instruction[nodePtr->lexeme], envPtr);
		convert = 0;
		break;
	    }







|
|
|







2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
		}
		TclEmitPush(TclRegisterNewLiteral(envPtr,
			(nodePtr->lexeme == AND) ? "0" : "1", 1), envPtr);
		TclFixupForwardJumpToHere(envPtr, &jumpPtr->next->next->jump,
			127);
		convert = 0;
		envPtr->currStackDepth = jumpPtr->depth + 1;
		BA_JumpList_Detach(stack, &jumpPtr);
		BA_JumpList_Detach(stack, &jumpPtr);
		BA_JumpList_Detach(stack, &jumpPtr);
		jumpPtr = jumpPtr->next;
		break;
	    default:
		TclEmitOpcode(instruction[nodePtr->lexeme], envPtr);
		convert = 0;
		break;
	    }