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

Side by Side Diff: src/ppc/full-codegen-ppc.cc

Issue 1146063006: Fix arrow functions requiring context without slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup test case. Created 5 years, 6 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 | « src/mips64/full-codegen-mips64.cc ('k') | src/x64/full-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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Emit the remaining pushes. 189 // Emit the remaining pushes.
190 for (int i = 0; i < remaining; i++) { 190 for (int i = 0; i < remaining; i++) {
191 __ push(ip); 191 __ push(ip);
192 } 192 }
193 } 193 }
194 } 194 }
195 195
196 bool function_in_register = true; 196 bool function_in_register = true;
197 197
198 // Possibly allocate a local context. 198 // Possibly allocate a local context.
199 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 199 if (info->scope()->num_heap_slots() > 0) {
200 if (heap_slots > 0) {
201 // Argument to NewContext is the function, which is still in r4. 200 // Argument to NewContext is the function, which is still in r4.
202 Comment cmnt(masm_, "[ Allocate context"); 201 Comment cmnt(masm_, "[ Allocate context");
203 bool need_write_barrier = true; 202 bool need_write_barrier = true;
203 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
204 if (info->scope()->is_script_scope()) { 204 if (info->scope()->is_script_scope()) {
205 __ push(r4); 205 __ push(r4);
206 __ Push(info->scope()->GetScopeInfo(info->isolate())); 206 __ Push(info->scope()->GetScopeInfo(info->isolate()));
207 __ CallRuntime(Runtime::kNewScriptContext, 2); 207 __ CallRuntime(Runtime::kNewScriptContext, 2);
208 } else if (heap_slots <= FastNewContextStub::kMaximumSlots) { 208 } else if (slots <= FastNewContextStub::kMaximumSlots) {
209 FastNewContextStub stub(isolate(), heap_slots); 209 FastNewContextStub stub(isolate(), slots);
210 __ CallStub(&stub); 210 __ CallStub(&stub);
211 // Result of FastNewContextStub is always in new space. 211 // Result of FastNewContextStub is always in new space.
212 need_write_barrier = false; 212 need_write_barrier = false;
213 } else { 213 } else {
214 __ push(r4); 214 __ push(r4);
215 __ CallRuntime(Runtime::kNewFunctionContext, 1); 215 __ CallRuntime(Runtime::kNewFunctionContext, 1);
216 } 216 }
217 function_in_register = false; 217 function_in_register = false;
218 // Context is returned in r3. It replaces the context passed to us. 218 // Context is returned in r3. It replaces the context passed to us.
219 // It's saved in the stack and kept live in cp. 219 // It's saved in the stack and kept live in cp.
(...skipping 5297 matching lines...) Expand 10 before | Expand all | Expand 10 after
5517 return ON_STACK_REPLACEMENT; 5517 return ON_STACK_REPLACEMENT;
5518 } 5518 }
5519 5519
5520 DCHECK(interrupt_address == 5520 DCHECK(interrupt_address ==
5521 isolate->builtins()->OsrAfterStackCheck()->entry()); 5521 isolate->builtins()->OsrAfterStackCheck()->entry());
5522 return OSR_AFTER_STACK_CHECK; 5522 return OSR_AFTER_STACK_CHECK;
5523 } 5523 }
5524 } // namespace internal 5524 } // namespace internal
5525 } // namespace v8 5525 } // namespace v8
5526 #endif // V8_TARGET_ARCH_PPC 5526 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698