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

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

Issue 7003058: A collection of context-related refactoring changes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.h » ('j') | src/ast.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // Possibly allocate a local context. 182 // Possibly allocate a local context.
183 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 183 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
184 if (heap_slots > 0) { 184 if (heap_slots > 0) {
185 Comment(";;; Allocate local context"); 185 Comment(";;; Allocate local context");
186 // Argument to NewContext is the function, which is in r1. 186 // Argument to NewContext is the function, which is in r1.
187 __ push(r1); 187 __ push(r1);
188 if (heap_slots <= FastNewContextStub::kMaximumSlots) { 188 if (heap_slots <= FastNewContextStub::kMaximumSlots) {
189 FastNewContextStub stub(heap_slots); 189 FastNewContextStub stub(heap_slots);
190 __ CallStub(&stub); 190 __ CallStub(&stub);
191 } else { 191 } else {
192 __ CallRuntime(Runtime::kNewContext, 1); 192 __ CallRuntime(Runtime::kNewFunctionContext, 1);
193 } 193 }
194 RecordSafepoint(Safepoint::kNoDeoptimizationIndex); 194 RecordSafepoint(Safepoint::kNoDeoptimizationIndex);
195 // Context is returned in both r0 and cp. It replaces the context 195 // Context is returned in both r0 and cp. It replaces the context
196 // passed to us. It's saved in the stack and kept live in cp. 196 // passed to us. It's saved in the stack and kept live in cp.
197 __ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 197 __ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
198 // Copy any necessary parameters into the context. 198 // Copy any necessary parameters into the context.
199 int num_parameters = scope()->num_parameters(); 199 int num_parameters = scope()->num_parameters();
200 for (int i = 0; i < num_parameters; i++) { 200 for (int i = 0; i < num_parameters; i++) {
201 Slot* slot = scope()->parameter(i)->AsSlot(); 201 Slot* slot = scope()->parameter(i)->AsSlot();
202 if (slot != NULL && slot->type() == Slot::CONTEXT) { 202 if (slot != NULL && slot->type() == Slot::CONTEXT) {
(...skipping 4368 matching lines...) Expand 10 before | Expand all | Expand 10 after
4571 ASSERT(osr_pc_offset_ == -1); 4571 ASSERT(osr_pc_offset_ == -1);
4572 osr_pc_offset_ = masm()->pc_offset(); 4572 osr_pc_offset_ = masm()->pc_offset();
4573 } 4573 }
4574 4574
4575 4575
4576 4576
4577 4577
4578 #undef __ 4578 #undef __
4579 4579
4580 } } // namespace v8::internal 4580 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.h » ('j') | src/ast.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698