| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 void VirtualFrame::CallLoadIC(Handle<String> name, RelocInfo::Mode mode) { | 323 void VirtualFrame::CallLoadIC(Handle<String> name, RelocInfo::Mode mode) { |
| 324 Handle<Code> ic(Isolate::Current()->builtins()->builtin( | 324 Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
| 325 Builtins::LoadIC_Initialize)); | 325 Builtins::LoadIC_Initialize)); |
| 326 PopToR0(); | 326 PopToR0(); |
| 327 SpillAll(); | 327 SpillAll(); |
| 328 __ mov(r2, Operand(name)); | 328 __ mov(r2, Operand(name)); |
| 329 CallCodeObject(ic, mode, 0); | 329 CallCodeObject(ic, mode, 0); |
| 330 } | 330 } |
| 331 | 331 |
| 332 | 332 |
| 333 void VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) { | 333 void VirtualFrame::CallStoreIC(Handle<String> name, |
| 334 bool is_contextual, |
| 335 StrictModeFlag strict_mode) { |
| 334 Handle<Code> ic(Isolate::Current()->builtins()->builtin( | 336 Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
| 335 Builtins::StoreIC_Initialize)); | 337 (strict_mode == kStrictMode) ? Builtins::StoreIC_Initialize_Strict |
| 338 : Builtins::StoreIC_Initialize)); |
| 336 PopToR0(); | 339 PopToR0(); |
| 340 RelocInfo::Mode mode; |
| 337 if (is_contextual) { | 341 if (is_contextual) { |
| 338 SpillAll(); | 342 SpillAll(); |
| 339 __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); | 343 __ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
| 344 mode = RelocInfo::CODE_TARGET_CONTEXT; |
| 340 } else { | 345 } else { |
| 341 EmitPop(r1); | 346 EmitPop(r1); |
| 342 SpillAll(); | 347 SpillAll(); |
| 348 mode = RelocInfo::CODE_TARGET; |
| 343 } | 349 } |
| 344 __ mov(r2, Operand(name)); | 350 __ mov(r2, Operand(name)); |
| 345 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); | 351 CallCodeObject(ic, mode, 0); |
| 346 } | 352 } |
| 347 | 353 |
| 348 | 354 |
| 349 void VirtualFrame::CallKeyedLoadIC() { | 355 void VirtualFrame::CallKeyedLoadIC() { |
| 350 Handle<Code> ic(Isolate::Current()->builtins()->builtin( | 356 Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
| 351 Builtins::KeyedLoadIC_Initialize)); | 357 Builtins::KeyedLoadIC_Initialize)); |
| 352 PopToR1R0(); | 358 PopToR1R0(); |
| 353 SpillAll(); | 359 SpillAll(); |
| 354 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); | 360 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); |
| 355 } | 361 } |
| 356 | 362 |
| 357 | 363 |
| 358 void VirtualFrame::CallKeyedStoreIC() { | 364 void VirtualFrame::CallKeyedStoreIC(StrictModeFlag strict_mode) { |
| 359 Handle<Code> ic(Isolate::Current()->builtins()->builtin( | 365 Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
| 360 Builtins::KeyedStoreIC_Initialize)); | 366 (strict_mode == kStrictMode) ? Builtins::KeyedStoreIC_Initialize_Strict |
| 367 : Builtins::KeyedStoreIC_Initialize)); |
| 361 PopToR1R0(); | 368 PopToR1R0(); |
| 362 SpillAll(); | 369 SpillAll(); |
| 363 EmitPop(r2); | 370 EmitPop(r2); |
| 364 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); | 371 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); |
| 365 } | 372 } |
| 366 | 373 |
| 367 | 374 |
| 368 void VirtualFrame::CallCodeObject(Handle<Code> code, | 375 void VirtualFrame::CallCodeObject(Handle<Code> code, |
| 369 RelocInfo::Mode rmode, | 376 RelocInfo::Mode rmode, |
| 370 int dropped_args) { | 377 int dropped_args) { |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 break; | 834 break; |
| 828 } | 835 } |
| 829 ASSERT(register_allocation_map_ == 0); // Not yet implemented. | 836 ASSERT(register_allocation_map_ == 0); // Not yet implemented. |
| 830 } | 837 } |
| 831 | 838 |
| 832 #undef __ | 839 #undef __ |
| 833 | 840 |
| 834 } } // namespace v8::internal | 841 } } // namespace v8::internal |
| 835 | 842 |
| 836 #endif // V8_TARGET_ARCH_ARM | 843 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |