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

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

Issue 104663004: Preview of a first step towards unification of hydrogen calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge fix Created 6 years, 11 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 | « src/ia32/builtins-ia32.cc ('k') | src/ia32/lithium-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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 Isolate* isolate, 357 Isolate* isolate,
358 CodeStubInterfaceDescriptor* descriptor) { 358 CodeStubInterfaceDescriptor* descriptor) {
359 static Register registers[] = { edx, eax }; 359 static Register registers[] = { edx, eax };
360 descriptor->register_param_count_ = 2; 360 descriptor->register_param_count_ = 2;
361 descriptor->register_params_ = registers; 361 descriptor->register_params_ = registers;
362 descriptor->deoptimization_handler_ = 362 descriptor->deoptimization_handler_ =
363 Runtime::FunctionForId(Runtime::kStringAdd)->entry; 363 Runtime::FunctionForId(Runtime::kStringAdd)->entry;
364 } 364 }
365 365
366 366
367 void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
368 {
369 CallInterfaceDescriptor* descriptor =
370 isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
371 static Register registers[] = { edi, // JSFunction
372 esi, // context
373 eax, // actual number of arguments
374 ebx, // expected number of arguments
375 };
376 static Representation representations[] = {
377 Representation::Tagged(), // JSFunction
378 Representation::Tagged(), // context
379 Representation::Integer32(), // actual number of arguments
380 Representation::Integer32(), // expected number of arguments
381 };
382 descriptor->register_param_count_ = 4;
383 descriptor->register_params_ = registers;
384 descriptor->param_representations_ = representations;
385 }
386 {
387 CallInterfaceDescriptor* descriptor =
388 isolate->call_descriptor(Isolate::KeyedCall);
389 static Register registers[] = { esi, // context
390 ecx, // key
391 };
392 static Representation representations[] = {
393 Representation::Tagged(), // context
394 Representation::Tagged(), // key
395 };
396 descriptor->register_param_count_ = 2;
397 descriptor->register_params_ = registers;
398 descriptor->param_representations_ = representations;
399 }
400 {
401 CallInterfaceDescriptor* descriptor =
402 isolate->call_descriptor(Isolate::NamedCall);
403 static Register registers[] = { esi, // context
404 ecx, // name
405 };
406 static Representation representations[] = {
407 Representation::Tagged(), // context
408 Representation::Tagged(), // name
409 };
410 descriptor->register_param_count_ = 2;
411 descriptor->register_params_ = registers;
412 descriptor->param_representations_ = representations;
413 }
414 }
415
416
367 #define __ ACCESS_MASM(masm) 417 #define __ ACCESS_MASM(masm)
368 418
369 419
370 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { 420 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
371 // Update the static counter each time a new code stub is generated. 421 // Update the static counter each time a new code stub is generated.
372 Isolate* isolate = masm->isolate(); 422 Isolate* isolate = masm->isolate();
373 isolate->counters()->code_stubs()->Increment(); 423 isolate->counters()->code_stubs()->Increment();
374 424
375 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); 425 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate);
376 int param_count = descriptor->register_param_count_; 426 int param_count = descriptor->register_param_count_;
(...skipping 5292 matching lines...) Expand 10 before | Expand all | Expand 10 after
5669 __ bind(&fast_elements_case); 5719 __ bind(&fast_elements_case);
5670 GenerateCase(masm, FAST_ELEMENTS); 5720 GenerateCase(masm, FAST_ELEMENTS);
5671 } 5721 }
5672 5722
5673 5723
5674 #undef __ 5724 #undef __
5675 5725
5676 } } // namespace v8::internal 5726 } } // namespace v8::internal
5677 5727
5678 #endif // V8_TARGET_ARCH_IA32 5728 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698