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

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: Addressed code review comments 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
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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 Isolate* isolate, 346 Isolate* isolate,
347 CodeStubInterfaceDescriptor* descriptor) { 347 CodeStubInterfaceDescriptor* descriptor) {
348 static Register registers[] = { edx, eax }; 348 static Register registers[] = { edx, eax };
349 descriptor->register_param_count_ = 2; 349 descriptor->register_param_count_ = 2;
350 descriptor->register_params_ = registers; 350 descriptor->register_params_ = registers;
351 descriptor->deoptimization_handler_ = 351 descriptor->deoptimization_handler_ =
352 Runtime::FunctionForId(Runtime::kStringAdd)->entry; 352 Runtime::FunctionForId(Runtime::kStringAdd)->entry;
353 } 353 }
354 354
355 355
356 void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
357 {
358 CallInterfaceDescriptor* descriptor =
359 isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
360 static Register registers[] = { edi, // JSFunction
361 esi, // context
362 ecx, // call kind
363 eax, // actual number of arguments
364 ebx, // expected number of arguments
365 };
366 static Representation representations[] = {
367 Representation::Tagged(), // JSFunction
368 Representation::Tagged(), // context
369 Representation::Smi(), // call kind
370 Representation::Integer32(), // actual number of arguments
371 Representation::Integer32(), // expected number of arguments
372 };
373 descriptor->register_param_count_ = 5;
374 descriptor->register_params_ = registers;
375 descriptor->param_representations_ = representations;
376 }
377 {
378 CallInterfaceDescriptor* descriptor =
379 isolate->call_descriptor(Isolate::KeyedCall);
380 static Register registers[] = { esi, // context
381 ecx, // key
382 };
383 static Representation representations[] = {
384 Representation::Tagged(), // context
385 Representation::Tagged(), // key
386 };
387 descriptor->register_param_count_ = 2;
388 descriptor->register_params_ = registers;
389 descriptor->param_representations_ = representations;
390 }
391 {
392 CallInterfaceDescriptor* descriptor =
393 isolate->call_descriptor(Isolate::NamedCall);
394 static Register registers[] = { esi, // context
395 ecx, // name
396 };
397 static Representation representations[] = {
398 Representation::Tagged(), // context
399 Representation::Tagged(), // name
400 };
401 descriptor->register_param_count_ = 2;
402 descriptor->register_params_ = registers;
403 descriptor->param_representations_ = representations;
404 }
405 }
406
407
356 #define __ ACCESS_MASM(masm) 408 #define __ ACCESS_MASM(masm)
357 409
358 410
359 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { 411 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
360 // Update the static counter each time a new code stub is generated. 412 // Update the static counter each time a new code stub is generated.
361 Isolate* isolate = masm->isolate(); 413 Isolate* isolate = masm->isolate();
362 isolate->counters()->code_stubs()->Increment(); 414 isolate->counters()->code_stubs()->Increment();
363 415
364 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); 416 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate);
365 int param_count = descriptor->register_param_count_; 417 int param_count = descriptor->register_param_count_;
(...skipping 5305 matching lines...) Expand 10 before | Expand all | Expand 10 after
5671 __ bind(&fast_elements_case); 5723 __ bind(&fast_elements_case);
5672 GenerateCase(masm, FAST_ELEMENTS); 5724 GenerateCase(masm, FAST_ELEMENTS);
5673 } 5725 }
5674 5726
5675 5727
5676 #undef __ 5728 #undef __
5677 5729
5678 } } // namespace v8::internal 5730 } } // namespace v8::internal
5679 5731
5680 #endif // V8_TARGET_ARCH_IA32 5732 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698