i am developing a compiler for my own defined language , i have generated 3 address code and now i am going to develop a virtual machine which can run that 3 address code. but for that i need Data Segment (where i can store all of my variables values) .i have two data types in my language (int and char) .
please give me a hint that how can i construct a data segment where i can store all of my variables (int and char both) values
thanks reading my problem
Data Segment in Compiler Construction
205 Views Asked by Haider Ali At
1
There are 1 best solutions below
Related Questions in COMPILER-CONSTRUCTION
- php Variable name must change in for loop
- register_shutdown_function is not getting called
- Query returning zero rows despite entries existing
- Retrieving *number* pages by page id
- Automatically closing tags in form input?
- How to resize images with PHP PARSE SDK
- how to send email from localhost using codeigniter?
- Mariadb max Error while sending QUERY packet PID
- Multiusers login redirect different page in php
- Imaginary folder when I use "DirectoryIterator" in PHP?
Related Questions in DATA-SEGMENT
- php Variable name must change in for loop
- register_shutdown_function is not getting called
- Query returning zero rows despite entries existing
- Retrieving *number* pages by page id
- Automatically closing tags in form input?
- How to resize images with PHP PARSE SDK
- how to send email from localhost using codeigniter?
- Mariadb max Error while sending QUERY packet PID
- Multiusers login redirect different page in php
- Imaginary folder when I use "DirectoryIterator" in PHP?
Related Questions in VM-IMPLEMENTATION
- php Variable name must change in for loop
- register_shutdown_function is not getting called
- Query returning zero rows despite entries existing
- Retrieving *number* pages by page id
- Automatically closing tags in form input?
- How to resize images with PHP PARSE SDK
- how to send email from localhost using codeigniter?
- Mariadb max Error while sending QUERY packet PID
- Multiusers login redirect different page in php
- Imaginary folder when I use "DirectoryIterator" in PHP?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I strongly recommend to read C.Queinnec's book Lisp In Small Pieces; it explains very well a lot of things related to your questions.
While C.Queinnec's book focus apparently on Lisp-like languages, it teach you concepts which you can apply to a lot of other languages, including your own. In particular, you'll want to formalize more the denotational semantics or operational semantics of your language.
You could also at least study some VM, including Ocaml virtual machine, JVM, Parrot VM, NekoVM, LUA VM...
And you may later want to use just in time compilation techniques, notably with LLVM or libjit etc...
See also http://lambda-the-ultimate.org/
BTW, you may find much more convenient to have your language implementation reuse some existing VM.
I don't grasp why is a data segment such an issue. Your VM usually starts with some heap image, which contain both data and bytecode. A lot of languages have (at least implicitly) closures - or at least objects - mixing code and data.