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>
29 lines
719 B
Plaintext
29 lines
719 B
Plaintext
Bytecode
|
|
Dynamic Module Entry Point: DART_SDK/pkg/dart2bytecode/testcases/hello.dart::main
|
|
Library 'DART_SDK/pkg/dart2bytecode/testcases/hello.dart'
|
|
name '#lib'
|
|
script 'DART_SDK/pkg/dart2bytecode/testcases/hello.dart'
|
|
|
|
Class '', script = 'DART_SDK/pkg/dart2bytecode/testcases/hello.dart'
|
|
|
|
|
|
Function 'main', static, reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type dynamic
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
PushConstant CP#0
|
|
DirectCall CP#1, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ObjectRef 'Hello, Dart Bytecode!'
|
|
[1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
|
|
[2] = Reserved
|
|
}
|
|
|