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

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

Issue 1235983002: [strong] class objects created in strong mode have their prototype frozen (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 5 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/ia32/full-codegen-ia32.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 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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 FeedbackVectorICSlot slot = FLAG_vector_stores 1197 FeedbackVectorICSlot slot = FLAG_vector_stores
1198 ? lit->GetNthSlot(store_slot_index++) 1198 ? lit->GetNthSlot(store_slot_index++)
1199 : FeedbackVectorICSlot::Invalid(); 1199 : FeedbackVectorICSlot::Invalid();
1200 EmitVariableAssignment(lit->class_variable_proxy()->var(), 1200 EmitVariableAssignment(lit->class_variable_proxy()->var(),
1201 Token::INIT_CONST, slot); 1201 Token::INIT_CONST, slot);
1202 } 1202 }
1203 1203
1204 // Verify that compilation exactly consumed the number of store ic slots 1204 // Verify that compilation exactly consumed the number of store ic slots
1205 // that the ClassLiteral node had to offer. 1205 // that the ClassLiteral node had to offer.
1206 DCHECK(!FLAG_vector_stores || store_slot_index == lit->slot_count()); 1206 DCHECK(!FLAG_vector_stores || store_slot_index == lit->slot_count());
1207
1208 if (is_strong(language_mode())) {
1209 // TODO(conradw): It would be more efficient to define the properties with
1210 // the right attributes the first time round.
1211 __ Push(result_register());
1212 __ CallRuntime(Runtime::kObjectFreeze, 1);
1213 }
1214 } 1207 }
1215 1208
1216 context()->Plug(result_register()); 1209 context()->Plug(result_register());
1217 } 1210 }
1218 1211
1219 1212
1220 void FullCodeGenerator::VisitNativeFunctionLiteral( 1213 void FullCodeGenerator::VisitNativeFunctionLiteral(
1221 NativeFunctionLiteral* expr) { 1214 NativeFunctionLiteral* expr) {
1222 Comment cmnt(masm_, "[ NativeFunctionLiteral"); 1215 Comment cmnt(masm_, "[ NativeFunctionLiteral");
1223 1216
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); 1470 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS);
1478 codegen_->scope_ = saved_scope_; 1471 codegen_->scope_ = saved_scope_;
1479 } 1472 }
1480 1473
1481 1474
1482 #undef __ 1475 #undef __
1483 1476
1484 1477
1485 } // namespace internal 1478 } // namespace internal
1486 } // namespace v8 1479 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698