Skip to content

Update README #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 28, 2017
Merged

Update README #80

merged 2 commits into from
Mar 28, 2017

Conversation

CodaFi
Copy link
Member

@CodaFi CodaFi commented Mar 28, 2017

No description provided.

Copy link
Contributor

@segiddins segiddins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks amazing!

README.md Outdated
let builder = IRBuilder(module: module)

let main = builder.addFunction(
name: "main",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs -> spaces

README.md Outdated
let main = builder.addFunction(
name: "main",
type: FunctionType(argTypes: [],
returnType: VoidType())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray tab

README.md Outdated
Notice that the value of `retVal` depends on the path the flow of control takes through this program, so we must emit a Phi node to properly initialize it:

```swift
let function = builder.addFunction("calculateFibs", type: FunctionType(argTypes: [IntType.int1], returnType: FloatType.double))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's align these parameters

README.md Outdated
Notice that the value of `retVal` depends on the path the flow of control takes through this program, so we must emit a Phi node to properly initialize it:

```swift
let function = builder.addFunction("calculateFibs", type: FunctionType(argTypes: [IntType.int1], returnType: FloatType.double))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we explain that booleans are int1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did want to add a section on types originally. I'll see what I can do.


```swift
// Setup the JIT
let jit = try! JIT(module: module, machine: TargetMachine())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure the machine is defaulted, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not.

@harlanhaskins
Copy link
Member

Looks amazing modulo nitpicks!

README.md Outdated
Notice that the value of `retVal` depends on the path the flow of control takes through this program, so we must emit a PHI node to properly initialize it:

```swift
let function = builder.addFunction("calculateFibs", type: FunctionType(argTypes: [IntType.int1], returnType: FloatType.double))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still maybe align these parameters?

@CodaFi CodaFi force-pushed the readme-and-weep branch 2 times, most recently from 53e7662 to ff34558 Compare March 28, 2017 20:24
@CodaFi
Copy link
Member Author

CodaFi commented Mar 28, 2017

New section on types

@harlanhaskins
Copy link
Member

🚢 🇮🇹

@CodaFi
Copy link
Member Author

CodaFi commented Mar 28, 2017

⛵️

@CodaFi CodaFi merged commit 7bc5935 into llvm-swift:master Mar 28, 2017
@CodaFi CodaFi deleted the readme-and-weep branch March 28, 2017 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants