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

Side by Side Diff: src/mips/lithium-codegen-mips.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/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (info()->saves_caller_doubles()) { 193 if (info()->saves_caller_doubles()) {
194 SaveCallerDoubles(); 194 SaveCallerDoubles();
195 } 195 }
196 196
197 // Possibly allocate a local context. 197 // Possibly allocate a local context.
198 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 198 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
199 if (heap_slots > 0) { 199 if (heap_slots > 0) {
200 Comment(";;; Allocate local context"); 200 Comment(";;; Allocate local context");
201 bool need_write_barrier = true; 201 bool need_write_barrier = true;
202 // Argument to NewContext is the function, which is in a1. 202 // Argument to NewContext is the function, which is in a1.
203 if (heap_slots <= FastNewContextStub::kMaximumSlots) { 203 if (FLAG_harmony_scoping && info()->scope()->is_global_scope()) {
204 __ push(a1);
205 __ Push(info()->scope()->GetScopeInfo());
206 __ CallRuntime(Runtime::kNewGlobalContext, 2);
207 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
204 FastNewContextStub stub(isolate(), heap_slots); 208 FastNewContextStub stub(isolate(), heap_slots);
205 __ CallStub(&stub); 209 __ CallStub(&stub);
206 // Result of FastNewContextStub is always in new space. 210 // Result of FastNewContextStub is always in new space.
207 need_write_barrier = false; 211 need_write_barrier = false;
208 } else { 212 } else {
209 __ push(a1); 213 __ push(a1);
210 __ CallRuntime(Runtime::kNewFunctionContext, 1); 214 __ CallRuntime(Runtime::kNewFunctionContext, 1);
211 } 215 }
212 RecordSafepoint(Safepoint::kNoLazyDeopt); 216 RecordSafepoint(Safepoint::kNoLazyDeopt);
213 // Context is returned in both v0. It replaces the context passed to us. 217 // Context is returned in both v0. It replaces the context passed to us.
(...skipping 5717 matching lines...) Expand 10 before | Expand all | Expand 10 after
5931 __ li(at, scope_info); 5935 __ li(at, scope_info);
5932 __ Push(at, ToRegister(instr->function())); 5936 __ Push(at, ToRegister(instr->function()));
5933 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5937 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5934 RecordSafepoint(Safepoint::kNoLazyDeopt); 5938 RecordSafepoint(Safepoint::kNoLazyDeopt);
5935 } 5939 }
5936 5940
5937 5941
5938 #undef __ 5942 #undef __
5939 5943
5940 } } // namespace v8::internal 5944 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698