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

Side by Side Diff: src/ia32/code-stubs-ia32.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/hydrogen-instructions.h ('k') | src/ia32/full-codegen-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 CodeStubInterfaceDescriptor* descriptor) { 299 CodeStubInterfaceDescriptor* descriptor) {
300 static Register registers[] = { edx, eax }; 300 static Register registers[] = { edx, eax };
301 descriptor->register_param_count_ = 2; 301 descriptor->register_param_count_ = 2;
302 descriptor->register_params_ = registers; 302 descriptor->register_params_ = registers;
303 descriptor->deoptimization_handler_ = FUNCTION_ADDR(BinaryOpIC_Miss); 303 descriptor->deoptimization_handler_ = FUNCTION_ADDR(BinaryOpIC_Miss);
304 descriptor->SetMissHandler( 304 descriptor->SetMissHandler(
305 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate)); 305 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate));
306 } 306 }
307 307
308 308
309 void NewStringAddStub::InitializeInterfaceDescriptor(
310 Isolate* isolate,
311 CodeStubInterfaceDescriptor* descriptor) {
312 static Register registers[] = { edx, eax };
313 descriptor->register_param_count_ = 2;
314 descriptor->register_params_ = registers;
315 descriptor->deoptimization_handler_ =
316 Runtime::FunctionForId(Runtime::kStringAdd)->entry;
317 }
318
319
309 #define __ ACCESS_MASM(masm) 320 #define __ ACCESS_MASM(masm)
310 321
311 322
312 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { 323 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
313 // Update the static counter each time a new code stub is generated. 324 // Update the static counter each time a new code stub is generated.
314 Isolate* isolate = masm->isolate(); 325 Isolate* isolate = masm->isolate();
315 isolate->counters()->code_stubs()->Increment(); 326 isolate->counters()->code_stubs()->Increment();
316 327
317 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); 328 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate);
318 int param_count = descriptor->register_param_count_; 329 int param_count = descriptor->register_param_count_;
(...skipping 5682 matching lines...) Expand 10 before | Expand all | Expand 10 after
6001 __ bind(&fast_elements_case); 6012 __ bind(&fast_elements_case);
6002 GenerateCase(masm, FAST_ELEMENTS); 6013 GenerateCase(masm, FAST_ELEMENTS);
6003 } 6014 }
6004 6015
6005 6016
6006 #undef __ 6017 #undef __
6007 6018
6008 } } // namespace v8::internal 6019 } } // namespace v8::internal
6009 6020
6010 #endif // V8_TARGET_ARCH_IA32 6021 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698