| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 void Ret(); | 238 void Ret(); |
| 239 | 239 |
| 240 struct Unresolved { | 240 struct Unresolved { |
| 241 int pc; | 241 int pc; |
| 242 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. | 242 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. |
| 243 const char* name; | 243 const char* name; |
| 244 }; | 244 }; |
| 245 List<Unresolved>* unresolved() { return &unresolved_; } | 245 List<Unresolved>* unresolved() { return &unresolved_; } |
| 246 | 246 |
| 247 Handle<Object> CodeObject() { return code_object_; } |
| 248 |
| 247 | 249 |
| 248 // --------------------------------------------------------------------------- | 250 // --------------------------------------------------------------------------- |
| 249 // StatsCounter support | 251 // StatsCounter support |
| 250 | 252 |
| 251 void SetCounter(StatsCounter* counter, int value); | 253 void SetCounter(StatsCounter* counter, int value); |
| 252 void IncrementCounter(StatsCounter* counter, int value); | 254 void IncrementCounter(StatsCounter* counter, int value); |
| 253 void DecrementCounter(StatsCounter* counter, int value); | 255 void DecrementCounter(StatsCounter* counter, int value); |
| 254 | 256 |
| 255 | 257 |
| 256 // --------------------------------------------------------------------------- | 258 // --------------------------------------------------------------------------- |
| (...skipping 12 matching lines...) Expand all Loading... |
| 269 // Verify restrictions about code generated in stubs. | 271 // Verify restrictions about code generated in stubs. |
| 270 void set_generating_stub(bool value) { generating_stub_ = value; } | 272 void set_generating_stub(bool value) { generating_stub_ = value; } |
| 271 bool generating_stub() { return generating_stub_; } | 273 bool generating_stub() { return generating_stub_; } |
| 272 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } | 274 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } |
| 273 bool allow_stub_calls() { return allow_stub_calls_; } | 275 bool allow_stub_calls() { return allow_stub_calls_; } |
| 274 | 276 |
| 275 private: | 277 private: |
| 276 List<Unresolved> unresolved_; | 278 List<Unresolved> unresolved_; |
| 277 bool generating_stub_; | 279 bool generating_stub_; |
| 278 bool allow_stub_calls_; | 280 bool allow_stub_calls_; |
| 281 Handle<Object> code_object_; // This handle will be patched with the code |
| 282 // code object on installation. |
| 279 | 283 |
| 280 // Helper functions for generating invokes. | 284 // Helper functions for generating invokes. |
| 281 void InvokePrologue(const ParameterCount& expected, | 285 void InvokePrologue(const ParameterCount& expected, |
| 282 const ParameterCount& actual, | 286 const ParameterCount& actual, |
| 283 Handle<Code> code_constant, | 287 Handle<Code> code_constant, |
| 284 const Operand& code_operand, | 288 const Operand& code_operand, |
| 285 Label* done, | 289 Label* done, |
| 286 InvokeFlag flag); | 290 InvokeFlag flag); |
| 287 | 291 |
| 288 // Get the code for the given builtin. Returns if able to resolve | 292 // Get the code for the given builtin. Returns if able to resolve |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 static inline Operand FieldOperand(Register object, | 332 static inline Operand FieldOperand(Register object, |
| 329 Register index, | 333 Register index, |
| 330 ScaleFactor scale, | 334 ScaleFactor scale, |
| 331 int offset) { | 335 int offset) { |
| 332 return Operand(object, index, scale, offset - kHeapObjectTag); | 336 return Operand(object, index, scale, offset - kHeapObjectTag); |
| 333 } | 337 } |
| 334 | 338 |
| 335 } } // namespace v8::internal | 339 } } // namespace v8::internal |
| 336 | 340 |
| 337 #endif // V8_MACRO_ASSEMBLER_IA32_H_ | 341 #endif // V8_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |