Skip to content

Commit

Permalink
Implement functions for vm (#1433)
Browse files Browse the repository at this point in the history
- Separate builtin function from rust JavaScript function
 - Removed BuiltInFunction struct
  • Loading branch information
HalidOdat committed Oct 1, 2021
1 parent 7be421b commit aacdd12
Show file tree
Hide file tree
Showing 23 changed files with 1,446 additions and 713 deletions.
2 changes: 1 addition & 1 deletion boa/examples/closures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn main() -> Result<(), JsValue> {
// captures.
let js_function = FunctionBuilder::closure_with_captures(
&mut context,
|_, _, context, captures| {
|_, _, captures, context| {
println!("Called `createMessage`");
// We obtain the `name` property of `captures.object`
let name = captures.object.get("name", context)?;
Expand Down
4 changes: 2 additions & 2 deletions boa/src/builtins/array/array_iterator.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
builtins::{function::make_builtin_fn, iterable::create_iter_result_object, Array, JsValue},
builtins::{iterable::create_iter_result_object, Array, JsValue},
gc::{Finalize, Trace},
object::{JsObject, ObjectData},
object::{function::make_builtin_fn, JsObject, ObjectData},
property::{PropertyDescriptor, PropertyNameKind},
symbol::WellKnownSymbols,
BoaProfiler, Context, JsResult,
Expand Down

0 comments on commit aacdd12

Please sign in to comment.