IP Library Granted Patent US 10,635,421
Granted Patent B2
US 10,635,421 · App. 15/742,740 · Granted Apr 28, 2020

Electronic device, compiling method and computer-readable recording medium

Inventors: Jae-man Park (Suwon-si, KR); Jun-young Cho (Gunpo-si, KR); Young-il Choi (Seoul, KR)
Assignee: Samsung Electronics Co., Ltd.
G06F8/53G06F8/30G06F8/41G06F8/42G06F8/43G06F8/49G06F9/4552G06F9/45529
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,635,421
App. No.
15/742,740
Granted
Apr 28, 2020
Kind
B2
Abstract

The present invention relates to an electronic device, a compiling method, and a computer-readable recording medium. An electronic device according to an embodiment of the present invention compiles a source code of a dynamic programming language compiled during execution of a program to the level of a static programming language compiled before execution, and may comprise a processor which determines whether the source code of the dynamic programming language generated when a command for operating the program is received can be processed by the first compiler in the same manner as the source code of the static programming language processing, and converts the source code of the dynamic programming language by the first compiler if the code can be processed as a result of the determination.

Claims (30)

1. A method for compiling a source code of a dynamic programming language compiled during program execution to a level of a static programming language compiled before program execution, the method comprising:

tokenizing and decomposing a source code of the dynamic programming language and forming a decomposed partial code into a tree form;

identifying, based on the decomposed partial code containing a function (func) relating to a command and a variable depending on the function, whether a type of the variable is changed with regard to an identical variable in the source code corresponding to the command;

identifying, based on the type of the variable being maintained, whether the decomposed partial code includes a syntax in conformity with a first compiler by identifying whether the function is compilable by the first compiler;

identifying that converting is available based on the syntax of the decomposed partial code being in conformity with the first compiler;

converting the decomposed partial code by the first compiler and outputting the converted partial code based on the converting being available as a result of the identifying; and

converting the decomposed partial code by a second compiler and outputting the converted partial code based on the converting being not available as a result of the identifying.

2. The method as claimed in claim 1 ,

wherein the first compiler comprises a compiler in which Ahead-of Time Compilation (AOTC) is available, and

wherein the second compiler comprises a compiler in which Just-in-Time Compilation (JITC) is available.

3. The method as claimed in claim 1 ,

wherein the identifying whether the decomposed partial code is converted by the first compiler comprises analyzing the decomposed partial code formed in the tree form and identifying whether conversion by the first compiler is available.

4. An electronic device for compiling a source code of a dynamic programming language compiled during program execution to a level of a static programming language compiled before program execution, comprising:

a processor configured to:

tokenize and decompose a source code of the dynamic programming language,

form a decomposed partial code into a tree form,

identify, based on the decomposed partial code containing a function (func) relating to a command and a variable depending on the function, whether a type of the variable is changed with regard to an identical variable in the source code corresponding to the command,

identify, based on the type of the variable being maintained, whether the decomposed partial code includes a syntax in conformity with a first compiler by identifying whether the function is compilable by the first compiler,

identify that converting is available based on the syntax of the decomposed partial code being in conformity with the first compiler,

convert the decomposed partial code by the first compiler based on the converting being available as a result of identification, and

convert the decomposed partial code of the dynamic programming language by a second compiler and outputting the converted partial code based on the converting being not available as a result of the identifying.

5. The electronic device as claimed in claim 4 ,

wherein the first compiler comprises a compiler in which Ahead-of Time Compilation (AOTC) is available, and

wherein the second compiler comprises a compiler in which Just-in-Time Compilation (JITC) is available.

6. The electronic device as claimed in claim 4 , wherein the processor is further configured to:

analyze the decomposed partial code formed in the tree form, and

identify whether conversion by the first compiler is available.

7. The electronic device as claimed in claim 4 , wherein the processor, when a syntax of a predetermined language does not exist in the decomposed partial code, is further configured to identify that a syntax of the decomposed partial code is in conformity with the first compiler.

8. The electronic device as claimed in claim 7 , wherein the syntax of the predetermined language comprises a specific function designated by a user or a system designer.

9. The electronic device as claimed in claim 8 , wherein the designated specific function comprises a function ‘eval(uate)’.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 8, 2018
From: PARK, JAE-MAN; CHOI, YOUNG-IL
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 044563/0522 →
Priority Claims (1)
KR 10-2015-0108276 · Jul 30, 2015 · national
Continuity (1)
Related Publication 20180203678A1 · Jul 19, 2018
Cited By (1)
US 12,373,678