@@ -239,7 +239,8 @@ Lowered form (IR) is more important to the compiler, since it is used for type i
239
239
optimizations like inlining, and and code generation. It is also less obvious to the human,
240
240
since it results from a significant rearrangement of the input syntax.
241
241
242
- The following data types exist in lowered form:
242
+ In addition to ` Symbol ` s and some number types, the following data
243
+ types exist in lowered form:
243
244
244
245
* ` Expr `
245
246
@@ -316,7 +317,7 @@ These symbols appear in the `head` field of [`Expr`](@ref)s in lowered form.
316
317
317
318
Adds a method to a generic function and assigns the result if necessary.
318
319
319
- Has a 1-argument form and a 4 -argument form. The 1-argument form arises from the syntax ` function foo end ` .
320
+ Has a 1-argument form and a 3 -argument form. The 1-argument form arises from the syntax ` function foo end ` .
320
321
In the 1-argument form, the argument is a symbol. If this symbol already names a function in the
321
322
current scope, nothing happens. If the symbol is undefined, a new function is created and assigned
322
323
to the identifier specified by the symbol. If the symbol is defined but names a non-function,
@@ -325,7 +326,7 @@ These symbols appear in the `head` field of [`Expr`](@ref)s in lowered form.
325
326
type uniquely identifies the type to add the method to. When the type has fields, it wouldn't
326
327
be clear whether the method was being added to the instance or its type.
327
328
328
- The 4 -argument form has the following arguments:
329
+ The 3 -argument form has the following arguments:
329
330
330
331
* ` args[1] `
331
332
@@ -345,9 +346,55 @@ These symbols appear in the `head` field of [`Expr`](@ref)s in lowered form.
345
346
method to a function that also has methods defined in different scopes) this is an
346
347
expression that evaluates to a ` :lambda ` expression.
347
348
349
+ * ` struct_type `
350
+
351
+ A 7-argument expression that defines a new ` struct ` :
352
+
353
+ * ` args[1] `
354
+
355
+ The name of the ` struct `
356
+
357
+ * ` args[2] `
358
+
359
+ A ` call ` expression that creates ` SimpleVector ` specifying its parameters
360
+
361
+ * ` args[3] `
362
+
363
+ A ` call ` expression that creates ` SimpleVector ` specifying its fieldnames
364
+
348
365
* ` args[4] `
349
366
350
- ` true ` or ` false ` , identifying whether the method is staged (` @generated function ` ).
367
+ A ` Symbol ` or ` GlobalRef ` specifying the supertype (e.g., ` :Integer ` or
368
+ ` GlobalRef(Core, :Any) ` )
369
+
370
+ * ` args[5] `
371
+
372
+ A ` call ` expression that creates ` SimpleVector ` specifying its fieldtypes
373
+
374
+ * ` args[6] `
375
+
376
+ A Bool, true if ` mutable `
377
+
378
+ * ` args[7] `
379
+
380
+ The number of arguments to initialize. This will be the number
381
+ of fields, or the minimum number of fields called by an inner
382
+ constructor's ` new ` statement.
383
+
384
+ * ` abstract_type `
385
+
386
+ A 3-argument expression that defines a new abstract type. The
387
+ arguments are the same as the first three arguments of
388
+ ` struct_type ` expressions.
389
+
390
+ * ` primitive_type `
391
+
392
+ A 4-argument expression that defines a new primitive type. Arguments 1, 2, and 4
393
+ are the same as ` struct_type ` . Argument 3 is the number of bits.
394
+
395
+ * ` global `
396
+
397
+ Declares a global binding.
351
398
352
399
* ` const `
353
400
@@ -368,6 +415,11 @@ These symbols appear in the `head` field of [`Expr`](@ref)s in lowered form.
368
415
369
416
Returns its argument as the value of the enclosing function.
370
417
418
+ * ` isdefined `
419
+
420
+ ` Expr(:isdefined, :x) ` returns a Bool indicating whether ` x ` has
421
+ already been defined in the current scope.
422
+
371
423
* ` the_exception `
372
424
373
425
Yields the caught exception inside a ` catch ` block, as returned by ` jl_current_exception() ` .
@@ -400,6 +452,10 @@ These symbols appear in the `head` field of [`Expr`](@ref)s in lowered form.
400
452
Has the value ` false ` if inlined into a section of code marked with ` @inbounds ` ,
401
453
otherwise has the value ` true ` .
402
454
455
+ * ` simdloop `
456
+
457
+ Marks the end of the inner loop of a ` @simd ` expression.
458
+
403
459
* ` copyast `
404
460
405
461
Part of the implementation of quasi-quote. The argument is a surface syntax AST that is simply
0 commit comments