Commit Graph

4616 Commits

Author SHA1 Message Date
drh
1013c9320d Registerify the SRT_Subroutine destination for SELECT results. (CVS 4690)
FossilOrigin-Name: 8201f71729c3afbb41764cea3cda65b03150cb0c
2008-01-06 00:25:21 +00:00
drh
477df4b3ac Modify OP_RegMakeRec to take a base register and count and optionally
store results in the register specified by P3. (CVS 4689)

FossilOrigin-Name: 6bb1b1bc1858028b743a4f660d42d5e9595dc022
2008-01-05 18:48:24 +00:00
danielk1977
dba0137e1e Fix a memory leak introduced with #4687. (CVS 4688)
FossilOrigin-Name: 2b98b0fca82e285ae6b38384587aafa27985fa34
2008-01-05 18:44:29 +00:00
danielk1977
a9d1ccb9b0 First pass at optimizing max()/min() as described in #2853. Some refinements to come. (CVS 4687)
FossilOrigin-Name: c449e04f1870b1ff726c95c0bf1c6c6a22ca588a
2008-01-05 17:39:29 +00:00
drh
5b6afba924 Registerify binary operators. Add register tracing to debugging output. (CVS 4686)
FossilOrigin-Name: 66396d2f0289e36b5fc0af5078c08d1b17f342ae
2008-01-05 16:29:28 +00:00
drh
9de221dff5 Expression code generator takes advantage of recent opcode changes. (CVS 4685)
FossilOrigin-Name: 6c78d2a49a3e6ee8bc31f16488a430cba9eda59d
2008-01-05 06:51:30 +00:00
drh
41c2bf0388 Register-ify the OP_ForceInt opcode. (CVS 4684)
FossilOrigin-Name: 32380dcabcd3839e79f91430b0c250d6e02d9243
2008-01-05 05:38:21 +00:00
drh
8558cde1ab Register-ify the OP_AddImm and all casting opcodes. Omit the
OP_MemIncr opcode. (CVS 4683)

FossilOrigin-Name: 3e8a07dd3cc9921ad39e379576abb0b485a42202
2008-01-05 05:20:10 +00:00
drh
b1fdb2adea Get rid of OP_Dup, OP_MemStore, OP_MemLoad, and OP_MemMove. Replace
with OP_Copy, OP_SCopy, and OP_Move.  Add the infrastructure for
operation properties in1, in2, in3, out2, and out3 but do not yet
use any of these. (CVS 4682)

FossilOrigin-Name: cc149eb9ca3c672cc6fea3528353234ac2ed5745
2008-01-05 04:06:03 +00:00
drh
4c583128bd Implement the out2-prerelease opcode design pattern. (CVS 4681)
FossilOrigin-Name: fe057a88d0038ac349ea41883b979ceba6ae410a
2008-01-04 22:01:03 +00:00
drh
d298151587 Allow the P2 operand to be negative on opcodes that are not jumps. (CVS 4680)
FossilOrigin-Name: 717bcd11a222fe100e25c5b2eb6de8b6b9930de1
2008-01-04 19:33:49 +00:00
drh
4aeb7bf778 Fix mkopcodeh.awk so that it works on a mac. (CVS 4679)
FossilOrigin-Name: 59d3dfa41f99e99b836649a0870cbfc1c275a654
2008-01-04 19:12:35 +00:00
danielk1977
287fb61c6b Some modifications to insert.c to work without using the stack. (CVS 4678)
FossilOrigin-Name: d9ac6beef538376d0ea0a1daa95cf1dfe36143cf
2008-01-04 19:10:28 +00:00
drh
3a40f696d4 Replace the NOPUSH_MASKs with a bit-vector mechanism that can contain
several different properties about each opcode. (CVS 4677)

FossilOrigin-Name: 042dcb9621934d0318a7c6e9cd08b20a569db367
2008-01-04 16:50:09 +00:00
danielk1977
dd2fb29be8 Modify FifoRead and FifoWrite to work exclusively with memory cells. (CVS 4676)
FossilOrigin-Name: 2c913908a47e7ace7d964067e3566d232ee2d494
2008-01-04 13:57:26 +00:00
danielk1977
96cb76fc7a Modify the code generated for a DELETE to use registers instead of the vdbe stack. (CVS 4675)
FossilOrigin-Name: 173f281334d340290e1978abea5d1ea804141910
2008-01-04 13:24:28 +00:00
danielk1977
a29f18cdfc Add OP_MemSet, for setting a memory cell to a string value. (CVS 4674)
FossilOrigin-Name: 8bb9f970dd71cbf19e45774fc822aa1efebc1724
2008-01-04 11:01:03 +00:00
drh
389a1adbd7 Change the sqlite3ExprCode() function so that callers can request that
the result of the expression be left on the stack or in a register. (CVS 4673)

FossilOrigin-Name: 61bfb77c4267b99ac8a8ef49355bcbc395a1a37b
2008-01-03 23:44:53 +00:00
danielk1977
890947e253 Fix typo in comment. Ticket #2870. (CVS 4672)
FossilOrigin-Name: e97e4578671d85b634072b8931cf55516bbd4ca8
2008-01-03 18:56:25 +00:00
drh
2133d82287 Update OP_Rowid, OP_Column and related opcodes to use registers. (CVS 4671)
FossilOrigin-Name: 4f3967073d2df9eae5a61b9770d5de2e1af47b4c
2008-01-03 18:44:59 +00:00
danielk1977
6dbee8185c Modify VFilter and VRename to use registers instead of the vdbe stack for inputs. (CVS 4670)
FossilOrigin-Name: 253ed40aa36247fc846cc41c8612cd29899d9f8f
2008-01-03 18:39:41 +00:00
drh
0a07c107a6 Registers (aka memory cells) in the VM are now numbered starting with 1
instead of 0.  A register number of 0 means "no such register". (CVS 4669)

FossilOrigin-Name: 0b849805c3a0f562d50623f406279b400d335639
2008-01-03 18:03:08 +00:00
danielk1977
2a339ff677 Modify OP_VUpdate to read arguments from a range of memory cells instead of from the stack. (CVS 4668)
FossilOrigin-Name: 955b15a020e9ea6401fe03a36f5139a03ea80b8a
2008-01-03 17:31:44 +00:00
danielk1977
2dca4ac1d3 Change the VdbeOp.p4 union to include specific pointer types for the various values of VdbeOp.p4type. (CVS 4667)
FossilOrigin-Name: 7e8330c8044dc7718e720dbd33f6e2fe970ead77
2008-01-03 11:50:29 +00:00
danielk1977
1f4aa337cd Change the OP_Insert opcode to read the key and data to insert from memory cells, not the stack. (CVS 4666)
FossilOrigin-Name: 46501f490a5f5577ea31c758df749e02c7c65f39
2008-01-03 09:51:55 +00:00
danielk1977
11641c1136 Change the output of vdbe_trace etc. to include operands p3 and p5. (CVS 4665)
FossilOrigin-Name: 76f2040b051e1d4d8033e354dffe277b549f7962
2008-01-03 08:18:30 +00:00
danielk1977
60585ddc7d Combine the OP_Column and OP_DfltValue opcodes. (CVS 4664)
FossilOrigin-Name: c30f8206353f32a08ef0b323c9fd0bdbeaa28b02
2008-01-03 08:08:40 +00:00
danielk1977
207872a488 Change OP_OpenRead and OP_OpenWrite so that the database number is read from the P3 operand, not the stack. (CVS 4663)
FossilOrigin-Name: 35da261daf602b1e938f05bbad1ff99213d9f4b9
2008-01-03 07:54:23 +00:00
danielk1977
0d78bae377 Fix EXPLAIN and EXPLAIN query plan to work with new opcode format. (CVS 4662)
FossilOrigin-Name: b166c33a7b9a58d571619d2248019eda09651dd2
2008-01-03 07:09:48 +00:00
drh
2400345a32 Revamp sqlite3VdbeAddOpList() so that the structure holds integer values
for P1, P2, and P3. (CVS 4661)

FossilOrigin-Name: 4dc507d87b242619fe32606452227900e16a6de7
2008-01-03 01:28:59 +00:00
drh
66a5167b47 Refactoring the VM. The P3 parameter is changed to P4. A P5 parameter is
added (though not currently used.)  Add routines sqlite3VdbeAddOpX() where
X is one of 0, 1, 2, 3, or 4. (CVS 4660)

FossilOrigin-Name: 027875e4d4c4bd7686dc880c6917a968049b2fec
2008-01-03 00:01:23 +00:00
drh
119a531de4 Add operands p4 and p5 to the VdbeOp structure. (CVS 4659)
FossilOrigin-Name: ad528735e41ce2ec2e680b12e562d4ddb6650985
2008-01-02 17:25:54 +00:00
danielk1977
9ed1dfa802 Minor optimizations for sub-selects in EXISTS(...) expressions: Discard any DISTINCT or ORDER BY clauses and do not calculate any column values. (CVS 4658)
FossilOrigin-Name: fbd17a8976cc9b4dd7c7c903d8beade9a7ef095f
2008-01-02 17:11:14 +00:00
danielk1977
6c8c8ce0e2 Combine the eDest and iParm arguments to sqlite3Select() into a single type - "SelectDest". (CVS 4657)
FossilOrigin-Name: 86dcdfe6d7d629618ccb3c3ff0ca09f2da2d06c7
2008-01-02 16:27:09 +00:00
drh
a2a49dc9df Add opcodes OP_ResultRow and OP_RegMakeRec which are register-based
equivalents to OP_Callback and OP_MakeRecord.  Use the new opcodes. (CVS 4656)

FossilOrigin-Name: 4c7f35da7751c61a9b61b1d95adddcc37fff3266
2008-01-02 14:28:13 +00:00
drh
2f6751f91e Remove a surplus OP_Close from delete.c. Fixes a problem with (4654). (CVS 4655)
FossilOrigin-Name: 03cc91b3b0ff9be192532f8a404b3c7b827e1449
2008-01-02 13:05:51 +00:00
danielk1977
e448dc4abf Take advantage of the fact that b-tree cursors need not be closed while other cursors modify their tables to simplify trigger program generation code. (CVS 4654)
FossilOrigin-Name: f1966a8a47fca85f7862c0797a527ab01ac8b0c1
2008-01-02 11:50:51 +00:00
danielk1977
eb9ae90137 Add some extra tests for the recent trigger compilation optimization. (CVS 4653)
FossilOrigin-Name: de54dad800f0b62740ad4ebb3780464b44eb6dff
2008-01-02 04:41:24 +00:00
drh
d4e70ebd6f Begin setting a foundation on which to convert the VM from a stack-based
to a register-based machine.  Everything is still mostly stack based with
this check-in.  This change merely begins adding infrastructure to support
a register-based architecture. (CVS 4652)

FossilOrigin-Name: 051ec01f2799e095516015f2ef0180e50fac387c
2008-01-02 00:34:36 +00:00
danielk1977
8f2c54e6e2 Optimize trigger compilation to avoid populating the OLD.* and NEW.* pseudo-tables with data that will never be used. Some testing to come. (CVS 4651)
FossilOrigin-Name: e08a33ed7255c22ce2805363f44a1d7770acb2dd
2008-01-01 19:02:09 +00:00
danielk1977
8ea1cfaa9a Silence a harmless unitialised variable warning in btree.c. Ticket #2862. (CVS 4650)
FossilOrigin-Name: b51782ccac28598eec7adc9302fe7d1986bfdaf8
2008-01-01 06:19:02 +00:00
danielk1977
7c9aaa7058 Define SQLITE_CORE=1 at the start of the amalgamation file for the benefit of any extension source code (i.e. fts3) appended to it. Ticket #2858. (CVS 4649)
FossilOrigin-Name: 6dea8c16384443ed4ab59d1e2694534992ec3118
2008-01-01 05:49:07 +00:00
pweilbacher
2a51576298 fix case in os2GetTempname() where none of the usual environment variables are set to not overwrite two unrelated bytes (CVS 4648)
FossilOrigin-Name: 9719a063942256e34395868d974ed2d53b81b697
2007-12-30 23:38:00 +00:00
pweilbacher
ce3dc640f5 simplify os2FullPathname() and at the same time make the allocations more robust (CVS 4647)
FossilOrigin-Name: 6f8952a8366065c9baa48cacc9c36743788210db
2007-12-30 23:35:15 +00:00
pweilbacher
efd9eff475 move variable declaration to be able to compile sqlite3_mutex_alloc() with older compilers (like EMX/gcc 2.8.1) (CVS 4646)
FossilOrigin-Name: a568a9cf3705f45c4734f212eb359cadd3b0c897
2007-12-30 23:29:06 +00:00
danielk1977
41c58b78b9 Add experimental pragma "quick_check", a reduced version of integrity_check that runs without most of the overhead of the full integrity_check. (CVS 4645)
FossilOrigin-Name: 2ddc8d72723e5a294e850491fcd9c1fb7474a9c3
2007-12-29 13:39:19 +00:00
drh
71f971b2da Mem3.c enhanced so that an allocation of N bytes only requires (N+11)&~7 bytes
instead of (N+15)&~7 bytes of heap storage.  Minimum heap usage per
allocation is still 16 bytes.  8-byte alignment is preserved. (CVS 4644)

FossilOrigin-Name: d027f91cea0a6fd1e04d2b3853f21348da601a17
2007-12-29 13:18:22 +00:00
danielk1977
4eab8b7b41 Fix a race condition that can occur when reloading the database schema in shared-cache mode. (CVS 4643)
FossilOrigin-Name: b37babef913fcceae7f0bd461a3105e184518d62
2007-12-27 15:12:16 +00:00
danielk1977
641b0f4ffa Fix for #2854. "BEGIN EXCLUSIVE" excludes other shared cache users from using the database. (CVS 4642)
FossilOrigin-Name: 2e59b1d07ee422bd799b5b7aeea44ebc998d9481
2007-12-21 04:47:25 +00:00
drh
9892c5d1f4 Fix some issues with lemon. Tickets #2852 and #2835. (CVS 4641)
FossilOrigin-Name: 5283e0d1467e0fc0ebbd1be553b5a8762e9c7975
2007-12-21 00:02:11 +00:00