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

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

Issue 2804005: [Isolates] Removal of miscellaneous statics from the backend. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 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/disasm-arm.cc ('k') | 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 class VirtualFrame : public ZoneObject { 49 class VirtualFrame : public ZoneObject {
50 public: 50 public:
51 class RegisterAllocationScope; 51 class RegisterAllocationScope;
52 // A utility class to introduce a scope where the virtual frame is 52 // A utility class to introduce a scope where the virtual frame is
53 // expected to remain spilled. The constructor spills the code 53 // expected to remain spilled. The constructor spills the code
54 // generator's current frame, and keeps it spilled. 54 // generator's current frame, and keeps it spilled.
55 class SpilledScope BASE_EMBEDDED { 55 class SpilledScope BASE_EMBEDDED {
56 public: 56 public:
57 explicit SpilledScope(VirtualFrame* frame) 57 explicit SpilledScope(VirtualFrame* frame)
58 : old_is_spilled_(is_spilled_) { 58 : old_is_spilled_(
59 Isolate::Current()->is_virtual_frame_in_spilled_scope()) {
59 if (frame != NULL) { 60 if (frame != NULL) {
60 if (!is_spilled_) { 61 if (!old_is_spilled_) {
61 frame->SpillAll(); 62 frame->SpillAll();
62 } else { 63 } else {
63 frame->AssertIsSpilled(); 64 frame->AssertIsSpilled();
64 } 65 }
65 } 66 }
66 is_spilled_ = true; 67 Isolate::Current()->set_is_virtual_frame_in_spilled_scope(true);
67 } 68 }
68 ~SpilledScope() { 69 ~SpilledScope() {
69 is_spilled_ = old_is_spilled_; 70 Isolate::Current()->set_is_virtual_frame_in_spilled_scope(
71 old_is_spilled_);
70 } 72 }
71 static bool is_spilled() { return is_spilled_; } 73 static bool is_spilled() {
74 return Isolate::Current()->is_virtual_frame_in_spilled_scope();
75 }
72 76
73 private: 77 private:
74 static bool is_spilled_;
75 int old_is_spilled_; 78 int old_is_spilled_;
76 79
77 SpilledScope() { } 80 SpilledScope() { }
78 81
79 friend class RegisterAllocationScope; 82 friend class RegisterAllocationScope;
80 }; 83 };
81 84
82 class RegisterAllocationScope BASE_EMBEDDED { 85 class RegisterAllocationScope BASE_EMBEDDED {
83 public: 86 public:
84 // A utility class to introduce a scope where the virtual frame 87 // A utility class to introduce a scope where the virtual frame
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 505 }
503 } 506 }
504 507
505 friend class JumpTarget; 508 friend class JumpTarget;
506 }; 509 };
507 510
508 511
509 } } // namespace v8::internal 512 } } // namespace v8::internal
510 513
511 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ 514 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/disasm-arm.cc ('k') | src/arm/virtual-frame-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698