@@ -675,9 +675,6 @@ class TemporaryScope BASE_EMBEDDED {
675
675
}
676
676
int materialized_literal_count () { return materialized_literal_count_; }
677
677
678
- void set_contains_array_literal () { contains_array_literal_ = true ; }
679
- bool contains_array_literal () { return contains_array_literal_; }
680
-
681
678
void SetThisPropertyAssignmentInfo (
682
679
bool only_this_property_assignments,
683
680
bool only_simple_this_property_assignments,
@@ -700,17 +697,11 @@ class TemporaryScope BASE_EMBEDDED {
700
697
void AddProperty () { expected_property_count_++; }
701
698
int expected_property_count () { return expected_property_count_; }
702
699
private:
703
- // Captures the number of nodes that need materialization in the
704
- // function. regexp literals, and boilerplate for object literals.
700
+ // Captures the number of literals that need materialization in the
701
+ // function. Includes regexp literals, and boilerplate for object
702
+ // and array literals.
705
703
int materialized_literal_count_;
706
704
707
- // Captures whether or not the function contains array literals. If
708
- // the function contains array literals, we have to allocate space
709
- // for the array constructor in the literals array of the function.
710
- // This array constructor is used when creating the actual array
711
- // literals.
712
- bool contains_array_literal_;
713
-
714
705
// Properties count estimation.
715
706
int expected_property_count_;
716
707
@@ -728,7 +719,6 @@ class TemporaryScope BASE_EMBEDDED {
728
719
729
720
TemporaryScope::TemporaryScope (Parser* parser)
730
721
: materialized_literal_count_(0 ),
731
- contains_array_literal_(false ),
732
722
expected_property_count_(0 ),
733
723
only_this_property_assignments_(false ),
734
724
only_simple_this_property_assignments_(false ),
@@ -1236,7 +1226,6 @@ FunctionLiteral* Parser::ParseProgram(Handle<String> source,
1236
1226
top_scope_,
1237
1227
body.elements (),
1238
1228
temp_scope.materialized_literal_count (),
1239
- temp_scope.contains_array_literal (),
1240
1229
temp_scope.expected_property_count (),
1241
1230
temp_scope.only_this_property_assignments (),
1242
1231
temp_scope.only_simple_this_property_assignments (),
@@ -1903,7 +1892,7 @@ Statement* Parser::ParseNativeDeclaration(bool* ok) {
1903
1892
const int literals = fun->NumberOfLiterals ();
1904
1893
Handle <Code> code = Handle <Code>(fun->shared ()->code ());
1905
1894
Handle <JSFunction> boilerplate =
1906
- Factory::NewFunctionBoilerplate (name, literals, false , code);
1895
+ Factory::NewFunctionBoilerplate (name, literals, code);
1907
1896
1908
1897
// Copy the function data to the boilerplate. Used by
1909
1898
// builtins.cc:HandleApiCall to perform argument type checks and to
@@ -3306,7 +3295,6 @@ Expression* Parser::ParseArrayLiteral(bool* ok) {
3306
3295
Expect (Token::RBRACK, CHECK_OK);
3307
3296
3308
3297
// Update the scope information before the pre-parsing bailout.
3309
- temp_scope_->set_contains_array_literal ();
3310
3298
int literal_index = temp_scope_->NextMaterializedLiteralIndex ();
3311
3299
3312
3300
if (is_pre_parsing_) return NULL ;
@@ -3636,7 +3624,6 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> var_name,
3636
3624
3637
3625
int materialized_literal_count;
3638
3626
int expected_property_count;
3639
- bool contains_array_literal;
3640
3627
bool only_this_property_assignments;
3641
3628
bool only_simple_this_property_assignments;
3642
3629
Handle <FixedArray> this_property_assignments;
@@ -3650,12 +3637,10 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> var_name,
3650
3637
only_this_property_assignments = false ;
3651
3638
only_simple_this_property_assignments = false ;
3652
3639
this_property_assignments = Factory::empty_fixed_array ();
3653
- contains_array_literal = entry.contains_array_literal ();
3654
3640
} else {
3655
3641
ParseSourceElements (&body, Token::RBRACE, CHECK_OK);
3656
3642
materialized_literal_count = temp_scope.materialized_literal_count ();
3657
3643
expected_property_count = temp_scope.expected_property_count ();
3658
- contains_array_literal = temp_scope.contains_array_literal ();
3659
3644
only_this_property_assignments =
3660
3645
temp_scope.only_this_property_assignments ();
3661
3646
only_simple_this_property_assignments =
@@ -3671,15 +3656,13 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> var_name,
3671
3656
entry.set_end_pos (end_pos);
3672
3657
entry.set_literal_count (materialized_literal_count);
3673
3658
entry.set_property_count (expected_property_count);
3674
- entry.set_contains_array_literal (contains_array_literal);
3675
3659
}
3676
3660
3677
3661
FunctionLiteral* function_literal =
3678
3662
NEW (FunctionLiteral (name,
3679
3663
top_scope_,
3680
3664
body.elements (),
3681
3665
materialized_literal_count,
3682
- contains_array_literal,
3683
3666
expected_property_count,
3684
3667
only_this_property_assignments,
3685
3668
only_simple_this_property_assignments,
0 commit comments