Find Jobs
Hire Freelancers

Basic Block OpCode - repost

$100 USD

已取消
已发布大约 11 年前

$100 USD

货到付款
I have attached the code below. I included hw8.gen.codes.c which is a working file and will help you understand the op code generation, however hw11.gen.codes.parser.c file is the one that I have been working on for creating basic blocks. I would like this code by this Saturday at 9:00am Mountain Standard Time. Here is the full instructions: The function traverse_ast(node) is a function that traverses the syntax subtree pointed to by node and builds the flow graph of basic blocks of intermediate codes. We perform an in-order traversal recursive algorithm to process the actions/semantics encoded in the abstract syntax tree. We always maintain a global variable current_bb which is the basic block that we are currently developing. Initially, we create a new empty basic block by calling fg_bb_new(). This is both the current basic block and the entry basic block for the flow graph. Note that we create the basic block in advance before we process any abstract syntax tree nodes to generate intermediate codes. In processing a syntax tree, we always maintain a current basic block. Suppose we have finished processing a (abstract syntax) subtree with a root labelled AST_IF_THEN. Note that the statement located immediately after the IF statement is the target of the branch link of the if-condition test. That is, the intermediate codes for the statement after the IF statement belongs to a new basic block. As our convention requires the current_bb to be created in advance, we need to call fg_bb_new() as part of the processing for the AST_IF_THEN node. There are other cases (for example, processing a AST_While node) that we need to create an empty current basic block at the end of the processing. You can compare the output of your program to that returned by the executable hw11 Source codes for the flow graph module (fg.h, fg.c) can be found in the project resource page. NOTE: For this homework, we assume that there are no initializations of global variable. (We still allow declarations of global variables though.)
项目 ID: 4468024

关于此项目

2提案
远程项目
活跃11 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
2威客以平均价$130 USD来参与此工作竞价
用户头像
I can help you.
$149 USD 在3天之内
5.0 (13条评论)
3.8
3.8
用户头像
Hi, I am ready for you! But I cant see your attached code
$103 USD 在1天之内
5.0 (1条评论)
2.8
2.8
用户头像
Please check your inbox
$110 USD 在1天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
Albuquerque, United States
5.0
2
会员自4月 8, 2013起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。