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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 61893009: Add initial hydrogenized NewStringAddStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case for --new-string-add. Created 7 years, 1 month 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 | « src/isolate.cc ('k') | src/x64/full-codegen-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 Isolate* isolate, 295 Isolate* isolate,
296 CodeStubInterfaceDescriptor* descriptor) { 296 CodeStubInterfaceDescriptor* descriptor) {
297 static Register registers[] = { rax, rbx, rcx, rdx }; 297 static Register registers[] = { rax, rbx, rcx, rdx };
298 descriptor->register_param_count_ = 4; 298 descriptor->register_param_count_ = 4;
299 descriptor->register_params_ = registers; 299 descriptor->register_params_ = registers;
300 descriptor->deoptimization_handler_ = 300 descriptor->deoptimization_handler_ =
301 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss); 301 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss);
302 } 302 }
303 303
304 304
305 void NewStringAddStub::InitializeInterfaceDescriptor(
306 Isolate* isolate,
307 CodeStubInterfaceDescriptor* descriptor) {
308 static Register registers[] = { rdx, rax };
309 descriptor->register_param_count_ = 2;
310 descriptor->register_params_ = registers;
311 descriptor->deoptimization_handler_ =
312 Runtime::FunctionForId(Runtime::kStringAdd)->entry;
313 }
314
315
305 #define __ ACCESS_MASM(masm) 316 #define __ ACCESS_MASM(masm)
306 317
307 318
308 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { 319 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
309 // Update the static counter each time a new code stub is generated. 320 // Update the static counter each time a new code stub is generated.
310 Isolate* isolate = masm->isolate(); 321 Isolate* isolate = masm->isolate();
311 isolate->counters()->code_stubs()->Increment(); 322 isolate->counters()->code_stubs()->Increment();
312 323
313 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); 324 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate);
314 int param_count = descriptor->register_param_count_; 325 int param_count = descriptor->register_param_count_;
(...skipping 5496 matching lines...) Expand 10 before | Expand all | Expand 10 after
5811 __ bind(&fast_elements_case); 5822 __ bind(&fast_elements_case);
5812 GenerateCase(masm, FAST_ELEMENTS); 5823 GenerateCase(masm, FAST_ELEMENTS);
5813 } 5824 }
5814 5825
5815 5826
5816 #undef __ 5827 #undef __
5817 5828
5818 } } // namespace v8::internal 5829 } } // namespace v8::internal
5819 5830
5820 #endif // V8_TARGET_ARCH_X64 5831 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698