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

Side by Side Diff: src/objects.cc

Issue 1191973004: 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
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 10547 matching lines...) Expand 10 before | Expand all | Expand 10 after
10558 PrintF("[disabled optimization for "); 10558 PrintF("[disabled optimization for ");
10559 ShortPrint(); 10559 ShortPrint();
10560 PrintF(", reason: %s]\n", GetBailoutReason(reason)); 10560 PrintF(", reason: %s]\n", GetBailoutReason(reason));
10561 } 10561 }
10562 } 10562 }
10563 10563
10564 10564
10565 void SharedFunctionInfo::InitFromFunctionLiteral( 10565 void SharedFunctionInfo::InitFromFunctionLiteral(
10566 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { 10566 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) {
10567 shared_info->set_length(lit->scope()->default_function_length()); 10567 shared_info->set_length(lit->scope()->default_function_length());
10568 if (IsSubclassConstructor(lit->kind())) { 10568 if (IsSubclassConstructor(lit->kind()) ||
10569 lit->scope()->new_target_var() != nullptr) {
10569 shared_info->set_internal_formal_parameter_count(lit->parameter_count() + 10570 shared_info->set_internal_formal_parameter_count(lit->parameter_count() +
10570 1); 10571 1);
10571 } else { 10572 } else {
10572 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); 10573 shared_info->set_internal_formal_parameter_count(lit->parameter_count());
10573 } 10574 }
10574 shared_info->set_function_token_position(lit->function_token_position()); 10575 shared_info->set_function_token_position(lit->function_token_position());
10575 shared_info->set_start_position(lit->start_position()); 10576 shared_info->set_start_position(lit->start_position());
10576 shared_info->set_end_position(lit->end_position()); 10577 shared_info->set_end_position(lit->end_position());
10577 shared_info->set_is_expression(lit->is_expression()); 10578 shared_info->set_is_expression(lit->is_expression());
10578 shared_info->set_is_anonymous(lit->is_anonymous()); 10579 shared_info->set_is_anonymous(lit->is_anonymous());
(...skipping 6083 matching lines...) Expand 10 before | Expand all | Expand 10 after
16662 Handle<Object> new_value) { 16663 Handle<Object> new_value) {
16663 if (cell->value() != *new_value) { 16664 if (cell->value() != *new_value) {
16664 cell->set_value(*new_value); 16665 cell->set_value(*new_value);
16665 Isolate* isolate = cell->GetIsolate(); 16666 Isolate* isolate = cell->GetIsolate();
16666 cell->dependent_code()->DeoptimizeDependentCodeGroup( 16667 cell->dependent_code()->DeoptimizeDependentCodeGroup(
16667 isolate, DependentCode::kPropertyCellChangedGroup); 16668 isolate, DependentCode::kPropertyCellChangedGroup);
16668 } 16669 }
16669 } 16670 }
16670 } // namespace internal 16671 } // namespace internal
16671 } // namespace v8 16672 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/scopes.cc » ('j') | test/mjsunit/harmony/new-target.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698