Commit Graph

116 Commits

Author SHA1 Message Date
rogerl%netscape.com
89515e83dc Removed FUNCTION instruction, other class related junk. 2000-06-23 22:53:09 +00:00
rginda%netscape.com
da45d9b0eb Added debugger opcode, change InstructionMap to a std::map, print source lines while tracing 2000-06-23 22:27:17 +00:00
beard%netscape.com
da19218b3e added assertion to ensure that mPC is always valid before fetching the next instruction. 2000-06-23 06:10:14 +00:00
beard%netscape.com
ca9001f387 When using a JSScope that has a parent scope, don't bother defining the standard properties, they will be shared. 2000-06-23 05:10:46 +00:00
rogerl%netscape.com
f2591282dc Work to support 'this'. 2000-06-21 22:32:21 +00:00
rogerl%netscape.com
27e254fee3 Changed use of Register to TypedRegister throughout. 2000-06-20 22:45:45 +00:00
rogerl%netscape.com
ecd0d99e85 Mucking about with operator overlaoding plus initializing global context
- beginning type stuff.
2000-06-16 01:36:59 +00:00
rogerl%netscape.com
6526fedd31 Adding support for Functions and Vars, preXcrement, object literals. 2000-06-14 23:26:15 +00:00
waldemar%netscape.com
bdd3276507 Fixed Mac warnings 2000-05-24 00:54:40 +00:00
rogerl%netscape.com
932d63213b Added operator overloading support 2000-05-23 00:08:29 +00:00
rginda%netscape.com
6fa16759c6 quieting linux warnings and fixing build bustage 2000-05-22 21:05:35 +00:00
rogerl%netscape.com
408e469b4b Playing with operator overloading & Type types. 2000-05-19 17:41:10 +00:00
rogerl%netscape.com
477b9aecd9 Moved genExpr to ICodeGenerator - added most expression ops. 2000-05-18 00:03:23 +00:00
beard%netscape.com
5323c7b05c Fixed signed/unsigned warning. InterpretStage -> Context::Event. Context::removeListener now using find() from <algorithm>. 2000-05-12 01:19:39 +00:00
rogerl%netscape.com
3dd4d8ff15 Added post inc/dec for properties & names. 2000-05-11 00:35:06 +00:00
beard%netscape.com
1c816f64a6 LoadString now has JSString* as second operand 2000-05-09 05:38:48 +00:00
beard%netscape.com
8647206526 VC6 bustage: can't initialize refs using construction form 2000-05-09 04:29:32 +00:00
beard%netscape.com
3f60dde90e JSNativeFunction::mCode returns JSValue now to avoid leaking 2000-05-09 03:57:28 +00:00
beard%netscape.com
5e272eaaf9 Fixed leaks by changing JSValue::toString()/toNumber() to return JSValue rather than JSValue*. LOAD_STRING now creates a JSString from a String*. 2000-05-09 03:11:54 +00:00
rogerl%netscape.com
261b8ef660 Added more string handling + valueToString/Number code.
NativeFunction support.
2000-05-08 22:59:42 +00:00
rogerl%netscape.com
ca4af3db37 New arithmetic ops. 2000-05-05 21:38:16 +00:00
rginda%netscape.com
d2e0252642 much debugger spankage; parse and execute step, continue, set, and print (kind-of) commands.
push implementation details of ICodeGenerator::print() into InstructionStream so they can be shared with ICodeModule.

copy variableList from ICodeGenerator to ICodeModule.

s/ScringAtom/const StringAtom/ in gencode.pl, regenerate vmtypes.h
2000-05-04 22:42:49 +00:00
beard%netscape.com
846e79c959 warnings on Linux 2000-05-01 17:18:49 +00:00
beard%netscape.com
7d9e844cad Implemented WITHIN, WITHOUT instructions, removed mICode from Context since it's part of Activation. No longer deleteing mActivation, just clearing it, since Activation objects are garbage collected. 2000-04-29 14:43:36 +00:00
beard%netscape.com
50f1660869 moved kUndefinedValue to jstypes.cpp, where it belongs. 2000-04-29 14:11:27 +00:00
beard%netscape.com
3eed137323 fixing windows bustage. 2000-04-29 00:29:56 +00:00
rginda%netscape.com
522d51c5b6 somewhat weak debugger console hookup.
build shouldn't *look* different yet.

Moved Context::interpret() local vars into Context private, added accessors for
stuff, using JavaScript::Lexer to lex debugger commands.

Fixed sign comparison warning in icg.cpp
2000-04-29 00:23:06 +00:00
beard%netscape.com
1f0e341d77 Merged JSMap & JSObject. Introduced JSNamespace. 2000-04-28 23:04:43 +00:00
beard%netscape.com
74a712cb16 using JSValue::tag to do simple operand validation. 2000-04-28 05:43:33 +00:00
beard%netscape.com
d30332fed4 reordered inheritance graph of Linkage. 2000-04-28 02:23:08 +00:00
rogerl%netscape.com
d96a9a02a4 More exception handling handling. 2000-04-27 01:27:09 +00:00
beard%netscape.com
4fb22b1f43 Using getProperty/setProperty rather than JSMap::operator[]. This follows the prototype chain. 2000-04-26 21:38:14 +00:00
beard%netscape.com
3b3617a676 Fixing windows bustage in Linkage. 2000-04-26 05:56:20 +00:00
beard%netscape.com
4996f07b77 JSActivation -> Activation, JSLinkage --> Linkage. Linkage now implements the Context::Frame interface. Implemented simple Context::Listener support. 2000-04-26 05:35:07 +00:00
beard%netscape.com
51b10bdffb JSFrame -> JSLinkage, using explicit linked list rather than a stack. 2000-04-26 01:42:00 +00:00
beard%netscape.com
b33c70b006 changed Context constructor to take JSObject* not JSObject&, to be able to control lifetime a little more carefully. 2000-04-25 03:32:53 +00:00
rogerl%netscape.com
adfcfe0dca Added a beginning for exception handling. 2000-04-21 22:52:52 +00:00
rogerl%netscape.com
8c81be5a55 Added labelled statements, fixed some VC++'isms 2000-04-21 00:37:51 +00:00
rginda%netscape.com
6ceaff6eaf icodegenerator.cpp
add m prefix to base and offset label members

interpreter.cpp,h
dual license
wrap interpret in a Context class
add RETURN_VOID case

js2.cpp
update to use context class
remove #if 0 code that'll probably never be used anyway.

jstypes.h
add defineProperty/function to JSObject

vmtypes.h
regerated opcode classes:
  added RETURN_VOID, removed LOAD/SAVE_VAR
  reverted bacl to the smaller print function (thanks to RETURN_VOID)
  fixed branch printing issue
  inherit print() from super if possible

tools/gencode.pl
generate smaller print functions again
don't generate print function if superclass can take care of it.
2000-04-21 00:04:14 +00:00
rogerl%netscape.com
07efe443fa Removing variables. 2000-04-19 22:45:57 +00:00
rginda%netscape.com
4308ea7ed1 formatting changes. use only one tab regardless of nested namespaces 2000-04-18 21:51:45 +00:00
rginda%netscape.com
6d135f273c removed superfluous ;s after namespace decs. 2000-04-18 07:14:49 +00:00
rogerl%netscape.com
8812cb41bd Fixed WINDOZE build issues 2000-04-18 00:38:26 +00:00
rginda%netscape.com
f8d4b9c989 added js::VM, ICG, JSTypes, and Interpreter namespaces; messed around with lots of code.
Created class for each ICode, adding a print() method (using formatters)
2000-04-18 00:17:34 +00:00
beard%netscape.com
2abecb9b3f gc_base now used as common base class of GC allocated objects. 2000-04-13 04:54:41 +00:00
beard%netscape.com
8aba8b4d32 JSActivation, JSFunction 2000-04-11 05:11:58 +00:00
beard%netscape.com
61caef62db JSObject, JSArray : public JSMap, gc_object<T>. Frame -> JSFrame. Added JSFrameStack which is an std:stack<JSFrame*, std:vector<JSFrame*> >. 2000-04-11 03:11:00 +00:00
rogerl%netscape.com
bb3a13555c CALL opcode & frames etc. (r=beard) 2000-04-11 00:32:17 +00:00
beard%netscape.com
65f51d1dc0 JSArray::elements(1), operator[](const JSValue&), fixed register-indexing. 2000-04-08 04:12:28 +00:00
beard%netscape.com
baed85e41a NEW_ARRAY 2000-04-08 03:37:49 +00:00
beard%netscape.com
5834a20d81 added JSArray, GET_ELEMENT, SET_ELEMENT, changed some ops to dest/src. 2000-04-08 03:23:44 +00:00
rogerl%netscape.com
3e3b3e45fd Fixed wacky tabs 2000-04-08 01:08:01 +00:00
rogerl%netscape.com
4898874939 Added ICodeModule to collect extra info about executable chunks. 2000-04-08 01:04:55 +00:00
beard%netscape.com
13179cd572 reindented, introduced gc_map_allocator to hide platform differences 2000-04-08 00:52:59 +00:00
rogerl%netscape.com
adb5b77071 Re-ordered instructions so destination is always first.
Changed labels to be struct * instead of ints.
2000-04-07 22:19:36 +00:00
beard%netscape.com
0679b2e1cf JSObject and its elements now allocated using gc_allocator<T> (XP_MAC only). 2000-04-07 04:39:50 +00:00
beard%netscape.com
5e0d72e3ce Added preliminary object representation class JSObject, which is simply an STL map<String, JSValue> for now. Changed static globals to be a JSObject (can you say scope chain?). Implemented NEW_OBJECT, GET_PROP, and SET_PROP, all in terms of operations provided by JSObject. No GC (yet). 2000-04-07 02:52:07 +00:00
rogerl%netscape.com
7741726bd9 Changed compare/branch handling to determine last compare opcode.
Made returnStatement a member in ICG.
2000-04-06 22:40:17 +00:00
beard%netscape.com
fb68200586 more arithmetic, conditional branches, return instruction. 2000-04-06 02:58:22 +00:00
rogerl%netscape.com
a43377758b Resolved branch targets 2000-04-06 00:04:11 +00:00
beard%netscape.com
bb3c0f54a0 removed usage of labels (duh) 2000-04-05 23:57:51 +00:00
rogerl%netscape.com
0e8b29460c typedef'd instructions 2000-04-05 23:41:58 +00:00
beard%netscape.com
f1fef2ea55 Added default case to avoid warning 2000-04-05 21:26:01 +00:00
beard%netscape.com
f8999eeb8f added "globals", labels parameter for branches, combined some Instruction_N<> typedefs. 2000-04-05 20:33:41 +00:00
beard%netscape.com
d9f7558a70 linux fixes 2000-04-05 06:10:53 +00:00
beard%netscape.com
8283b89064 first crack at an icode interpreter 2000-04-05 06:05:57 +00:00