Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Side by Side Diff: src/objects.cc

Issue 1188383002: Work In Progress: support new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler.cc ('k') | src/scopes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10517 matching lines...) Expand 10 before | Expand all | Expand 10 after
10528 PrintF("[disabled optimization for "); 10528 PrintF("[disabled optimization for ");
10529 ShortPrint(); 10529 ShortPrint();
10530 PrintF(", reason: %s]\n", GetBailoutReason(reason)); 10530 PrintF(", reason: %s]\n", GetBailoutReason(reason));
10531 } 10531 }
10532 } 10532 }
10533 10533
10534 10534
10535 void SharedFunctionInfo::InitFromFunctionLiteral( 10535 void SharedFunctionInfo::InitFromFunctionLiteral(
10536 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { 10536 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) {
10537 shared_info->set_length(lit->scope()->default_function_length()); 10537 shared_info->set_length(lit->scope()->default_function_length());
10538 if (IsSubclassConstructor(lit->kind())) { 10538 if (IsSubclassConstructor(lit->kind()) ||
10539 lit->scope()->new_target_var() != nullptr) {
10539 shared_info->set_internal_formal_parameter_count(lit->parameter_count() + 10540 shared_info->set_internal_formal_parameter_count(lit->parameter_count() +
10540 1); 10541 1);
10541 } else { 10542 } else {
10542 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); 10543 shared_info->set_internal_formal_parameter_count(lit->parameter_count());
10543 } 10544 }
10544 shared_info->set_function_token_position(lit->function_token_position()); 10545 shared_info->set_function_token_position(lit->function_token_position());
10545 shared_info->set_start_position(lit->start_position()); 10546 shared_info->set_start_position(lit->start_position());
10546 shared_info->set_end_position(lit->end_position()); 10547 shared_info->set_end_position(lit->end_position());
10547 shared_info->set_is_expression(lit->is_expression()); 10548 shared_info->set_is_expression(lit->is_expression());
10548 shared_info->set_is_anonymous(lit->is_anonymous()); 10549 shared_info->set_is_anonymous(lit->is_anonymous());
(...skipping 6076 matching lines...) Expand 10 before | Expand all | Expand 10 after
16625 Handle<Object> new_value) { 16626 Handle<Object> new_value) {
16626 if (cell->value() != *new_value) { 16627 if (cell->value() != *new_value) {
16627 cell->set_value(*new_value); 16628 cell->set_value(*new_value);
16628 Isolate* isolate = cell->GetIsolate(); 16629 Isolate* isolate = cell->GetIsolate();
16629 cell->dependent_code()->DeoptimizeDependentCodeGroup( 16630 cell->dependent_code()->DeoptimizeDependentCodeGroup(
16630 isolate, DependentCode::kPropertyCellChangedGroup); 16631 isolate, DependentCode::kPropertyCellChangedGroup);
16631 } 16632 }
16632 } 16633 }
16633 } // namespace internal 16634 } // namespace internal
16634 } // namespace v8 16635 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698