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

Side by Side Diff: src/ia32/macro-assembler-ia32.h

Issue 508002: Merge bleeding_edge revision 3501 to trunk. This change contains a... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 years 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/ia32/macro-assembler-ia32.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // a retry after GC failure. 303 // a retry after GC failure.
304 Object* TryTailCallStub(CodeStub* stub); 304 Object* TryTailCallStub(CodeStub* stub);
305 305
306 // Return from a code stub after popping its arguments. 306 // Return from a code stub after popping its arguments.
307 void StubReturn(int argc); 307 void StubReturn(int argc);
308 308
309 // Call a runtime routine. 309 // Call a runtime routine.
310 // Eventually this should be used for all C calls. 310 // Eventually this should be used for all C calls.
311 void CallRuntime(Runtime::Function* f, int num_arguments); 311 void CallRuntime(Runtime::Function* f, int num_arguments);
312 312
313 // Call a runtime function, returning the RuntimeStub object called.
314 // Try to generate the stub code if necessary. Do not perform a GC
315 // but instead return a retry after GC failure.
316 Object* TryCallRuntime(Runtime::Function* f, int num_arguments);
317
313 // Convenience function: Same as above, but takes the fid instead. 318 // Convenience function: Same as above, but takes the fid instead.
314 void CallRuntime(Runtime::FunctionId id, int num_arguments); 319 void CallRuntime(Runtime::FunctionId id, int num_arguments);
315 320
321 // Convenience function: Same as above, but takes the fid instead.
322 Object* TryCallRuntime(Runtime::FunctionId id, int num_arguments);
323
316 // Tail call of a runtime routine (jump). 324 // Tail call of a runtime routine (jump).
317 // Like JumpToRuntime, but also takes care of passing the number 325 // Like JumpToRuntime, but also takes care of passing the number
318 // of arguments. 326 // of arguments.
319 void TailCallRuntime(const ExternalReference& ext, 327 void TailCallRuntime(const ExternalReference& ext,
320 int num_arguments, 328 int num_arguments,
321 int result_size); 329 int result_size);
322 330
323 void PushHandleScope(Register scratch); 331 void PushHandleScope(Register scratch);
324 332
325 // Pops a handle scope using the specified scratch register and 333 // Pops a handle scope using the specified scratch register and
326 // ensuring that saved register, it is not no_reg, is left unchanged. 334 // ensuring that saved register, it is not no_reg, is left unchanged.
327 void PopHandleScope(Register saved, Register scratch); 335 void PopHandleScope(Register saved, Register scratch);
328 336
337 // As PopHandleScope, but does not perform a GC. Instead, returns a
338 // retry after GC failure object if GC is necessary.
339 Object* TryPopHandleScope(Register saved, Register scratch);
340
329 // Jump to a runtime routine. 341 // Jump to a runtime routine.
330 void JumpToRuntime(const ExternalReference& ext); 342 void JumpToRuntime(const ExternalReference& ext);
331 343
332 344
333 // --------------------------------------------------------------------------- 345 // ---------------------------------------------------------------------------
334 // Utilities 346 // Utilities
335 347
336 void Ret(); 348 void Ret();
337 349
338 void Drop(int element_count); 350 void Drop(int element_count);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 423
412 void EnterExitFramePrologue(ExitFrame::Mode mode); 424 void EnterExitFramePrologue(ExitFrame::Mode mode);
413 void EnterExitFrameEpilogue(ExitFrame::Mode mode, int argc); 425 void EnterExitFrameEpilogue(ExitFrame::Mode mode, int argc);
414 426
415 // Allocation support helpers. 427 // Allocation support helpers.
416 void LoadAllocationTopHelper(Register result, 428 void LoadAllocationTopHelper(Register result,
417 Register result_end, 429 Register result_end,
418 Register scratch, 430 Register scratch,
419 AllocationFlags flags); 431 AllocationFlags flags);
420 void UpdateAllocationTopHelper(Register result_end, Register scratch); 432 void UpdateAllocationTopHelper(Register result_end, Register scratch);
433
434 // Helper for PopHandleScope. Allowed to perform a GC and returns
435 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and
436 // possibly returns a failure object indicating an allocation failure.
437 Object* PopHandleScopeHelper(Register saved,
438 Register scratch,
439 bool gc_allowed);
421 }; 440 };
422 441
423 442
424 // The code patcher is used to patch (typically) small parts of code e.g. for 443 // The code patcher is used to patch (typically) small parts of code e.g. for
425 // debugging and other types of instrumentation. When using the code patcher 444 // debugging and other types of instrumentation. When using the code patcher
426 // the exact number of bytes specified must be emitted. Is not legal to emit 445 // the exact number of bytes specified must be emitted. Is not legal to emit
427 // relocation information. If any of these constraints are violated it causes 446 // relocation information. If any of these constraints are violated it causes
428 // an assertion. 447 // an assertion.
429 class CodePatcher { 448 class CodePatcher {
430 public: 449 public:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } \ 496 } \
478 masm-> 497 masm->
479 #else 498 #else
480 #define ACCESS_MASM(masm) masm-> 499 #define ACCESS_MASM(masm) masm->
481 #endif 500 #endif
482 501
483 502
484 } } // namespace v8::internal 503 } } // namespace v8::internal
485 504
486 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 505 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698