Skip to content
Browse files

Initial shed impl.

  • Loading branch information...
1 parent 9fa64b5 commit 0b40ba89223133abf05b936e69549fcd23566eb7 @adamalix adamalix committed
Showing with 31 additions and 0 deletions.
  1. +31 −0 src/ljs/ljs_cesk.ml
View
31 src/ljs/ljs_cesk.ml
@@ -111,6 +111,35 @@ let string_of_kont k = match k with
| K.DataProp (_, _, _, _, _) -> "k.dataprop"
| K.AccProp (_, _, _, _, _, _) -> "k.accprop"
+let shed k = match k with
+ | K.SetBang (_, k) -> k
+ | K.GetAttr (_, _, _, k) -> k
+ | K.SetAttr (_, _, _, _, _, k) -> k
+ | K.GetObjAttr (_, k) -> k
+ | K.SetObjAttr (_, _, _, k) -> k
+ | K.GetField (_, _, _, _, _, _, _, k) -> k
+ | K.SetField (_, _, _, _, _, _, _, _, _, k) -> k
+ | K.OwnFieldNames (k) -> k
+ | K.DeleteField (_, _, _, k) -> k
+ | K.Op1 (_, k) -> k
+ | K.Op2 (_, _, _, k) -> k
+(* | K.Mt (k) -> k *)
+ | K.If (_, _, _, k) -> k
+ | K.App (_, _, _, _, _, _, k) -> k
+ | K.Seq (_, k) -> k
+ | K.Let (_, _, k) -> k
+ | K.Rec (_, _, k) -> k
+ | K.Break (_, k) -> k
+ | K.TryCatch (_, _, _, _, k) -> k
+ | K.TryFinally (_, _, _, k) -> k
+(* | K.Throw (k) -> k *)
+ | K.Eval (_, _, _, _, k) -> k
+ (* something cool here *)
+(* | K.Hint (k) -> k *)
+ | K.Object (_, _, _, k) -> k
+ | K.Attrs (_, _, _, _, _, k) -> k
+ | K.DataProp (_, _, _, _, k) -> k
+ | K.AccProp (_, _, _, _, _, k) -> k
(* from ljs_eval, let's move these to a util file eventuallly *)
let rec get_attr store attr obj field = match obj, field with
@@ -833,3 +862,5 @@ with
print_trace => bool *)
let eval_expr expr desugar print_trace =
continue_eval expr desugar print_trace IdMap.empty (Store.empty, Store.empty)
+
+

0 comments on commit 0b40ba8

Please sign in to comment.
Something went wrong with that request. Please try again.