@@ -212,7 +212,7 @@ func (c *compiler) compileStmt(stmt ast.Stmt) {
212
212
// Body []Stmt
213
213
// DecoratorList []Expr
214
214
// Returns Expr
215
- panic ("FIXME not implemented" )
215
+ panic ("FIXME compile: FunctionDef not implemented" )
216
216
_ = node
217
217
case * ast.ClassDef :
218
218
// Name Identifier
@@ -222,79 +222,79 @@ func (c *compiler) compileStmt(stmt ast.Stmt) {
222
222
// Kwargs Expr
223
223
// Body []Stmt
224
224
// DecoratorList []Expr
225
- panic ("FIXME not implemented" )
225
+ panic ("FIXME compile: ClassDef not implemented" )
226
226
case * ast.Return :
227
227
// Value Expr
228
- panic ("FIXME not implemented" )
228
+ panic ("FIXME compile: Return not implemented" )
229
229
case * ast.Delete :
230
230
// Targets []Expr
231
- panic ("FIXME not implemented" )
231
+ panic ("FIXME compile: Delete not implemented" )
232
232
case * ast.Assign :
233
233
// Targets []Expr
234
234
// Value Expr
235
- panic ("FIXME not implemented" )
235
+ panic ("FIXME compile: Assign not implemented" )
236
236
case * ast.AugAssign :
237
237
// Target Expr
238
238
// Op OperatorNumber
239
239
// Value Expr
240
- panic ("FIXME not implemented" )
240
+ panic ("FIXME compile: AugAssign not implemented" )
241
241
case * ast.For :
242
242
// Target Expr
243
243
// Iter Expr
244
244
// Body []Stmt
245
245
// Orelse []Stmt
246
- panic ("FIXME not implemented" )
246
+ panic ("FIXME compile: For not implemented" )
247
247
case * ast.While :
248
248
// Test Expr
249
249
// Body []Stmt
250
250
// Orelse []Stmt
251
- panic ("FIXME not implemented" )
251
+ panic ("FIXME compile: While not implemented" )
252
252
case * ast.If :
253
253
// Test Expr
254
254
// Body []Stmt
255
255
// Orelse []Stmt
256
- panic ("FIXME not implemented" )
256
+ panic ("FIXME compile: If not implemented" )
257
257
case * ast.With :
258
258
// Items []*WithItem
259
259
// Body []Stmt
260
- panic ("FIXME not implemented" )
260
+ panic ("FIXME compile: With not implemented" )
261
261
case * ast.Raise :
262
262
// Exc Expr
263
263
// Cause Expr
264
- panic ("FIXME not implemented" )
264
+ panic ("FIXME compile: Raise not implemented" )
265
265
case * ast.Try :
266
266
// Body []Stmt
267
267
// Handlers []*ExceptHandler
268
268
// Orelse []Stmt
269
269
// Finalbody []Stmt
270
- panic ("FIXME not implemented" )
270
+ panic ("FIXME compile: Try not implemented" )
271
271
case * ast.Assert :
272
272
// Test Expr
273
273
// Msg Expr
274
- panic ("FIXME not implemented" )
274
+ panic ("FIXME compile: Assert not implemented" )
275
275
case * ast.Import :
276
276
// Names []*Alias
277
- panic ("FIXME not implemented" )
277
+ panic ("FIXME compile: Import not implemented" )
278
278
case * ast.ImportFrom :
279
279
// Module Identifier
280
280
// Names []*Alias
281
281
// Level int
282
- panic ("FIXME not implemented" )
282
+ panic ("FIXME compile: ImportFrom not implemented" )
283
283
case * ast.Global :
284
284
// Names []Identifier
285
- panic ("FIXME not implemented" )
285
+ panic ("FIXME compile: Global not implemented" )
286
286
case * ast.Nonlocal :
287
287
// Names []Identifier
288
- panic ("FIXME not implemented" )
288
+ panic ("FIXME compile: Nonlocal not implemented" )
289
289
case * ast.ExprStmt :
290
290
// Value Expr
291
- panic ("FIXME not implemented" )
291
+ panic ("FIXME compile: ExprStmt not implemented" )
292
292
case * ast.Pass :
293
293
// No nothing
294
294
case * ast.Break :
295
- panic ("FIXME not implemented" )
295
+ panic ("FIXME compile: Break not implemented" )
296
296
case * ast.Continue :
297
- panic ("FIXME not implemented" )
297
+ panic ("FIXME compile: Continue not implemented" )
298
298
default :
299
299
panic (py .ExceptionNewf (py .SyntaxError , "Unknown StmtBase: %v" , stmt ))
300
300
}
@@ -380,7 +380,7 @@ func (c *compiler) compileExpr(expr ast.Expr) {
380
380
case * ast.Lambda :
381
381
// Args *Arguments
382
382
// Body Expr
383
- panic ("FIXME not implemented" )
383
+ panic ("FIXME compile: Lambda not implemented" )
384
384
case * ast.IfExp :
385
385
// Test Expr
386
386
// Body Expr
@@ -397,45 +397,45 @@ func (c *compiler) compileExpr(expr ast.Expr) {
397
397
case * ast.Dict :
398
398
// Keys []Expr
399
399
// Values []Expr
400
- panic ("FIXME not implemented" )
400
+ panic ("FIXME compile: Dict not implemented" )
401
401
case * ast.Set :
402
402
// Elts []Expr
403
- panic ("FIXME not implemented" )
403
+ panic ("FIXME compile: Set not implemented" )
404
404
case * ast.ListComp :
405
405
// Elt Expr
406
406
// Generators []Comprehension
407
- panic ("FIXME not implemented" )
407
+ panic ("FIXME compile: ListComp not implemented" )
408
408
case * ast.SetComp :
409
409
// Elt Expr
410
410
// Generators []Comprehension
411
- panic ("FIXME not implemented" )
411
+ panic ("FIXME compile: SetComp not implemented" )
412
412
case * ast.DictComp :
413
413
// Key Expr
414
414
// Value Expr
415
415
// Generators []Comprehension
416
- panic ("FIXME not implemented" )
416
+ panic ("FIXME compile: DictComp not implemented" )
417
417
case * ast.GeneratorExp :
418
418
// Elt Expr
419
419
// Generators []Comprehension
420
- panic ("FIXME not implemented" )
420
+ panic ("FIXME compile: GeneratorExp not implemented" )
421
421
case * ast.Yield :
422
422
// Value Expr
423
- panic ("FIXME not implemented" )
423
+ panic ("FIXME compile: Yield not implemented" )
424
424
case * ast.YieldFrom :
425
425
// Value Expr
426
- panic ("FIXME not implemented" )
426
+ panic ("FIXME compile: YieldFrom not implemented" )
427
427
case * ast.Compare :
428
428
// Left Expr
429
429
// Ops []CmpOp
430
430
// Comparators []Expr
431
- panic ("FIXME not implemented" )
431
+ panic ("FIXME compile: Compare not implemented" )
432
432
case * ast.Call :
433
433
// Func Expr
434
434
// Args []Expr
435
435
// Keywords []*Keyword
436
436
// Starargs Expr
437
437
// Kwargs Expr
438
- panic ("FIXME not implemented" )
438
+ panic ("FIXME compile: Call not implemented" )
439
439
case * ast.Num :
440
440
// N Object
441
441
c .OpArg (vm .LOAD_CONST , c .Const (node .N ))
@@ -444,26 +444,26 @@ func (c *compiler) compileExpr(expr ast.Expr) {
444
444
c .OpArg (vm .LOAD_CONST , c .Const (node .S ))
445
445
case * ast.Bytes :
446
446
// S py.Bytes
447
- panic ("FIXME not implemented" )
447
+ panic ("FIXME compile: Bytes not implemented" )
448
448
case * ast.NameConstant :
449
449
// Value Singleton
450
- panic ("FIXME not implemented" )
450
+ panic ("FIXME compile: NameConstant not implemented" )
451
451
case * ast.Ellipsis :
452
- panic ("FIXME not implemented" )
452
+ panic ("FIXME compile: Ellipsis not implemented" )
453
453
case * ast.Attribute :
454
454
// Value Expr
455
455
// Attr Identifier
456
456
// Ctx ExprContext
457
- panic ("FIXME not implemented" )
457
+ panic ("FIXME compile: Attribute not implemented" )
458
458
case * ast.Subscript :
459
459
// Value Expr
460
460
// Slice Slicer
461
461
// Ctx ExprContext
462
- panic ("FIXME not implemented" )
462
+ panic ("FIXME compile: Subscript not implemented" )
463
463
case * ast.Starred :
464
464
// Value Expr
465
465
// Ctx ExprContext
466
- panic ("FIXME not implemented" )
466
+ panic ("FIXME compile: Starred not implemented" )
467
467
case * ast.Name :
468
468
// Id Identifier
469
469
// Ctx ExprContext
@@ -472,11 +472,11 @@ func (c *compiler) compileExpr(expr ast.Expr) {
472
472
case * ast.List :
473
473
// Elts []Expr
474
474
// Ctx ExprContext
475
- panic ("FIXME not implemented" )
475
+ panic ("FIXME compile: List not implemented" )
476
476
case * ast.Tuple :
477
477
// Elts []Expr
478
478
// Ctx ExprContext
479
- panic ("FIXME not implemented" )
479
+ panic ("FIXME compile: Tuple not implemented" )
480
480
default :
481
481
panic (py .ExceptionNewf (py .SyntaxError , "Unknown ExprBase: %v" , expr ))
482
482
}
@@ -889,13 +889,13 @@ func (o *JumpRel) Resolve() {
889
889
currentSize := o .Size ()
890
890
currentPos := o .Pos () + currentSize
891
891
if o .Dest .Pos () < currentPos {
892
- panic ("Attempt use JUMP_FORWARD to jump backwards" )
892
+ panic ("JUMP_FORWARD can't jump backwards" )
893
893
}
894
894
o .OpArg .Arg = o .Dest .Pos () - currentPos
895
895
if o .Size () != currentSize {
896
- // There is an awkward moment where jump forwards is
896
+ // FIXME There is an awkward moment where jump forwards is
897
897
// between 0x1000 and 0x1002 where the Arg oscillates
898
898
// between 2 and 4 bytes
899
- panic ("FIXME JUMP_FOWARDS size changed" )
899
+ panic ("FIXME compile: JUMP_FOWARDS size changed" )
900
900
}
901
901
}
0 commit comments