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

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

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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/stub-cache-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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Call stub given the number of arguments it expects on (and 270 // Call stub given the number of arguments it expects on (and
268 // removes from) the stack. 271 // removes from) the stack.
269 inline void CallStub(CodeStub* stub, int arg_count); 272 inline void CallStub(CodeStub* stub, int arg_count);
270 273
271 // Call JS function from top of the stack with arguments 274 // Call JS function from top of the stack with arguments
272 // taken from the stack. 275 // taken from the stack.
273 void CallJSFunction(int arg_count); 276 void CallJSFunction(int arg_count);
274 277
275 // Call runtime given the number of arguments expected on (and 278 // Call runtime given the number of arguments expected on (and
276 // removed from) the stack. 279 // removed from) the stack.
277 void CallRuntime(Runtime::Function* f, int arg_count); 280 void CallRuntime(const Runtime::Function* f, int arg_count);
278 void CallRuntime(Runtime::FunctionId id, int arg_count); 281 void CallRuntime(Runtime::FunctionId id, int arg_count);
279 282
280 #ifdef ENABLE_DEBUGGER_SUPPORT 283 #ifdef ENABLE_DEBUGGER_SUPPORT
281 void DebugBreak(); 284 void DebugBreak();
282 #endif 285 #endif
283 286
284 // Invoke builtin given the number of arguments it expects on (and 287 // Invoke builtin given the number of arguments it expects on (and
285 // removes from) the stack. 288 // removes from) the stack.
286 void InvokeBuiltin(Builtins::JavaScript id, 289 void InvokeBuiltin(Builtins::JavaScript id,
287 InvokeJSFlags flag, 290 InvokeJSFlags flag,
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 } 514 }
512 } 515 }
513 516
514 friend class JumpTarget; 517 friend class JumpTarget;
515 }; 518 };
516 519
517 520
518 } } // namespace v8::internal 521 } } // namespace v8::internal
519 522
520 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ 523 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/arm/virtual-frame-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698