Chromium Code Reviews| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 | 228 |
| 229 void Ret(); | 229 void Ret(); |
| 230 | 230 |
| 231 struct Unresolved { | 231 struct Unresolved { |
| 232 int pc; | 232 int pc; |
| 233 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. | 233 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. |
| 234 const char* name; | 234 const char* name; |
| 235 }; | 235 }; |
| 236 List<Unresolved>* unresolved() { return &unresolved_; } | 236 List<Unresolved>* unresolved() { return &unresolved_; } |
| 237 | 237 |
| 238 Handle<Object> CodeObject() { | |
|
Kasper Lund
2009/02/25 15:00:19
Fits on one line?
iposva
2009/02/25 16:42:54
Done.
| |
| 239 return code_object_; | |
| 240 } | |
| 241 | |
| 238 | 242 |
| 239 // --------------------------------------------------------------------------- | 243 // --------------------------------------------------------------------------- |
| 240 // StatsCounter support | 244 // StatsCounter support |
| 241 | 245 |
| 242 void SetCounter(StatsCounter* counter, int value); | 246 void SetCounter(StatsCounter* counter, int value); |
| 243 void IncrementCounter(StatsCounter* counter, int value); | 247 void IncrementCounter(StatsCounter* counter, int value); |
| 244 void DecrementCounter(StatsCounter* counter, int value); | 248 void DecrementCounter(StatsCounter* counter, int value); |
| 245 | 249 |
| 246 | 250 |
| 247 // --------------------------------------------------------------------------- | 251 // --------------------------------------------------------------------------- |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 260 // Verify restrictions about code generated in stubs. | 264 // Verify restrictions about code generated in stubs. |
| 261 void set_generating_stub(bool value) { generating_stub_ = value; } | 265 void set_generating_stub(bool value) { generating_stub_ = value; } |
| 262 bool generating_stub() { return generating_stub_; } | 266 bool generating_stub() { return generating_stub_; } |
| 263 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } | 267 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } |
| 264 bool allow_stub_calls() { return allow_stub_calls_; } | 268 bool allow_stub_calls() { return allow_stub_calls_; } |
| 265 | 269 |
| 266 private: | 270 private: |
| 267 List<Unresolved> unresolved_; | 271 List<Unresolved> unresolved_; |
| 268 bool generating_stub_; | 272 bool generating_stub_; |
| 269 bool allow_stub_calls_; | 273 bool allow_stub_calls_; |
| 274 Handle<Object> code_object_; // This handle will be patched with the code | |
| 275 // code object on installation. | |
| 270 | 276 |
| 271 // Helper functions for generating invokes. | 277 // Helper functions for generating invokes. |
| 272 void InvokePrologue(const ParameterCount& expected, | 278 void InvokePrologue(const ParameterCount& expected, |
| 273 const ParameterCount& actual, | 279 const ParameterCount& actual, |
| 274 Handle<Code> code_constant, | 280 Handle<Code> code_constant, |
| 275 const Operand& code_operand, | 281 const Operand& code_operand, |
| 276 Label* done, | 282 Label* done, |
| 277 InvokeFlag flag); | 283 InvokeFlag flag); |
| 278 | 284 |
| 279 // Get the code for the given builtin. Returns if able to resolve | 285 // Get the code for the given builtin. Returns if able to resolve |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 320 Register index, | 326 Register index, |
| 321 ScaleFactor scale, | 327 ScaleFactor scale, |
| 322 int offset) { | 328 int offset) { |
| 323 return Operand(object, index, scale, offset - kHeapObjectTag); | 329 return Operand(object, index, scale, offset - kHeapObjectTag); |
| 324 } | 330 } |
| 325 | 331 |
| 326 | 332 |
| 327 } } // namespace v8::internal | 333 } } // namespace v8::internal |
| 328 | 334 |
| 329 #endif // V8_MACRO_ASSEMBLER_IA32_H_ | 335 #endif // V8_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |