OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 | 293 |
294 void VirtualFrame::InvokeBuiltin(Builtins::JavaScript id, | 294 void VirtualFrame::InvokeBuiltin(Builtins::JavaScript id, |
295 InvokeJSFlags flags, | 295 InvokeJSFlags flags, |
296 int arg_count) { | 296 int arg_count) { |
297 Forget(arg_count); | 297 Forget(arg_count); |
298 __ InvokeBuiltin(id, flags); | 298 __ InvokeBuiltin(id, flags); |
299 } | 299 } |
300 | 300 |
301 | 301 |
| 302 void VirtualFrame::CallLoadIC(RelocInfo::Mode mode, bool load_inlined) { |
| 303 // If a nop is generated later make sure the it follows the call directly. |
| 304 Assembler::BlockConstPoolScope block_const_pool(masm()); |
| 305 |
| 306 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); |
| 307 CallCodeObject(ic, mode, 0); |
| 308 if (!load_inlined) { |
| 309 // A B instruction following the call signals that the load was inlined. |
| 310 // Ensure that there is not a B instruction here. |
| 311 __ nop(); |
| 312 } |
| 313 } |
| 314 |
| 315 |
302 void VirtualFrame::CallCodeObject(Handle<Code> code, | 316 void VirtualFrame::CallCodeObject(Handle<Code> code, |
303 RelocInfo::Mode rmode, | 317 RelocInfo::Mode rmode, |
304 int dropped_args) { | 318 int dropped_args) { |
305 switch (code->kind()) { | 319 switch (code->kind()) { |
306 case Code::CALL_IC: | 320 case Code::CALL_IC: |
307 case Code::FUNCTION: | 321 case Code::FUNCTION: |
308 break; | 322 break; |
309 case Code::KEYED_LOAD_IC: | 323 case Code::KEYED_LOAD_IC: |
310 case Code::LOAD_IC: | 324 case Code::LOAD_IC: |
311 case Code::KEYED_STORE_IC: | 325 case Code::KEYED_STORE_IC: |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 default: | 524 default: |
511 UNREACHABLE(); | 525 UNREACHABLE(); |
512 break; | 526 break; |
513 } | 527 } |
514 ASSERT(register_allocation_map_ == 0); // Not yet implemented. | 528 ASSERT(register_allocation_map_ == 0); // Not yet implemented. |
515 } | 529 } |
516 | 530 |
517 #undef __ | 531 #undef __ |
518 | 532 |
519 } } // namespace v8::internal | 533 } } // namespace v8::internal |
OLD | NEW |