Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Ann: ada binding to v8(google javascript engine)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kylix  
View profile  
 More options Jan 23, 6:44 am
Newsgroups: comp.lang.ada
From: Kylix <lika...@gmail.com>
Date: Mon, 23 Jan 2012 03:44:18 -0800 (PST)
Local: Mon, Jan 23 2012 6:44 am
Subject: Ann: ada binding to v8(google javascript engine)
I made a binding to v8(google javascript engine), with some examples,
such as a simple shell:
   procedure Shell is
      p : v8.Class_Handle_Scope.Handle_Scope;
      pragma Unreferenced (p);
      c      : v8.Class_Context.Handles.Persistent :=
v8.Class_Context.Create;
      cs     : v8.Class_Context.Scope (c.As_Object);
      ver    : v8.Class_String.Pointer := v8.Class_String.Create
(v8.Class_V8.Get_Version);
      tc     : v8.Class_Try_Catch.Holder;
      pragma Warnings (Off);
   begin
      loop
         Ada.Text_IO.Put("input code to execute or enter exit:");
         declare
            code : String := Ada.Text_IO.Get_Line;
            bin  : v8.Class_Script_Data.Pointer;
         begin
            exit when code = "exit";
            bin := v8.Class_Script_Data.Pre_Compile (code);
            if not bin.Has_Error then
               declare
                  js     : v8.CLass_Script.Pointer :=
v8.Class_Script.Compile (source => v8.Class_String.Create (code),
pre_data => bin);
                  result : v8.Class_Value.Pointer := js.Run;
                  use type v8.Class_Value.Pointer;
               begin
                  if result /= null then
                     Show_Result(result);
                  else
                     Ada.Text_IO.Put_Line
(int'Image(tc.Message.Get_Line_Number));
                     tc.Reset;
                  end if;
               end;
            end if;
            bin.Free;
         end;
      end loop;
   end Shell;

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kylix  
View profile  
 More options Jan 23, 6:47 am
Newsgroups: comp.lang.ada
From: Kylix <lika...@gmail.com>
Date: Mon, 23 Jan 2012 03:47:59 -0800 (PST)
Local: Mon, Jan 23 2012 6:47 am
Subject: Re: Ann: ada binding to v8(google javascript engine)
the project url is :
http://code.google.com/p/v8a/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »