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

Side by Side Diff: src/virtual-frame.cc

Issue 113259: Inline the code dealing with entering spilled scopes and maintaining a... (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
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 17 matching lines...) Expand all
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "codegen-inl.h" 30 #include "codegen-inl.h"
31 #include "register-allocator-inl.h" 31 #include "register-allocator-inl.h"
32 32
33 namespace v8 { namespace internal { 33 namespace v8 { namespace internal {
34 34
35 // ------------------------------------------------------------------------- 35 // -------------------------------------------------------------------------
36 // VirtualFrame implementation. 36 // VirtualFrame implementation.
37 37
38 VirtualFrame::SpilledScope::SpilledScope(CodeGenerator* cgen)
39 : cgen_(cgen),
40 previous_state_(cgen->in_spilled_code()) {
41 ASSERT(cgen->has_valid_frame());
42 cgen->frame()->SpillAll();
43 cgen->set_in_spilled_code(true);
44 }
45
46
47 VirtualFrame::SpilledScope::~SpilledScope() {
48 cgen_->set_in_spilled_code(previous_state_);
49 }
50
51
52 // When cloned, a frame is a deep copy of the original. 38 // When cloned, a frame is a deep copy of the original.
53 VirtualFrame::VirtualFrame(VirtualFrame* original) 39 VirtualFrame::VirtualFrame(VirtualFrame* original)
54 : cgen_(original->cgen_), 40 : cgen_(original->cgen_),
55 masm_(original->masm_), 41 masm_(original->masm_),
56 elements_(original->elements_.capacity()), 42 elements_(original->elements_.capacity()),
57 parameter_count_(original->parameter_count_), 43 parameter_count_(original->parameter_count_),
58 local_count_(original->local_count_), 44 local_count_(original->local_count_),
59 stack_pointer_(original->stack_pointer_), 45 stack_pointer_(original->stack_pointer_),
60 frame_pointer_(original->frame_pointer_) { 46 frame_pointer_(original->frame_pointer_) {
61 // Copy all the elements from the original. 47 // Copy all the elements from the original.
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // Specialization of List::ResizeAdd to non-inlined version for FrameElements. 497 // Specialization of List::ResizeAdd to non-inlined version for FrameElements.
512 // The function ResizeAdd becomes a real function, whose implementation is the 498 // The function ResizeAdd becomes a real function, whose implementation is the
513 // inlined ResizeAddInternal. 499 // inlined ResizeAddInternal.
514 template <> 500 template <>
515 void List<FrameElement, 501 void List<FrameElement,
516 FreeStoreAllocationPolicy>::ResizeAdd(const FrameElement& element) { 502 FreeStoreAllocationPolicy>::ResizeAdd(const FrameElement& element) {
517 ResizeAddInternal(element); 503 ResizeAddInternal(element);
518 } 504 }
519 505
520 } } // namespace v8::internal 506 } } // namespace v8::internal
OLDNEW
« src/ia32/codegen-ia32.h ('K') | « src/virtual-frame.h ('k') | src/x64/codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698