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

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

Issue 429583002: Revert "Make --always-opt also optimize toplevel code." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 (FLAG_harmony_scoping && info()->scope()->is_global_scope()) { 692 if (heap_slots <= FastNewContextStub::kMaximumSlots) {
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) {
699 FastNewContextStub stub(isolate(), heap_slots); 693 FastNewContextStub stub(isolate(), heap_slots);
700 __ CallStub(&stub); 694 __ CallStub(&stub);
701 // Result of FastNewContextStub is always in new space. 695 // Result of FastNewContextStub is always in new space.
702 need_write_barrier = false; 696 need_write_barrier = false;
703 } else { 697 } else {
704 __ Push(x1); 698 __ Push(x1);
705 __ CallRuntime(Runtime::kNewFunctionContext, 1); 699 __ CallRuntime(Runtime::kNewFunctionContext, 1);
706 } 700 }
707 RecordSafepoint(Safepoint::kNoLazyDeopt); 701 RecordSafepoint(Safepoint::kNoLazyDeopt);
708 // Context is returned in x0. It replaces the context passed to us. It's 702 // 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
5025 void LCodeGen::DoDebugBreak(LDebugBreak* instr) { 5019 void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
5026 __ Debug("LDebugBreak", 0, BREAK); 5020 __ Debug("LDebugBreak", 0, BREAK);
5027 } 5021 }
5028 5022
5029 5023
5030 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { 5024 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
5031 ASSERT(ToRegister(instr->context()).is(cp)); 5025 ASSERT(ToRegister(instr->context()).is(cp));
5032 Register scratch1 = x5; 5026 Register scratch1 = x5;
5033 Register scratch2 = x6; 5027 Register scratch2 = x6;
5034 ASSERT(instr->IsMarkedAsCall()); 5028 ASSERT(instr->IsMarkedAsCall());
5029
5030 ASM_UNIMPLEMENTED_BREAK("DoDeclareGlobals");
5035 // TODO(all): if Mov could handle object in new space then it could be used 5031 // TODO(all): if Mov could handle object in new space then it could be used
5036 // here. 5032 // here.
5037 __ LoadHeapObject(scratch1, instr->hydrogen()->pairs()); 5033 __ LoadHeapObject(scratch1, instr->hydrogen()->pairs());
5038 __ Mov(scratch2, Smi::FromInt(instr->hydrogen()->flags())); 5034 __ Mov(scratch2, Smi::FromInt(instr->hydrogen()->flags()));
5039 __ Push(cp, scratch1, scratch2); // The context is the first argument. 5035 __ Push(cp, scratch1, scratch2); // The context is the first argument.
5040 CallRuntime(Runtime::kDeclareGlobals, 3, instr); 5036 CallRuntime(Runtime::kDeclareGlobals, 3, instr);
5041 } 5037 }
5042 5038
5043 5039
5044 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { 5040 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
6050 Handle<ScopeInfo> scope_info = instr->scope_info(); 6046 Handle<ScopeInfo> scope_info = instr->scope_info();
6051 __ Push(scope_info); 6047 __ Push(scope_info);
6052 __ Push(ToRegister(instr->function())); 6048 __ Push(ToRegister(instr->function()));
6053 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6049 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6054 RecordSafepoint(Safepoint::kNoLazyDeopt); 6050 RecordSafepoint(Safepoint::kNoLazyDeopt);
6055 } 6051 }
6056 6052
6057 6053
6058 6054
6059 } } // namespace v8::internal 6055 } } // 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