3abf78212c
Add dart2bytecode tool which takes Dart sources and produces Dart bytecode. The tool uses common front-end (CFE) to parse Dart source code and contains bytecode generator which translates kernel AST to bytecode. Change-Id: I90bd6e72c619cf0edc556da0640760b30e81091d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378560 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Slava Egorov <vegorov@google.com>
61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
Bytecode
|
|
Dynamic Module Entry Point: DART_SDK/pkg/dart2bytecode/testcases/deferred_lib.dart::main
|
|
Library 'DART_SDK/pkg/dart2bytecode/testcases/deferred_lib.dart'
|
|
name '#lib'
|
|
script 'DART_SDK/pkg/dart2bytecode/testcases/deferred_lib.dart'
|
|
|
|
Class '', script = 'DART_SDK/pkg/dart2bytecode/testcases/deferred_lib.dart'
|
|
|
|
|
|
Function 'callDeferred', static, reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type dynamic
|
|
|
|
Bytecode {
|
|
Entry 1
|
|
CheckStack 0
|
|
PushNull
|
|
DirectCall CP#0, 1
|
|
PopLocal r0
|
|
DirectCall CP#2, 0
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:async::Future::value (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
[2] = DirectCall 'DART_SDK/pkg/dart2bytecode/testcases/hello.dart::main', ArgDesc num-args 0, num-type-args 0, names []
|
|
[3] = Reserved
|
|
}
|
|
|
|
|
|
Function 'testLoadLibrary', static, reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type dynamic
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
PushNull
|
|
DirectCall CP#0, 1
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:async::Future::value (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
|
|
Function 'main', static, reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type dynamic
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
}
|
|
|