-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove rollup plugin ts, use glimmer imports (#5)
- Loading branch information
1 parent
483b24b
commit 2682766
Showing
12 changed files
with
3,219 additions
and
3,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,12 @@ | ||
//github.com/glimmerjs/glimmer-vm/blob/14413355ef6b48c1ab416a91fb7ff950cf8511d8/packages/%40glimmer/interfaces/lib/vm-opcodes.d.ts#L14 | ||
|
||
// We can't use enums from @glimmer/interfaces due to the issue below: | ||
// https://github.com/glimmerjs/glimmer-vm/issues/1294 | ||
// We can use type imports, but an enum would need to be transformed into JS, | ||
// which fails. | ||
// We copy the opcodes from the source into here, and only the ones that are | ||
// relevant to us. | ||
// This is safe, because the opcodes should be stable. | ||
// https://github.com/glimmerjs/glimmer-vm/blob/68d371bdccb41bc239b8f70d832e956ce6c349d8/packages/%40glimmer/vm/lib/opcodes.ts#L196 | ||
export const enum Op { | ||
Helper = 16, | ||
SetNamedVariables = 17, | ||
SetBlocks = 18, | ||
SetVariable = 19, | ||
SetBlock = 20, | ||
GetVariable = 21, | ||
GetProperty = 22, | ||
GetBlock = 23, | ||
SpreadBlock = 24, | ||
HasBlock = 25, | ||
HasBlockParams = 26, | ||
Concat = 27, | ||
Constant = 28, | ||
ConstantReference = 29, | ||
Primitive = 30, | ||
PrimitiveReference = 31, | ||
ReifyU32 = 32, | ||
Dup = 33, | ||
Pop = 34, | ||
Load = 35, | ||
Fetch = 36, | ||
RootScope = 37, | ||
VirtualRootScope = 38, | ||
ChildScope = 39, | ||
PopScope = 40, | ||
Text = 41, | ||
Comment = 42, | ||
AppendHTML = 43, | ||
AppendSafeHTML = 44, | ||
AppendDocumentFragment = 45, | ||
AppendNode = 46, | ||
AppendText = 47, | ||
OpenElement = 48, | ||
OpenDynamicElement = 49, | ||
PushRemoteElement = 50, | ||
StaticAttr = 51, | ||
DynamicAttr = 52, | ||
ComponentAttr = 53, | ||
FlushElement = 54, | ||
CloseElement = 55, | ||
PopRemoteElement = 56, | ||
Modifier = 57, | ||
BindDynamicScope = 58, | ||
PushDynamicScope = 59, | ||
PopDynamicScope = 60, | ||
CompileBlock = 61, | ||
PushBlockScope = 62, | ||
PushSymbolTable = 63, | ||
InvokeYield = 64, | ||
JumpIf = 65, | ||
JumpUnless = 66, | ||
JumpEq = 67, | ||
AssertSame = 68, | ||
Enter = 69, | ||
Exit = 70, | ||
ToBoolean = 71, | ||
EnterList = 72, | ||
ExitList = 73, | ||
Iterate = 74, | ||
Main = 75, | ||
ContentType = 76, | ||
Curry = 77, | ||
PushComponentDefinition = 78, | ||
PushDynamicComponentInstance = 79, | ||
ResolveDynamicComponent = 80, | ||
ResolveCurriedComponent = 81, | ||
PushArgs = 82, | ||
PushEmptyArgs = 83, | ||
PopArgs = 84, | ||
PrepareArgs = 85, | ||
CaptureArgs = 86, | ||
CreateComponent = 87, | ||
RegisterComponentDestructor = 88, | ||
PutComponentOperations = 89, | ||
GetComponentSelf = 90, | ||
GetComponentTagName = 91, | ||
GetComponentLayout = 92, | ||
BindEvalScope = 93, | ||
SetupForEval = 94, | ||
PopulateLayout = 95, | ||
InvokeComponentLayout = 96, | ||
BeginComponentTransaction = 97, | ||
CommitComponentTransaction = 98, | ||
DidCreateElement = 99, | ||
DidRenderLayout = 100, | ||
ResolveMaybeLocal = 102, | ||
Debugger = 103, | ||
Size = 104, | ||
StaticComponentAttr = 105, | ||
DynamicContentType = 106, | ||
DynamicHelper = 107, | ||
DynamicModifier = 108, | ||
IfInline = 109, | ||
Not = 110, | ||
GetDynamicVar = 111, | ||
Log = 112, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import type { ComponentInstance } from '@glimmer/interfaces'; | ||
import type { UpdatingVM } from '@glimmer/runtime'; | ||
|
||
export class ProvideConsumeContextUpdateOpcode { | ||
// "instance" is a VM component instance | ||
constructor(private instance: any) {} | ||
constructor(private instance: ComponentInstance) {} | ||
|
||
// vm is an instance of the updating VM: | ||
// https://github.com/glimmerjs/glimmer-vm/blob/68d371bdccb41bc239b8f70d832e956ce6c349d8/packages/%40glimmer/runtime/lib/vm/update.ts#L33 | ||
evaluate(vm: any) { | ||
evaluate(vm: UpdatingVM) { | ||
vm.env.provideConsumeContextContainer?.enter(this.instance); | ||
} | ||
} | ||
|
||
export class ProvideConsumeContextDidRenderOpcode { | ||
// "instance" is a VM component instance | ||
constructor(private instance: any) {} | ||
constructor(private instance: ComponentInstance) {} | ||
|
||
// vm is an instance of the updating VM: | ||
// https://github.com/glimmerjs/glimmer-vm/blob/68d371bdccb41bc239b8f70d832e956ce6c349d8/packages/%40glimmer/runtime/lib/vm/update.ts#L33 | ||
evaluate(vm: any) { | ||
evaluate(vm: UpdatingVM) { | ||
vm.env.provideConsumeContextContainer?.exit(this.instance); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.