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

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 441273002: Reland "Make --always-opt also optimize toplevel code." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Well, yeah. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/factory.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 if (info()->saves_caller_doubles()) { 682 if (info()->saves_caller_doubles()) {
683 SaveCallerDoubles(); 683 SaveCallerDoubles();
684 } 684 }
685 685
686 // Allocate a local context if needed. 686 // Allocate a local context if needed.
687 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 687 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
688 if (heap_slots > 0) { 688 if (heap_slots > 0) {
689 Comment(";;; Allocate local context"); 689 Comment(";;; Allocate local context");
690 bool need_write_barrier = true; 690 bool need_write_barrier = true;
691 // Argument to NewContext is the function, which is in x1. 691 // Argument to NewContext is the function, which is in x1.
692 if (heap_slots <= FastNewContextStub::kMaximumSlots) { 692 if (FLAG_harmony_scoping && info()->scope()->is_global_scope()) {
693 UseScratchRegisterScope temps(masm());
694 Register scope_info = temps.AcquireX();
695 __ Mov(scope_info, Operand(info()->scope()->GetScopeInfo()));
696 __ Push(x1, scope_info);
697 __ CallRuntime(Runtime::kNewGlobalContext, 2);
698 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
693 FastNewContextStub stub(isolate(), heap_slots); 699 FastNewContextStub stub(isolate(), heap_slots);
694 __ CallStub(&stub); 700 __ CallStub(&stub);
695 // Result of FastNewContextStub is always in new space. 701 // Result of FastNewContextStub is always in new space.
696 need_write_barrier = false; 702 need_write_barrier = false;
697 } else { 703 } else {
698 __ Push(x1); 704 __ Push(x1);
699 __ CallRuntime(Runtime::kNewFunctionContext, 1); 705 __ CallRuntime(Runtime::kNewFunctionContext, 1);
700 } 706 }
701 RecordSafepoint(Safepoint::kNoLazyDeopt); 707 RecordSafepoint(Safepoint::kNoLazyDeopt);
702 // Context is returned in x0. It replaces the context passed to us. It's 708 // Context is returned in x0. It replaces the context passed to us. It's
(...skipping 4316 matching lines...) Expand 10 before | Expand all | Expand 10 after
5019 void LCodeGen::DoDebugBreak(LDebugBreak* instr) { 5025 void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
5020 __ Debug("LDebugBreak", 0, BREAK); 5026 __ Debug("LDebugBreak", 0, BREAK);
5021 } 5027 }
5022 5028
5023 5029
5024 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { 5030 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
5025 DCHECK(ToRegister(instr->context()).is(cp)); 5031 DCHECK(ToRegister(instr->context()).is(cp));
5026 Register scratch1 = x5; 5032 Register scratch1 = x5;
5027 Register scratch2 = x6; 5033 Register scratch2 = x6;
5028 DCHECK(instr->IsMarkedAsCall()); 5034 DCHECK(instr->IsMarkedAsCall());
5029
5030 ASM_UNIMPLEMENTED_BREAK("DoDeclareGlobals");
5031 // TODO(all): if Mov could handle object in new space then it could be used 5035 // TODO(all): if Mov could handle object in new space then it could be used
5032 // here. 5036 // here.
5033 __ LoadHeapObject(scratch1, instr->hydrogen()->pairs()); 5037 __ LoadHeapObject(scratch1, instr->hydrogen()->pairs());
5034 __ Mov(scratch2, Smi::FromInt(instr->hydrogen()->flags())); 5038 __ Mov(scratch2, Smi::FromInt(instr->hydrogen()->flags()));
5035 __ Push(cp, scratch1, scratch2); // The context is the first argument. 5039 __ Push(cp, scratch1, scratch2); // The context is the first argument.
5036 CallRuntime(Runtime::kDeclareGlobals, 3, instr); 5040 CallRuntime(Runtime::kDeclareGlobals, 3, instr);
5037 } 5041 }
5038 5042
5039 5043
5040 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { 5044 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
6046 Handle<ScopeInfo> scope_info = instr->scope_info(); 6050 Handle<ScopeInfo> scope_info = instr->scope_info();
6047 __ Push(scope_info); 6051 __ Push(scope_info);
6048 __ Push(ToRegister(instr->function())); 6052 __ Push(ToRegister(instr->function()));
6049 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6053 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6050 RecordSafepoint(Safepoint::kNoLazyDeopt); 6054 RecordSafepoint(Safepoint::kNoLazyDeopt);
6051 } 6055 }
6052 6056
6053 6057
6054 6058
6055 } } // namespace v8::internal 6059 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698