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

Side by Side Diff: src/virtual-frame-ia32.h

Issue 18148: Use unspilled frames in unary operations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 11 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/codegen-ia32.cc ('k') | src/virtual-frame-ia32.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 // An element of the expression stack as an assembly operand. 253 // An element of the expression stack as an assembly operand.
254 Operand ElementAt(int index) const { 254 Operand ElementAt(int index) const {
255 return Operand(esp, index * kPointerSize); 255 return Operand(esp, index * kPointerSize);
256 } 256 }
257 257
258 // Random-access store to a frame-top relative frame element. The result 258 // Random-access store to a frame-top relative frame element. The result
259 // becomes owned by the frame and is invalidated. 259 // becomes owned by the frame and is invalidated.
260 void SetElementAt(int index, Result* value); 260 void SetElementAt(int index, Result* value);
261 261
262 // Set a frame element to a constant. The index is frame-top relative.
263 void SetElementAt(int index, Handle<Object> value) {
264 Result temp(value, cgen_);
265 SetElementAt(index, &temp);
266 }
267
262 // A frame-allocated local as an assembly operand. 268 // A frame-allocated local as an assembly operand.
263 Operand LocalAt(int index) const { 269 Operand LocalAt(int index) const {
264 ASSERT(0 <= index); 270 ASSERT(0 <= index);
265 ASSERT(index < local_count_); 271 ASSERT(index < local_count_);
266 return Operand(ebp, kLocal0Offset - index * kPointerSize); 272 return Operand(ebp, kLocal0Offset - index * kPointerSize);
267 } 273 }
268 274
269 // Push a copy of the value of a local frame slot on top of the frame. 275 // Push a copy of the value of a local frame slot on top of the frame.
270 void LoadLocalAt(int index) { 276 void LoadLocalAt(int index) {
271 LoadFrameSlotAt(local0_index() + index); 277 LoadFrameSlotAt(local0_index() + index);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 Result* arg1, 340 Result* arg1,
335 int frame_arg_count); 341 int frame_arg_count);
336 342
337 // Call the runtime, given the number of arguments expected on (and 343 // Call the runtime, given the number of arguments expected on (and
338 // removed from) the top of the physical frame. 344 // removed from) the top of the physical frame.
339 Result CallRuntime(Runtime::Function* f, int frame_arg_count); 345 Result CallRuntime(Runtime::Function* f, int frame_arg_count);
340 Result CallRuntime(Runtime::FunctionId id, int frame_arg_count); 346 Result CallRuntime(Runtime::FunctionId id, int frame_arg_count);
341 347
342 // Invoke a builtin, given the number of arguments it expects on (and 348 // Invoke a builtin, given the number of arguments it expects on (and
343 // removes from) the top of the physical frame. 349 // removes from) the top of the physical frame.
344 void InvokeBuiltin(Builtins::JavaScript id, 350 Result InvokeBuiltin(Builtins::JavaScript id,
345 InvokeFlag flag, 351 InvokeFlag flag,
346 int frame_arg_count); 352 int frame_arg_count);
347 353
348 // Call into a JS code object, given the number of arguments it expects on 354 // Call into a JS code object, given the number of arguments it expects on
349 // (and removes from) the top of the physical frame. 355 // (and removes from) the top of the physical frame.
350 Result CallCodeObject(Handle<Code> ic, 356 Result CallCodeObject(Handle<Code> ic,
351 RelocInfo::Mode rmode, 357 RelocInfo::Mode rmode,
352 int frame_arg_count); 358 int frame_arg_count);
353 359
354 // Drop a number of elements from the top of the expression stack. May 360 // Drop a number of elements from the top of the expression stack. May
355 // emit code to affect the physical frame. Does not clobber any registers 361 // emit code to affect the physical frame. Does not clobber any registers
356 // excepting possibly the stack pointer. 362 // excepting possibly the stack pointer.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // Called after all register-to-memory and register-to-register 528 // Called after all register-to-memory and register-to-register
523 // moves have been made. After this function returns, the frames 529 // moves have been made. After this function returns, the frames
524 // should be equal. 530 // should be equal.
525 void MergeMoveMemoryToRegisters(VirtualFrame* expected); 531 void MergeMoveMemoryToRegisters(VirtualFrame* expected);
526 }; 532 };
527 533
528 534
529 } } // namespace v8::internal 535 } } // namespace v8::internal
530 536
531 #endif // V8_VIRTUAL_FRAME_IA32_H_ 537 #endif // V8_VIRTUAL_FRAME_IA32_H_
OLDNEW
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/virtual-frame-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698