| OLD | NEW |
| 1 // Copyright 2006-2008 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 IN_C_ENTRY | 60 IN_C_ENTRY |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 enum HandlerType { | 63 enum HandlerType { |
| 64 TRY_CATCH_HANDLER, | 64 TRY_CATCH_HANDLER, |
| 65 TRY_FINALLY_HANDLER, | 65 TRY_FINALLY_HANDLER, |
| 66 JS_ENTRY_HANDLER | 66 JS_ENTRY_HANDLER |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 | 69 |
| 70 // Flags used for the AllocateObjectInNewSpace functions. |
| 71 enum AllocationFlags { |
| 72 // No special flags. |
| 73 NO_ALLOCATION_FLAGS = 0, |
| 74 // Return the pointer to the allocated already tagged as a heap object. |
| 75 TAG_OBJECT = 1 << 0, |
| 76 // The content of the result register already contains the allocation top in |
| 77 // new space. |
| 78 RESULT_CONTAINS_TOP = 1 << 1 |
| 79 }; |
| 80 |
| 81 |
| 70 // MacroAssembler implements a collection of frequently used macros. | 82 // MacroAssembler implements a collection of frequently used macros. |
| 71 class MacroAssembler: public Assembler { | 83 class MacroAssembler: public Assembler { |
| 72 public: | 84 public: |
| 73 MacroAssembler(void* buffer, int size); | 85 MacroAssembler(void* buffer, int size); |
| 74 | 86 |
| 75 // --------------------------------------------------------------------------- | 87 // --------------------------------------------------------------------------- |
| 76 // Low-level helpers for compiler | 88 // Low-level helpers for compiler |
| 77 | 89 |
| 78 // Jump, Call, and Ret pseudo instructions implementing inter-working | 90 // Jump, Call, and Ret pseudo instructions implementing inter-working |
| 79 private: | 91 private: |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 204 |
| 193 // Allocate an object in new space. The object_size is specified in words (not | 205 // Allocate an object in new space. The object_size is specified in words (not |
| 194 // bytes). If the new space is exhausted control continues at the gc_required | 206 // bytes). If the new space is exhausted control continues at the gc_required |
| 195 // label. The allocated object is returned in result. If the flag | 207 // label. The allocated object is returned in result. If the flag |
| 196 // tag_allocated_object is true the result is tagged as as a heap object. | 208 // tag_allocated_object is true the result is tagged as as a heap object. |
| 197 void AllocateObjectInNewSpace(int object_size, | 209 void AllocateObjectInNewSpace(int object_size, |
| 198 Register result, | 210 Register result, |
| 199 Register scratch1, | 211 Register scratch1, |
| 200 Register scratch2, | 212 Register scratch2, |
| 201 Label* gc_required, | 213 Label* gc_required, |
| 202 bool tag_allocated_object); | 214 AllocationFlags flags); |
| 203 void AllocateObjectInNewSpace(Register object_size, | 215 void AllocateObjectInNewSpace(Register object_size, |
| 204 Register result, | 216 Register result, |
| 205 Register scratch1, | 217 Register scratch1, |
| 206 Register scratch2, | 218 Register scratch2, |
| 207 Label* gc_required, | 219 Label* gc_required, |
| 208 bool tag_allocated_object); | 220 AllocationFlags flags); |
| 209 | 221 |
| 210 // Undo allocation in new space. The object passed and objects allocated after | 222 // Undo allocation in new space. The object passed and objects allocated after |
| 211 // it will no longer be allocated. The caller must make sure that no pointers | 223 // it will no longer be allocated. The caller must make sure that no pointers |
| 212 // are left to the object(s) no longer allocated as they would be invalid when | 224 // are left to the object(s) no longer allocated as they would be invalid when |
| 213 // allocation is undone. | 225 // allocation is undone. |
| 214 void UndoAllocationInNewSpace(Register object, Register scratch); | 226 void UndoAllocationInNewSpace(Register object, Register scratch); |
| 215 | 227 |
| 216 // --------------------------------------------------------------------------- | 228 // --------------------------------------------------------------------------- |
| 217 // Support functions. | 229 // Support functions. |
| 218 | 230 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 387 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 376 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 388 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 377 #else | 389 #else |
| 378 #define ACCESS_MASM(masm) masm-> | 390 #define ACCESS_MASM(masm) masm-> |
| 379 #endif | 391 #endif |
| 380 | 392 |
| 381 | 393 |
| 382 } } // namespace v8::internal | 394 } } // namespace v8::internal |
| 383 | 395 |
| 384 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 396 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |