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

Side by Side Diff: src/mips/lithium-codegen-mips.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 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 DCHECK(!info()->scope()->is_script_scope());
203 if (heap_slots <= FastNewContextStub::kMaximumSlots) { 204 if (heap_slots <= FastNewContextStub::kMaximumSlots) {
204 FastNewContextStub stub(isolate(), heap_slots); 205 FastNewContextStub stub(isolate(), heap_slots);
205 __ CallStub(&stub); 206 __ CallStub(&stub);
206 // Result of FastNewContextStub is always in new space. 207 // Result of FastNewContextStub is always in new space.
207 need_write_barrier = false; 208 need_write_barrier = false;
208 } else { 209 } else {
209 __ push(a1); 210 __ push(a1);
210 __ CallRuntime(Runtime::kNewFunctionContext, 1); 211 __ CallRuntime(Runtime::kNewFunctionContext, 1);
211 } 212 }
212 RecordSafepoint(Safepoint::kNoLazyDeopt); 213 RecordSafepoint(Safepoint::kNoLazyDeopt);
(...skipping 5775 matching lines...) Expand 10 before | Expand all | Expand 10 after
5988 __ li(at, scope_info); 5989 __ li(at, scope_info);
5989 __ Push(at, ToRegister(instr->function())); 5990 __ Push(at, ToRegister(instr->function()));
5990 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5991 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5991 RecordSafepoint(Safepoint::kNoLazyDeopt); 5992 RecordSafepoint(Safepoint::kNoLazyDeopt);
5992 } 5993 }
5993 5994
5994 5995
5995 #undef __ 5996 #undef __
5996 5997
5997 } } // namespace v8::internal 5998 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698