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

Side by Side Diff: src/interface-descriptors.cc

Issue 552803002: Get CallInterfaceDescriptor directly from CodeStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interface-descriptors.h" 7 #include "src/interface-descriptors.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 24 matching lines...) Expand all
35 // If there is a context register, the representation must be tagged. 35 // If there is a context register, the representation must be tagged.
36 DCHECK( 36 DCHECK(
37 i != 0 || 37 i != 0 ||
38 register_param_representations[i].Equals(Representation::Tagged())); 38 register_param_representations[i].Equals(Representation::Tagged()));
39 register_param_representations_[i] = register_param_representations[i]; 39 register_param_representations_[i] = register_param_representations[i];
40 } 40 }
41 } 41 }
42 } 42 }
43 43
44 44
45 const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) {
46 CallInterfaceDescriptorData* start = isolate->call_descriptor_data(0);
47 int index = data_ - start;
48 DCHECK(index < CallDescriptors::NUMBER_OF_DESCRIPTORS);
49 CallDescriptors::Key key = static_cast<CallDescriptors::Key>(index);
50 switch (key) {
51 #define DEF_CASE(NAME) \
52 case CallDescriptors::NAME: \
53 return #NAME " Descriptor";
54 INTERFACE_DESCRIPTOR_LIST(DEF_CASE)
55 #undef DEF_CASE
56 case CallDescriptors::NUMBER_OF_DESCRIPTORS:
57 break;
58 }
59 return "";
60 }
61
62
45 void LoadDescriptor::Initialize(CallInterfaceDescriptorData* data) { 63 void LoadDescriptor::Initialize(CallInterfaceDescriptorData* data) {
46 Register registers[] = {ContextRegister(), ReceiverRegister(), 64 Register registers[] = {ContextRegister(), ReceiverRegister(),
47 NameRegister()}; 65 NameRegister()};
48 data->Initialize(arraysize(registers), registers, NULL); 66 data->Initialize(arraysize(registers), registers, NULL);
49 } 67 }
50 68
51 69
52 void StoreDescriptor::Initialize(CallInterfaceDescriptorData* data) { 70 void StoreDescriptor::Initialize(CallInterfaceDescriptorData* data) {
53 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), 71 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
54 ValueRegister()}; 72 ValueRegister()};
(...skipping 16 matching lines...) Expand all
71 89
72 90
73 void VectorLoadICDescriptor::Initialize(CallInterfaceDescriptorData* data) { 91 void VectorLoadICDescriptor::Initialize(CallInterfaceDescriptorData* data) {
74 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), 92 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
75 SlotRegister(), VectorRegister()}; 93 SlotRegister(), VectorRegister()};
76 data->Initialize(arraysize(registers), registers, NULL); 94 data->Initialize(arraysize(registers), registers, NULL);
77 } 95 }
78 96
79 } 97 }
80 } // namespace v8::internal 98 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698