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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 // setup the function in r1. | 223 // setup the function in r1. |
| 224 void GetBuiltinEntry(Register target, Builtins::JavaScript id); | 224 void GetBuiltinEntry(Register target, Builtins::JavaScript id); |
| 225 | 225 |
| 226 struct Unresolved { | 226 struct Unresolved { |
| 227 int pc; | 227 int pc; |
| 228 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. | 228 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. |
| 229 const char* name; | 229 const char* name; |
| 230 }; | 230 }; |
| 231 List<Unresolved>* unresolved() { return &unresolved_; } | 231 List<Unresolved>* unresolved() { return &unresolved_; } |
| 232 | 232 |
| 233 Handle<Object> CodeObject() { | |
|
Kasper Lund
2009/02/25 15:00:19
Fits on one line?
iposva
2009/02/25 16:42:54
Done.
| |
| 234 return code_object_; | |
| 235 } | |
| 236 | |
| 233 | 237 |
| 234 // --------------------------------------------------------------------------- | 238 // --------------------------------------------------------------------------- |
| 235 // StatsCounter support | 239 // StatsCounter support |
| 236 | 240 |
| 237 void SetCounter(StatsCounter* counter, int value, | 241 void SetCounter(StatsCounter* counter, int value, |
| 238 Register scratch1, Register scratch2); | 242 Register scratch1, Register scratch2); |
| 239 void IncrementCounter(StatsCounter* counter, int value, | 243 void IncrementCounter(StatsCounter* counter, int value, |
| 240 Register scratch1, Register scratch2); | 244 Register scratch1, Register scratch2); |
| 241 void DecrementCounter(StatsCounter* counter, int value, | 245 void DecrementCounter(StatsCounter* counter, int value, |
| 242 Register scratch1, Register scratch2); | 246 Register scratch1, Register scratch2); |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 258 // Verify restrictions about code generated in stubs. | 262 // Verify restrictions about code generated in stubs. |
| 259 void set_generating_stub(bool value) { generating_stub_ = value; } | 263 void set_generating_stub(bool value) { generating_stub_ = value; } |
| 260 bool generating_stub() { return generating_stub_; } | 264 bool generating_stub() { return generating_stub_; } |
| 261 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } | 265 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } |
| 262 bool allow_stub_calls() { return allow_stub_calls_; } | 266 bool allow_stub_calls() { return allow_stub_calls_; } |
| 263 | 267 |
| 264 private: | 268 private: |
| 265 List<Unresolved> unresolved_; | 269 List<Unresolved> unresolved_; |
| 266 bool generating_stub_; | 270 bool generating_stub_; |
| 267 bool allow_stub_calls_; | 271 bool allow_stub_calls_; |
| 272 Handle<Object> code_object_; // This handle will be patched with the code | |
| 273 // object on installation. | |
| 268 | 274 |
| 269 // Helper functions for generating invokes. | 275 // Helper functions for generating invokes. |
| 270 void InvokePrologue(const ParameterCount& expected, | 276 void InvokePrologue(const ParameterCount& expected, |
| 271 const ParameterCount& actual, | 277 const ParameterCount& actual, |
| 272 Handle<Code> code_constant, | 278 Handle<Code> code_constant, |
| 273 Register code_reg, | 279 Register code_reg, |
| 274 Label* done, | 280 Label* done, |
| 275 InvokeFlag flag); | 281 InvokeFlag flag); |
| 276 | 282 |
| 277 // Get the code for the given builtin. Returns if able to resolve | 283 // Get the code for the given builtin. Returns if able to resolve |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 290 // Generate a MemOperand for loading a field from an object. | 296 // Generate a MemOperand for loading a field from an object. |
| 291 static inline MemOperand FieldMemOperand(Register object, int offset) { | 297 static inline MemOperand FieldMemOperand(Register object, int offset) { |
| 292 return MemOperand(object, offset - kHeapObjectTag); | 298 return MemOperand(object, offset - kHeapObjectTag); |
| 293 } | 299 } |
| 294 | 300 |
| 295 | 301 |
| 296 | 302 |
| 297 } } // namespace v8::internal | 303 } } // namespace v8::internal |
| 298 | 304 |
| 299 #endif // V8_MACRO_ASSEMBLER_ARM_H_ | 305 #endif // V8_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |