Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: src/arm/codegen-arm.cc

Issue 1937003: Pass key in register for keyed load IC... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/debug-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 5373 matching lines...) Expand 10 before | Expand all | Expand 10 after
5384 5384
5385 5385
5386 void DeferredReferenceGetKeyedValue::Generate() { 5386 void DeferredReferenceGetKeyedValue::Generate() {
5387 Register scratch1 = VirtualFrame::scratch0(); 5387 Register scratch1 = VirtualFrame::scratch0();
5388 Register scratch2 = VirtualFrame::scratch1(); 5388 Register scratch2 = VirtualFrame::scratch1();
5389 __ DecrementCounter(&Counters::keyed_load_inline, 1, scratch1, scratch2); 5389 __ DecrementCounter(&Counters::keyed_load_inline, 1, scratch1, scratch2);
5390 __ IncrementCounter(&Counters::keyed_load_inline_miss, 1, scratch1, scratch2); 5390 __ IncrementCounter(&Counters::keyed_load_inline_miss, 1, scratch1, scratch2);
5391 5391
5392 // The rest of the instructions in the deferred code must be together. 5392 // The rest of the instructions in the deferred code must be together.
5393 { Assembler::BlockConstPoolScope block_const_pool(masm_); 5393 { Assembler::BlockConstPoolScope block_const_pool(masm_);
5394 // Call keyed load IC. It has all arguments on the stack. 5394 // Call keyed load IC. It has all arguments on the stack and the key in r0.
5395 __ ldr(r0, MemOperand(sp, 0));
5395 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); 5396 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
5396 __ Call(ic, RelocInfo::CODE_TARGET); 5397 __ Call(ic, RelocInfo::CODE_TARGET);
5397 // The call must be followed by a nop instruction to indicate that the 5398 // The call must be followed by a nop instruction to indicate that the
5398 // keyed load has been inlined. 5399 // keyed load has been inlined.
5399 __ nop(PROPERTY_ACCESS_INLINED); 5400 __ nop(PROPERTY_ACCESS_INLINED);
5400 5401
5401 // Block the constant pool for one more instruction after leaving this 5402 // Block the constant pool for one more instruction after leaving this
5402 // constant pool block scope to include the branch instruction ending the 5403 // constant pool block scope to include the branch instruction ending the
5403 // deferred code. 5404 // deferred code.
5404 __ BlockConstPoolFor(1); 5405 __ BlockConstPoolFor(1);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
5507 int expected_height = frame_->height() - (is_contextual ? 1 : 2); 5508 int expected_height = frame_->height() - (is_contextual ? 1 : 2);
5508 #endif 5509 #endif
5509 frame_->CallStoreIC(name, is_contextual); 5510 frame_->CallStoreIC(name, is_contextual);
5510 5511
5511 ASSERT_EQ(expected_height, frame_->height()); 5512 ASSERT_EQ(expected_height, frame_->height());
5512 } 5513 }
5513 5514
5514 5515
5515 void CodeGenerator::EmitKeyedLoad() { 5516 void CodeGenerator::EmitKeyedLoad() {
5516 if (loop_nesting() == 0) { 5517 if (loop_nesting() == 0) {
5517 VirtualFrame::SpilledScope spilled(frame_);
5518 Comment cmnt(masm_, "[ Load from keyed property"); 5518 Comment cmnt(masm_, "[ Load from keyed property");
5519 frame_->CallKeyedLoadIC(); 5519 frame_->CallKeyedLoadIC();
5520 } else { 5520 } else {
5521 // Inline the keyed load. 5521 // Inline the keyed load.
5522 Comment cmnt(masm_, "[ Inlined load from keyed property"); 5522 Comment cmnt(masm_, "[ Inlined load from keyed property");
5523 5523
5524 // Counter will be decremented in the deferred code. Placed here to avoid 5524 // Counter will be decremented in the deferred code. Placed here to avoid
5525 // having it in the instruction stream below where patching will occur. 5525 // having it in the instruction stream below where patching will occur.
5526 __ IncrementCounter(&Counters::keyed_load_inline, 1, 5526 __ IncrementCounter(&Counters::keyed_load_inline, 1,
5527 frame_->scratch0(), frame_->scratch1()); 5527 frame_->scratch0(), frame_->scratch1());
(...skipping 4344 matching lines...) Expand 10 before | Expand all | Expand 10 after
9872 9872
9873 // Just jump to runtime to add the two strings. 9873 // Just jump to runtime to add the two strings.
9874 __ bind(&string_add_runtime); 9874 __ bind(&string_add_runtime);
9875 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); 9875 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
9876 } 9876 }
9877 9877
9878 9878
9879 #undef __ 9879 #undef __
9880 9880
9881 } } // namespace v8::internal 9881 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/debug-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698