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

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

Issue 1053063003: Make --always-opt also optimize top-level code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Skip failing tests. Created 5 years, 8 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 | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | src/hydrogen.cc » ('J')
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/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (info()->saves_caller_doubles()) { 173 if (info()->saves_caller_doubles()) {
174 SaveCallerDoubles(); 174 SaveCallerDoubles();
175 } 175 }
176 176
177 // Possibly allocate a local context. 177 // Possibly allocate a local context.
178 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 178 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
179 if (heap_slots > 0) { 179 if (heap_slots > 0) {
180 Comment(";;; Allocate local context"); 180 Comment(";;; Allocate local context");
181 bool need_write_barrier = true; 181 bool need_write_barrier = true;
182 // Argument to NewContext is the function, which is in r1. 182 // Argument to NewContext is the function, which is in r1.
183 DCHECK(!info()->scope()->is_script_scope());
183 if (heap_slots <= FastNewContextStub::kMaximumSlots) { 184 if (heap_slots <= FastNewContextStub::kMaximumSlots) {
184 FastNewContextStub stub(isolate(), heap_slots); 185 FastNewContextStub stub(isolate(), heap_slots);
185 __ CallStub(&stub); 186 __ CallStub(&stub);
186 // Result of FastNewContextStub is always in new space. 187 // Result of FastNewContextStub is always in new space.
187 need_write_barrier = false; 188 need_write_barrier = false;
188 } else { 189 } else {
189 __ push(r1); 190 __ push(r1);
190 __ CallRuntime(Runtime::kNewFunctionContext, 1); 191 __ CallRuntime(Runtime::kNewFunctionContext, 1);
191 } 192 }
192 RecordSafepoint(Safepoint::kNoLazyDeopt); 193 RecordSafepoint(Safepoint::kNoLazyDeopt);
(...skipping 5743 matching lines...) Expand 10 before | Expand all | Expand 10 after
5936 __ Push(scope_info); 5937 __ Push(scope_info);
5937 __ push(ToRegister(instr->function())); 5938 __ push(ToRegister(instr->function()));
5938 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5939 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5939 RecordSafepoint(Safepoint::kNoLazyDeopt); 5940 RecordSafepoint(Safepoint::kNoLazyDeopt);
5940 } 5941 }
5941 5942
5942 5943
5943 #undef __ 5944 #undef __
5944 5945
5945 } } // namespace v8::internal 5946 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698