| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 13484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13495 estimate += 8; | 13495 estimate += 8; |
| 13496 } | 13496 } |
| 13497 | 13497 |
| 13498 shared->set_expected_nof_properties(estimate); | 13498 shared->set_expected_nof_properties(estimate); |
| 13499 } | 13499 } |
| 13500 | 13500 |
| 13501 } // namespace | 13501 } // namespace |
| 13502 | 13502 |
| 13503 void SharedFunctionInfo::InitFromFunctionLiteral( | 13503 void SharedFunctionInfo::InitFromFunctionLiteral( |
| 13504 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { | 13504 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { |
| 13505 // When adding fields here, make sure Scope::AnalyzePartially is updated | 13505 // When adding fields here, make sure DeclarationScope::AnalyzePartially is |
| 13506 // accordingly. | 13506 // updated accordingly. |
| 13507 shared_info->set_length(lit->scope()->default_function_length()); | 13507 shared_info->set_length(lit->scope()->default_function_length()); |
| 13508 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); | 13508 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); |
| 13509 shared_info->set_function_token_position(lit->function_token_position()); | 13509 shared_info->set_function_token_position(lit->function_token_position()); |
| 13510 shared_info->set_start_position(lit->start_position()); | 13510 shared_info->set_start_position(lit->start_position()); |
| 13511 shared_info->set_end_position(lit->end_position()); | 13511 shared_info->set_end_position(lit->end_position()); |
| 13512 shared_info->set_is_declaration(lit->is_declaration()); | 13512 shared_info->set_is_declaration(lit->is_declaration()); |
| 13513 shared_info->set_is_named_expression(lit->is_named_expression()); | 13513 shared_info->set_is_named_expression(lit->is_named_expression()); |
| 13514 shared_info->set_is_anonymous_expression(lit->is_anonymous_expression()); | 13514 shared_info->set_is_anonymous_expression(lit->is_anonymous_expression()); |
| 13515 shared_info->set_inferred_name(*lit->inferred_name()); | 13515 shared_info->set_inferred_name(*lit->inferred_name()); |
| 13516 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); | 13516 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); |
| (...skipping 5821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19338 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, | 19338 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, |
| 19339 PrototypeIterator::END_AT_NULL); | 19339 PrototypeIterator::END_AT_NULL); |
| 19340 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { | 19340 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { |
| 19341 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; | 19341 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; |
| 19342 } | 19342 } |
| 19343 return false; | 19343 return false; |
| 19344 } | 19344 } |
| 19345 | 19345 |
| 19346 } // namespace internal | 19346 } // namespace internal |
| 19347 } // namespace v8 | 19347 } // namespace v8 |
| OLD | NEW |