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

Side by Side Diff: src/interpreter/bytecode-array-builder.cc

Issue 2510653002: [ic] Pass name to LoadGlobalIC again. (Closed)
Patch Set: Release 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
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 #include "src/globals.h" 7 #include "src/globals.h"
8 #include "src/interpreter/bytecode-array-writer.h" 8 #include "src/interpreter/bytecode-array-writer.h"
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" 9 #include "src/interpreter/bytecode-dead-code-optimizer.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 Register to) { 426 Register to) {
427 DCHECK(from != to); 427 DCHECK(from != to);
428 if (register_optimizer_) { 428 if (register_optimizer_) {
429 register_optimizer_->DoMov(from, to, CurrentSourcePosition(Bytecode::kMov)); 429 register_optimizer_->DoMov(from, to, CurrentSourcePosition(Bytecode::kMov));
430 } else { 430 } else {
431 OutputMov(from, to); 431 OutputMov(from, to);
432 } 432 }
433 return *this; 433 return *this;
434 } 434 }
435 435
436 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadGlobal(int feedback_slot, 436 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadGlobal(
437 TypeofMode typeof_mode) { 437 const Handle<String> name, int feedback_slot, TypeofMode typeof_mode) {
438 size_t name_index = GetConstantPoolEntry(name);
438 if (typeof_mode == INSIDE_TYPEOF) { 439 if (typeof_mode == INSIDE_TYPEOF) {
439 OutputLdaGlobalInsideTypeof(feedback_slot); 440 OutputLdaGlobalInsideTypeof(name_index, feedback_slot);
440 } else { 441 } else {
441 DCHECK_EQ(typeof_mode, NOT_INSIDE_TYPEOF); 442 DCHECK_EQ(typeof_mode, NOT_INSIDE_TYPEOF);
442 OutputLdaGlobal(feedback_slot); 443 OutputLdaGlobal(name_index, feedback_slot);
443 } 444 }
444 return *this; 445 return *this;
445 } 446 }
446 447
447 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal( 448 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal(
448 const Handle<String> name, int feedback_slot, LanguageMode language_mode) { 449 const Handle<String> name, int feedback_slot, LanguageMode language_mode) {
449 size_t name_index = GetConstantPoolEntry(name); 450 size_t name_index = GetConstantPoolEntry(name);
450 if (language_mode == SLOPPY) { 451 if (language_mode == SLOPPY) {
451 OutputStaGlobalSloppy(name_index, feedback_slot); 452 OutputStaGlobalSloppy(name_index, feedback_slot);
452 } else { 453 } else {
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 RegisterList reg_list) { 1009 RegisterList reg_list) {
1009 DCHECK(RegisterListIsValid(reg_list)); 1010 DCHECK(RegisterListIsValid(reg_list));
1010 if (register_optimizer_) 1011 if (register_optimizer_)
1011 register_optimizer_->PrepareOutputRegisterList(reg_list); 1012 register_optimizer_->PrepareOutputRegisterList(reg_list);
1012 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); 1013 return static_cast<uint32_t>(reg_list.first_register().ToOperand());
1013 } 1014 }
1014 1015
1015 } // namespace interpreter 1016 } // namespace interpreter
1016 } // namespace internal 1017 } // namespace internal
1017 } // namespace v8 1018 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698