src/JavaVM.st
branchjk_new_structure
changeset 1548 af9097580037
parent 1547 5935ecf54caa
child 1549 d99bd163584e
equal deleted inserted replaced
1547:5935ecf54caa 1548:af9097580037
  1398     JavaPrivilegedAccessQuery := QuerySignal new.
  1398     JavaPrivilegedAccessQuery := QuerySignal new.
  1399     JavaPrivilegedAccessQuery defaultAnswer: false.
  1399     JavaPrivilegedAccessQuery defaultAnswer: false.
  1400     AssertionsEnabled := true.
  1400     AssertionsEnabled := true.
  1401     ClassRegistry := JavaClassRegistry new.
  1401     ClassRegistry := JavaClassRegistry new.
  1402     FinalizationEnabled := true.
  1402     FinalizationEnabled := true.
  1403     FinalizationLobby := Registry new.
       
  1404     EagerResolvingEnabled := false.
  1403     EagerResolvingEnabled := false.
  1405 
  1404 
  1406     "
  1405     "
  1407      JavaVM initialize"
  1406      JavaVM initialize"
  1408 
  1407 
  1409     "Created: / 02-01-1998 / 18:02:34 / cg"
  1408     "Created: / 02-01-1998 / 18:02:34 / cg"
  1410     "Modified: / 02-12-1998 / 23:02:22 / cg"
  1409     "Modified: / 02-12-1998 / 23:02:22 / cg"
  1411     "Modified: / 09-10-2011 / 20:29:10 / Marcel Hlopko <hlopik@gmail.com>"
  1410     "Modified: / 09-10-2011 / 20:29:10 / Marcel Hlopko <hlopik@gmail.com>"
  1412     "Modified: / 08-12-2011 / 21:06:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
  1411     "Modified: / 08-12-2011 / 21:06:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
  1413     "Modified: / 09-04-2012 / 21:01:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1412     "Modified: / 24-07-2012 / 02:10:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1414 !
  1413 !
  1415 
  1414 
  1416 initializeAdditionalJavaProtocol
  1415 initializeAdditionalJavaProtocol
  1417     "install additional java protocol in smalltalk classes, req'd for java programs"
  1416     "install additional java protocol in smalltalk classes, req'd for java programs"
  1418 
  1417 
  1882     Java initAllStaticFields.
  1881     Java initAllStaticFields.
  1883     Java markAllClassesUninitialized.
  1882     Java markAllClassesUninitialized.
  1884     ZipCache := OrderedCollection new.
  1883     ZipCache := OrderedCollection new.
  1885     ZipEntryCache := OrderedCollection new.
  1884     ZipEntryCache := OrderedCollection new.
  1886     ZipInflaters := OrderedCollection new.
  1885     ZipInflaters := OrderedCollection new.
       
  1886     FinalizationLobby := JavaFinalizationRegistry new.
  1887     
  1887     
  1888     "/ force re-resolving;
  1888     "/ force re-resolving;
  1889     "/ otherwise, class-inits would not be called
  1889     "/ otherwise, class-inits would not be called
  1890     "/ by resolver ... (sigh)
  1890     "/ by resolver ... (sigh)
  1891     
  1891     
  1921     Java initializeCurrentThread.
  1921     Java initializeCurrentThread.
  1922     self initializeSystemClassLoader.
  1922     self initializeSystemClassLoader.
  1923     ObjectMemory addDependent: self.
  1923     ObjectMemory addDependent: self.
  1924     StartupTime := OperatingSystem getOSTime.
  1924     StartupTime := OperatingSystem getOSTime.
  1925 
  1925 
       
  1926 
       
  1927 
  1926     "
  1928     "
  1927      JavaVM initialize.
  1929      JavaVM initialize.
  1928      JavaVM initializeVM."
  1930      JavaVM initializeVM."
  1929 
  1931 
  1930     "Created: / 03-01-1998 / 21:29:09 / cg"
  1932     "Created: / 03-01-1998 / 21:29:09 / cg"
  1931     "Modified: / 14-12-1999 / 18:58:56 / cg"
  1933     "Modified: / 14-12-1999 / 18:58:56 / cg"
  1932     "Modified: / 15-10-2010 / 15:27:45 / Jan Kurs <kurs.jan@post.cz>"
  1934     "Modified: / 15-10-2010 / 15:27:45 / Jan Kurs <kurs.jan@post.cz>"
  1933     "Modified: / 24-02-2012 / 13:59:29 / Marcel Hlopko <hlopik@gmail.com>"
  1935     "Modified: / 24-02-2012 / 13:59:29 / Marcel Hlopko <hlopik@gmail.com>"
  1934     "Modified: / 24-02-2012 / 14:37:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
  1936     "Modified: / 24-02-2012 / 14:37:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
  1935     "Modified: / 23-07-2012 / 22:35:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1937     "Modified: / 24-07-2012 / 02:44:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1936 !
  1938 !
  1937 
  1939 
  1938 initializeVMIfNoEventThreadRunning
  1940 initializeVMIfNoEventThreadRunning
  1939     |uClass updater p|
  1941     |uClass updater p|
  1940 
  1942 
  5659         ('JAVA: opened ' , name , ' as FD ' , fileNo printString) infoPrintCR.
  5661         ('JAVA: opened ' , name , ' as FD ' , fileNo printString) infoPrintCR.
  5660     ].
  5662     ].
  5661 
  5663 
  5662     fd instVarNamed:'fd' put:fileNo.
  5664     fd instVarNamed:'fd' put:fileNo.
  5663     "Kludge for finalization..."
  5665     "Kludge for finalization..."
  5664     fs finalizationLobby registerChange: fs
       
  5665 
  5666 
  5666     "Created: / 04-01-1998 / 16:47:12 / cg"
  5667     "Created: / 04-01-1998 / 16:47:12 / cg"
  5667     "Modified: / 28-01-1999 / 17:24:07 / cg"
  5668     "Modified: / 28-01-1999 / 17:24:07 / cg"
  5668     "Modified (format): / 18-07-2012 / 23:29:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  5669     "Modified: / 24-07-2012 / 02:17:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  5669 !
  5670 !
  5670 
  5671 
  5671 _java_io_FileInputStream_read: nativeContext
  5672 _java_io_FileInputStream_read: nativeContext
  5672 
  5673 
  5673     <javanative: 'java/io/FileInputStream' name: 'read()I'>
  5674     <javanative: 'java/io/FileInputStream' name: 'read()I'>