Граф коммитов

901 Коммитов

Автор SHA1 Сообщение Дата
igor%mir2.org af3cca93fd I made FunctionNode to inherit from Node instead of Node.StringNode as FunctionNode is never used as a string source. 2002-11-03 01:26:29 +00:00
igor%mir2.org e33d132a12 I removed method duplication in Node where getNext() was duplicated as getNextSibling() and code was using both of them and similarly for getFirstChild()/getFirst(). 2002-11-02 22:08:00 +00:00
igor%mir2.org 9b6ae7fdf7 Allow for TokenStream.COMMA node in the parsed tree to contain more then 2 children to avoid too-deep recursion during code generation for long array and object initialization lists. 2002-11-02 18:01:26 +00:00
igor%mir2.org 6c91eb5274 Cosmetics: use uniform indentation in switch statements 2002-11-02 14:54:35 +00:00
igor%mir2.org 9c88f342b2 Avoid potentially expensive calls to Node.addChildBefore which may need to traverse a long child list to find the previous child when a reference to the previous child is available from context. 2002-11-02 12:52:11 +00:00
igor%mir2.org 498ccb82fe Clear reference to sourceBuffer array as soon as it is no longer needed to allow its earlier GC. 2002-11-02 12:46:28 +00:00
igor%mir2.org 85132aacd6 Fixing 159334: store bytecode indexes as uint16 to extend limit on maximum number of different strings to 64K 2002-11-01 14:43:34 +00:00
igor%mir2.org b9a8bd50ee Fixing regression introduced by 1.93: during generation of code for NEW and CALL do not assume that function name index would be the index of the last string in the string table as due to name sharing it can be any index. Instead NEW and CALL generator uses lastStringIndex which is updated in addString and holds the last used string index. 2002-10-31 01:19:53 +00:00
igor%mir2.org 902aee2f8d Fixing 177314:
TokenStream.java: third octal digit is a part of the octal escape in strings only if the result is <= 0377.

resources/Messages.properties: removal of unused msg.oct.esc.too.large
2002-10-30 09:20:00 +00:00
igor%mir2.org 86a5bceb04 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=173906: change Codegen.visitCall to check for dynamic scope flag when calling
direct call target
2002-10-24 10:05:36 +00:00
igor%mir2.org a086d887a9 Using ThreadLocal under JDK >= 1.2 in Context.enter/Context.exit so they do not need to synchronize on global Context.threadContexts object as java.lang.ThreadLocal allows to associate a Context instance with the current thread in a completely synchronization-free way.
When ThreadLocal is not available (JDK 1.1), the old way of doing things is used.
2002-10-24 10:04:30 +00:00
igor%mir2.org 32dcd895ba I modified Context.enter/Context.exit to remove explicit synchronization on threadContexts as implicit implicit synchronization when calling threadContexts.get/threadContexts.put/threadContexts.remove is enough to ensure thread safety. It reduces time spend in synchronized code so Context.enter/Context.exit is less problematic with script execution on many threads.
The change also allows with simple modifications of Context.getCurrentContext and Context.setThreadContext to use java.lang.ThreadLocal from JDK 1.2 to remove any synchronization on global data structures during Context.enter/Context.exit/Context.getCurrentContext.
2002-10-23 09:56:26 +00:00
igor%mir2.org 7fe4fdbc33 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=173180
Merges utf8ToOneUcs4Char body into the decode method and adds checks
for overlongs to follow SpiderMonkey.
2002-10-22 21:22:44 +00:00
igor%mir2.org 5c85c4f1ae Add isGeneratedScript to DebuggableScript and its implementations to allow debuger to distinguish between scripts and functions coming from external files or ones defined vvia exec or new Function() 2002-09-26 20:19:39 +00:00
igor%mir2.org 984ec2e982 Fixing 169830: I replaced in jsFunction_concat calls to hasLengthPropert by ScriptRuntime.instanceOf and as hasLengthPropert is no longer used, I removed it as well. 2002-09-24 15:57:58 +00:00
igor%mir2.org a63ccf0cc5 In newObject pass top level scope to the constructor, not ctor.getParentScope() to take into account hasCompileFunctionsWithDynamicScope() 2002-09-24 14:14:00 +00:00
igor%mir2.org 6f4b833c59 In getClassPrototype replace ScriptRuntime.getTopLevelProp by getProperty to avoid double call to getTopLevelScope 2002-09-24 14:10:53 +00:00
igor%mir2.org e3402dd61f In jsFunction_concat inline ScriptRuntime.newObject to throw JavaScriptException if array constructor throws one and avoid double call to ScriptableObject.getTopLevelScope() 2002-09-24 14:08:22 +00:00
igor%mir2.org 0a4b0ef2af Change ScriptRuntime.getTopLevelPropery to call ScriptableObject.getProperty in place of explicit loop over the prototype chain. It makes sure that all Scriptable.get(property, start) on the prototype chain are called with a proper start value.
Add getExistingCtor to get existing constructor property or throw an exception.
2002-09-24 14:05:24 +00:00
igor%mir2.org 8e32c0c8a1 Remove the minimalAllocation field and instead pre-allocate data array in the constructor if necessary. 2002-09-24 11:21:19 +00:00
igor%mir2.org 5f6a565762 Change NativeArray.getLengthProperty to return long instead of double as its results are always uint32 and adjust its usage accordingly . Fix Context.getElements documentation to state that it returns empty array, not null, if object does not have a reasonable length property. 2002-09-24 09:29:27 +00:00
igor%mir2.org 6c61080e81 Reduce "new X" usage by inlining few classes or packing their members into long field 2002-09-18 12:57:09 +00:00
igor%mir2.org afd43edcb3 C relics removal: no need to check for null after "new X" 2002-09-18 12:50:51 +00:00
igor%mir2.org c0c5171c48 Store line number and operation type as int field instead of wrapping them into Integer; use Node subclass for nodes with string data; add few explicit checks about node structure assumptions. 2002-09-04 09:28:58 +00:00
igor%mir2.org 9068084e6a Use Node subclass to represent number literals to avoid creation of Double object. 2002-09-03 12:34:56 +00:00
igor%mir2.org 5381cd9877 Workaround in JS Math.pow implementation for java.lang.Math.pow brokeness in some JVM. 2002-08-27 08:14:49 +00:00
igor%mir2.org 21946b7034 Fixing a bug reported by Steven Beal where Interpreter.icodeTokenLength() and In
terpreter.dumpICode() used wrong size for CLOSURE opcode arguments.
2002-08-27 08:12:25 +00:00
igor%mir2.org 265a588aaf Fixing a bug reported by Steven Beal where Interpreter.icodeTokenLength() and Interpreter.dumpICode() used wrong size for REGEXP opcode arguments. 2002-08-26 09:11:54 +00:00
igor%mir2.org dd4a08ede4 Renaming the TokenStream.OBJECT constant to TokenStream.REGEXP for better reflection of semantics. 2002-08-26 08:06:27 +00:00
igor%mir2.org b481986e42 Fixing line number generation for the empty return statement which was reported by Steven Beal. It was caused by missed update of lineno in statementHelper when dealing with return;. 2002-08-16 06:42:27 +00:00
igor%mir2.org 7ad5c25d66 Fixing ArrayIndexOutOfBoundsException reported by Steven Beal caused by broken code to setup endLine in SourceInfo.updateLineInfo. 2002-08-15 06:42:45 +00:00
rogerl%netscape.com fd5470f403 Changed decimal escape handling to backward compatible rather than ECMA3
conforming. (Bug#158159)
2002-07-23 21:38:03 +00:00
igor%mir2.org 012b28330e Serialization fixes to correctly restore members and related fields in NativeJavaClass. 2002-07-16 21:17:09 +00:00
igor%mir2.org 0257e231a5 Fixing the bug 157196: custom serialization of ScriptableObject not to save deleted/empty slot. 2002-07-16 21:15:51 +00:00
igor%mir2.org 5335225a4e Checking for 1.2 version in toString for objects and arrays is replaced by calling cx.hasFeature(Context.FEATURE_TO_STRING_AS_SOURCE) to allow to control toString from applications without switching on other JS 1.2 features. 2002-07-16 17:42:18 +00:00
igor%mir2.org 091a93a0a4 I removed startString/getString and their support code as TokenStream uses its own buffer and fixed the bug 151337 which was cause by incorrect getLine 2002-07-16 17:37:46 +00:00
igor%mir2.org 307d75e312 I changed TokenStream to use internal buffer in place of LineBuffer#startString/getString to store currently read characters for identifiers, strings and numbers. For the price of yet another character coping it allows to simplify code logic especially regarding interaction with LineBuffer.
I also fixed http://bugzilla.mozilla.org/show_bug.cgi?id=157509
2002-07-15 18:49:42 +00:00
igor%mir2.org c725147d07 Call to InterpretedFunction.construct is inlined to avoid argument array allocation. 2002-07-12 19:40:49 +00:00
igor%mir2.org a45b576bee Creation and initialization of new object in BaseFunction.construct is moved to a separated function createObject to simplify inlining of InterpretedFunction.construct in Interpreter 2002-07-12 19:39:57 +00:00
igor%mir2.org 017b616d0b Added ObjToIntMap.intern() 2002-07-12 19:37:20 +00:00
igor%mir2.org 9896d08d55 When calling interpreted functions from Interpreter.interpret, pass current stack arrays to the callee to avoid creation of temporary argument arrays and wrapping double numbers into Double objects. 2002-07-11 21:17:34 +00:00
igor%mir2.org 8c98718cd4 Optimizing encode/decode not to allocate temporary buffers if the result equals the original string 2002-07-11 21:10:36 +00:00
igor%mir2.org b8b54c75b5 Optimizing NativeGlobal.js_escape, ScriptRuntime.escapeString not to create StringBuffer if there are no character to escape in the initial string. Workaround for JDK 1.1 compiler bug in the initialization of ScriptRuntime.ComparableClass. 2002-07-11 18:45:16 +00:00
igor%mir2.org ed6e3066d3 Fixing 136893: for(i in undefined), for(i in null) do not throw TypeError but treated as for(i in {}) 2002-07-11 18:39:24 +00:00
rogerl%netscape.com e76a9bdf17 Fixes for bugs #155285 - Array.join(undefined) should use ','
#155289 - String.prototype.XXX.length has some wrong values
 #155291 - RegExp properties should be DontEnum
Plus fix for matching against RegEXp captures with undefined value.
2002-07-09 22:28:52 +00:00
igor%mir2.org 1cf0bd8a05 Examples now uses try {} finally { Context.exit(); } to release Context even in case of errors 2002-07-09 17:49:16 +00:00
igor%mir2.org 988587183a New security implementation. 2002-07-04 21:40:12 +00:00
rogerl%netscape.com d4cc22a21f Fixed matching of un-matched paren contents (e.g. /(a)\1/("x") ). 2002-06-28 23:04:55 +00:00
rogerl%netscape.com a270823871 Fixed whitespace testing. Fixed bug 122167 - $nn handling in replace. 2002-06-22 19:38:02 +00:00
rogerl%netscape.com 17b4a2e105 Fixing bug 153223; - 'flat' input may be null. 'isWhiteSpace' does not
return true for non-break spaces, use 'isSpaceChar' instead. Bytes are
signed so needed to extract char values more carefully.
2002-06-21 18:19:25 +00:00