Skip to content
Permalink
Browse files

fixes #3243

  • Loading branch information
MarcusDenker committed Apr 26, 2019
1 parent da31e92 commit 2aaa0643374706152a19189cc888eebe69a885ca
Showing with 14 additions and 4 deletions.
  1. +14 −4 src/OpalCompiler-Core/OpalCompiler.class.st
@@ -158,6 +158,17 @@ OpalCompiler class >> isActive [
^Smalltalk compilerClass == self
]

{ #category : #overlay }
OpalCompiler class >> overlayClasses [
"here the classes for the overlay can changed. the default is just the compiler"
^self package definedClasses

"Compiler and AST:
self package definedClasses, RBProgramNode package definedClasses, {TRBProgramNodeVisitor}
"

]

{ #category : #overlay }
OpalCompiler class >> overlayEnvironment [
^overlayEnvironment
@@ -185,9 +196,8 @@ OpalCompiler class >> startUsingOverlayForDevelopment [
<script>
overlayEnvironment := Dictionary new.

"now we put a copy of all the classes of the compiler package into the environment"
self package definedClasses
do: [ :class | overlayEnvironment at: class name put: class copy ].
"now we put a copy of all the classes into the environment"
self overlayClasses do: [ :class | overlayEnvironment at: class name put: class copy ].

"now we recompile the classes in the environment with itself as an overlay"
overlayEnvironment valuesDo: [ :class |
@@ -200,7 +210,7 @@ OpalCompiler class >> startUsingOverlayForDevelopment [

"make sure superclass pointers are correct"
overlayEnvironment valuesDo: [ :class |
(overlayEnvironment includesKey: class superclass name) ifTrue: [
(class isTrait not and: [overlayEnvironment includesKey: class superclass name]) ifTrue: [
class superclass: (overlayEnvironment at: class superclass name)]].

"make the copy the default compiler for the image"

0 comments on commit 2aaa064

Please sign in to comment.
You can’t perform that action at this time.