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

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

Issue 2511603002: [ic] Support data handlers in LoadGlobalIC. (Closed)
Patch Set: fix Created 4 years, 1 month 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 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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 TypeofMode typeof_mode) { 501 TypeofMode typeof_mode) {
502 Variable* var = proxy->var(); 502 Variable* var = proxy->var();
503 DCHECK(var->IsUnallocated() || 503 DCHECK(var->IsUnallocated() ||
504 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); 504 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
505 __ Move(LoadDescriptor::NameRegister(), var->name()); 505 __ Move(LoadDescriptor::NameRegister(), var->name());
506 506
507 EmitLoadSlot(LoadGlobalDescriptor::SlotRegister(), 507 EmitLoadSlot(LoadGlobalDescriptor::SlotRegister(),
508 proxy->VariableFeedbackSlot()); 508 proxy->VariableFeedbackSlot());
509 Handle<Code> code = CodeFactory::LoadGlobalIC(isolate(), typeof_mode).code(); 509 Handle<Code> code = CodeFactory::LoadGlobalIC(isolate(), typeof_mode).code();
510 __ Call(code, RelocInfo::CODE_TARGET); 510 __ Call(code, RelocInfo::CODE_TARGET);
511 RestoreContext();
511 } 512 }
512 513
513 void FullCodeGenerator::VisitSloppyBlockFunctionStatement( 514 void FullCodeGenerator::VisitSloppyBlockFunctionStatement(
514 SloppyBlockFunctionStatement* declaration) { 515 SloppyBlockFunctionStatement* declaration) {
515 Visit(declaration->statement()); 516 Visit(declaration->statement());
516 } 517 }
517 518
518 519
519 int FullCodeGenerator::DeclareGlobalsFlags() { 520 int FullCodeGenerator::DeclareGlobalsFlags() {
520 return info_->GetDeclareGlobalsFlags(); 521 return info_->GetDeclareGlobalsFlags();
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 return info_->has_simple_parameters(); 1994 return info_->has_simple_parameters();
1994 } 1995 }
1995 1996
1996 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } 1997 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
1997 1998
1998 #undef __ 1999 #undef __
1999 2000
2000 2001
2001 } // namespace internal 2002 } // namespace internal
2002 } // namespace v8 2003 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/globals.h » ('j') | src/ic/accessor-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698