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

Side by Side Diff: src/x64/lithium-codegen-x64.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
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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 SaveCallerDoubles(); 188 SaveCallerDoubles();
189 } 189 }
190 } 190 }
191 191
192 // Possibly allocate a local context. 192 // Possibly allocate a local context.
193 int heap_slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 193 int heap_slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
194 if (heap_slots > 0) { 194 if (heap_slots > 0) {
195 Comment(";;; Allocate local context"); 195 Comment(";;; Allocate local context");
196 bool need_write_barrier = true; 196 bool need_write_barrier = true;
197 // Argument to NewContext is the function, which is still in rdi. 197 // Argument to NewContext is the function, which is still in rdi.
198 DCHECK(!info()->scope()->is_script_scope());
198 if (heap_slots <= FastNewContextStub::kMaximumSlots) { 199 if (heap_slots <= FastNewContextStub::kMaximumSlots) {
199 FastNewContextStub stub(isolate(), heap_slots); 200 FastNewContextStub stub(isolate(), heap_slots);
200 __ CallStub(&stub); 201 __ CallStub(&stub);
201 // Result of FastNewContextStub is always in new space. 202 // Result of FastNewContextStub is always in new space.
202 need_write_barrier = false; 203 need_write_barrier = false;
203 } else { 204 } else {
204 __ Push(rdi); 205 __ Push(rdi);
205 __ CallRuntime(Runtime::kNewFunctionContext, 1); 206 __ CallRuntime(Runtime::kNewFunctionContext, 1);
206 } 207 }
207 RecordSafepoint(Safepoint::kNoLazyDeopt); 208 RecordSafepoint(Safepoint::kNoLazyDeopt);
(...skipping 5725 matching lines...) Expand 10 before | Expand all | Expand 10 after
5933 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5934 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5934 RecordSafepoint(Safepoint::kNoLazyDeopt); 5935 RecordSafepoint(Safepoint::kNoLazyDeopt);
5935 } 5936 }
5936 5937
5937 5938
5938 #undef __ 5939 #undef __
5939 5940
5940 } } // namespace v8::internal 5941 } } // namespace v8::internal
5941 5942
5942 #endif // V8_TARGET_ARCH_X64 5943 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698