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

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

Issue 410153002: Make --always-opt also optimize toplevel code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jacob Bramley. 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/mips/lithium-codegen-mips.cc ('k') | test/cctest/test-api.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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 SaveCallerDoubles(); 186 SaveCallerDoubles();
187 } 187 }
188 } 188 }
189 189
190 // Possibly allocate a local context. 190 // Possibly allocate a local context.
191 int heap_slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 191 int heap_slots = info_->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
192 if (heap_slots > 0) { 192 if (heap_slots > 0) {
193 Comment(";;; Allocate local context"); 193 Comment(";;; Allocate local context");
194 bool need_write_barrier = true; 194 bool need_write_barrier = true;
195 // Argument to NewContext is the function, which is still in rdi. 195 // Argument to NewContext is the function, which is still in rdi.
196 if (heap_slots <= FastNewContextStub::kMaximumSlots) { 196 if (FLAG_harmony_scoping && info()->scope()->is_global_scope()) {
197 __ Push(rdi);
198 __ Push(info()->scope()->GetScopeInfo());
199 __ CallRuntime(Runtime::kNewGlobalContext, 2);
200 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
197 FastNewContextStub stub(isolate(), heap_slots); 201 FastNewContextStub stub(isolate(), heap_slots);
198 __ CallStub(&stub); 202 __ CallStub(&stub);
199 // Result of FastNewContextStub is always in new space. 203 // Result of FastNewContextStub is always in new space.
200 need_write_barrier = false; 204 need_write_barrier = false;
201 } else { 205 } else {
202 __ Push(rdi); 206 __ Push(rdi);
203 __ CallRuntime(Runtime::kNewFunctionContext, 1); 207 __ CallRuntime(Runtime::kNewFunctionContext, 1);
204 } 208 }
205 RecordSafepoint(Safepoint::kNoLazyDeopt); 209 RecordSafepoint(Safepoint::kNoLazyDeopt);
206 // Context is returned in rax. It replaces the context passed to us. 210 // Context is returned in rax. It replaces the context passed to us.
(...skipping 5653 matching lines...) Expand 10 before | Expand all | Expand 10 after
5860 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5864 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5861 RecordSafepoint(Safepoint::kNoLazyDeopt); 5865 RecordSafepoint(Safepoint::kNoLazyDeopt);
5862 } 5866 }
5863 5867
5864 5868
5865 #undef __ 5869 #undef __
5866 5870
5867 } } // namespace v8::internal 5871 } } // namespace v8::internal
5868 5872
5869 #endif // V8_TARGET_ARCH_X64 5873 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698