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

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

Issue 660095: Merge revision 3813 to 3930 from bleeding_edge to partial snapshots branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: '' Created 10 years, 10 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Construct an initial virtual frame on entry to a JS function. 61 // Construct an initial virtual frame on entry to a JS function.
62 VirtualFrame(); 62 VirtualFrame();
63 63
64 // Construct a virtual frame as a clone of an existing one. 64 // Construct a virtual frame as a clone of an existing one.
65 explicit VirtualFrame(VirtualFrame* original); 65 explicit VirtualFrame(VirtualFrame* original);
66 66
67 CodeGenerator* cgen() { return CodeGeneratorScope::Current(); } 67 CodeGenerator* cgen() { return CodeGeneratorScope::Current(); }
68 MacroAssembler* masm() { return cgen()->masm(); } 68 MacroAssembler* masm() { return cgen()->masm(); }
69 69
70 // Create a duplicate of an existing valid frame element. 70 // Create a duplicate of an existing valid frame element.
71 FrameElement CopyElementAt(int index); 71 FrameElement CopyElementAt(int index,
72 NumberInfo::Type info = NumberInfo::kUnknown);
72 73
73 // The number of elements on the virtual frame. 74 // The number of elements on the virtual frame.
74 int element_count() { return elements_.length(); } 75 int element_count() { return elements_.length(); }
75 76
76 // The height of the virtual expression stack. 77 // The height of the virtual expression stack.
77 int height() { 78 int height() {
78 return element_count() - expression_base_index(); 79 return element_count() - expression_base_index();
79 } 80 }
80 81
81 int register_location(int num) { 82 int register_location(int num) {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 Forget(arg_count); 291 Forget(arg_count);
291 ASSERT(cgen()->HasValidEntryRegisters()); 292 ASSERT(cgen()->HasValidEntryRegisters());
292 masm()->CallStub(stub); 293 masm()->CallStub(stub);
293 } 294 }
294 295
295 // Call runtime given the number of arguments expected on (and 296 // Call runtime given the number of arguments expected on (and
296 // removed from) the stack. 297 // removed from) the stack.
297 void CallRuntime(Runtime::Function* f, int arg_count); 298 void CallRuntime(Runtime::Function* f, int arg_count);
298 void CallRuntime(Runtime::FunctionId id, int arg_count); 299 void CallRuntime(Runtime::FunctionId id, int arg_count);
299 300
301 #ifdef ENABLE_DEBUGGER_SUPPORT
302 void DebugBreak();
303 #endif
304
300 // Invoke builtin given the number of arguments it expects on (and 305 // Invoke builtin given the number of arguments it expects on (and
301 // removes from) the stack. 306 // removes from) the stack.
302 void InvokeBuiltin(Builtins::JavaScript id, 307 void InvokeBuiltin(Builtins::JavaScript id,
303 InvokeJSFlags flag, 308 InvokeJSFlags flag,
304 int arg_count); 309 int arg_count);
305 310
306 // Call into an IC stub given the number of arguments it removes 311 // Call into an IC stub given the number of arguments it removes
307 // from the stack. Register arguments to the IC stub are implicit, 312 // from the stack. Register arguments to the IC stub are implicit,
308 // and depend on the type of IC stub. 313 // and depend on the type of IC stub.
309 void CallCodeObject(Handle<Code> ic, 314 void CallCodeObject(Handle<Code> ic,
(...skipping 22 matching lines...) Expand all
332 // Push an element on top of the expression stack and emit a 337 // Push an element on top of the expression stack and emit a
333 // corresponding push instruction. 338 // corresponding push instruction.
334 void EmitPush(Register reg); 339 void EmitPush(Register reg);
335 340
336 // Push multiple registers on the stack and the virtual frame 341 // Push multiple registers on the stack and the virtual frame
337 // Register are selected by setting bit in src_regs and 342 // Register are selected by setting bit in src_regs and
338 // are pushed in decreasing order: r15 .. r0. 343 // are pushed in decreasing order: r15 .. r0.
339 void EmitPushMultiple(int count, int src_regs); 344 void EmitPushMultiple(int count, int src_regs);
340 345
341 // Push an element on the virtual frame. 346 // Push an element on the virtual frame.
342 void Push(Register reg); 347 void Push(Register reg, NumberInfo::Type info = NumberInfo::kUnknown);
343 void Push(Handle<Object> value); 348 void Push(Handle<Object> value);
344 void Push(Smi* value) { Push(Handle<Object>(value)); } 349 void Push(Smi* value) { Push(Handle<Object>(value)); }
345 350
346 // Pushing a result invalidates it (its contents become owned by the frame). 351 // Pushing a result invalidates it (its contents become owned by the frame).
347 void Push(Result* result) { 352 void Push(Result* result) {
348 if (result->is_register()) { 353 if (result->is_register()) {
349 Push(result->reg()); 354 Push(result->reg());
350 } else { 355 } else {
351 ASSERT(result->is_constant()); 356 ASSERT(result->is_constant());
352 Push(result->handle()); 357 Push(result->handle());
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 504
500 // Classes that need raw access to the elements_ array. 505 // Classes that need raw access to the elements_ array.
501 friend class DeferredCode; 506 friend class DeferredCode;
502 friend class JumpTarget; 507 friend class JumpTarget;
503 }; 508 };
504 509
505 510
506 } } // namespace v8::internal 511 } } // namespace v8::internal
507 512
508 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ 513 #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