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

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

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased (w/ conflicts) Created 5 years, 10 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/full-codegen.h ('k') | src/globals.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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 440
441 441
442 void FullCodeGenerator::CallLoadIC(ContextualMode contextual_mode, 442 void FullCodeGenerator::CallLoadIC(ContextualMode contextual_mode,
443 TypeFeedbackId id) { 443 TypeFeedbackId id) {
444 Handle<Code> ic = CodeFactory::LoadIC(isolate(), contextual_mode).code(); 444 Handle<Code> ic = CodeFactory::LoadIC(isolate(), contextual_mode).code();
445 CallIC(ic, id); 445 CallIC(ic, id);
446 } 446 }
447 447
448 448
449 void FullCodeGenerator::CallStoreIC(TypeFeedbackId id) { 449 void FullCodeGenerator::CallStoreIC(TypeFeedbackId id) {
450 Handle<Code> ic = CodeFactory::StoreIC(isolate(), strict_mode()).code(); 450 Handle<Code> ic = CodeFactory::StoreIC(isolate(), language_mode()).code();
451 CallIC(ic, id); 451 CallIC(ic, id);
452 } 452 }
453 453
454 454
455 void FullCodeGenerator::RecordJSReturnSite(Call* call) { 455 void FullCodeGenerator::RecordJSReturnSite(Call* call) {
456 // We record the offset of the function return so we can rebuild the frame 456 // We record the offset of the function return so we can rebuild the frame
457 // if the function was inlined, i.e., this is the return address in the 457 // if the function was inlined, i.e., this is the return address in the
458 // inlined function's frame. 458 // inlined function's frame.
459 // 459 //
460 // The state is ignored. We defensively set it to TOS_REG, which is the 460 // The state is ignored. We defensively set it to TOS_REG, which is the
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 interface->Allocate(scope->module_var()->index()); 807 interface->Allocate(scope->module_var()->index());
808 int index = module_index_++; 808 int index = module_index_++;
809 809
810 Handle<ModuleInfo> description = 810 Handle<ModuleInfo> description =
811 ModuleInfo::Create(isolate(), interface, scope_); 811 ModuleInfo::Create(isolate(), interface, scope_);
812 modules_->set(index, *description); 812 modules_->set(index, *description);
813 } 813 }
814 814
815 815
816 int FullCodeGenerator::DeclareGlobalsFlags() { 816 int FullCodeGenerator::DeclareGlobalsFlags() {
817 DCHECK(DeclareGlobalsStrictMode::is_valid(strict_mode())); 817 DCHECK(DeclareGlobalsLanguageMode::is_valid(language_mode()));
818 return DeclareGlobalsEvalFlag::encode(is_eval()) | 818 return DeclareGlobalsEvalFlag::encode(is_eval()) |
819 DeclareGlobalsNativeFlag::encode(is_native()) | 819 DeclareGlobalsNativeFlag::encode(is_native()) |
820 DeclareGlobalsStrictMode::encode(strict_mode()); 820 DeclareGlobalsLanguageMode::encode(language_mode());
821 } 821 }
822 822
823 823
824 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { 824 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) {
825 CodeGenerator::RecordPositions(masm_, fun->start_position()); 825 CodeGenerator::RecordPositions(masm_, fun->start_position());
826 } 826 }
827 827
828 828
829 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { 829 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) {
830 CodeGenerator::RecordPositions(masm_, fun->end_position() - 1); 830 CodeGenerator::RecordPositions(masm_, fun->end_position() - 1);
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 } 1828 }
1829 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); 1829 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS);
1830 codegen_->scope_ = saved_scope_; 1830 codegen_->scope_ = saved_scope_;
1831 } 1831 }
1832 1832
1833 1833
1834 #undef __ 1834 #undef __
1835 1835
1836 1836
1837 } } // namespace v8::internal 1837 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698