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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 1290703002: Do not save script object on the class constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/ast-graph-builder.cc ('k') | src/heap/heap.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 } 1288 }
1289 1289
1290 if (lit->extends() != NULL) { 1290 if (lit->extends() != NULL) {
1291 VisitForStackValue(lit->extends()); 1291 VisitForStackValue(lit->extends());
1292 } else { 1292 } else {
1293 __ Push(isolate()->factory()->the_hole_value()); 1293 __ Push(isolate()->factory()->the_hole_value());
1294 } 1294 }
1295 1295
1296 VisitForStackValue(lit->constructor()); 1296 VisitForStackValue(lit->constructor());
1297 1297
1298 __ Push(script());
1299 __ Push(Smi::FromInt(lit->start_position())); 1298 __ Push(Smi::FromInt(lit->start_position()));
1300 __ Push(Smi::FromInt(lit->end_position())); 1299 __ Push(Smi::FromInt(lit->end_position()));
1301 1300
1302 __ CallRuntime(is_strong(language_mode()) ? Runtime::kDefineClassStrong 1301 __ CallRuntime(is_strong(language_mode()) ? Runtime::kDefineClassStrong
1303 : Runtime::kDefineClass, 1302 : Runtime::kDefineClass,
1304 6); 1303 5);
1305 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG); 1304 PrepareForBailoutForId(lit->CreateLiteralId(), TOS_REG);
1306 1305
1307 int store_slot_index = 0; 1306 int store_slot_index = 0;
1308 EmitClassDefineProperties(lit, &store_slot_index); 1307 EmitClassDefineProperties(lit, &store_slot_index);
1309 1308
1310 if (lit->scope() != NULL) { 1309 if (lit->scope() != NULL) {
1311 DCHECK_NOT_NULL(lit->class_variable_proxy()); 1310 DCHECK_NOT_NULL(lit->class_variable_proxy());
1312 FeedbackVectorICSlot slot = 1311 FeedbackVectorICSlot slot =
1313 FLAG_vector_stores && 1312 FLAG_vector_stores &&
1314 lit->class_variable_proxy()->var()->IsUnallocated() 1313 lit->class_variable_proxy()->var()->IsUnallocated()
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); 1586 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS);
1588 codegen_->scope_ = saved_scope_; 1587 codegen_->scope_ = saved_scope_;
1589 } 1588 }
1590 1589
1591 1590
1592 #undef __ 1591 #undef __
1593 1592
1594 1593
1595 } // namespace internal 1594 } // namespace internal
1596 } // namespace v8 1595 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698