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

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

Issue 115345: - Make VirtualFrame and JumpTarget zone allocated.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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 | « no previous file | src/arm/virtual-frame-arm.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 23 matching lines...) Expand all
34 34
35 // ------------------------------------------------------------------------- 35 // -------------------------------------------------------------------------
36 // Virtual frames 36 // Virtual frames
37 // 37 //
38 // The virtual frame is an abstraction of the physical stack frame. It 38 // The virtual frame is an abstraction of the physical stack frame. It
39 // encapsulates the parameters, frame-allocated locals, and the expression 39 // encapsulates the parameters, frame-allocated locals, and the expression
40 // stack. It supports push/pop operations on the expression stack, as well 40 // stack. It supports push/pop operations on the expression stack, as well
41 // as random access to the expression stack elements, locals, and 41 // as random access to the expression stack elements, locals, and
42 // parameters. 42 // parameters.
43 43
44 class VirtualFrame : public Malloced { 44 class VirtualFrame : public ZoneObject {
45 public: 45 public:
46 // A utility class to introduce a scope where the virtual frame is 46 // A utility class to introduce a scope where the virtual frame is
47 // expected to remain spilled. The constructor spills the code 47 // expected to remain spilled. The constructor spills the code
48 // generator's current frame, but no attempt is made to require it 48 // generator's current frame, but no attempt is made to require it
49 // to stay spilled. It is intended as documentation while the code 49 // to stay spilled. It is intended as documentation while the code
50 // generator is being transformed. 50 // generator is being transformed.
51 class SpilledScope BASE_EMBEDDED { 51 class SpilledScope BASE_EMBEDDED {
52 public: 52 public:
53 explicit SpilledScope(CodeGenerator* cgen); 53 explicit SpilledScope(CodeGenerator* cgen);
54 54
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 static const int kLocal0Offset = JavaScriptFrameConstants::kLocal0Offset; 328 static const int kLocal0Offset = JavaScriptFrameConstants::kLocal0Offset;
329 static const int kFunctionOffset = JavaScriptFrameConstants::kFunctionOffset; 329 static const int kFunctionOffset = JavaScriptFrameConstants::kFunctionOffset;
330 static const int kContextOffset = StandardFrameConstants::kContextOffset; 330 static const int kContextOffset = StandardFrameConstants::kContextOffset;
331 331
332 static const int kHandlerSize = StackHandlerConstants::kSize / kPointerSize; 332 static const int kHandlerSize = StackHandlerConstants::kSize / kPointerSize;
333 static const int kPreallocatedElements = 5 + 8; // 8 expression stack slots. 333 static const int kPreallocatedElements = 5 + 8; // 8 expression stack slots.
334 334
335 CodeGenerator* cgen_; 335 CodeGenerator* cgen_;
336 MacroAssembler* masm_; 336 MacroAssembler* masm_;
337 337
338 List<FrameElement> elements_; 338 ZoneList<FrameElement> elements_;
339 339
340 // The number of frame-allocated locals and parameters respectively. 340 // The number of frame-allocated locals and parameters respectively.
341 int parameter_count_; 341 int16_t parameter_count_;
342 int local_count_; 342 int16_t local_count_;
343 343
344 // The index of the element that is at the processor's stack pointer 344 // The index of the element that is at the processor's stack pointer
345 // (the sp register). 345 // (the sp register).
346 int stack_pointer_; 346 int16_t stack_pointer_;
347 347
348 // The index of the element that is at the processor's frame pointer 348 // The index of the element that is at the processor's frame pointer
349 // (the fp register). 349 // (the fp register).
350 int frame_pointer_; 350 int16_t frame_pointer_;
351 351
352 // The index of the register frame element using each register, or 352 // The index of the register frame element using each register, or
353 // kIllegalIndex if a register is not on the frame. 353 // kIllegalIndex if a register is not on the frame.
354 int register_locations_[kNumRegisters]; 354 int16_t register_locations_[kNumRegisters];
355 355
356 // The index of the first parameter. The receiver lies below the first 356 // The index of the first parameter. The receiver lies below the first
357 // parameter. 357 // parameter.
358 int param0_index() const { return 1; } 358 int param0_index() const { return 1; }
359 359
360 // The index of the context slot in the frame. 360 // The index of the context slot in the frame.
361 int context_index() const { 361 int context_index() const {
362 ASSERT(frame_pointer_ != kIllegalIndex); 362 ASSERT(frame_pointer_ != kIllegalIndex);
363 return frame_pointer_ - 1; 363 return frame_pointer_ - 1;
364 } 364 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 } 483 }
484 } 484 }
485 485
486 friend class JumpTarget; 486 friend class JumpTarget;
487 }; 487 };
488 488
489 489
490 } } // namespace v8::internal 490 } } // namespace v8::internal
491 491
492 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ 492 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/virtual-frame-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698