OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 336 |
337 void AddDeferred(DeferredCode* code) { deferred_.Add(code); } | 337 void AddDeferred(DeferredCode* code) { deferred_.Add(code); } |
338 | 338 |
339 bool in_spilled_code() const { return in_spilled_code_; } | 339 bool in_spilled_code() const { return in_spilled_code_; } |
340 void set_in_spilled_code(bool flag) { in_spilled_code_ = flag; } | 340 void set_in_spilled_code(bool flag) { in_spilled_code_ = flag; } |
341 | 341 |
342 // If the name is an inline runtime function call return the number of | 342 // If the name is an inline runtime function call return the number of |
343 // expected arguments. Otherwise return -1. | 343 // expected arguments. Otherwise return -1. |
344 static int InlineRuntimeCallArgumentsCount(Handle<String> name); | 344 static int InlineRuntimeCallArgumentsCount(Handle<String> name); |
345 | 345 |
| 346 // Return a position of the element at |index_as_smi| + |additional_offset| |
| 347 // in FixedArray pointer to which is held in |array|. |index_as_smi| is Smi. |
| 348 static Operand FixedArrayElementOperand(Register array, |
| 349 Register index_as_smi, |
| 350 int additional_offset = 0) { |
| 351 int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; |
| 352 return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); |
| 353 } |
| 354 |
346 private: | 355 private: |
347 // Construction/Destruction | 356 // Construction/Destruction |
348 explicit CodeGenerator(MacroAssembler* masm); | 357 explicit CodeGenerator(MacroAssembler* masm); |
349 | 358 |
350 // Accessors | 359 // Accessors |
351 inline bool is_eval(); | 360 inline bool is_eval(); |
352 inline Scope* scope(); | 361 inline Scope* scope(); |
353 | 362 |
354 // Generating deferred code. | 363 // Generating deferred code. |
355 void ProcessDeferred(); | 364 void ProcessDeferred(); |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 return ObjectBits::encode(object_.code()) | | 1103 return ObjectBits::encode(object_.code()) | |
1095 AddressBits::encode(addr_.code()) | | 1104 AddressBits::encode(addr_.code()) | |
1096 ScratchBits::encode(scratch_.code()); | 1105 ScratchBits::encode(scratch_.code()); |
1097 } | 1106 } |
1098 }; | 1107 }; |
1099 | 1108 |
1100 | 1109 |
1101 } } // namespace v8::internal | 1110 } } // namespace v8::internal |
1102 | 1111 |
1103 #endif // V8_IA32_CODEGEN_IA32_H_ | 1112 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |