Methods and systems for evaluating bytecode in an on-demand service environment including translation of apex to bytecode

US10452363B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10452363-B2
Application numberUS-201514807781-A
CountryUS
Kind codeB2
Filing dateJul 23, 2015
Priority dateApr 21, 2010
Publication dateOct 22, 2019
Grant dateOct 22, 2019

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Techniques and mechanisms for conversion of code of a first type to bytecode. Apex provides various unique characteristics. When converting to bytecode, these characteristics are handled to provide bytecode functionality. Some of the unique characteristics of Apex include Autoboxing, SOQL, Properties, Comparisons, Modifiers, Code coverage mechanisms and Sharing mechanisms.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: receiving, with one or more processors, code conforming to a first programming language wherein the code conforming to the first programming language comprises on demand platform code capable of running without client-side servers or software where all values are reference types, the first programming language to be implemented as an abstract syntax tree (AST)-based language supporting an in-line version of a database query language, wherein the code conforming to the first programming language comprises at least a database query; generating code conforming to a second programming language, wherein the code is a compiled AST bytecode of the code conforming to the first programming language, wherein the generating comprises: generating a plurality of constructs for each property; tracking each property with a tuple; generating a closure method with the property; for the database query in the first programming language, wherein the database query includes one or more expressions, performing the steps of: unboxing the expression; evaluating the one or more expressions to generate a results; and storing results of the evolution in one or more temporary variables; rewriting the form of the database query to refer to the one or more temporary variables; and compiling the rewritten database query; emitting the rewritten database query as a method invocation with a stringized form of the query; storing a rewritten database query in a distributed caching system; and executing the rewritten database query within an execution environment to provide functionality corresponding to the code conforming to the first programming language. 2. The method of claim 1 further comprising: identifying intermediate values; and eliminating boxing and unboxing for the intermediate values. 3. A method comprising: receiving, with one or more processors, code conforming to a first programming language wherein the code conforming to the first programming language comprises on demand platform code capable of running without client-side servers or software where all values are reference types, the first programming language to be implemented as an abstract syntax tree (AST)-based language supporting an in-line version of a database query language, wherein the code conforming to the first programming language comprises at least a database query; generating code conforming to a second programming language, wherein the code is a compiled AST bytecode of the code conforming to the first programming language, wherein the generating comprises: generating a plurality of constructs for each property; tracking each property with a tuple; generating a closure method with the property; invoking the closure method; revoking the closure method; for the database query in the first programming language, wherein the database query includes one or more expressions, performing the steps of: unboxing the expression; evaluating the one or more expressions to generate a results; and storing results of the evolution in one or more temporary variables; rewriting the form of the database query to refer to the one or more temporary variables; and compiling the rewritten database query; emitting the rewritten database query as a method invocation with a stringized form of the query; storing a rewritten database query in a distributed caching system; and executing the rewritten database query within an execution environment to provide functionality corresponding to the code conforming to the first programming language. 4. The method of claim 3 wherein the plurality of constructs comprise: a field of a same type as the property on a type that defines the property; a setter method that includes code to set the field; and a getter method to get the field. 5. An article comprising a non-transitory computer-readable medium having stored thereon instructions that, when executed, cause one or more processors in a multitenant environment to: receiving, with one or more processors, code conforming to a first programming language wherein the code conforming to the first programming language comprises on demand platform code capable of running without client-side servers or software where all values are reference types, the first programming language to be implemented as an abstract syntax tree (AST)-based language supporting an in-line version of a database query language, wherein the code conforming to the first programming language comprises at least a database query; generating code conforming to a second programming language, wherein the code is a compiled AST bytecode of the code conforming to the first programming language, wherein the generating comprises: generating a plurality of constructs for each property; tracking each property with a tuple; generating a closure method with the property; for the database query in the first programming language, wherein the database query includes one or more expressions, performing the steps of: unboxing the expression; evaluating the one or more expressions to generate a results; and storing results of the evolution in one or more temporary variables; rewriting the form of the database query to refer to the one or more temporary variables; and compiling the rewritten database query; emitting the rewritten database query as a method invocation with a stringized form of the query; storing a rewritten database query in a distributed caching system; and executing the rewritten database query within an execution environment to provide functionality corresponding to the code conforming to the first programming language. 6. The article of claim 5 further comprising instructions that, when executed, cause the one or more processors to: identify intermediate values; and eliminate boxing and unboxing for the intermediate values. 7. An article comprising a non-transitory computer-readable medium having stored thereon instructions that, when executed, cause one or more processors in a multitenant environment to: receiving code conforming to a first programming language wherein the code conforming to the first programming language comprises on demand platform code capable of running without client-side servers or software where all values are reference types, the first programming language to be implemented as an abstract syntax tree (AST)-based language supporting an in-line version of a database query language, wherein the code conforming to the first programming language comprises at least a database query; generating code conforming to a second programming language, wherein the code is a compiled AST bytecode of the code conforming to the first programming language, wherein the generating comprises: generating a plurality of constructs for each property; tracking each property with a tuple; generating a closure method with the property; invoking the closure method; revoking the closure method; for the database query in the first programming language, wherein the database query includes one or more expressions, performing the steps of: unboxing the expression; evaluating the one or more expressions to generate a results; and storing results of the evolution in one or more temporary variables; rewriting the form of the database query to refer to the one or more temporary variables; and compiling the rewritten database query; emitting the rewritten database query as a method invocation with a stringized form of the query; storing a rewritten database query in a distributed caching system; and executing the rewritten database query within an execution environment to provide functionality corresponding to the code conforming to the first programming language.

Assignees

Inventors

Classifications

  • Query processing · CPC title

  • G06F8/41Primary

    Compilation · CPC title

  • with dedicated cache, e.g. instruction or stack · CPC title

  • Remote execution · CPC title

  • G06F9/5027Primary

    the resource being a machine, e.g. CPUs, Servers, Terminals · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10452363B2 cover?
Techniques and mechanisms for conversion of code of a first type to bytecode. Apex provides various unique characteristics. When converting to bytecode, these characteristics are handled to provide bytecode functionality. Some of the unique characteristics of Apex include Autoboxing, SOQL, Properties, Comparisons, Modifiers, Code coverage mechanisms and Sharing mechanisms.
Who is the assignee on this patent?
Salesforce Com Inc
What technology area does this patent fall under?
Primary CPC classification G06F8/41. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Oct 22 2019 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).